/********************************************************************** * Copyright (c) Digital Equipment Corporation 1984, 1985, 1986. * * All Rights Reserved. * * Reference "/usr/src/COPYRIGHT" for applicable restrictions. * **********************************************************************/ static char Sccsid[]="@(#)repeat.c 3.0 4/22/86"; /* Set `result' equal to `str' repeated `repfac' times. Return `result'. */ char *repeat(result,str,repfac) char *result, *str; register unsigned repfac; { register char *r, *s; r = result; for (++repfac; --repfac > 0; --r) for (s=str; *r++ = *s++; ); *r = '\0'; return(result); }