diff options
author | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1994-04-04 00:00:00 +0000 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1994-04-04 00:00:00 +0000 |
commit | 2304df62caa7d9be70e8b8bcdb454e139c9c103d (patch) | |
tree | 98a456ef0fbe59b1a02bfe68afa4a3d9afb4f21c /mg.c | |
parent | 8990e3071044a96302560bbdb5706f3e74cf1bef (diff) | |
download | perl-2304df62caa7d9be70e8b8bcdb454e139c9c103d.tar.gz |
perl 5.0 alpha 8
[the last one taken from the September '94 InfoMagic CD; a similar
style of cleanup as the previous commits was performed]
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -188,14 +188,6 @@ SV* sv; #include <signal.h> #endif -#ifdef VOIDSIG -#define handlertype void -#else -#define handlertype int -#endif - -static handlertype sighandler(); - U32 magic_len(sv, mg) SV *sv; @@ -405,7 +397,7 @@ MAGIC *mg; break; case '!': sv_setnv(sv,(double)errno); - sv_setpv(sv, errno ? strerror(errno) : ""); + sv_setpv(sv, errno ? Strerror(errno) : ""); SvNOK_on(sv); /* what a wonderful hack! */ break; case '<': @@ -506,8 +498,8 @@ MAGIC* mg; (void)signal(i,SIG_DFL); else { (void)signal(i,sighandler); - if (!strchr(s,'\'')) { - sprintf(tokenbuf, "main'%s",s); + if (!strchr(s,':') && !strchr(s,'\'')) { + sprintf(tokenbuf, "main::%s",s); sv_setpv(sv,tokenbuf); } } @@ -896,6 +888,8 @@ MAGIC* mg; case '.': if (localizing) save_sptr((SV**)&last_in_gv); + else if (SvOK(sv)) + IoLINES(GvIO(last_in_gv)) = (long)SvIV(sv); break; case '^': Safefree(IoTOP_NAME(GvIO(defoutgv))); @@ -1117,7 +1111,7 @@ char *sig; return 0; } -static handlertype +VOIDRET sighandler(sig) I32 sig; { |