perl 5.0 alpha 3
[p5sagit/p5-mst-13.2.git] / do / repeatary
CommitLineData
79072805 1int
2do_repeatary(ARGS)
3ARGSdecl
4{
5 MSP;
6 register int count = POPi;
7 register int items = sp - mark;
8 register int i;
9 int max;
10
11 max = items * count;
12 MEXTEND(mark,max);
13 if (count > 1) {
14 while (sp > mark) {
15 if (*sp)
16 (*sp)->str_pok &= ~SP_TEMP;
17 }
18 mark++;
19 repeatcpy(mark + items, mark, items * sizeof(STR*), count - 1);
20 }
21 sp += max;
22
23 MRETURN;
24}
25