(void) strncpy (dest, ptr, len);
(void) strncpy (dest, ptr, len-1);
String _XtGetUserName(dest, len)    String dest;    int len;{#ifdef WIN32    String ptr = NULL;    if ((ptr = getenv("USERNAME"))) {	(void) strncpy (dest, ptr, len);	dest[len-1] = '\0';    } else	*dest = '\0';#else    _Xgetpwparams pwparams;    struct passwd *pw;    char* ptr;    if ((ptr = getenv("USER"))) {	(void) strncpy (dest, ptr, len);	dest[len-1] = '\0';    } else {	if ((pw = _XGetpwuid(getuid(),pwparams)) != NULL)	    (void) strcpy (dest, pw->pw_name);	else	    *dest = '\0';    }#endif    return dest;}