From deff89c8be78ed962d989bd88c5b3ee292263596 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 12 Oct 1998 20:53:15 +0000 Subject: [PATCH] Replaced fprintf(stderr,...) with PySys_WriteStderr(...) where appropriate. --- Mac/Include/macbuildno.h | 2 +- Mac/Lib/lib-toolbox/AEDataModel.py | 2 +- Mac/Lib/lib-toolbox/AEObjects.py | 2 +- Mac/Lib/lib-toolbox/AERegistry.py | 2 +- Mac/Lib/lib-toolbox/AppleEvents.py | 2 +- Mac/Lib/lib-toolbox/Controls.py | 2 +- Mac/Lib/lib-toolbox/Dialogs.py | 2 +- Mac/Modules/ae/AEmodule.c | 2 +- Mac/Modules/ae/aesupport.py | 2 +- Mac/Modules/ctl/Ctlmodule.c | 2 +- Mac/Modules/ctl/ctlsupport.py | 2 +- Mac/Modules/dlg/Dlgmodule.c | 4 ++-- Mac/Modules/dlg/dlgsupport.py | 4 ++-- Mac/Modules/macosmodule.c | 2 +- Mac/Modules/waste/wastemodule.c | 2 +- Mac/Modules/waste/wastesupport.py | 2 +- Mac/Python/macimport.c | 7 +++---- 17 files changed, 21 insertions(+), 22 deletions(-) diff --git a/Mac/Include/macbuildno.h b/Mac/Include/macbuildno.h index 40de2144bd0..064f56147d2 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 51738630cab..7a2260e1a6b 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 7d4f28e49f7..1b48998dc0a 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 0211ac07d9d..a511ef1d09a 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 3f3cad83f7d..544d16ba546 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 416b850e720..71e37b7abc8 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 477f001d6b6..a07729e260b 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 31274307166..241cb5d44f0 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 58af2df9be3..d82496bfd40 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 6b43b68975e..6a74d2338ca 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 e01e8710c0c..84dd6cec8d7 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 9e59ecdbff7..2abd785f731 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 8af8fe71328..526bfa441cd 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 68f9b48c9dd..14f807c81c5 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 660401f7dfc..ffb39c3f749 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 76eb010acfa..488e01ad4e5 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 627f828a10f..e079d2e5ee4 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