?????й?C????????????????й????????????????????????????????????????????????????????鷳?????????????????????char????????????á???????????????????????str????????У??????????β????????NULL????????strncpy????????linux kernel????????д??

/**
 * strncpy - Copy a length-limited?? %NUL-terminated string
 * @dest: Where to copy the string to
 * @src: Where to copy the string from
 * @count: The maximum number of bytes to copy
 *
 * The result is not %NUL-terminated if the source exceeds
 * @count bytes.
 */
char * strncpy(char * dest??const char *src??size_t count)
{
 char *tmp = dest;

 while (count) {
  if ((*tmp = *src) != 0) src++;
  tmp++;
  count--;
 }
 return dest;
}
 


??????memmove????????????д??

/**
 * memmove - Copy one area of memory to another
 * @dest: Where to copy to
 * @src: Where to copy from
 * @count: The size of the area.
 *
 * Unlike memcpy()?? memmove() copes with overlapping areas.
 */
void * memmove(void * dest??const void *src??size_t count)
{
 char *tmp?? *s;

 if (dest <= src) {
  tmp = (char *) dest;
  s = (char *) src;
  while (count--)
   *tmp++ = *s++;
  }
 else {
  tmp = (char *) dest + count;
  s = (char *) src + count;
  while (count--)
   *--tmp = *--s;
  }

 return dest;
}
 


??????????????????????memmove?????м????????

??????1???????dest??src???????????ж???????

??????2????????????NULL???

??????3????????????????????????С????

??????4??memmove?????????????????????????????char*?????