Fred Drake [Mon, 24 Jul 2000 23:03:32 +0000 (23:03 +0000)]
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.
Jack Jansen [Mon, 24 Jul 2000 19:50:16 +0000 (19:50 +0000)]
Added PyMac_getscript() which returns the pythonic name of the current script. Not ideal and not complete, but good enough for the time being. Idea and most of the code by Fredrik Lund.
Jack Jansen [Mon, 24 Jul 2000 19:44:17 +0000 (19:44 +0000)]
Added a "compile-time" flag PPC_ONLY, if set we make ppc-only applications without posting the dialog. This is the normal situation since 1.6alfa (no more 68k support).
Thomas Wouters [Mon, 24 Jul 2000 16:06:23 +0000 (16:06 +0000)]
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.
Fred Drake [Mon, 24 Jul 2000 06:55:00 +0000 (06:55 +0000)]
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.
Fredrik Lundh [Sun, 23 Jul 2000 21:46:17 +0000 (21:46 +0000)]
-- 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
Tim Peters [Sun, 23 Jul 2000 21:18:09 +0000 (21:18 +0000)]
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).
Fredrik Lundh [Sun, 23 Jul 2000 19:47:12 +0000 (19:47 +0000)]
-- 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)
Tim Peters [Sun, 23 Jul 2000 19:28:35 +0000 (19:28 +0000)]
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.
Tim Peters [Sun, 23 Jul 2000 18:10:18 +0000 (18:10 +0000)]
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.
Thomas Wouters [Sun, 23 Jul 2000 09:20:08 +0000 (09:20 +0000)]
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.)
Thomas Wouters [Sat, 22 Jul 2000 23:56:07 +0000 (23:56 +0000)]
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.
Thomas Wouters [Sat, 22 Jul 2000 23:51:19 +0000 (23:51 +0000)]
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.
Thomas Wouters [Sat, 22 Jul 2000 23:49:30 +0000 (23:49 +0000)]
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.
Thomas Wouters [Sat, 22 Jul 2000 23:33:22 +0000 (23:33 +0000)]
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.
Thomas Wouters [Sat, 22 Jul 2000 19:25:51 +0000 (19:25 +0000)]
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
Thomas Wouters [Sat, 22 Jul 2000 19:20:54 +0000 (19:20 +0000)]
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.
Thomas Wouters [Fri, 21 Jul 2000 06:00:07 +0000 (06:00 +0000)]
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 ;)
Jack Jansen [Tue, 18 Jul 2000 09:40:39 +0000 (09:40 +0000)]
MacPython on MacOSX DP4 gets started in the wrong directory. The workaround (ifdeffed by USE_ARGV0_CHDIR) is to do a chdir() to the folder part of our executable name.
Thomas Wouters [Sun, 16 Jul 2000 19:01:10 +0000 (19:01 +0000)]
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.
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.)
Thomas Wouters [Sun, 16 Jul 2000 12:04:32 +0000 (12:04 +0000)]
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 ;)
Jack Jansen [Fri, 14 Jul 2000 22:16:45 +0000 (22:16 +0000)]
pymactoolbox.h contains protoypes for all externally visible toolbox module
functions. Include it in stead of duplicating the declarations everywhere. Also
cleaned up toolbox module exports, and got rid of resNotFound error.