(username_completion_function) [__GO32__]: Don't bypass getpw* calls.
(filename_completion_function): Handle drive-relative file names d:foo.
This commit is contained in:
parent
a27688aa9f
commit
cd0040c11f
1 changed files with 10 additions and 2 deletions
|
@ -1407,9 +1407,9 @@ username_completion_function (text, state)
|
||||||
char *text;
|
char *text;
|
||||||
int state;
|
int state;
|
||||||
{
|
{
|
||||||
#if defined (__GO32__) || defined (__WIN32__) || defined (__OPENNT)
|
#if defined (__WIN32__) || defined (__OPENNT)
|
||||||
return (char *)NULL;
|
return (char *)NULL;
|
||||||
#else /* !__GO32__ */
|
#else /* !__WIN32__ && !__OPENNT */
|
||||||
static char *username = (char *)NULL;
|
static char *username = (char *)NULL;
|
||||||
static struct passwd *entry;
|
static struct passwd *entry;
|
||||||
static int namelen, first_char, first_char_loc;
|
static int namelen, first_char, first_char_loc;
|
||||||
|
@ -1499,6 +1499,14 @@ filename_completion_function (text, state)
|
||||||
strcpy (filename, ++temp);
|
strcpy (filename, ++temp);
|
||||||
*temp = '\0';
|
*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
|
else
|
||||||
{
|
{
|
||||||
dirname[0] = '.';
|
dirname[0] = '.';
|
||||||
|
|
Loading…
Reference in a new issue