diff options
Diffstat (limited to 'do/push')
-rw-r--r-- | do/push | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/do/push b/do/push new file mode 100644 index 0000000000..8ff5b2400c --- /dev/null +++ b/do/push @@ -0,0 +1,19 @@ +STR * +do_push(ary,arglast) +register ARRAY *ary; +int *arglast; +{ + register STR **st = stack->ary_array; + register int sp = arglast[1]; + register int items = arglast[2] - sp; + register STR *TARG = &str_undef; + + for (st += ++sp; items > 0; items--,st++) { + TARG = Str_new(26,0); + if (*st) + str_sset(TARG,*st); + (void)apush(ary,TARG); + } + return TARG; +} + |