summaryrefslogtreecommitdiffstats
path: root/Mac/Python
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-04-14 20:12:41 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-04-14 20:12:41 (GMT)
commit7b8c7546ebc1fc3688ef95768fa8b82f0f205490 (patch)
tree2e14b243347a9c38c82e2e774d4b201f23149916 /Mac/Python
parentdcd2dc2fffce8614c5d2b8d303a303a599b88a23 (diff)
downloadcpython-7b8c7546ebc1fc3688ef95768fa8b82f0f205490.zip
cpython-7b8c7546ebc1fc3688ef95768fa8b82f0f205490.tar.gz
cpython-7b8c7546ebc1fc3688ef95768fa8b82f0f205490.tar.bz2
Mass checkin of universal newline support.
Highlights: import and friends will understand any of \r, \n and \r\n as end of line. Python file input will do the same if you use mode 'U'. Everything can be disabled by configuring with --without-universal-newlines. See PEP278 for details.
Diffstat (limited to 'Mac/Python')
-rw-r--r--Mac/Python/macmain.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Mac/Python/macmain.c b/Mac/Python/macmain.c
index 8b38a2c..a4f7dc4 100644
--- a/Mac/Python/macmain.c
+++ b/Mac/Python/macmain.c
@@ -611,7 +611,7 @@ Py_Main(int argc, char **argv, char *filename)
Py_GetVersion(), Py_GetPlatform(), COPYRIGHT);
if (filename != NULL) {
- if ((fp = fopen(filename, "r")) == NULL) {
+ if ((fp = fopen(filename, "r" PY_STDIOTEXTMODE)) == NULL) {
fprintf(stderr, "%s: can't open file '%s'\n",
argv[0], filename);
PyMac_Exit(2);
@@ -630,7 +630,7 @@ Py_Main(int argc, char **argv, char *filename)
PySys_SetArgv(argc, argv);
if (filename == NULL && isatty((int)fileno(fp))) {
- FILE *fp = fopen(STARTUP, "r");
+ FILE *fp = fopen(STARTUP, "r" PY_STDIOTEXTMODE);
if (fp != NULL) {
(void) PyRun_SimpleFile(fp, STARTUP);
PyErr_Clear();