Change 14582: Use correct Mac filenames in error messages, caller()

[email protected] (Chris Nandor) Thu, 7 Feb 2002 16:38:57 -0500
Newsgroups perl.perl5.changes.mac
Message-ID <p0510030db888a46a0d5c@[10.0.1.177]>
Change 14582 by pudge@pudge-mobile on 2002/02/07 18:35:20

	Use correct Mac filenames in error messages, caller()

Affected files ...

.... //depot/maint-5.6/macperl/deb.c#2 edit
.... //depot/maint-5.6/macperl/pp_ctl.c#5 edit
.... //depot/maint-5.6/macperl/toke.c#5 edit
.... //depot/maint-5.6/macperl/util.c#7 edit

Differences ...

==== //depot/maint-5.6/macperl/deb.c#2 (text) ====
Index: perl/deb.c
--- perl/deb.c.~1~	Thu Feb  7 11:45:06 2002
+++ perl/deb.c	Thu Feb  7 11:45:06 2002
@@ -45,7 +45,11 @@
 Perl_vdeb(pTHX_ const char *pat, va_list *args)
 {
 #ifdef DEBUGGING
+#ifdef MACOS_TRADITIONAL
+    char* file = MacPerl_MPWFileName(CopFILE(PL_curcop));
+#else
     char* file = CopFILE(PL_curcop);
+#endif
 
 #ifdef USE_THREADS
     PerlIO_printf(Perl_debug_log, "0x%"UVxf" (%s:%ld)\t",

==== //depot/maint-5.6/macperl/pp_ctl.c#5 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c.~1~	Thu Feb  7 11:45:06 2002
+++ perl/pp_ctl.c	Thu Feb  7 11:45:06 2002
@@ -1537,7 +1537,11 @@
 	PUSHs(&PL_sv_undef);
     else
 	PUSHs(sv_2mortal(newSVpv(stashname, 0)));
+#ifdef MACOS_TRADITIONAL
+    PUSHs(sv_2mortal(newSVpv(MacPerl_MPWFileName(CopFILE(cx->blk_oldcop)), 0)));
+#else
     PUSHs(sv_2mortal(newSVpv(CopFILE(cx->blk_oldcop), 0)));
+#endif
     PUSHs(sv_2mortal(newSViv((I32)CopLINE(cx->blk_oldcop))));
     if (!MAXARG)
 	RETURN;

==== //depot/maint-5.6/macperl/toke.c#5 (text) ====
Index: perl/toke.c
--- perl/toke.c.~1~	Thu Feb  7 11:45:06 2002
+++ perl/toke.c	Thu Feb  7 11:45:06 2002
@@ -7484,7 +7484,11 @@
     }
     msg = sv_2mortal(newSVpv(s, 0));
     Perl_sv_catpvf(aTHX_ msg, " at %s line %"IVdf", ",
+#ifdef MACOS_TRADITIONAL
+		   MacPerl_MPWFileName(CopFILE(PL_curcop)), (IV)CopLINE(PL_curcop));
+#else
 		   CopFILE(PL_curcop), (IV)CopLINE(PL_curcop));
+#endif
     if (context)
 	Perl_sv_catpvf(aTHX_ msg, "near \"%.*s\"\n", contlen, context);
     else
@@ -7502,10 +7506,18 @@
     if (PL_error_count >= 10) {
 	if (PL_in_eval && SvCUR(ERRSV))
 	    Perl_croak(aTHX_ "%"SVf"%s has too many errors.\n",
+#ifdef MACOS_TRADITIONAL
+		       ERRSV, MacPerl_MPWFileName(CopFILE(PL_curcop)));
+#else
 		       ERRSV, CopFILE(PL_curcop));
+#endif
 	else
 	    Perl_croak(aTHX_ "%s has too many errors.\n",
+#ifdef MACOS_TRADITIONAL
+		       MacPerl_MPWFileName(CopFILE(PL_curcop)));
+#else
 		       CopFILE(PL_curcop));
+#endif
     }
     PL_in_my = 0;
     PL_in_my_stash = Nullhv;

==== //depot/maint-5.6/macperl/util.c#7 (text) ====
Index: perl/util.c
--- perl/util.c.~1~	Thu Feb  7 11:45:06 2002
+++ perl/util.c	Thu Feb  7 11:45:06 2002
@@ -1525,7 +1525,12 @@
     if (!SvCUR(sv) || *(SvEND(sv) - 1) != '\n') {
 	if (CopLINE(PL_curcop))
 	    Perl_sv_catpvf(aTHX_ sv, " at %s line %"IVdf,
-			   CopFILE(PL_curcop), (IV)CopLINE(PL_curcop));
+#ifdef MACOS_TRADITIONAL
+			   MacPerl_MPWFileName(CopFILE(PL_curcop)),
+#else
+			   CopFILE(PL_curcop),
+#endif
+			   (IV)CopLINE(PL_curcop));
 	if (GvIO(PL_last_in_gv) && IoLINES(GvIOp(PL_last_in_gv))) {
 	    bool line_mode = (RsSIMPLE(PL_rs) &&
 			      SvCUR(PL_rs) == 1 && *SvPVX(PL_rs) == '\n');
End of Patch.