mirror of
https://github.com/python/cpython.git
synced 2025-09-14 04:37:29 +00:00
Added preferences/startup options for division warning
and accepting unix-style newlines on input. Also (finally) added a startup option to get -vv behaviour. Moved __convert_to_newlines to main.c because that's easier with the newline option.
This commit is contained in:
parent
a5ffeb69ab
commit
ff5d8aaa28
2 changed files with 37 additions and 23 deletions
|
@ -179,23 +179,6 @@ static PyObject *python_event_handler;
|
|||
*/
|
||||
int PyMac_AppearanceCompliant;
|
||||
|
||||
#ifndef WITHOUT_UNIX_NEWLINES
|
||||
/*
|
||||
** Experimental feature (for 2.2a2): allow unix newlines
|
||||
** as well as Mac newlines on input. We replace a lowlevel
|
||||
** MSL routine to accomplish this
|
||||
*/
|
||||
void
|
||||
__convert_to_newlines(unsigned char * buf, size_t * n_ptr)
|
||||
{
|
||||
unsigned char *p;
|
||||
size_t n = *n_ptr;
|
||||
|
||||
for(p=buf; n > 0; p++, n--)
|
||||
if ( *p == '\r' ) *p = '\n';
|
||||
}
|
||||
#endif /* WITHOUT_UNIX_NEWLINES */
|
||||
|
||||
/* Given an FSSpec, return the FSSpec of the parent folder */
|
||||
|
||||
static OSErr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue