Commit f8b67718 authored by Jack Jansen's avatar Jack Jansen

Experimental feature: allow \n as well as \r as newline for text files, by...

Experimental feature: allow \n as well as \r as newline for text files, by breaking in to the lowlevel I/O system. Can be disabled by defining WITHOUT_UNIX_NEWLINES.
parent ec076e00
......@@ -179,6 +179,23 @@ 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment