summaryrefslogtreecommitdiff
path: root/predump
blob: 272c3734c986d29a6897343e988b76e8adcb4bd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
    SV *sv;
    GV* tmpgv;

    /* initialize everything that won't change if we undump */

    if (siggv = gv_fetchpv("SIG",allgvs)) {
	HV *hv;
	SvMULTI_on(siggv);
	hv = GvHVn(siggv);
	hv_magic(hv, siggv, 'S');

	/* initialize signal stack */
        signalstack = newAV();
        av_store(signalstack, 32, Nullsv);
        av_clear(signalstack);
        AvREAL_off(signalstack);
    }

    magicalize("!#?^~=-%.+&*()<>,\\/[|`':\004\t\020\024\027\006");

    ampergv = gv_fetchpv("&",allgvs);
    leftgv = gv_fetchpv("`",allgvs);
    rightgv = gv_fetchpv("'",allgvs);
    sawampersand = (ampergv || leftgv || rightgv);
    if (tmpgv = gv_fetchpv(":",allgvs))
	sv_setpv(GvSV(tmpgv),chopset);

    /* these aren't necessarily magical */
    if (tmpgv = gv_fetchpv("\014",allgvs)) {
	sv_setpv(GvSV(tmpgv),"\f");
	formfeed = GvSV(tmpgv);
    }
    if (tmpgv = gv_fetchpv(";",allgvs))
	sv_setpv(GvSV(tmpgv),"\034");
    if (tmpgv = gv_fetchpv("]",allgvs)) {
	sv = GvSV(tmpgv);
	sv_upgrade(sv, SVt_PVNV);
	sv_setpv(sv,rcsid);
	SvNV(sv) = atof(patchlevel);
	SvNOK_on(sv);
    }