#include "prototypes.h"
#include "string/memset/memzero.h"
#include "string/strchr/stpspn.h"
+#include "string/strcpy/strtcpy.h"
#include "string/strtok/stpsep.h"
* login_prompt() displays the standard login prompt. If ISSUE_FILE
* is set in login.defs, this file is displayed before the prompt.
*/
-
-void login_prompt (char *name, int namesize)
+void
+login_prompt(char *name, int namesize)
{
char buf[1024];
*/
cp = stpspn(buf, " \t");
-
- for (i = 0; i < namesize - 1 && *cp != '\0'; name[i++] = *cp++);
-
- stpcpy(&name[i], "");
+ strtcpy(name, cp, namesize);
/*
* Set the SIGQUIT handler back to its original value