mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-25 15:26:14 +08:00
Check the last byte for '\n'
From-SVN: r107492
This commit is contained in:
parent
f375f46240
commit
66f788b0b3
@ -1,3 +1,8 @@
|
||||
2005-11-24 Bruce Korb <bkorb@gnu.org>
|
||||
|
||||
* fixincl.c(write_replacement) "here strings" in AutoGen often/generally
|
||||
don't have a terminating newline. Check the last byte for '\n'.
|
||||
|
||||
2005-11-13 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
* check.tpl: Handle CVS additionally.
|
||||
|
@ -1202,7 +1202,10 @@ write_replacement (tFixDesc* p_fixd)
|
||||
|
||||
{
|
||||
FILE* out_fp = create_file ();
|
||||
fputs (pz_text, out_fp);
|
||||
size_t sz = strlen (pz_text);
|
||||
fwrite (pz_text, sz, 1, out_fp);
|
||||
if (pz_text[ sz-1 ] != '\n')
|
||||
fputc ('\n', out_fp);
|
||||
fclose (out_fp);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user