diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-03-21 23:49:12 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-03-21 23:49:12 +0000 |
commit | 967e832dd1d3235bcf51a3ac8ec310b06588d0ab (patch) | |
tree | 9d9a5d8b86aabebb1108bde45e3214ef1c909fba /gnu/usr.bin | |
parent | 17d4a270579cc58ac148fb07097d0574c7057a4c (diff) |
permit [] hostname formats in CVSroot, for v6
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r-- | gnu/usr.bin/cvs/src/root.c | 14 |
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); |