Commit graph

1661 commits

Author SHA1 Message Date
Fredrik Lundh 56055a4749 -- 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)
2000-07-23 19:47:12 +00:00
Tim Peters e21107145a Missed a return from a signal handler -- thanks to /F for pointing
it out!
2000-07-23 18:33:52 +00:00
Tim Peters 1be46844d9 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.
2000-07-23 18:10:18 +00:00
Thomas Wouters 53e7fd77a7 Fix prototypes generated by makesetup, so they include '(void)' rather than
empty argumentlists.
2000-07-23 00:02:15 +00:00
Thomas Wouters bd4bc4e9e9 Even more ANSIfication: fix as many function pointers and declarations as
possible.
2000-07-22 23:57:55 +00:00
Thomas Wouters 3b6448fbae 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.
2000-07-22 23:56:07 +00:00
Thomas Wouters 2c46eaf8e9 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.
2000-07-22 23:51:19 +00:00
Thomas Wouters 0796b00279 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.
2000-07-22 23:49:30 +00:00
Thomas Wouters ba48a3f3ff Remove unused variable. 2000-07-22 16:41:08 +00:00
Thomas Wouters 1bc8c1eb83 Remove unused helper-function 'posix_strint'. 2000-07-22 16:39:39 +00:00
Thomas Wouters 3531730a68 Mark Favas's fix for typos in docstrings. 2000-07-22 16:34:15 +00:00
Thomas Wouters f3f33dcf03 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 ;)
2000-07-21 06:00:07 +00:00
Skip Montanaro 49bd24d4e4 added history file truncation based upon code from Johannes Zellner. 2000-07-19 16:54:53 +00:00
Thomas Wouters 616607a987 ANSIfy the just-checked-in isatty() wrapper. 2000-07-19 14:45:40 +00:00
Skip Montanaro 1517d842b6 new method isatty from Thomas Wouters 2000-07-19 14:34:14 +00:00
Thomas Wouters 7e47402264 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 ;)
2000-07-16 12:04:32 +00:00
Jack Jansen 307d7a426f Implemented getdefaultlocale() for macintosh, after an idea by Fredrik. 2000-07-15 22:31:45 +00:00
Thomas Wouters 70c21a1603 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
2000-07-14 14:28:33 +00:00
Andrew M. Kuchling 9f28a039f6 Use PyObject_AsFileDescriptor 2000-07-13 23:59:35 +00:00
Peter Schneider-Kamp 9656abd913 ANSI-fication (got lost in the deep seas of source forge <wink>) 2000-07-13 21:10:57 +00:00
Andrew M. Kuchling 8d2f2b2db2 From Sam Rushing's Medusa, via SF patch #100858: add & document
os.seteuid(), os.setegid(), os.setreuid(), os.setregid().
2000-07-13 01:26:58 +00:00
Jeremy Hylton 03657cfdb0 replace PyXXX_Length calls with PyXXX_Size calls 2000-07-12 13:05:33 +00:00
Guido van Rossum 3f2fa0a53d Add "exceptions" to list of built-in modules for the sake of
sys.builtin_module_names.  (Noticed by Toby Dickenson.)
2000-07-12 12:09:05 +00:00
Sjoerd Mullender 0ae528447f Fixed up some ANSIfications. 2000-07-12 10:43:11 +00:00
Barry Warsaw 35e459c3eb 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).
2000-07-12 05:18:36 +00:00
Fred Drake 0582df98d3 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.
2000-07-12 04:49:00 +00:00
Fred Drake cc1be2401e Always use the :funcname part of the format specifier for PyArg_ParseTuple()
so we get better error messages.
2000-07-12 04:42:23 +00:00
Andrew M. Kuchling c72c3bed77 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
2000-07-12 01:27:18 +00:00
Andrew M. Kuchling a4e75d74f8 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.)
2000-07-12 00:53:41 +00:00
Vladimir Marangozov 9e3d73af93 Fix mixed mallocs: re->re_patbuf.buffer is allocated with std malloc(). 2000-07-12 00:49:17 +00:00
Peter Schneider-Kamp 618e25dfdf Errare humanum est.
Changed parameter in getsockaddrlen from unsigned to socklen_t.
2000-07-11 23:00:12 +00:00
Jack Jansen e4b4863296 One more include of limits.h (possibly to be moved elsewhere when there is
consensus where it should go).
2000-07-11 21:35:02 +00:00
Jeremy Hylton 672fac0d65 satisfy the -Wall: remove two unused local variables and unused ins function 2000-07-11 20:30:05 +00:00
Peter Schneider-Kamp 88e1932930 fixed a warning in getsockaddrlen 2000-07-11 17:40:30 +00:00
Fred Drake b35de5b78a Neil Schemenauer <nascheme@enme.ucalgary.ca>:
Change a cast, intialize a local, and make some sprintf() format strings
type-appropriate (add the "l" to "%d").

Closes SourceForge patch #100737.
2000-07-11 14:37:41 +00:00
Tim Peters dc0c031ad8 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!
2000-07-10 22:41:30 +00:00
Peter Schneider-Kamp 3e3175b5e7 ANSI-fication (fixed on parameter list I messed up in the patch) 2000-07-10 17:25:37 +00:00
Peter Schneider-Kamp 8bc8f0d036 ANSI-fication 2000-07-10 17:15:07 +00:00
Peter Schneider-Kamp 3646366f4c ANSI-fication, added #ifdef construction in mpz_coerce 2000-07-10 17:14:00 +00:00
Peter Schneider-Kamp cb27c35aa6 ANSI-fication, not really tested, but should (hopefully) compile 2000-07-10 17:06:38 +00:00
Peter Schneider-Kamp 6a85027a97 ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
have already been checked in)

UNTESTED!
2000-07-10 17:04:33 +00:00
Fredrik Lundh 10723347c6 - stupid typo. 2000-07-10 16:38:09 +00:00
Fredrik Lundh 44328e60df -- get rid of a compiler warning on unix. (as reported
for #100836, but implemented in a different way)
2000-07-10 15:59:30 +00:00
Peter Schneider-Kamp 39e0e5a180 ANSI-fication 2000-07-10 13:12:27 +00:00
Peter Schneider-Kamp 7d0c71ac8c ANSI-fication 2000-07-10 13:05:29 +00:00
Peter Schneider-Kamp 286da3b46a ANSI-fying
added excplicit node * parameter to termvalid argument in
validate_two_chain_ops of parsermodule.c (as proposed by fred)
2000-07-10 12:43:58 +00:00
Peter Schneider-Kamp 41c36ffe83 ANSI-fication 2000-07-10 12:29:26 +00:00
Peter Schneider-Kamp 416d413527 ANSI-fication 2000-07-10 12:15:54 +00:00
Peter Schneider-Kamp e89b15691e ANSI-fication 2000-07-10 12:04:18 +00:00
Peter Schneider-Kamp c4bc0e0895 ANSI-fication 2000-07-10 11:56:03 +00:00