3 * Copyright (c) 1991-1997, Larry Wall
5 * You may distribute under the terms of either the GNU General Public
6 * License or the Artistic License, as specified in the README file.
11 * Now far ahead the Road has gone,
12 * And I must follow, if I can,
13 * Pursuing it with eager feet,
14 * Until it joins some larger way
15 * Where many paths and errands meet.
16 * And whither then? I cannot say.
23 #define WORD_ALIGN sizeof(U16)
26 #define DOCATCH(o) ((CATCH_GET == TRUE) ? docatch(o) : (o))
28 static OP *docatch _((OP *o));
29 static OP *doeval _((int gimme));
30 static OP *dofindlabel _((OP *op, char *label, OP **opstack));
31 static void doparseform _((SV *sv));
32 static I32 dopoptoeval _((I32 startingblock));
33 static I32 dopoptolabel _((char *label));
34 static I32 dopoptoloop _((I32 startingblock));
35 static I32 dopoptosub _((I32 startingblock));
36 static void save_lines _((AV *array, SV *sv));
37 static int sortcv _((const void *, const void *));
38 static int sortcmp _((const void *, const void *));
39 static int sortcmp_locale _((const void *, const void *));
49 cxix = dopoptosub(cxstack_ix);
53 switch (cxstack[cxix].blk_gimme) {
70 register PMOP *pm = (PMOP*)cLOGOP->op_other;
76 t = SvPV(tmpstr, len);
78 /* JMR: Check against the last compiled regexp */
79 if ( ! pm->op_pmregexp || ! pm->op_pmregexp->precomp
80 || strnNE(pm->op_pmregexp->precomp, t, len)
81 || pm->op_pmregexp->precomp[len]) {
82 if (pm->op_pmregexp) {
83 pregfree(pm->op_pmregexp);
84 pm->op_pmregexp = Null(REGEXP*); /* crucial if regcomp aborts */
87 pm->op_pmflags = pm->op_pmpermflags; /* reset case sensitivity */
88 pm->op_pmregexp = pregcomp(t, t + len, pm);
91 if (!pm->op_pmregexp->prelen && curpm)
93 else if (strEQ("\\s+", pm->op_pmregexp->precomp))
94 pm->op_pmflags |= PMf_WHITE;
96 if (pm->op_pmflags & PMf_KEEP) {
97 pm->op_pmflags &= ~PMf_RUNTIME; /* no point compiling again */
99 cLOGOP->op_first->op_next = op->op_next;
107 register PMOP *pm = (PMOP*) cLOGOP->op_other;
108 register CONTEXT *cx = &cxstack[cxstack_ix];
109 register SV *dstr = cx->sb_dstr;
110 register char *s = cx->sb_s;
111 register char *m = cx->sb_m;
112 char *orig = cx->sb_orig;
113 register REGEXP *rx = cx->sb_rx;
115 if (cx->sb_iters++) {
116 if (cx->sb_iters > cx->sb_maxiters)
117 DIE("Substitution loop");
119 if (!cx->sb_rxtainted)
120 cx->sb_rxtainted = SvTAINTED(TOPs);
121 sv_catsv(dstr, POPs);
124 if (cx->sb_once || !pregexec(rx, s, cx->sb_strend, orig,
125 s == m, Nullsv, cx->sb_safebase))
127 SV *targ = cx->sb_targ;
128 sv_catpvn(dstr, s, cx->sb_strend - s);
130 TAINT_IF(cx->sb_rxtainted || rx->exec_tainted);
132 (void)SvOOK_off(targ);
133 Safefree(SvPVX(targ));
134 SvPVX(targ) = SvPVX(dstr);
135 SvCUR_set(targ, SvCUR(dstr));
136 SvLEN_set(targ, SvLEN(dstr));
139 (void)SvPOK_only(targ);
143 PUSHs(sv_2mortal(newSViv((I32)cx->sb_iters - 1)));
144 LEAVE_SCOPE(cx->sb_oldsave);
146 RETURNOP(pm->op_next);
149 if (rx->subbase && rx->subbase != orig) {
152 cx->sb_orig = orig = rx->subbase;
154 cx->sb_strend = s + (cx->sb_strend - m);
156 cx->sb_m = m = rx->startp[0];
157 sv_catpvn(dstr, s, m-s);
158 cx->sb_s = rx->endp[0];
159 cx->sb_rxtainted |= rx->exec_tainted;
160 RETURNOP(pm->op_pmreplstart);
165 dSP; dMARK; dORIGMARK;
166 register SV *form = *++MARK;
178 bool chopspace = (strchr(chopset, ' ') != Nullch);
185 if (!SvMAGICAL(form) || !SvCOMPILED(form)) {
186 SvREADONLY_off(form);
190 SvPV_force(formtarget, len);
191 t = SvGROW(formtarget, len + SvCUR(form) + 1); /* XXX SvCUR bad */
194 /* need to jump to the next word */
195 s = f + len + WORD_ALIGN - SvCUR(form) % WORD_ALIGN;
204 case FF_LITERAL: arg = fpc[1]; name = "LITERAL"; break;
205 case FF_BLANK: arg = fpc[1]; name = "BLANK"; break;
206 case FF_SKIP: arg = fpc[1]; name = "SKIP"; break;
207 case FF_FETCH: arg = fpc[1]; name = "FETCH"; break;
208 case FF_DECIMAL: arg = fpc[1]; name = "DECIMAL"; break;
210 case FF_CHECKNL: name = "CHECKNL"; break;
211 case FF_CHECKCHOP: name = "CHECKCHOP"; break;
212 case FF_SPACE: name = "SPACE"; break;
213 case FF_HALFSPACE: name = "HALFSPACE"; break;
214 case FF_ITEM: name = "ITEM"; break;
215 case FF_CHOP: name = "CHOP"; break;
216 case FF_LINEGLOB: name = "LINEGLOB"; break;
217 case FF_NEWLINE: name = "NEWLINE"; break;
218 case FF_MORE: name = "MORE"; break;
219 case FF_LINEMARK: name = "LINEMARK"; break;
220 case FF_END: name = "END"; break;
223 PerlIO_printf(PerlIO_stderr(), "%-16s%ld\n", name, (long) arg);
225 PerlIO_printf(PerlIO_stderr(), "%-16s\n", name);
254 warn("Not enough format arguments");
259 item = s = SvPV(sv, len);
261 if (itemsize > fieldsize)
262 itemsize = fieldsize;
263 send = chophere = s + itemsize;
275 item = s = SvPV(sv, len);
277 if (itemsize <= fieldsize) {
278 send = chophere = s + itemsize;
289 itemsize = fieldsize;
290 send = chophere = s + itemsize;
291 while (s < send || (s == send && isSPACE(*s))) {
301 if (strchr(chopset, *s))
306 itemsize = chophere - item;
311 arg = fieldsize - itemsize;
320 arg = fieldsize - itemsize;
334 int ch = *t++ = *s++;
338 if ( !((*t++ = *s++) & ~31) )
348 while (*s && isSPACE(*s))
355 item = s = SvPV(sv, len);
368 SvCUR_set(formtarget, t - SvPVX(formtarget));
369 sv_catpvn(formtarget, item, itemsize);
370 SvGROW(formtarget, SvCUR(formtarget) + SvCUR(form) + 1);
371 t = SvPVX(formtarget) + SvCUR(formtarget);
376 /* If the field is marked with ^ and the value is undefined,
379 if ((arg & 512) && !SvOK(sv)) {
387 /* Formats aren't yet marked for locales, so assume "yes". */
390 sprintf(t, "%#*.*f", (int) fieldsize, (int) arg & 255, value);
392 sprintf(t, "%*.0f", (int) fieldsize, value);
399 while (t-- > linemark && *t == ' ') ;
407 if (arg) { /* repeat until fields exhausted? */
409 SvCUR_set(formtarget, t - SvPVX(formtarget));
410 lines += FmLINES(formtarget);
413 if (strnEQ(linemark, linemark - arg, arg))
414 DIE("Runaway format");
416 FmLINES(formtarget) = lines;
418 RETURNOP(cLISTOP->op_first);
429 arg = fieldsize - itemsize;
436 if (strnEQ(s," ",3)) {
437 while (s > SvPVX(formtarget) && isSPACE(s[-1]))
448 SvCUR_set(formtarget, t - SvPVX(formtarget));
449 FmLINES(formtarget) += lines;
461 if (stack_base + *markstack_ptr == sp) {
463 if (GIMME_V == G_SCALAR)
465 RETURNOP(op->op_next->op_next);
467 stack_sp = stack_base + *markstack_ptr + 1;
468 pp_pushmark(); /* push dst */
469 pp_pushmark(); /* push src */
470 ENTER; /* enter outer scope */
473 SAVESPTR(GvSV(defgv));
475 ENTER; /* enter inner scope */
478 src = stack_base[*markstack_ptr];
483 if (op->op_type == OP_MAPSTART)
484 pp_pushmark(); /* push top */
485 return ((LOGOP*)op->op_next)->op_other;
490 DIE("panic: mapstart"); /* uses grepstart */
496 I32 diff = (sp - stack_base) - *markstack_ptr;
504 if (diff > markstack_ptr[-1] - markstack_ptr[-2]) {
505 shift = diff - (markstack_ptr[-1] - markstack_ptr[-2]);
506 count = (sp - stack_base) - markstack_ptr[-1] + 2;
511 markstack_ptr[-1] += shift;
512 *markstack_ptr += shift;
516 dst = stack_base + (markstack_ptr[-2] += diff) - 1;
519 *dst-- = SvTEMP(TOPs) ? POPs : sv_mortalcopy(POPs);
521 LEAVE; /* exit inner scope */
524 if (markstack_ptr[-1] > *markstack_ptr) {
528 (void)POPMARK; /* pop top */
529 LEAVE; /* exit outer scope */
530 (void)POPMARK; /* pop src */
531 items = --*markstack_ptr - markstack_ptr[-1];
532 (void)POPMARK; /* pop dst */
533 SP = stack_base + POPMARK; /* pop original mark */
534 if (gimme == G_SCALAR) {
538 else if (gimme == G_ARRAY)
545 ENTER; /* enter inner scope */
548 src = stack_base[markstack_ptr[-1]];
552 RETURNOP(cLOGOP->op_other);
559 dSP; dMARK; dORIGMARK;
561 SV **myorigmark = ORIGMARK;
567 OP* nextop = op->op_next;
569 if (gimme != G_ARRAY) {
574 if (op->op_flags & OPf_STACKED) {
576 if (op->op_flags & OPf_SPECIAL) {
577 OP *kid = cLISTOP->op_first->op_sibling; /* pass pushmark */
578 kid = kUNOP->op_first; /* pass rv2gv */
579 kid = kUNOP->op_first; /* pass leave */
580 sortcop = kid->op_next;
581 stash = curcop->cop_stash;
584 cv = sv_2cv(*++MARK, &stash, &gv, 0);
585 if (!(cv && CvROOT(cv))) {
587 SV *tmpstr = sv_newmortal();
588 gv_efullname3(tmpstr, gv, Nullch);
589 if (cv && CvXSUB(cv))
590 DIE("Xsub \"%s\" called in sort", SvPVX(tmpstr));
591 DIE("Undefined sort subroutine \"%s\" called",
596 DIE("Xsub called in sort");
597 DIE("Undefined subroutine in sort");
599 DIE("Not a CODE reference in sort");
601 sortcop = CvSTART(cv);
602 SAVESPTR(CvROOT(cv)->op_ppaddr);
603 CvROOT(cv)->op_ppaddr = ppaddr[OP_NULL];
606 curpad = AvARRAY((AV*)AvARRAY(CvPADLIST(cv))[1]);
611 stash = curcop->cop_stash;
615 while (MARK < SP) { /* This may or may not shift down one here. */
617 if (*up = *++MARK) { /* Weed out nulls. */
619 if (!sortcop && !SvPOK(*up))
620 (void)sv_2pv(*up, &na);
624 max = --up - myorigmark;
630 bool oldcatch = CATCH_GET;
638 AvREAL_off(sortstack);
639 av_extend(sortstack, 32);
642 SWITCHSTACK(curstack, sortstack);
643 if (sortstash != stash) {
644 firstgv = gv_fetchpv("a", TRUE, SVt_PV);
645 secondgv = gv_fetchpv("b", TRUE, SVt_PV);
649 SAVESPTR(GvSV(firstgv));
650 SAVESPTR(GvSV(secondgv));
651 PUSHBLOCK(cx, CXt_NULL, stack_base);
652 sortcxix = cxstack_ix;
654 qsort((char*)(myorigmark+1), max, sizeof(SV*), sortcv);
657 SWITCHSTACK(sortstack, oldstack);
664 MEXTEND(SP, 20); /* Can't afford stack realloc on signal. */
665 qsort((char*)(ORIGMARK+1), max, sizeof(SV*),
666 (op->op_private & OPpLOCALE) ? sortcmp_locale : sortcmp);
669 stack_sp = ORIGMARK + max;
677 if (GIMME == G_ARRAY)
678 return cCONDOP->op_true;
679 return SvTRUEx(PAD_SV(op->op_targ)) ? cCONDOP->op_false : cCONDOP->op_true;
686 if (GIMME == G_ARRAY) {
687 RETURNOP(((CONDOP*)cUNOP->op_first)->op_false);
691 SV *targ = PAD_SV(op->op_targ);
693 if ((op->op_private & OPpFLIP_LINENUM)
694 ? last_in_gv && SvIV(sv) == IoLINES(GvIOp(last_in_gv))
696 sv_setiv(PAD_SV(cUNOP->op_first->op_targ), 1);
697 if (op->op_flags & OPf_SPECIAL) {
704 RETURNOP(((CONDOP*)cUNOP->op_first)->op_false);
717 if (GIMME == G_ARRAY) {
723 if (SvNIOKp(left) || !SvPOKp(left) ||
724 (looks_like_number(left) && *SvPVX(left) != '0') )
729 EXTEND_MORTAL(max - i + 1);
730 EXTEND(SP, max - i + 1);
733 sv = sv_2mortal(newSViv(i++));
738 SV *final = sv_mortalcopy(right);
740 char *tmps = SvPV(final, len);
742 sv = sv_mortalcopy(left);
743 while (!SvNIOKp(sv) && SvCUR(sv) <= len &&
744 strNE(SvPVX(sv),tmps) ) {
746 sv = sv_2mortal(newSVsv(sv));
749 if (strEQ(SvPVX(sv),tmps))
755 SV *targ = PAD_SV(cUNOP->op_first->op_targ);
757 if ((op->op_private & OPpFLIP_LINENUM)
758 ? last_in_gv && SvIV(sv) == IoLINES(GvIOp(last_in_gv))
760 sv_setiv(PAD_SV(((UNOP*)cUNOP->op_first)->op_first->op_targ), 0);
761 sv_catpv(targ, "E0");
776 register CONTEXT *cx;
778 for (i = cxstack_ix; i >= 0; i--) {
780 switch (cx->cx_type) {
783 warn("Exiting substitution via %s", op_name[op->op_type]);
787 warn("Exiting subroutine via %s", op_name[op->op_type]);
791 warn("Exiting eval via %s", op_name[op->op_type]);
795 warn("Exiting pseudo-block via %s", op_name[op->op_type]);
798 if (!cx->blk_loop.label ||
799 strNE(label, cx->blk_loop.label) ) {
800 DEBUG_l(deb("(Skipping label #%ld %s)\n",
801 (long)i, cx->blk_loop.label));
804 DEBUG_l( deb("(Found label #%ld %s)\n", (long)i, label));
814 I32 gimme = block_gimme();
815 return (gimme == G_VOID) ? G_SCALAR : gimme;
823 cxix = dopoptosub(cxstack_ix);
827 switch (cxstack[cxix].blk_gimme) {
835 croak("panic: bad gimme: %d\n", cxstack[cxix].blk_gimme);
840 dopoptosub(startingblock)
844 register CONTEXT *cx;
845 for (i = startingblock; i >= 0; i--) {
847 switch (cx->cx_type) {
852 DEBUG_l( deb("(Found sub #%ld)\n", (long)i));
860 dopoptoeval(startingblock)
864 register CONTEXT *cx;
865 for (i = startingblock; i >= 0; i--) {
867 switch (cx->cx_type) {
871 DEBUG_l( deb("(Found eval #%ld)\n", (long)i));
879 dopoptoloop(startingblock)
883 register CONTEXT *cx;
884 for (i = startingblock; i >= 0; i--) {
886 switch (cx->cx_type) {
889 warn("Exiting substitution via %s", op_name[op->op_type]);
893 warn("Exiting subroutine via %s", op_name[op->op_type]);
897 warn("Exiting eval via %s", op_name[op->op_type]);
901 warn("Exiting pseudo-block via %s", op_name[op->op_type]);
904 DEBUG_l( deb("(Found loop #%ld)\n", (long)i));
915 register CONTEXT *cx;
919 while (cxstack_ix > cxix) {
920 cx = &cxstack[cxstack_ix--];
921 DEBUG_l(PerlIO_printf(Perl_debug_log, "Unwinding block %ld, type %s\n", (long) cxstack_ix+1,
922 block_type[cx->cx_type]));
923 /* Note: we don't need to restore the base context info till the end. */
924 switch (cx->cx_type) {
947 register CONTEXT *cx;
953 STRLEN klen = strlen(message);
955 svp = hv_fetch(GvHV(errgv), message, klen, TRUE);
958 static char prefix[] = "\t(in cleanup) ";
959 sv_upgrade(*svp, SVt_IV);
960 (void)SvIOK_only(*svp);
961 SvGROW(GvSV(errgv), SvCUR(GvSV(errgv))+sizeof(prefix)+klen);
962 sv_catpvn(GvSV(errgv), prefix, sizeof(prefix)-1);
963 sv_catpvn(GvSV(errgv), message, klen);
969 sv_setpv(GvSV(errgv), message);
971 cxix = dopoptoeval(cxstack_ix);
975 if (cxix < cxstack_ix)
979 if (cx->cx_type != CXt_EVAL) {
980 PerlIO_printf(PerlIO_stderr(), "panic: die %s", message);
985 if (gimme == G_SCALAR)
986 *++newsp = &sv_undef;
991 if (optype == OP_REQUIRE) {
992 char* msg = SvPVx(GvSV(errgv), na);
993 DIE("%s", *msg ? msg : "Compilation failed in require");
998 PerlIO_printf(PerlIO_stderr(), "%s",message);
999 PerlIO_flush(PerlIO_stderr());
1008 if (SvTRUE(left) != SvTRUE(right))
1020 RETURNOP(cLOGOP->op_other);
1029 RETURNOP(cLOGOP->op_other);
1036 SV** mark = (stack_base + *markstack_ptr + 1);
1038 while (mark < sp) { /* emulate old interface */
1043 return pp_entersub();
1050 register I32 cxix = dopoptosub(cxstack_ix);
1051 register CONTEXT *cx;
1062 if (GIMME != G_ARRAY)
1066 if (DBsub && cxix >= 0 &&
1067 cxstack[cxix].blk_sub.cv == GvCV(DBsub))
1071 cxix = dopoptosub(cxix - 1);
1073 cx = &cxstack[cxix];
1074 if (cxstack[cxix].cx_type == CXt_SUB) {
1075 dbcxix = dopoptosub(cxix - 1);
1076 /* We expect that cxstack[dbcxix] is CXt_SUB, anyway, the
1077 field below is defined for any cx. */
1078 if (DBsub && dbcxix >= 0 && cxstack[dbcxix].blk_sub.cv == GvCV(DBsub))
1079 cx = &cxstack[dbcxix];
1082 if (GIMME != G_ARRAY) {
1085 sv_setpv(TARG, HvNAME(cx->blk_oldcop->cop_stash));
1090 PUSHs(sv_2mortal(newSVpv(HvNAME(cx->blk_oldcop->cop_stash), 0)));
1091 PUSHs(sv_2mortal(newSVpv(SvPVX(GvSV(cx->blk_oldcop->cop_filegv)), 0)));
1092 PUSHs(sv_2mortal(newSViv((I32)cx->blk_oldcop->cop_line)));
1095 if (cx->cx_type == CXt_SUB) { /* So is cxstack[dbcxix]. */
1097 gv_efullname3(sv, CvGV(cxstack[cxix].blk_sub.cv), Nullch);
1098 PUSHs(sv_2mortal(sv));
1099 PUSHs(sv_2mortal(newSViv((I32)cx->blk_sub.hasargs)));
1102 PUSHs(sv_2mortal(newSVpv("(eval)",0)));
1103 PUSHs(sv_2mortal(newSViv(0)));
1105 gimme = (I32)cx->blk_gimme;
1106 if (gimme == G_VOID)
1109 PUSHs(sv_2mortal(newSViv(gimme & G_ARRAY)));
1110 if (cx->cx_type == CXt_EVAL) {
1111 if (cx->blk_eval.old_op_type == OP_ENTEREVAL) {
1112 PUSHs(cx->blk_eval.cur_text);
1115 else if (cx->blk_eval.old_name) { /* Try blocks have old_name == 0. */
1116 /* Require, put the name. */
1117 PUSHs(sv_2mortal(newSVpv(cx->blk_eval.old_name, 0)));
1121 else if (cx->cx_type == CXt_SUB &&
1122 cx->blk_sub.hasargs &&
1123 curcop->cop_stash == debstash)
1125 AV *ary = cx->blk_sub.argarray;
1126 int off = AvARRAY(ary) - AvALLOC(ary);
1130 dbargs = GvAV(gv_AVadd(tmpgv = gv_fetchpv("DB::args", TRUE,
1133 AvREAL_off(dbargs); /* XXX Should be REIFY */
1136 if (AvMAX(dbargs) < AvFILL(ary) + off)
1137 av_extend(dbargs, AvFILL(ary) + off);
1138 Copy(AvALLOC(ary), AvARRAY(dbargs), AvFILL(ary) + 1 + off, SV*);
1139 AvFILL(dbargs) = AvFILL(ary) + off;
1149 SV * const *str1 = (SV * const *)a;
1150 SV * const *str2 = (SV * const *)b;
1151 I32 oldsaveix = savestack_ix;
1152 I32 oldscopeix = scopestack_ix;
1154 GvSV(firstgv) = *str1;
1155 GvSV(secondgv) = *str2;
1156 stack_sp = stack_base;
1159 if (stack_sp != stack_base + 1)
1160 croak("Sort subroutine didn't return single value");
1161 if (!SvNIOKp(*stack_sp))
1162 croak("Sort subroutine didn't return a numeric value");
1163 result = SvIV(*stack_sp);
1164 while (scopestack_ix > oldscopeix) {
1167 leave_scope(oldsaveix);
1176 return sv_cmp(*(SV * const *)a, *(SV * const *)b);
1180 sortcmp_locale(a, b)
1184 return sv_cmp_locale(*(SV * const *)a, *(SV * const *)b);
1196 sv_reset(tmps, curcop->cop_stash);
1209 TAINT_NOT; /* Each statement is presumed innocent */
1210 stack_sp = stack_base + cxstack[cxstack_ix].blk_oldsp;
1213 if (op->op_private || SvIV(DBsingle) || SvIV(DBsignal) || SvIV(DBtrace))
1217 register CONTEXT *cx;
1218 I32 gimme = G_ARRAY;
1225 DIE("No DB::DB routine defined");
1227 if (CvDEPTH(cv) >= 1 && !(debug & (1<<30))) /* don't do recursive DB::DB call */
1239 push_return(op->op_next);
1240 PUSHBLOCK(cx, CXt_SUB, sp);
1243 (void)SvREFCNT_inc(cv);
1245 curpad = AvARRAY((AV*)*av_fetch(CvPADLIST(cv),1,FALSE));
1246 RETURNOP(CvSTART(cv));
1260 register CONTEXT *cx;
1261 I32 gimme = GIMME_V;
1268 svp = &curpad[op->op_targ]; /* "my" variable */
1270 svp = &GvSV((GV*)POPs); /* symbol table variable */
1276 PUSHBLOCK(cx, CXt_LOOP, SP);
1277 PUSHLOOP(cx, svp, MARK);
1278 if (op->op_flags & OPf_STACKED)
1279 cx->blk_loop.iterary = (AV*)SvREFCNT_inc(POPs);
1281 cx->blk_loop.iterary = curstack;
1282 AvFILL(curstack) = sp - stack_base;
1283 cx->blk_loop.iterix = MARK - stack_base;
1292 register CONTEXT *cx;
1293 I32 gimme = GIMME_V;
1299 PUSHBLOCK(cx, CXt_LOOP, SP);
1300 PUSHLOOP(cx, 0, SP);
1308 register CONTEXT *cx;
1309 struct block_loop cxloop;
1317 POPLOOP1(cx); /* Delay POPLOOP2 until stack values are safe */
1319 if (gimme == G_VOID)
1321 else if (gimme == G_SCALAR) {
1323 *++newsp = sv_mortalcopy(*SP);
1325 *++newsp = &sv_undef;
1329 *++newsp = sv_mortalcopy(*++mark);
1334 POPLOOP2(); /* Stack values are safe: release loop vars ... */
1335 curpm = newpm; /* ... and pop $1 et al */
1347 register CONTEXT *cx;
1348 struct block_sub cxsub;
1349 bool popsub2 = FALSE;
1355 if (curstack == sortstack) {
1356 if (cxstack_ix == sortcxix || dopoptosub(cxstack_ix) < sortcxix) {
1357 if (cxstack_ix > sortcxix)
1359 AvARRAY(curstack)[1] = *SP;
1360 stack_sp = stack_base + 1;
1365 cxix = dopoptosub(cxstack_ix);
1367 DIE("Can't return outside a subroutine");
1368 if (cxix < cxstack_ix)
1372 switch (cx->cx_type) {
1374 POPSUB1(cx); /* Delay POPSUB2 until stack values are safe */
1379 if (optype == OP_REQUIRE &&
1380 (MARK == SP || (gimme == G_SCALAR && !SvTRUE(*SP))) )
1382 /* Unassume the success we assumed earlier. */
1383 char *name = cx->blk_eval.old_name;
1384 (void)hv_delete(GvHVn(incgv), name, strlen(name), G_DISCARD);
1385 DIE("%s did not return a true value", name);
1389 DIE("panic: return");
1392 if (gimme == G_SCALAR) {
1394 *++newsp = (popsub2 && SvTEMP(*SP))
1395 ? *SP : sv_mortalcopy(*SP);
1397 *++newsp = &sv_undef;
1399 else if (gimme == G_ARRAY) {
1400 while (++MARK <= SP)
1401 *++newsp = (popsub2 && SvTEMP(*MARK))
1402 ? *MARK : sv_mortalcopy(*MARK);
1406 /* Stack values are safe: */
1408 POPSUB2(); /* release CV and @_ ... */
1410 curpm = newpm; /* ... and pop $1 et al */
1413 return pop_return();
1420 register CONTEXT *cx;
1421 struct block_loop cxloop;
1422 struct block_sub cxsub;
1429 SV **mark = stack_base + cxstack[cxstack_ix].blk_oldsp;
1431 if (op->op_flags & OPf_SPECIAL) {
1432 cxix = dopoptoloop(cxstack_ix);
1434 DIE("Can't \"last\" outside a block");
1437 cxix = dopoptolabel(cPVOP->op_pv);
1439 DIE("Label not found for \"last %s\"", cPVOP->op_pv);
1441 if (cxix < cxstack_ix)
1445 switch (cx->cx_type) {
1447 POPLOOP1(cx); /* Delay POPLOOP2 until stack values are safe */
1449 nextop = cxloop.last_op->op_next;
1452 POPSUB1(cx); /* Delay POPSUB2 until stack values are safe */
1454 nextop = pop_return();
1458 nextop = pop_return();
1464 if (gimme == G_SCALAR) {
1466 *++newsp = ((pop2 == CXt_SUB) && SvTEMP(*SP))
1467 ? *SP : sv_mortalcopy(*SP);
1469 *++newsp = &sv_undef;
1471 else if (gimme == G_ARRAY) {
1472 while (++MARK <= SP)
1473 *++newsp = ((pop2 == CXt_SUB) && SvTEMP(*MARK))
1474 ? *MARK : sv_mortalcopy(*MARK);
1479 /* Stack values are safe: */
1482 POPLOOP2(); /* release loop vars ... */
1486 POPSUB2(); /* release CV and @_ ... */
1489 curpm = newpm; /* ... and pop $1 et al */
1498 register CONTEXT *cx;
1501 if (op->op_flags & OPf_SPECIAL) {
1502 cxix = dopoptoloop(cxstack_ix);
1504 DIE("Can't \"next\" outside a block");
1507 cxix = dopoptolabel(cPVOP->op_pv);
1509 DIE("Label not found for \"next %s\"", cPVOP->op_pv);
1511 if (cxix < cxstack_ix)
1515 oldsave = scopestack[scopestack_ix - 1];
1516 LEAVE_SCOPE(oldsave);
1517 return cx->blk_loop.next_op;
1523 register CONTEXT *cx;
1526 if (op->op_flags & OPf_SPECIAL) {
1527 cxix = dopoptoloop(cxstack_ix);
1529 DIE("Can't \"redo\" outside a block");
1532 cxix = dopoptolabel(cPVOP->op_pv);
1534 DIE("Label not found for \"redo %s\"", cPVOP->op_pv);
1536 if (cxix < cxstack_ix)
1540 oldsave = scopestack[scopestack_ix - 1];
1541 LEAVE_SCOPE(oldsave);
1542 return cx->blk_loop.redo_op;
1545 static OP* lastgotoprobe;
1548 dofindlabel(op,label,opstack)
1556 if (op->op_type == OP_LEAVE ||
1557 op->op_type == OP_SCOPE ||
1558 op->op_type == OP_LEAVELOOP ||
1559 op->op_type == OP_LEAVETRY)
1560 *ops++ = cUNOP->op_first;
1562 if (op->op_flags & OPf_KIDS) {
1563 /* First try all the kids at this level, since that's likeliest. */
1564 for (kid = cUNOP->op_first; kid; kid = kid->op_sibling) {
1565 if ((kid->op_type == OP_NEXTSTATE || kid->op_type == OP_DBSTATE) &&
1566 kCOP->cop_label && strEQ(kCOP->cop_label, label))
1569 for (kid = cUNOP->op_first; kid; kid = kid->op_sibling) {
1570 if (kid == lastgotoprobe)
1572 if (kid->op_type == OP_NEXTSTATE || kid->op_type == OP_DBSTATE) {
1573 if (ops > opstack &&
1574 (ops[-1]->op_type == OP_NEXTSTATE ||
1575 ops[-1]->op_type == OP_DBSTATE))
1580 if (op = dofindlabel(kid,label,ops))
1590 return pp_goto(ARGS);
1599 register CONTEXT *cx;
1602 int do_dump = (op->op_type == OP_DUMP);
1605 if (op->op_flags & OPf_STACKED) {
1608 /* This egregious kludge implements goto &subroutine */
1609 if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVCV) {
1611 register CONTEXT *cx;
1612 CV* cv = (CV*)SvRV(sv);
1617 if (!CvROOT(cv) && !CvXSUB(cv)) {
1619 SV *tmpstr = sv_newmortal();
1620 gv_efullname3(tmpstr, CvGV(cv), Nullch);
1621 DIE("Goto undefined subroutine &%s",SvPVX(tmpstr));
1623 DIE("Goto undefined subroutine");
1626 /* First do some returnish stuff. */
1627 cxix = dopoptosub(cxstack_ix);
1629 DIE("Can't goto subroutine outside a subroutine");
1630 if (cxix < cxstack_ix)
1634 if (cx->blk_sub.hasargs) { /* put @_ back onto stack */
1635 AV* av = cx->blk_sub.argarray;
1637 items = AvFILL(av) + 1;
1639 EXTEND(stack_sp, items); /* @_ could have been extended. */
1640 Copy(AvARRAY(av), stack_sp, items, SV*);
1642 SvREFCNT_dec(GvAV(defgv));
1643 GvAV(defgv) = cx->blk_sub.savearray;
1647 if (!(CvDEPTH(cx->blk_sub.cv) = cx->blk_sub.olddepth))
1648 SvREFCNT_dec(cx->blk_sub.cv);
1649 oldsave = scopestack[scopestack_ix - 1];
1650 LEAVE_SCOPE(oldsave);
1652 /* Now do some callish stuff. */
1655 if (CvOLDSTYLE(cv)) {
1656 I32 (*fp3)_((int,int,int));
1661 fp3 = (I32(*)_((int,int,int)))CvXSUB(cv);
1662 items = (*fp3)(CvXSUBANY(cv).any_i32,
1663 mark - stack_base + 1,
1665 sp = stack_base + items;
1668 stack_sp--; /* There is no cv arg. */
1669 (void)(*CvXSUB(cv))(cv);
1672 return pop_return();
1675 AV* padlist = CvPADLIST(cv);
1676 SV** svp = AvARRAY(padlist);
1677 cx->blk_sub.cv = cv;
1678 cx->blk_sub.olddepth = CvDEPTH(cv);
1680 if (CvDEPTH(cv) < 2)
1681 (void)SvREFCNT_inc(cv);
1682 else { /* save temporaries on recursion? */
1683 if (CvDEPTH(cv) == 100 && dowarn)
1684 sub_crush_depth(cv);
1685 if (CvDEPTH(cv) > AvFILL(padlist)) {
1686 AV *newpad = newAV();
1687 SV **oldpad = AvARRAY(svp[CvDEPTH(cv)-1]);
1688 I32 ix = AvFILL((AV*)svp[1]);
1689 svp = AvARRAY(svp[0]);
1690 for ( ;ix > 0; ix--) {
1691 if (svp[ix] != &sv_undef) {
1692 char *name = SvPVX(svp[ix]);
1693 if ((SvFLAGS(svp[ix]) & SVf_FAKE)
1696 /* outer lexical or anon code */
1697 av_store(newpad, ix,
1698 SvREFCNT_inc(oldpad[ix]) );
1700 else { /* our own lexical */
1702 av_store(newpad, ix, sv = (SV*)newAV());
1703 else if (*name == '%')
1704 av_store(newpad, ix, sv = (SV*)newHV());
1706 av_store(newpad, ix, sv = NEWSV(0,0));
1711 av_store(newpad, ix, sv = NEWSV(0,0));
1715 if (cx->blk_sub.hasargs) {
1718 av_store(newpad, 0, (SV*)av);
1719 AvFLAGS(av) = AVf_REIFY;
1721 av_store(padlist, CvDEPTH(cv), (SV*)newpad);
1722 AvFILL(padlist) = CvDEPTH(cv);
1723 svp = AvARRAY(padlist);
1727 curpad = AvARRAY((AV*)svp[CvDEPTH(cv)]);
1728 if (cx->blk_sub.hasargs) {
1729 AV* av = (AV*)curpad[0];
1732 cx->blk_sub.savearray = GvAV(defgv);
1733 cx->blk_sub.argarray = av;
1734 GvAV(defgv) = (AV*)SvREFCNT_inc(av);
1737 if (items >= AvMAX(av) + 1) {
1739 if (AvARRAY(av) != ary) {
1740 AvMAX(av) += AvARRAY(av) - AvALLOC(av);
1741 SvPVX(av) = (char*)ary;
1743 if (items >= AvMAX(av) + 1) {
1744 AvMAX(av) = items - 1;
1745 Renew(ary,items+1,SV*);
1747 SvPVX(av) = (char*)ary;
1750 Copy(mark,AvARRAY(av),items,SV*);
1751 AvFILL(av) = items - 1;
1759 if (perldb && curstash != debstash) {
1761 * We do not care about using sv to call CV;
1762 * it's for informational purposes only.
1764 SV *sv = GvSV(DBsub);
1766 gv_efullname3(sv, CvGV(cv), Nullch);
1768 RETURNOP(CvSTART(cv));
1772 label = SvPV(sv,na);
1774 else if (op->op_flags & OPf_SPECIAL) {
1776 DIE("goto must have label");
1779 label = cPVOP->op_pv;
1781 if (label && *label) {
1788 for (ix = cxstack_ix; ix >= 0; ix--) {
1790 switch (cx->cx_type) {
1792 gotoprobe = CvROOT(cx->blk_sub.cv);
1795 gotoprobe = eval_root; /* XXX not good for nested eval */
1798 gotoprobe = cx->blk_oldcop->op_sibling;
1804 gotoprobe = cx->blk_oldcop->op_sibling;
1806 gotoprobe = main_root;
1809 DIE("Can't \"goto\" outside a block");
1813 gotoprobe = main_root;
1816 retop = dofindlabel(gotoprobe, label, enterops);
1819 lastgotoprobe = gotoprobe;
1822 DIE("Can't find label %s", label);
1824 /* pop unwanted frames */
1826 if (ix < cxstack_ix) {
1833 oldsave = scopestack[scopestack_ix];
1834 LEAVE_SCOPE(oldsave);
1837 /* push wanted frames */
1839 if (*enterops && enterops[1]) {
1841 for (ix = 1; enterops[ix]; ix++) {
1851 if (!retop) retop = main_start;
1858 restartop = 0; /* hmm, must be GNU unexec().. */
1862 if (curstack == signalstack) {
1880 if (anum == 1 && VMSISH_EXIT)
1893 double value = SvNVx(GvSV(cCOP->cop_gv));
1894 register I32 match = I_32(value);
1897 if (((double)match) > value)
1898 --match; /* was fractional--truncate other way */
1900 match -= cCOP->uop.scop.scop_offset;
1903 else if (match > cCOP->uop.scop.scop_max)
1904 match = cCOP->uop.scop.scop_max;
1905 op = cCOP->uop.scop.scop_next[match];
1915 op = op->op_next; /* can't assume anything */
1917 match = *(SvPVx(GvSV(cCOP->cop_gv), na)) & 255;
1918 match -= cCOP->uop.scop.scop_offset;
1921 else if (match > cCOP->uop.scop.scop_max)
1922 match = cCOP->uop.scop.scop_max;
1923 op = cCOP->uop.scop.scop_next[match];
1932 save_lines(array, sv)
1936 register char *s = SvPVX(sv);
1937 register char *send = SvPVX(sv) + SvCUR(sv);
1939 register I32 line = 1;
1941 while (s && s < send) {
1942 SV *tmpstr = NEWSV(85,0);
1944 sv_upgrade(tmpstr, SVt_PVMG);
1945 t = strchr(s, '\n');
1951 sv_setpvn(tmpstr, s, t - s);
1952 av_store(array, line++, tmpstr);
1962 I32 oldrunlevel = runlevel;
1968 assert(CATCH_GET == TRUE);
1969 DEBUG_l(deb("(Setting up local jumplevel, runlevel = %ld)\n", (long)runlevel+1));
1973 default: /* topmost level handles it */
1975 runlevel = oldrunlevel;
1981 PerlIO_printf(PerlIO_stderr(), "panic: restartop\n");
1992 runlevel = oldrunlevel;
2011 /* set up a scratch pad */
2016 SAVESPTR(comppad_name);
2017 SAVEI32(comppad_name_fill);
2018 SAVEI32(min_intro_pending);
2019 SAVEI32(max_intro_pending);
2023 compcv = (CV*)NEWSV(1104,0);
2024 sv_upgrade((SV *)compcv, SVt_PVCV);
2025 CvUNIQUE_on(compcv);
2028 comppad_name = newAV();
2029 comppad_name_fill = 0;
2030 min_intro_pending = 0;
2031 av_push(comppad, Nullsv);
2032 curpad = AvARRAY(comppad);
2035 comppadlist = newAV();
2036 AvREAL_off(comppadlist);
2037 av_store(comppadlist, 0, (SV*)comppad_name);
2038 av_store(comppadlist, 1, (SV*)comppad);
2039 CvPADLIST(compcv) = comppadlist;
2041 if (saveop->op_type != OP_REQUIRE)
2042 CvOUTSIDE(compcv) = (CV*)SvREFCNT_inc(caller);
2046 /* make sure we compile in the right package */
2048 newstash = curcop->cop_stash;
2049 if (curstash != newstash) {
2051 curstash = newstash;
2055 SAVEFREESV(beginav);
2057 /* try to compile it */
2061 curcop = &compiling;
2062 curcop->cop_arybase = 0;
2064 rs = newSVpv("\n", 1);
2065 if (saveop->op_flags & OPf_SPECIAL)
2068 sv_setpv(GvSV(errgv),"");
2069 if (yyparse() || error_count || !eval_root) {
2080 SP = stack_base + POPMARK; /* pop original mark */
2086 if (optype == OP_REQUIRE) {
2087 char* msg = SvPVx(GvSV(errgv), na);
2088 DIE("%s", *msg ? msg : "Compilation failed in require");
2091 rs = SvREFCNT_inc(nrs);
2095 rs = SvREFCNT_inc(nrs);
2096 compiling.cop_line = 0;
2097 SAVEFREEOP(eval_root);
2099 scalarvoid(eval_root);
2100 else if (gimme & G_ARRAY)
2105 DEBUG_x(dump_eval());
2107 /* Register with debugger: */
2108 if (perldb && saveop->op_type == OP_REQUIRE) {
2109 CV *cv = perl_get_cv("DB::postponed", FALSE);
2113 XPUSHs((SV*)compiling.cop_filegv);
2115 perl_call_sv((SV*)cv, G_DISCARD);
2119 /* compiled okay, so do it */
2121 CvDEPTH(compcv) = 1;
2123 SP = stack_base + POPMARK; /* pop original mark */
2124 RETURNOP(eval_start);
2130 register CONTEXT *cx;
2135 I32 gimme = G_SCALAR;
2136 PerlIO *tryrsfp = 0;
2139 if (SvNIOKp(sv) && !SvPOKp(sv)) {
2140 SET_NUMERIC_STANDARD();
2141 if (atof(patchlevel) + 0.00000999 < SvNV(sv))
2142 DIE("Perl %s required--this is only version %s, stopped",
2143 SvPV(sv,na),patchlevel);
2146 name = SvPV(sv, na);
2148 DIE("Null filename used");
2149 TAINT_PROPER("require");
2150 if (op->op_type == OP_REQUIRE &&
2151 (svp = hv_fetch(GvHVn(incgv), name, SvCUR(sv), 0)) &&
2155 /* prepare to compile file */
2157 tmpname = savepv(name);
2158 if (*tmpname == '/' ||
2160 (tmpname[1] == '/' ||
2161 (tmpname[1] == '.' && tmpname[2] == '/')))
2163 || (tmpname[0] && tmpname[1] == ':')
2166 || (strchr(tmpname,':') || ((*tmpname == '[' || *tmpname == '<') &&
2167 (isALNUM(tmpname[1]) || strchr("$-_]>",tmpname[1]))))
2171 tryrsfp = PerlIO_open(tmpname,"r");
2174 AV *ar = GvAVn(incgv);
2177 char unixified[256];
2178 if (tounixspec_ts(tmpname,unixified) != NULL)
2179 for (i = 0; i <= AvFILL(ar); i++) {
2180 if (tounixpath_ts(SvPVx(*av_fetch(ar, i, TRUE), na),buf) == NULL)
2182 strcat(buf,unixified);
2184 for (i = 0; i <= AvFILL(ar); i++) {
2185 (void)sprintf(buf, "%s/%s",
2186 SvPVx(*av_fetch(ar, i, TRUE), na), name);
2188 tryrsfp = PerlIO_open(buf, "r");
2192 if (*s == '.' && s[1] == '/')
2195 tmpname = savepv(s);
2200 SAVESPTR(compiling.cop_filegv);
2201 compiling.cop_filegv = gv_fetchfile(tmpname);
2205 if (op->op_type == OP_REQUIRE) {
2206 sprintf(tokenbuf,"Can't locate %s in @INC", name);
2207 if (instr(tokenbuf,".h "))
2208 strcat(tokenbuf," (change .h to .ph maybe?)");
2209 if (instr(tokenbuf,".ph "))
2210 strcat(tokenbuf," (did you run h2ph?)");
2217 /* Assume success here to prevent recursive requirement. */
2218 (void)hv_store(GvHVn(incgv), name, strlen(name),
2219 newSVsv(GvSV(compiling.cop_filegv)), 0 );
2223 lex_start(sv_2mortal(newSVpv("",0)));
2225 save_aptr(&rsfp_filters);
2226 rsfp_filters = NULL;
2230 name = savepv(name);
2235 /* switch to eval mode */
2237 push_return(op->op_next);
2238 PUSHBLOCK(cx, CXt_EVAL, SP);
2239 PUSHEVAL(cx, name, compiling.cop_filegv);
2241 compiling.cop_line = 0;
2244 return DOCATCH(doeval(G_SCALAR));
2249 return pp_require(ARGS);
2255 register CONTEXT *cx;
2257 I32 gimme = GIMME_V, was = sub_generation;
2258 char tmpbuf[32], *safestr;
2262 if (!SvPV(sv,len) || !len)
2264 TAINT_PROPER("eval");
2270 /* switch to eval mode */
2272 SAVESPTR(compiling.cop_filegv);
2273 sprintf(tmpbuf, "_<(eval %lu)", (unsigned long)++evalseq);
2274 compiling.cop_filegv = gv_fetchfile(tmpbuf+2);
2275 compiling.cop_line = 1;
2276 /* XXX For C<eval "...">s within BEGIN {} blocks, this ends up
2277 deleting the eval's FILEGV from the stash before gv_check() runs
2278 (i.e. before run-time proper). To work around the coredump that
2279 ensues, we always turn GvMULTI_on for any globals that were
2280 introduced within evals. See force_ident(). GSAR 96-10-12 */
2281 safestr = savepv(tmpbuf);
2282 SAVEDELETE(defstash, safestr, strlen(safestr));
2284 hints = op->op_targ;
2286 push_return(op->op_next);
2287 PUSHBLOCK(cx, CXt_EVAL, SP);
2288 PUSHEVAL(cx, 0, compiling.cop_filegv);
2290 /* prepare to compile string */
2292 if (perldb && curstash != debstash)
2293 save_lines(GvAV(compiling.cop_filegv), linestr);
2295 ret = doeval(gimme);
2296 if (perldb && was != sub_generation) { /* Some subs defined here. */
2297 strcpy(safestr, "_<(eval )"); /* Anything fake and short. */
2299 return DOCATCH(ret);
2309 register CONTEXT *cx;
2311 U8 save_flags = op -> op_flags;
2316 retop = pop_return();
2318 if (gimme == G_VOID)
2320 else if (gimme == G_SCALAR) {
2323 if (SvFLAGS(TOPs) & SVs_TEMP)
2326 *MARK = sv_mortalcopy(TOPs);
2334 for (mark = newsp + 1; mark <= SP; mark++)
2335 if (!(SvFLAGS(*mark) & SVs_TEMP))
2336 *mark = sv_mortalcopy(*mark);
2337 /* in case LEAVE wipes old return values */
2339 curpm = newpm; /* Don't pop $1 et al till now */
2342 assert(CvDEPTH(compcv) == 1);
2344 CvDEPTH(compcv) = 0;
2346 if (optype == OP_REQUIRE &&
2347 !(gimme == G_SCALAR ? SvTRUE(*sp) : sp > newsp))
2349 /* Unassume the success we assumed earlier. */
2350 char *name = cx->blk_eval.old_name;
2351 (void)hv_delete(GvHVn(incgv), name, strlen(name), G_DISCARD);
2352 retop = die("%s did not return a true value", name);
2358 if (!(save_flags & OPf_SPECIAL))
2359 sv_setpv(GvSV(errgv),"");
2367 register CONTEXT *cx;
2368 I32 gimme = GIMME_V;
2373 push_return(cLOGOP->op_other->op_next);
2374 PUSHBLOCK(cx, CXt_EVAL, SP);
2376 eval_root = op; /* Only needed so that goto works right. */
2379 sv_setpv(GvSV(errgv),"");
2381 return DOCATCH(op->op_next);
2391 register CONTEXT *cx;
2398 if (gimme == G_VOID)
2400 else if (gimme == G_SCALAR) {
2403 if (SvFLAGS(TOPs) & (SVs_PADTMP|SVs_TEMP))
2406 *MARK = sv_mortalcopy(TOPs);
2415 for (mark = newsp + 1; mark <= SP; mark++)
2416 if (!(SvFLAGS(*mark) & (SVs_PADTMP|SVs_TEMP)))
2417 *mark = sv_mortalcopy(*mark);
2418 /* in case LEAVE wipes old return values */
2420 curpm = newpm; /* Don't pop $1 et al till now */
2423 sv_setpv(GvSV(errgv),"");
2432 register char *s = SvPV_force(sv, len);
2433 register char *send = s + len;
2434 register char *base;
2435 register I32 skipspaces = 0;
2438 bool postspace = FALSE;
2446 croak("Null picture in formline");
2448 New(804, fops, (send - s)*3+10, U16); /* Almost certainly too long... */
2453 *fpc++ = FF_LINEMARK;
2454 noblank = repeat = FALSE;
2472 case ' ': case '\t':
2483 *fpc++ = FF_LITERAL;
2491 *fpc++ = skipspaces;
2495 *fpc++ = FF_NEWLINE;
2499 arg = fpc - linepc + 1;
2506 *fpc++ = FF_LINEMARK;
2507 noblank = repeat = FALSE;
2516 ischop = s[-1] == '^';
2522 arg = (s - base) - 1;
2524 *fpc++ = FF_LITERAL;
2533 *fpc++ = FF_LINEGLOB;
2535 else if (*s == '#' || (*s == '.' && s[1] == '#')) {
2536 arg = ischop ? 512 : 0;
2546 arg |= 256 + (s - f);
2548 *fpc++ = s - base; /* fieldsize for FETCH */
2549 *fpc++ = FF_DECIMAL;
2554 bool ismore = FALSE;
2557 while (*++s == '>') ;
2558 prespace = FF_SPACE;
2560 else if (*s == '|') {
2561 while (*++s == '|') ;
2562 prespace = FF_HALFSPACE;
2567 while (*++s == '<') ;
2570 if (*s == '.' && s[1] == '.' && s[2] == '.') {
2574 *fpc++ = s - base; /* fieldsize for FETCH */
2576 *fpc++ = ischop ? FF_CHECKCHOP : FF_CHECKNL;
2594 { /* need to jump to the next word */
2596 z = WORD_ALIGN - SvCUR(sv) % WORD_ALIGN;
2597 SvGROW(sv, SvCUR(sv) + z + arg * sizeof(U16) + 4);
2598 s = SvPVX(sv) + SvCUR(sv) + z;
2600 Copy(fops, s, arg, U16);
2602 sv_magic(sv, Nullsv, 'f', Nullch, 0);