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
d50c1d49
Commit
d50c1d49
authored
Mar 16, 1993
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(write_output): Test value of `write'; report errors.
(out_fname): Var now file-scope. From-SVN: r3752
parent
ec241c19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
gcc/cccp.c
+10
-6
No files found.
gcc/cccp.c
View file @
d50c1d49
...
...
@@ -917,6 +917,9 @@ static U_CHAR is_space[256];
static
int
errors
=
0
;
/* Error counter for exit code */
/* Name of output file, for error messages. */
static
char
*
out_fname
;
/* Zero means dollar signs are punctuation.
-$ stores 0; -traditional may store 1. Default is 1 for VMS, 0 otherwise.
This must be 0 for correct processing of this ANSI C program:
...
...
@@ -972,7 +975,7 @@ main (argc, argv)
{
int
st_mode
;
long
st_size
;
char
*
in_fname
,
*
out_fname
;
char
*
in_fname
;
char
*
p
;
int
f
,
i
;
FILE_BUF
*
fp
;
...
...
@@ -4683,10 +4686,10 @@ write_output ()
line_command_len
*=
2
);
sprintf
(
line_command
,
"
\n
# %d
\"
%s
\"\n
"
,
next_string
->
lineno
,
next_string
->
filename
);
write
(
fileno
(
stdout
),
line_command
,
strlen
(
line_command
)
);
write
(
fileno
(
stdout
),
next_string
->
contents
,
next_string
->
len
);
if
(
write
(
fileno
(
stdout
),
line_command
,
strlen
(
line_command
))
<
0
)
perror_with_name
(
out_fname
);
if
(
write
(
fileno
(
stdout
),
next_string
->
contents
,
next_string
->
len
)
<
0
)
perror_with_name
(
out_fname
);
}
next_string
=
next_string
->
chain
;
}
...
...
@@ -4696,7 +4699,8 @@ write_output ()
-
(
cur_buf_loc
-
outbuf
.
buf
))
:
outbuf
.
bufp
-
cur_buf_loc
);
write
(
fileno
(
stdout
),
cur_buf_loc
,
len
);
if
(
write
(
fileno
(
stdout
),
cur_buf_loc
,
len
)
<
len
)
perror_with_name
(
out_fname
);
cur_buf_loc
+=
len
;
}
}
...
...
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