strncpy(out,p,size-1); out[size-1]='\0';
BUF_strlcpy(out,p,size);
void program_name(char *in, char *out, int size)	{	char *p;	p=strrchr(in,'/');	if (p != NULL)		p++;	else		p=in;	strncpy(out,p,size-1);	out[size-1]='\0';	}