summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-03-21 23:49:12 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-03-21 23:49:12 +0000
commit967e832dd1d3235bcf51a3ac8ec310b06588d0ab (patch)
tree9d9a5d8b86aabebb1108bde45e3214ef1c909fba /gnu/usr.bin
parent17d4a270579cc58ac148fb07097d0574c7057a4c (diff)
permit [] hostname formats in CVSroot, for v6
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/cvs/src/root.c14
1 files changed, 13 insertions, 1 deletions
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);