~ubuntu-branches/ubuntu/vivid/diffutils/vivid

« back to all changes in this revision

Viewing changes to src/diff.h

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2010-02-13 11:49:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100213114900-09lz8jx6wct52qp8
Tags: 1:2.9-1
* New upstream release, now under GPL version 3 or later.
* There is now a --tab-size option. Closes: #82923.
* Manpage for cmp describes exit status. Closes: #200614.
* Manpage for diff describes exit status. Closes: #228441, #473233.
* The file de.po is now more recent. Closes: #313686.
* Fixed bad sdiff behaviour. Closes: #320222.
* Added wdiff to Suggests. Closes: #324627.
* Fixed cmp behaviour regarding stdout and stderr. Closes: #356083.
* The file ru.po is now more recent. Closes: #409274.
* The file es.po is now more recent. Closes: #418005, #481708.
* The file nl.po is now more recent. Closes: #427370.
* Modified watch file to use http instead of ftp.
* Removed .comment section from executables.
* Added Homepage field to control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Shared definitions for GNU DIFF
2
2
 
3
 
   Copyright (C) 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1998, 2001,
4
 
   2002 Free Software Foundation, Inc.
 
3
   Copyright (C) 1988-1989, 1991-1995, 1998, 2001-2002, 2004, 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 "system.h"
 
22
#include <regex.h>
24
23
#include <stdio.h>
25
 
 
26
 
#define TAB_WIDTH 8
 
24
#include <unlocked-io.h>
27
25
 
28
26
/* What kind of changes a hunk contains.  */
29
27
enum changes
144
142
   despite the characters added to the front of each line (-t).  */
145
143
XTERN bool expand_tabs;
146
144
 
 
145
/* Number of columns between tab stops.  */
 
146
XTERN size_t tabsize;
 
147
 
147
148
/* Use a tab in the output, rather than a space, before the text of an
148
149
   input line, so as to keep the proper alignment in the input line
149
150
   without changing the characters in it (-T).  */
150
151
XTERN bool initial_tab;
151
152
 
 
153
/* Do not output an initial space or tab before the text of an empty line.  */
 
154
XTERN bool suppress_blank_empty;
 
155
 
152
156
/* Remove trailing carriage returns from input.  */
153
157
XTERN bool strip_trailing_cr;
154
158
 
176
180
XTERN bool suppress_common_lines;
177
181
 
178
182
/* The half line width and column 2 offset for OUTPUT_SDIFF.  */
179
 
XTERN unsigned int sdiff_half_width;
180
 
XTERN unsigned int sdiff_column2_offset;
 
183
XTERN size_t sdiff_half_width;
 
184
XTERN size_t sdiff_column2_offset;
181
185
 
182
186
/* String containing all the command options diff received,
183
187
   with spaces between and at the beginning but none at the end.
195
199
   slower) but will find a guaranteed minimal set of changes.  */
196
200
XTERN bool minimal;
197
201
 
198
 
/* Name of program the user invoked (for error messages).  */
199
 
XTERN char *program_name;
200
 
 
201
202
/* The strftime format to use for time strings.  */
202
203
XTERN char const *time_format;
203
204
 
277
278
    lin nondiscarded_lines;
278
279
 
279
280
    /* Vector, indexed by real origin-0 line number,
280
 
       containing TRUE for a line that is an insertion or a deletion.
 
281
       containing 1 for a line that is an insertion or a deletion.
281
282
       The results of comparison are stored here.  */
282
 
    bool *changed;
 
283
    char *changed;
283
284
 
284
285
    /* 1 if file ends in a line with no final newline.  */
285
286
    bool missing_newline;
369
370
void print_number_range (char, struct file_data *, lin, lin);
370
371
void print_script (struct change *, struct change * (*) (struct change *), void (*) (struct change *));
371
372
void setup_output (char const *, char const *, bool);
372
 
void translate_range (struct file_data const *, lin, lin, long *, long *);
373
 
 
374
 
/* version.c */
375
 
extern char const version_string[];
 
373
void translate_range (struct file_data const *, lin, lin, long int *, long int *);