diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 1998-11-28 15:21:59 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 1998-11-28 15:21:59 +0000 |
commit | 49460fe6d299521eb33c31ef95793c8ca16e93d2 (patch) | |
tree | c43661736895795b59b5a26f3211bc5dcf2f9753 /mg.c | |
parent | 6051dbdb749e970695dd861ca273edafbbb539cb (diff) | |
download | perl-49460fe6d299521eb33c31ef95793c8ca16e93d2.tar.gz |
Implement $^C to allow perl access to -c flag - I think this
was agreed once...
p4raw-id: //depot/perl@2352
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -477,6 +477,10 @@ magic_get(SV *sv, MAGIC *mg) /* printf("some %s\n", printW(PL_curcop->cop_warnings)), */ sv_setsv(sv, PL_curcop->cop_warnings); break; + case '\003': /* ^C */ + sv_setiv(sv, (IV)PL_minus_c); + break; + case '\004': /* ^D */ sv_setiv(sv, (IV)(PL_debug & 32767)); break; @@ -1655,6 +1659,11 @@ magic_set(SV *sv, MAGIC *mg) } } break; + + case '\003': /* ^C */ + PL_minus_c = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv); + break; + case '\004': /* ^D */ PL_debug = (SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv)) | 0x80000000; DEBUG_x(dump_all()); |