/* * strlcpy.c */#include<string.h>#include<klibc/compiler.h>size_tstrlcpy(char*dst,constchar*src,size_tsize){size_tbytes=0;char*q=dst;constchar*p=src;charch;while((ch=*p++)){if(bytes+1<size)*q++=ch;bytes++;}/* If size == 0 there is no space for a final null... */if(size)*q='\0';returnbytes;}