summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gv.c1
-rw-r--r--mg.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/gv.c b/gv.c
index 4cef56d5e4..beffabfce0 100644
--- a/gv.c
+++ b/gv.c
@@ -761,6 +761,7 @@ gv_fetchpv(char *nambeg, I32 add, I32 sv_type)
case '|':
case '\001':
case '\002':
+ case '\003':
case '\004':
case '\005':
case '\006':
diff --git a/mg.c b/mg.c
index 7859c47ae0..360e304db5 100644
--- a/mg.c
+++ b/mg.c
@@ -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());