static char **client_brkstring (char *, char *, char *);
static int client_brkany (char, char *);
static char **client_copyip (char **, char **, int);
-static char *client_getcpy (char *);
static void client_freelist(char **);
ap = arguments;
if (args != NULL && *args != 0) {
- ap = client_copyip (client_brkstring (client_getcpy (args), " ", "\n"),
+ ap = client_copyip (client_brkstring (mh_xstrdup(args), " ", "\n"),
ap, MAXARGS);
} else {
if (servers != NULL && *servers != 0)
- ap = client_copyip (client_brkstring (client_getcpy (servers), " ", "\n"),
+ ap = client_copyip (client_brkstring (mh_xstrdup(servers), " ", "\n"),
ap, MAXARGS);
}
if (ap == arguments) {
- *ap++ = client_getcpy ("localhost");
+ *ap++ = mh_xstrdup("localhost");
*ap = NULL;
}
static char **
client_brkstring (char *strg, char *brksep, char *brkterm)
{
- register int bi;
- register char c, *sp;
+ int bi;
+ char c, *sp;
sp = strg;
static int
client_brkany (char chr, char *strg)
{
- register char *sp;
+ char *sp;
if (strg)
for (sp = strg; *sp; sp++)
return q;
}
-
-
-static char *
-client_getcpy (char *str)
-{
- char *cp;
- size_t len;
-
- len = strlen(str) + 1;
- cp = mh_xmalloc(len);
-
- memcpy (cp, str, len);
- return cp;
-}