diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-05-07 08:16:19 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2006-05-07 08:16:19 +0000 |
commit | 96e1fbe4c727ac843a4760859148378c22d52b66 (patch) | |
tree | 31e13d571beeca7bb8f92debbcc0988fc427e302 /src/normal.c | |
parent | e0842123160e781efcc0ddbf854dae53b7f674e2 (diff) | |
download | diffutils-96e1fbe4c727ac843a4760859148378c22d52b66.tar.gz |
* src/context.c (pr_context_hunk, pr_unidiff_hunk):
Prefer fputs or fputc to fprintf, since it's a tad more efficient
with unlocked-IO on glibc. Long ago we avoided fputs to
work around an ancient SunOS bug, but that's no longer relevant.
* src/diff3.c (output_diff3, dotlines, undotlines):
(output_diff3_edscript, output_diff3_merge): Likewise.
This also avoids a gcc -Wformat-security warning reported
by Jim Meyering.
* src/ed.c (print_ed_hunk, print_forward_ed_hunk, print_rcs_hunk):
Likewise.
* src/normal.c (print_normal_hunk): Likewise.
Diffstat (limited to 'src/normal.c')
-rw-r--r-- | src/normal.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/normal.c b/src/normal.c index fcc6ff4..0f322c9 100644 --- a/src/normal.c +++ b/src/normal.c @@ -1,7 +1,7 @@ /* Normal-format output routines for GNU DIFF. - Copyright (C) 1988, 1989, 1993, 1995, 1998, 2001 Free Software - Foundation, Inc. + Copyright (C) 1988, 1989, 1993, 1995, 1998, 2001, 2006 Free + Software Foundation, Inc. This file is part of GNU DIFF. @@ -52,9 +52,9 @@ print_normal_hunk (struct change *hunk) /* Print out the line number header for this hunk */ print_number_range (',', &files[0], first0, last0); - fprintf (outfile, "%c", change_letter[changes]); + fputc (change_letter[changes], outfile); print_number_range (',', &files[1], first1, last1); - fprintf (outfile, "\n"); + fputc ('\n', outfile); /* Print the lines that the first file has. */ if (changes & OLD) @@ -62,7 +62,7 @@ print_normal_hunk (struct change *hunk) print_1_line ("<", &files[0].linbuf[i]); if (changes == CHANGED) - fprintf (outfile, "---\n"); + fputs ("---\n", outfile); /* Print the lines that the second file has. */ if (changes & NEW) |