From: Jack Jansen Date: Mon, 12 Oct 1998 20:53:15 +0000 (+0000) Subject: Replaced fprintf(stderr,...) with PySys_WriteStderr(...) where appropriate. X-Git-Tag: v1.5.2a2~61 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=deff89c8be78ed962d989bd88c5b3ee292263596;p=python Replaced fprintf(stderr,...) with PySys_WriteStderr(...) where appropriate. --- diff --git a/Mac/Include/macbuildno.h b/Mac/Include/macbuildno.h index 40de2144bd..064f56147d 100644 --- a/Mac/Include/macbuildno.h +++ b/Mac/Include/macbuildno.h @@ -1 +1 @@ -#define BUILD 41 +#define BUILD 42 diff --git a/Mac/Lib/lib-toolbox/AEDataModel.py b/Mac/Lib/lib-toolbox/AEDataModel.py index 51738630ca..7a2260e1a6 100644 --- a/Mac/Lib/lib-toolbox/AEDataModel.py +++ b/Mac/Lib/lib-toolbox/AEDataModel.py @@ -1,4 +1,4 @@ -# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:AEDataModel.h' +# Generated from 'moes:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:AEDataModel.h' def FOUR_CHAR_CODE(x): return x typeBoolean = FOUR_CHAR_CODE('bool') diff --git a/Mac/Lib/lib-toolbox/AEObjects.py b/Mac/Lib/lib-toolbox/AEObjects.py index 7d4f28e49f..1b48998dc0 100644 --- a/Mac/Lib/lib-toolbox/AEObjects.py +++ b/Mac/Lib/lib-toolbox/AEObjects.py @@ -1,4 +1,4 @@ -# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:AEObjects.h' +# Generated from 'moes:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:AEObjects.h' def FOUR_CHAR_CODE(x): return x kAEAND = FOUR_CHAR_CODE('AND ') diff --git a/Mac/Lib/lib-toolbox/AERegistry.py b/Mac/Lib/lib-toolbox/AERegistry.py index 0211ac07d9..a511ef1d09 100644 --- a/Mac/Lib/lib-toolbox/AERegistry.py +++ b/Mac/Lib/lib-toolbox/AERegistry.py @@ -1,4 +1,4 @@ -# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:AERegistry.h' +# Generated from 'moes:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:AERegistry.h' def FOUR_CHAR_CODE(x): return x from AEDataModel import * diff --git a/Mac/Lib/lib-toolbox/AppleEvents.py b/Mac/Lib/lib-toolbox/AppleEvents.py index 3f3cad83f7..544d16ba54 100644 --- a/Mac/Lib/lib-toolbox/AppleEvents.py +++ b/Mac/Lib/lib-toolbox/AppleEvents.py @@ -1,4 +1,4 @@ -# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:AppleEvents.h' +# Generated from 'moes:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:AppleEvents.h' def FOUR_CHAR_CODE(x): return x from AEDataModel import * diff --git a/Mac/Lib/lib-toolbox/Controls.py b/Mac/Lib/lib-toolbox/Controls.py index 416b850e72..71e37b7abc 100644 --- a/Mac/Lib/lib-toolbox/Controls.py +++ b/Mac/Lib/lib-toolbox/Controls.py @@ -1,4 +1,4 @@ -# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Controls.h' +# Generated from 'moes:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Controls.h' def FOUR_CHAR_CODE(x): return x from TextEdit import * diff --git a/Mac/Lib/lib-toolbox/Dialogs.py b/Mac/Lib/lib-toolbox/Dialogs.py index 477f001d6b..a07729e260 100644 --- a/Mac/Lib/lib-toolbox/Dialogs.py +++ b/Mac/Lib/lib-toolbox/Dialogs.py @@ -1,4 +1,4 @@ -# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Dialogs.h' +# Generated from 'moes:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Dialogs.h' kControlDialogItem = 4 kButtonDialogItem = kControlDialogItem | 0 diff --git a/Mac/Modules/ae/AEmodule.c b/Mac/Modules/ae/AEmodule.c index 3127430716..241cb5d44f 100644 --- a/Mac/Modules/ae/AEmodule.c +++ b/Mac/Modules/ae/AEmodule.c @@ -75,7 +75,7 @@ static pascal Boolean AEIdleProc(EventRecord *theEvent, long *sleepTime, RgnHand if ( PyOS_InterruptOccurred() ) return 1; if ( PyMac_HandleEvent(theEvent) < 0 ) { - fprintf(stderr, "Exception in user event handler during AE processing\n"); + PySys_WriteStderr("Exception in user event handler during AE processing\n"); PyErr_Clear(); } return 0; diff --git a/Mac/Modules/ae/aesupport.py b/Mac/Modules/ae/aesupport.py index 58af2df9be..d82496bfd4 100644 --- a/Mac/Modules/ae/aesupport.py +++ b/Mac/Modules/ae/aesupport.py @@ -115,7 +115,7 @@ static pascal Boolean AEIdleProc(EventRecord *theEvent, long *sleepTime, RgnHand if ( PyOS_InterruptOccurred() ) return 1; if ( PyMac_HandleEvent(theEvent) < 0 ) { - fprintf(stderr, "Exception in user event handler during AE processing\\n"); + PySys_WriteStderr("Exception in user event handler during AE processing\\n"); PyErr_Clear(); } return 0; diff --git a/Mac/Modules/ctl/Ctlmodule.c b/Mac/Modules/ctl/Ctlmodule.c index 6b43b68975..6a74d2338c 100644 --- a/Mac/Modules/ctl/Ctlmodule.c +++ b/Mac/Modules/ctl/Ctlmodule.c @@ -1419,7 +1419,7 @@ mytracker(ctl, part) if (rv) Py_DECREF(rv); else - fprintf(stderr, "TrackControl: exception in tracker function\n"); + PySys_WriteStderr("TrackControl: exception in tracker function\n"); } diff --git a/Mac/Modules/ctl/ctlsupport.py b/Mac/Modules/ctl/ctlsupport.py index e01e8710c0..84dd6cec8d 100644 --- a/Mac/Modules/ctl/ctlsupport.py +++ b/Mac/Modules/ctl/ctlsupport.py @@ -137,7 +137,7 @@ mytracker(ctl, part) if (rv) Py_DECREF(rv); else - fprintf(stderr, "TrackControl: exception in tracker function\\n"); + PySys_WriteStderr("TrackControl: exception in tracker function\\n"); } """ diff --git a/Mac/Modules/dlg/Dlgmodule.c b/Mac/Modules/dlg/Dlgmodule.c index 9e59ecdbff..2abd785f73 100644 --- a/Mac/Modules/dlg/Dlgmodule.c +++ b/Mac/Modules/dlg/Dlgmodule.c @@ -73,7 +73,7 @@ static pascal Boolean Dlg_UnivFilterProc(DialogPtr dialog, Py_DECREF(args); } if (res == NULL) { - fprintf(stderr, "Exception in Dialog Filter\n"); + PySys_WriteStderr("Exception in Dialog Filter\n"); PyErr_Print(); *itemHit = -1; /* Fake return item */ return 1; /* We handled it */ @@ -124,7 +124,7 @@ static pascal void Dlg_UnivUserItemProc(DialogPtr dialog, Py_DECREF(args); } if (res == NULL) { - fprintf(stderr, "Exception in Dialog UserItem proc\n"); + PySys_WriteStderr("Exception in Dialog UserItem proc\n"); PyErr_Print(); } Py_XDECREF(res); diff --git a/Mac/Modules/dlg/dlgsupport.py b/Mac/Modules/dlg/dlgsupport.py index 8af8fe7132..526bfa441c 100644 --- a/Mac/Modules/dlg/dlgsupport.py +++ b/Mac/Modules/dlg/dlgsupport.py @@ -59,7 +59,7 @@ static pascal Boolean Dlg_UnivFilterProc(DialogPtr dialog, Py_DECREF(args); } if (res == NULL) { - fprintf(stderr, "Exception in Dialog Filter\\n"); + PySys_WriteStderr("Exception in Dialog Filter\\n"); PyErr_Print(); *itemHit = -1; /* Fake return item */ return 1; /* We handled it */ @@ -110,7 +110,7 @@ static pascal void Dlg_UnivUserItemProc(DialogPtr dialog, Py_DECREF(args); } if (res == NULL) { - fprintf(stderr, "Exception in Dialog UserItem proc\\n"); + PySys_WriteStderr("Exception in Dialog UserItem proc\\n"); PyErr_Print(); } Py_XDECREF(res); diff --git a/Mac/Modules/macosmodule.c b/Mac/Modules/macosmodule.c index 68f9b48c9d..14f807c81c 100644 --- a/Mac/Modules/macosmodule.c +++ b/Mac/Modules/macosmodule.c @@ -377,7 +377,7 @@ MacOS_HighLevelEventProc(EventRecord *e) Py_DECREF(args); } if (res == NULL) { - fprintf(stderr, "Exception in MacOS_HighLevelEventProc:\n"); + PySys_WriteStderr("Exception in MacOS_HighLevelEventProc:\n"); PyErr_Print(); } else diff --git a/Mac/Modules/waste/wastemodule.c b/Mac/Modules/waste/wastemodule.c index 660401f7df..ffb39c3f74 100644 --- a/Mac/Modules/waste/wastemodule.c +++ b/Mac/Modules/waste/wastemodule.c @@ -150,7 +150,7 @@ any_handler(WESelector what, WEObjectReference who, PyObject *args, PyObject **r Py_DECREF(func); Py_DECREF(key); if ( *rv == NULL ) { - fprintf(stderr, "--Exception in callback: "); + PySys_WriteStderr("--Exception in callback: "); PyErr_Print(); return errAEReplyNotArrived; } diff --git a/Mac/Modules/waste/wastesupport.py b/Mac/Modules/waste/wastesupport.py index 76eb010acf..488e01ad4e 100644 --- a/Mac/Modules/waste/wastesupport.py +++ b/Mac/Modules/waste/wastesupport.py @@ -164,7 +164,7 @@ any_handler(WESelector what, WEObjectReference who, PyObject *args, PyObject **r Py_DECREF(func); Py_DECREF(key); if ( *rv == NULL ) { - fprintf(stderr, "--Exception in callback: "); + PySys_WriteStderr("--Exception in callback: "); PyErr_Print(); return errAEReplyNotArrived; } diff --git a/Mac/Python/macimport.c b/Mac/Python/macimport.c index 627f828a10..e079d2e5ee 100644 --- a/Mac/Python/macimport.c +++ b/Mac/Python/macimport.c @@ -271,8 +271,7 @@ PyMac_LoadCodeResourceModule(name, pathname) Py_XDECREF(s); #endif if (Py_VerboseFlag) - fprintf(stderr, - "import %s # pyd fragment %#s loaded from %s\n", + PySys_WriteStderr("import %s # pyd fragment %#s loaded from %s\n", name, fragmentname, pathname); Py_INCREF(m); return m; @@ -389,7 +388,7 @@ packageerror: m = NULL; } if (Py_VerboseFlag) - fprintf(stderr, "import %s # pyc resource from %s\n", + PySys_WriteStderr("import %s # pyc resource from %s\n", module, filename); return m; error: @@ -459,7 +458,7 @@ PyMac_FindModuleExtension(char *buf, int *lenp, char *module) strcpy((char *)fnbuf+1+modnamelen, fdp->suffix); fnbuf[0] = strlen((char *)fnbuf+1); if (Py_VerboseFlag > 1) - fprintf(stderr, "# trying %s%s\n", buf, fdp->suffix); + PySys_WriteStderr("# trying %s%s\n", buf, fdp->suffix); if ( FSMakeFSSpec(refnum, dirid, fnbuf, &fss) == noErr ) { /* Found it. */ #if 0