From 96e1fbe4c727ac843a4760859148378c22d52b66 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 7 May 2006 08:16:19 +0000 Subject: * 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. --- src/normal.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/normal.c') 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) -- cgit v1.2.1