Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
6ce3c2a1
Commit
6ce3c2a1
authored
Feb 21, 1995
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fix_argv): Rewrite.
From-SVN: r9013
parent
3709124d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
32 deletions
+35
-32
gcc/gcc.c
+35
-32
No files found.
gcc/gcc.c
View file @
6ce3c2a1
...
...
@@ -2163,39 +2163,42 @@ pexecute (search_flag, program, argv, not_last)
#ifdef WINNT
char
**
/* This is a kludge to get around the Microsoft C spawn functions' propensity
to remove the outermost set of double quotes from all arguments. */
const
char
*
const
fix_argv
(
argvec
)
char
**
argvec
char
**
argvec
;
{
int
i
;
for
(
i
=
1
;
argvec
[
i
]
!=
0
;
i
++
)
{
int
len
,
j
;
char
*
temp
,
*
newtemp
;
temp
=
argvec
[
i
];
len
=
strlen
(
temp
);
for
(
j
=
0
;
j
<
len
;
j
++
)
{
if
(
temp
[
j
]
==
'"'
)
{
newtemp
=
xmalloc
(
len
+
2
);
strncpy
(
newtemp
,
temp
,
j
);
newtemp
[
j
]
=
'\\'
;
strncpy
(
&
newtemp
[
j
+
1
],
&
temp
[
j
],
len
-
j
);
newtemp
[
len
+
1
]
=
0
;
free
(
temp
);
temp
=
newtemp
;
len
++
;
j
++
;
}
}
argvec
[
i
]
=
temp
;
}
return
argvec
;
int
i
;
for
(
i
=
1
;
argvec
[
i
]
!=
0
;
i
++
)
{
int
len
,
j
;
char
*
temp
,
*
newtemp
;
temp
=
argvec
[
i
];
len
=
strlen
(
temp
);
for
(
j
=
0
;
j
<
len
;
j
++
)
{
if
(
temp
[
j
]
==
'"'
)
{
newtemp
=
xmalloc
(
len
+
2
);
strncpy
(
newtemp
,
temp
,
j
);
newtemp
[
j
]
=
'\\'
;
strncpy
(
&
newtemp
[
j
+
1
],
&
temp
[
j
],
len
-
j
);
newtemp
[
len
+
1
]
=
0
;
free
(
temp
);
temp
=
newtemp
;
len
++
;
j
++
;
}
}
argvec
[
i
]
=
temp
;
}
return
(
const
char
*
const
*
)
argvec
;
}
#define FIX_ARGV(a) fix_argv(a)
...
...
@@ -2204,7 +2207,7 @@ fix_argv (argvec)
#define FIX_ARGV(a) a
#endif
/* OS2 or WINNT */
#endif
static
int
pexecute
(
search_flag
,
program
,
argv
,
not_last
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment