#include "f2c.h"

#ifdef KR_headers
VOID s_cat(lp, rpp, rnp, np, ll) char *lp, *rpp[];
ftnlen rnp[], *np, ll;
#else
VOID s_cat(char *lp, char *rpp[], ftnlen rnp[], ftnlen *np, ftnlen ll)
#endif
{
  ftnlen i, n, nc;
  char *f__rp;

  n = (int) * np;
  for(i = 0 ; i < n ; ++i)
  {
    nc = ll;
    if(rnp[i] < nc)
      nc = rnp[i];
    ll -= nc;
    f__rp = rpp[i];
    while(--nc >= 0)
      *lp++ = *f__rp++;
  }
  while(--ll >= 0)
    *lp++ = ' ';
}
