~peter-pearse/ubuntu/natty/diffutils/prop001

« back to all changes in this revision

Viewing changes to src/normal.c

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2010-05-04 20:38:00 UTC
  • mfrom: (2.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100504203800-f67xd9rsa9xl9qqj
Tags: 1:3.0-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Normal-format output routines for GNU DIFF.
2
2
 
3
 
   Copyright (C) 1988, 1989, 1993, 1995, 1998, 2001 Free Software
4
 
   Foundation, Inc.
 
3
   Copyright (C) 1988-1989, 1993, 1995, 1998, 2001, 2006, 2009-2010 Free
 
4
   Software Foundation, Inc.
5
5
 
6
6
   This file is part of GNU DIFF.
7
7
 
8
 
   GNU DIFF is free software; you can redistribute it and/or modify
 
8
   This program is free software: you can redistribute it and/or modify
9
9
   it under the terms of the GNU General Public License as published by
10
 
   the Free Software Foundation; either version 2, or (at your option)
11
 
   any later version.
 
10
   the Free Software Foundation, either version 3 of the License, or
 
11
   (at your option) any later version.
12
12
 
13
 
   GNU DIFF is distributed in the hope that it will be useful,
 
13
   This program is distributed in the hope that it will be useful,
14
14
   but WITHOUT ANY WARRANTY; without even the implied warranty of
15
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
16
   GNU General Public License for more details.
17
17
 
18
18
   You should have received a copy of the GNU General Public License
19
 
   along with this program; see the file COPYING.
20
 
   If not, write to the Free Software Foundation,
21
 
   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
19
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
22
20
 
23
21
#include "diff.h"
24
22
 
52
50
 
53
51
  /* Print out the line number header for this hunk */
54
52
  print_number_range (',', &files[0], first0, last0);
55
 
  fprintf (outfile, "%c", change_letter[changes]);
 
53
  fputc (change_letter[changes], outfile);
56
54
  print_number_range (',', &files[1], first1, last1);
57
 
  fprintf (outfile, "\n");
 
55
  fputc ('\n', outfile);
58
56
 
59
57
  /* Print the lines that the first file has.  */
60
58
  if (changes & OLD)
62
60
      print_1_line ("<", &files[0].linbuf[i]);
63
61
 
64
62
  if (changes == CHANGED)
65
 
    fprintf (outfile, "---\n");
 
63
    fputs ("---\n", outfile);
66
64
 
67
65
  /* Print the lines that the second file has.  */
68
66
  if (changes & NEW)