summaryrefslogtreecommitdiff
path: root/readline
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2000-03-15 11:36:20 +0000
committerEli Zaretskii <eliz@gnu.org>2000-03-15 11:36:20 +0000
commit84fa01df0b1c267b80cde777acfb4505f9e4040d (patch)
treef19f50ac5c43b0d9283aab441bd995c5ac69c2f6 /readline
parent4ac2aa6127375ef9a793336f581f621ad69c87ce (diff)
downloadgdb-84fa01df0b1c267b80cde777acfb4505f9e4040d.tar.gz
(username_completion_function) [__GO32__]: Don't bypass getpw* calls.
(filename_completion_function): Handle drive-relative file names d:foo.
Diffstat (limited to 'readline')
-rw-r--r--readline/complete.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/readline/complete.c b/readline/complete.c
index 714a2bf49dc..1188120f0ab 100644
--- a/readline/complete.c
+++ b/readline/complete.c
@@ -1407,9 +1407,9 @@ username_completion_function (text, state)
char *text;
int state;
{
-#if defined (__GO32__) || defined (__WIN32__) || defined (__OPENNT)
+#if defined (__WIN32__) || defined (__OPENNT)
return (char *)NULL;
-#else /* !__GO32__ */
+#else /* !__WIN32__ && !__OPENNT */
static char *username = (char *)NULL;
static struct passwd *entry;
static int namelen, first_char, first_char_loc;
@@ -1499,6 +1499,14 @@ filename_completion_function (text, state)
strcpy (filename, ++temp);
*temp = '\0';
}
+#if defined (__WIN32__) || defined (__OPENNT) || defined (__MSDOS__)
+ /* Handle the drive-relative names "d:foo/bar". */
+ else if (dirname[1] == ':')
+ {
+ strcpy (filename, dirname + 2);
+ dirname[2] = '\0';
+ }
+#endif
else
{
dirname[0] = '.';