* dcrt0.cc (globify): Don't use \ quoting when apparently quoting a DOS path
spec.
This commit is contained in:
parent
e11ddfb02d
commit
c845acffda
@ -1,3 +1,8 @@
|
|||||||
|
Tue Apr 18 17:26:43 2000 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
|
* dcrt0.cc (globify): Don't use \ quoting when apparently quoting a DOS
|
||||||
|
path spec.
|
||||||
|
|
||||||
Sun Apr 16 18:54:21 2000 Christopher Faylor <cgf@cygnus.com>
|
Sun Apr 16 18:54:21 2000 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
* init.cc (dll_entry): Use better check for determining when to set
|
* init.cc (dll_entry): Use better check for determining when to set
|
||||||
|
@ -308,6 +308,8 @@ globify (char *word, char **&argv, int &argc, int &argvlen)
|
|||||||
int n = 0;
|
int n = 0;
|
||||||
char *p, *s;
|
char *p, *s;
|
||||||
int dos_spec = isalpha(*word) && word[1] == ':' ? 1 : 0;
|
int dos_spec = isalpha(*word) && word[1] == ':' ? 1 : 0;
|
||||||
|
if (!dos_spec && isquote(*word) && word[1] && word[2])
|
||||||
|
dos_spec = isalpha(word[1]) && word[2] == ':' ? 1 : 0;
|
||||||
|
|
||||||
/* We'll need more space if there are quoting characters in
|
/* We'll need more space if there are quoting characters in
|
||||||
word. If that is the case, doubling the size of the
|
word. If that is the case, doubling the size of the
|
||||||
@ -330,7 +332,11 @@ globify (char *word, char **&argv, int &argc, int &argvlen)
|
|||||||
char quote = *s;
|
char quote = *s;
|
||||||
while (*++s && *s != quote)
|
while (*++s && *s != quote)
|
||||||
{
|
{
|
||||||
if (*s == '\\' && s[1] == quote)
|
if (*s != '\\')
|
||||||
|
/* nothing */;
|
||||||
|
else if (dos_spec)
|
||||||
|
*p++ = '\\';
|
||||||
|
else if (s[1] == quote || s[1] == '\\')
|
||||||
s++;
|
s++;
|
||||||
*p++ = '\\';
|
*p++ = '\\';
|
||||||
*p++ = *s;
|
*p++ = *s;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user