aboutsummaryrefslogtreecommitdiff
path: root/fixincludes
diff options
context:
space:
mode:
Diffstat (limited to 'fixincludes')
-rw-r--r--fixincludes/ChangeLog5
-rw-r--r--fixincludes/fixincl.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index eb73943..0121729 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -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.
diff --git a/fixincludes/fixincl.c b/fixincludes/fixincl.c
index 250f0b0..f8941c3 100644
--- a/fixincludes/fixincl.c
+++ b/fixincludes/fixincl.c
@@ -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);
}
}