From 967e832dd1d3235bcf51a3ac8ec310b06588d0ab Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Wed, 21 Mar 2001 23:49:12 +0000 Subject: permit [] hostname formats in CVSroot, for v6 --- gnu/usr.bin/cvs/src/root.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'gnu/usr.bin') diff --git a/gnu/usr.bin/cvs/src/root.c b/gnu/usr.bin/cvs/src/root.c index 1007fc422b4..1c92b1561e8 100644 --- a/gnu/usr.bin/cvs/src/root.c +++ b/gnu/usr.bin/cvs/src/root.c @@ -397,7 +397,19 @@ parse_cvsroot (CVSroot) CVSroot_username = NULL; } - if ((p = strchr (cvsroot_copy, ':')) != NULL) + if (*cvsroot_copy == '[') + { + p = strchr(cvsroot_copy, ']'); + if (p != NULL) + { + *p = '\0'; + CVSroot_hostname = xstrdup (cvsroot_copy+1); + *p++ = ']'; + if (*p == ':') + cvsroot_copy = p+1; + } + } + else if ((p = strchr (cvsroot_copy, ':')) != NULL) { *p = '\0'; CVSroot_hostname = xstrdup (cvsroot_copy); -- cgit v1.2.3