/*
   Strncpy
   
   See COPYLEFT.JRD
*/

char * strncpy(target, str, nbytes)
char * target;
char * str;
int nbytes;
{
  char * t = target;
  char * s = str;

  while ((--nbytes >= 0) && (*s))
	*t++ = *s++;
  *t = '\0';
  while (--nbytes >= 0)
	*t++ = '\0';
  return(target);
}
