Commit 66f788b0 by Bruce Korb Committed by Bruce Korb

Check the last byte for '\n'

From-SVN: r107492
parent f375f462
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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment