1
1
/* Shared definitions for GNU DIFF
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.
6
6
This file is part of GNU DIFF.
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)
10
the Free Software Foundation, either version 3 of the License, or
11
(at your option) any later version.
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.
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/>. */
23
21
#include "system.h"
24
#include <unlocked-io.h>
28
26
/* What kind of changes a hunk contains. */
144
142
despite the characters added to the front of each line (-t). */
145
143
XTERN bool expand_tabs;
145
/* Number of columns between tab stops. */
146
XTERN size_t tabsize;
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;
153
/* Do not output an initial space or tab before the text of an empty line. */
154
XTERN bool suppress_blank_empty;
152
156
/* Remove trailing carriage returns from input. */
153
157
XTERN bool strip_trailing_cr;
176
180
XTERN bool suppress_common_lines;
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;
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;
198
/* Name of program the user invoked (for error messages). */
199
XTERN char *program_name;
201
202
/* The strftime format to use for time strings. */
202
203
XTERN char const *time_format;
277
278
lin nondiscarded_lines;
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. */
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 *);
375
extern char const version_string[];
373
void translate_range (struct file_data const *, lin, lin, long int *, long int *);