Deleted Added
full compact
normal.c (32785) normal.c (44852)
1/* Normal-format output routines for GNU DIFF.
1/* Normal-format output routines for GNU DIFF.
2 Copyright (C) 1988, 1989, 1993 Free Software Foundation, Inc.
2 Copyright (C) 1988, 1989, 1993, 1998 Free Software Foundation, Inc.
3
4This file is part of GNU DIFF.
5
6GNU DIFF is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10

--- 36 unchanged lines hidden (view full) ---

47 analyze_hunk (hunk, &first0, &last0, &first1, &last1, &deletes, &inserts);
48 if (!deletes && !inserts)
49 return;
50
51 begin_output ();
52
53 /* Print out the line number header for this hunk */
54 print_number_range (',', &files[0], first0, last0);
3
4This file is part of GNU DIFF.
5
6GNU DIFF is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10

--- 36 unchanged lines hidden (view full) ---

47 analyze_hunk (hunk, &first0, &last0, &first1, &last1, &deletes, &inserts);
48 if (!deletes && !inserts)
49 return;
50
51 begin_output ();
52
53 /* Print out the line number header for this hunk */
54 print_number_range (',', &files[0], first0, last0);
55 fprintf (outfile, "%c", change_letter (inserts, deletes));
55 printf_output ("%c", change_letter (inserts, deletes));
56 print_number_range (',', &files[1], first1, last1);
56 print_number_range (',', &files[1], first1, last1);
57 fprintf (outfile, "\n");
57 printf_output ("\n");
58
59 /* Print the lines that the first file has. */
60 if (deletes)
61 for (i = first0; i <= last0; i++)
62 print_1_line ("<", &files[0].linbuf[i]);
63
64 if (inserts && deletes)
58
59 /* Print the lines that the first file has. */
60 if (deletes)
61 for (i = first0; i <= last0; i++)
62 print_1_line ("<", &files[0].linbuf[i]);
63
64 if (inserts && deletes)
65 fprintf (outfile, "---\n");
65 printf_output ("---\n");
66
67 /* Print the lines that the second file has. */
68 if (inserts)
69 for (i = first1; i <= last1; i++)
70 print_1_line (">", &files[1].linbuf[i]);
71}
66
67 /* Print the lines that the second file has. */
68 if (inserts)
69 for (i = first1; i <= last1; i++)
70 print_1_line (">", &files[1].linbuf[i]);
71}