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
d5ea2ac4
Commit
d5ea2ac4
authored
May 09, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(delete_if_ordinary): New function.
(delete_temp_files, delete_failure_queue): Call it. From-SVN: r7267
parent
5a76b349
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
41 deletions
+31
-41
gcc/gcc.c
+31
-41
No files found.
gcc/gcc.c
View file @
d5ea2ac4
...
...
@@ -207,6 +207,12 @@ static char *find_a_file PROTO((struct path_prefix *, char *, int));
static
void
add_prefix
PROTO
((
struct
path_prefix
*
,
char
*
,
int
,
int
,
int
*
));
static
char
*
skip_whitespace
PROTO
((
char
*
));
static
void
record_temp_file
PROTO
((
char
*
,
int
,
int
));
static
void
delete_if_ordinary
PROTO
((
char
*
));
static
void
delete_temp_files
PROTO
((
void
));
static
void
delete_failure_queue
PROTO
((
void
));
static
void
clear_failure_queue
PROTO
((
void
));
static
char
*
choose_temp_base_try
PROTO
((
char
*
,
char
*
));
static
void
choose_temp_base
PROTO
((
void
));
static
int
check_live_switch
PROTO
((
int
,
int
));
static
char
*
handle_braces
PROTO
((
char
*
));
static
char
*
save_string
PROTO
((
char
*
,
int
));
...
...
@@ -1371,34 +1377,33 @@ record_temp_file (filename, always_delete, fail_delete)
/* Delete all the temporary files whose names we previously recorded. */
static
void
delete_if_ordinary
(
name
)
char
*
name
;
{
struct
stat
st
;
#ifdef DEBUG
int
i
,
c
;
printf
(
"Delete %s? (y or n) "
,
name
);
fflush
(
stdout
);
i
=
getchar
();
if
(
i
!=
'\n'
)
while
((
c
=
getchar
())
!=
'\n'
&&
c
!=
EOF
)
;
if
(
i
==
'y'
||
i
==
'Y'
)
#endif
/* DEBUG */
if
(
stat
(
name
,
&
st
)
>=
0
&&
S_ISREG
(
st
.
st_mode
))
if
(
unlink
(
name
)
<
0
)
if
(
verbose_flag
)
perror_with_name
(
name
);
}
static
void
delete_temp_files
()
{
register
struct
temp_file
*
temp
;
for
(
temp
=
always_delete_queue
;
temp
;
temp
=
temp
->
next
)
{
#ifdef DEBUG
int
i
;
printf
(
"Delete %s? (y or n) "
,
temp
->
name
);
fflush
(
stdout
);
i
=
getchar
();
if
(
i
!=
'\n'
)
while
(
getchar
()
!=
'\n'
)
;
if
(
i
==
'y'
||
i
==
'Y'
)
#endif
/* DEBUG */
{
struct
stat
st
;
if
(
stat
(
temp
->
name
,
&
st
)
>=
0
)
{
/* Delete only ordinary files. */
if
(
S_ISREG
(
st
.
st_mode
))
if
(
unlink
(
temp
->
name
)
<
0
)
if
(
verbose_flag
)
perror_with_name
(
temp
->
name
);
}
}
}
delete_if_ordinary
(
temp
->
name
);
always_delete_queue
=
0
;
}
...
...
@@ -1410,22 +1415,7 @@ delete_failure_queue ()
register
struct
temp_file
*
temp
;
for
(
temp
=
failure_delete_queue
;
temp
;
temp
=
temp
->
next
)
{
#ifdef DEBUG
int
i
;
printf
(
"Delete %s? (y or n) "
,
temp
->
name
);
fflush
(
stdout
);
i
=
getchar
();
if
(
i
!=
'\n'
)
while
(
getchar
()
!=
'\n'
)
;
if
(
i
==
'y'
||
i
==
'Y'
)
#endif
/* DEBUG */
{
if
(
unlink
(
temp
->
name
)
<
0
)
if
(
verbose_flag
)
perror_with_name
(
temp
->
name
);
}
}
delete_if_ordinary
(
temp
->
name
);
}
static
void
...
...
@@ -1439,8 +1429,8 @@ clear_failure_queue ()
static
char
*
choose_temp_base_try
(
try
,
base
)
char
*
try
;
char
*
base
;
char
*
try
;
char
*
base
;
{
char
*
rv
;
if
(
base
)
...
...
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