1 /*-
2 * Copyright (c) 1980 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * %sccs.include.proprietary.c%
6 */
7
8 #ifndef lint
9 static char sccsid[] = "@(#)s_cat.c 5.2 (Berkeley) 04/12/91";
10 #endif /* not lint */
11
s_cat(lp,rpp,rnp,np,ll)12 s_cat(lp, rpp, rnp, np, ll)
13 char *lp, *rpp[];
14 long int rnp[], *np, ll;
15 {
16 int i, n, nc;
17 char *rp;
18
19 n = *np;
20 for(i = 0 ; i < n ; ++i)
21 {
22 nc = ll;
23 if(rnp[i] < nc)
24 nc = rnp[i];
25 ll -= nc;
26 rp = rpp[i];
27 while(--nc >= 0)
28 *lp++ = *rp++;
29 }
30 while(--ll >= 0)
31 *lp++ = ' ';
32 }
33