xref: /dflybsd-src/contrib/cvs-1.12/diff/diff.h (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
1*86d7f5d3SJohn Marino /* Shared definitions for GNU DIFF
2*86d7f5d3SJohn Marino    Copyright (C) 1988, 89, 91, 92, 93, 97, 1998 Free Software Foundation, Inc.
3*86d7f5d3SJohn Marino 
4*86d7f5d3SJohn Marino This file is part of GNU DIFF.
5*86d7f5d3SJohn Marino 
6*86d7f5d3SJohn Marino GNU DIFF is free software; you can redistribute it and/or modify
7*86d7f5d3SJohn Marino it under the terms of the GNU General Public License as published by
8*86d7f5d3SJohn Marino the Free Software Foundation; either version 2, or (at your option)
9*86d7f5d3SJohn Marino any later version.
10*86d7f5d3SJohn Marino 
11*86d7f5d3SJohn Marino GNU DIFF is distributed in the hope that it will be useful,
12*86d7f5d3SJohn Marino but WITHOUT ANY WARRANTY; without even the implied warranty of
13*86d7f5d3SJohn Marino MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*86d7f5d3SJohn Marino GNU General Public License for more details.
15*86d7f5d3SJohn Marino 
16*86d7f5d3SJohn Marino */
17*86d7f5d3SJohn Marino 
18*86d7f5d3SJohn Marino #include "system.h"
19*86d7f5d3SJohn Marino #include <stdio.h>
20*86d7f5d3SJohn Marino #include <setjmp.h>
21*86d7f5d3SJohn Marino #include "regex.h"
22*86d7f5d3SJohn Marino #include "diffrun.h"
23*86d7f5d3SJohn Marino 
24*86d7f5d3SJohn Marino #define TAB_WIDTH 8
25*86d7f5d3SJohn Marino 
26*86d7f5d3SJohn Marino /* Variables for command line options */
27*86d7f5d3SJohn Marino 
28*86d7f5d3SJohn Marino #ifndef GDIFF_MAIN
29*86d7f5d3SJohn Marino #define EXTERN extern
30*86d7f5d3SJohn Marino #else
31*86d7f5d3SJohn Marino #define EXTERN
32*86d7f5d3SJohn Marino #endif
33*86d7f5d3SJohn Marino 
34*86d7f5d3SJohn Marino /* The callbacks to use for output.  */
35*86d7f5d3SJohn Marino EXTERN const struct diff_callbacks *callbacks;
36*86d7f5d3SJohn Marino 
37*86d7f5d3SJohn Marino enum output_style {
38*86d7f5d3SJohn Marino   /* Default output style.  */
39*86d7f5d3SJohn Marino   OUTPUT_NORMAL,
40*86d7f5d3SJohn Marino   /* Output the differences with lines of context before and after (-c).  */
41*86d7f5d3SJohn Marino   OUTPUT_CONTEXT,
42*86d7f5d3SJohn Marino   /* Output the differences in a unified context diff format (-u). */
43*86d7f5d3SJohn Marino   OUTPUT_UNIFIED,
44*86d7f5d3SJohn Marino   /* Output the differences as commands suitable for `ed' (-e).  */
45*86d7f5d3SJohn Marino   OUTPUT_ED,
46*86d7f5d3SJohn Marino   /* Output the diff as a forward ed script (-f).  */
47*86d7f5d3SJohn Marino   OUTPUT_FORWARD_ED,
48*86d7f5d3SJohn Marino   /* Like -f, but output a count of changed lines in each "command" (-n). */
49*86d7f5d3SJohn Marino   OUTPUT_RCS,
50*86d7f5d3SJohn Marino   /* Output merged #ifdef'd file (-D).  */
51*86d7f5d3SJohn Marino   OUTPUT_IFDEF,
52*86d7f5d3SJohn Marino   /* Output sdiff style (-y).  */
53*86d7f5d3SJohn Marino   OUTPUT_SDIFF
54*86d7f5d3SJohn Marino };
55*86d7f5d3SJohn Marino 
56*86d7f5d3SJohn Marino /* True for output styles that are robust,
57*86d7f5d3SJohn Marino    i.e. can handle a file that ends in a non-newline.  */
58*86d7f5d3SJohn Marino #define ROBUST_OUTPUT_STYLE(S) ((S) != OUTPUT_ED && (S) != OUTPUT_FORWARD_ED)
59*86d7f5d3SJohn Marino 
60*86d7f5d3SJohn Marino EXTERN enum output_style output_style;
61*86d7f5d3SJohn Marino 
62*86d7f5d3SJohn Marino /* Nonzero if output cannot be generated for identical files.  */
63*86d7f5d3SJohn Marino EXTERN int no_diff_means_no_output;
64*86d7f5d3SJohn Marino 
65*86d7f5d3SJohn Marino /* Number of lines of context to show in each set of diffs.
66*86d7f5d3SJohn Marino    This is zero when context is not to be shown.  */
67*86d7f5d3SJohn Marino EXTERN int      context;
68*86d7f5d3SJohn Marino 
69*86d7f5d3SJohn Marino /* Consider all files as text files (-a).
70*86d7f5d3SJohn Marino    Don't interpret codes over 0177 as implying a "binary file".  */
71*86d7f5d3SJohn Marino EXTERN int	always_text_flag;
72*86d7f5d3SJohn Marino 
73*86d7f5d3SJohn Marino /* Number of lines to keep in identical prefix and suffix.  */
74*86d7f5d3SJohn Marino EXTERN int      horizon_lines;
75*86d7f5d3SJohn Marino 
76*86d7f5d3SJohn Marino /* Ignore changes in horizontal white space (-b).  */
77*86d7f5d3SJohn Marino EXTERN int      ignore_space_change_flag;
78*86d7f5d3SJohn Marino 
79*86d7f5d3SJohn Marino /* Ignore all horizontal white space (-w).  */
80*86d7f5d3SJohn Marino EXTERN int      ignore_all_space_flag;
81*86d7f5d3SJohn Marino 
82*86d7f5d3SJohn Marino /* Ignore changes that affect only blank lines (-B).  */
83*86d7f5d3SJohn Marino EXTERN int      ignore_blank_lines_flag;
84*86d7f5d3SJohn Marino 
85*86d7f5d3SJohn Marino /* 1 if lines may match even if their contents do not match exactly.
86*86d7f5d3SJohn Marino    This depends on various options.  */
87*86d7f5d3SJohn Marino EXTERN int      ignore_some_line_changes;
88*86d7f5d3SJohn Marino 
89*86d7f5d3SJohn Marino /* 1 if files may match even if their contents are not byte-for-byte identical.
90*86d7f5d3SJohn Marino    This depends on various options.  */
91*86d7f5d3SJohn Marino EXTERN int      ignore_some_changes;
92*86d7f5d3SJohn Marino 
93*86d7f5d3SJohn Marino /* Ignore differences in case of letters (-i).  */
94*86d7f5d3SJohn Marino EXTERN int      ignore_case_flag;
95*86d7f5d3SJohn Marino 
96*86d7f5d3SJohn Marino /* File labels for `-c' output headers (-L).  */
97*86d7f5d3SJohn Marino EXTERN char *file_label[2];
98*86d7f5d3SJohn Marino 
99*86d7f5d3SJohn Marino struct regexp_list
100*86d7f5d3SJohn Marino {
101*86d7f5d3SJohn Marino   struct re_pattern_buffer buf;
102*86d7f5d3SJohn Marino   struct regexp_list *next;
103*86d7f5d3SJohn Marino };
104*86d7f5d3SJohn Marino 
105*86d7f5d3SJohn Marino /* Regexp to identify function-header lines (-F).  */
106*86d7f5d3SJohn Marino EXTERN struct regexp_list *function_regexp_list;
107*86d7f5d3SJohn Marino 
108*86d7f5d3SJohn Marino /* Ignore changes that affect only lines matching this regexp (-I).  */
109*86d7f5d3SJohn Marino EXTERN struct regexp_list *ignore_regexp_list;
110*86d7f5d3SJohn Marino 
111*86d7f5d3SJohn Marino /* Say only whether files differ, not how (-q).  */
112*86d7f5d3SJohn Marino EXTERN int 	no_details_flag;
113*86d7f5d3SJohn Marino 
114*86d7f5d3SJohn Marino /* Report files compared that match (-s).
115*86d7f5d3SJohn Marino    Normally nothing is output when that happens.  */
116*86d7f5d3SJohn Marino EXTERN int      print_file_same_flag;
117*86d7f5d3SJohn Marino 
118*86d7f5d3SJohn Marino /* Output the differences with exactly 8 columns added to each line
119*86d7f5d3SJohn Marino    so that any tabs in the text line up properly (-T).  */
120*86d7f5d3SJohn Marino EXTERN int	tab_align_flag;
121*86d7f5d3SJohn Marino 
122*86d7f5d3SJohn Marino /* Expand tabs in the output so the text lines up properly
123*86d7f5d3SJohn Marino    despite the characters added to the front of each line (-t).  */
124*86d7f5d3SJohn Marino EXTERN int	tab_expand_flag;
125*86d7f5d3SJohn Marino 
126*86d7f5d3SJohn Marino /* In directory comparison, specify file to start with (-S).
127*86d7f5d3SJohn Marino    All file names less than this name are ignored.  */
128*86d7f5d3SJohn Marino EXTERN char	*dir_start_file;
129*86d7f5d3SJohn Marino 
130*86d7f5d3SJohn Marino /* If a file is new (appears in only one dir)
131*86d7f5d3SJohn Marino    include its entire contents (-N).
132*86d7f5d3SJohn Marino    Then `patch' would create the file with appropriate contents.  */
133*86d7f5d3SJohn Marino EXTERN int	entire_new_file_flag;
134*86d7f5d3SJohn Marino 
135*86d7f5d3SJohn Marino /* If a file is new (appears in only the second dir)
136*86d7f5d3SJohn Marino    include its entire contents (-P).
137*86d7f5d3SJohn Marino    Then `patch' would create the file with appropriate contents.  */
138*86d7f5d3SJohn Marino EXTERN int	unidirectional_new_file_flag;
139*86d7f5d3SJohn Marino 
140*86d7f5d3SJohn Marino /* Pipe each file's output through pr (-l).  */
141*86d7f5d3SJohn Marino EXTERN int	paginate_flag;
142*86d7f5d3SJohn Marino 
143*86d7f5d3SJohn Marino enum line_class {
144*86d7f5d3SJohn Marino   /* Lines taken from just the first file.  */
145*86d7f5d3SJohn Marino   OLD,
146*86d7f5d3SJohn Marino   /* Lines taken from just the second file.  */
147*86d7f5d3SJohn Marino   NEW,
148*86d7f5d3SJohn Marino   /* Lines common to both files.  */
149*86d7f5d3SJohn Marino   UNCHANGED,
150*86d7f5d3SJohn Marino   /* A hunk containing both old and new lines (line groups only).  */
151*86d7f5d3SJohn Marino   CHANGED
152*86d7f5d3SJohn Marino };
153*86d7f5d3SJohn Marino 
154*86d7f5d3SJohn Marino /* Line group formats for old, new, unchanged, and changed groups.  */
155*86d7f5d3SJohn Marino EXTERN char *group_format[CHANGED + 1];
156*86d7f5d3SJohn Marino 
157*86d7f5d3SJohn Marino /* Line formats for old, new, and unchanged lines.  */
158*86d7f5d3SJohn Marino EXTERN char *line_format[UNCHANGED + 1];
159*86d7f5d3SJohn Marino 
160*86d7f5d3SJohn Marino /* If using OUTPUT_SDIFF print extra information to help the sdiff filter. */
161*86d7f5d3SJohn Marino EXTERN int sdiff_help_sdiff;
162*86d7f5d3SJohn Marino 
163*86d7f5d3SJohn Marino /* Tell OUTPUT_SDIFF to show only the left version of common lines. */
164*86d7f5d3SJohn Marino EXTERN int sdiff_left_only;
165*86d7f5d3SJohn Marino 
166*86d7f5d3SJohn Marino /* Tell OUTPUT_SDIFF to not show common lines. */
167*86d7f5d3SJohn Marino EXTERN int sdiff_skip_common_lines;
168*86d7f5d3SJohn Marino 
169*86d7f5d3SJohn Marino /* The half line width and column 2 offset for OUTPUT_SDIFF.  */
170*86d7f5d3SJohn Marino EXTERN unsigned sdiff_half_width;
171*86d7f5d3SJohn Marino EXTERN unsigned sdiff_column2_offset;
172*86d7f5d3SJohn Marino 
173*86d7f5d3SJohn Marino /* String containing all the command options diff received,
174*86d7f5d3SJohn Marino    with spaces between and at the beginning but none at the end.
175*86d7f5d3SJohn Marino    If there were no options given, this string is empty.  */
176*86d7f5d3SJohn Marino EXTERN char *	switch_string;
177*86d7f5d3SJohn Marino 
178*86d7f5d3SJohn Marino /* Nonzero means use heuristics for better speed.  */
179*86d7f5d3SJohn Marino EXTERN int	heuristic;
180*86d7f5d3SJohn Marino 
181*86d7f5d3SJohn Marino /* Name of program the user invoked (for error messages).  */
182*86d7f5d3SJohn Marino EXTERN char *diff_program_name;
183*86d7f5d3SJohn Marino 
184*86d7f5d3SJohn Marino /* Jump buffer for nonlocal exits. */
185*86d7f5d3SJohn Marino EXTERN jmp_buf diff_abort_buf;
186*86d7f5d3SJohn Marino #define DIFF_ABORT(retval) longjmp(diff_abort_buf, retval)
187*86d7f5d3SJohn Marino 
188*86d7f5d3SJohn Marino /* The result of comparison is an "edit script": a chain of `struct change'.
189*86d7f5d3SJohn Marino    Each `struct change' represents one place where some lines are deleted
190*86d7f5d3SJohn Marino    and some are inserted.
191*86d7f5d3SJohn Marino 
192*86d7f5d3SJohn Marino    LINE0 and LINE1 are the first affected lines in the two files (origin 0).
193*86d7f5d3SJohn Marino    DELETED is the number of lines deleted here from file 0.
194*86d7f5d3SJohn Marino    INSERTED is the number of lines inserted here in file 1.
195*86d7f5d3SJohn Marino 
196*86d7f5d3SJohn Marino    If DELETED is 0 then LINE0 is the number of the line before
197*86d7f5d3SJohn Marino    which the insertion was done; vice versa for INSERTED and LINE1.  */
198*86d7f5d3SJohn Marino 
199*86d7f5d3SJohn Marino struct change
200*86d7f5d3SJohn Marino {
201*86d7f5d3SJohn Marino   struct change *link;		/* Previous or next edit command  */
202*86d7f5d3SJohn Marino   int inserted;			/* # lines of file 1 changed here.  */
203*86d7f5d3SJohn Marino   int deleted;			/* # lines of file 0 changed here.  */
204*86d7f5d3SJohn Marino   int line0;			/* Line number of 1st deleted line.  */
205*86d7f5d3SJohn Marino   int line1;			/* Line number of 1st inserted line.  */
206*86d7f5d3SJohn Marino   char ignore;			/* Flag used in context.c */
207*86d7f5d3SJohn Marino };
208*86d7f5d3SJohn Marino 
209*86d7f5d3SJohn Marino /* Structures that describe the input files.  */
210*86d7f5d3SJohn Marino 
211*86d7f5d3SJohn Marino /* Data on one input file being compared.  */
212*86d7f5d3SJohn Marino 
213*86d7f5d3SJohn Marino struct file_data {
214*86d7f5d3SJohn Marino     int             desc;	/* File descriptor  */
215*86d7f5d3SJohn Marino     char const      *name;	/* File name  */
216*86d7f5d3SJohn Marino     struct stat     stat;	/* File status from fstat()  */
217*86d7f5d3SJohn Marino     int             dir_p;	/* nonzero if file is a directory  */
218*86d7f5d3SJohn Marino 
219*86d7f5d3SJohn Marino     /* Buffer in which text of file is read.  */
220*86d7f5d3SJohn Marino     char *	    buffer;
221*86d7f5d3SJohn Marino     /* Allocated size of buffer.  */
222*86d7f5d3SJohn Marino     size_t	    bufsize;
223*86d7f5d3SJohn Marino     /* Number of valid characters now in the buffer. */
224*86d7f5d3SJohn Marino     size_t	    buffered_chars;
225*86d7f5d3SJohn Marino 
226*86d7f5d3SJohn Marino     /* Array of pointers to lines in the file.  */
227*86d7f5d3SJohn Marino     char const **linbuf;
228*86d7f5d3SJohn Marino 
229*86d7f5d3SJohn Marino     /* linbuf_base <= buffered_lines <= valid_lines <= alloc_lines.
230*86d7f5d3SJohn Marino        linebuf[linbuf_base ... buffered_lines - 1] are possibly differing.
231*86d7f5d3SJohn Marino        linebuf[linbuf_base ... valid_lines - 1] contain valid data.
232*86d7f5d3SJohn Marino        linebuf[linbuf_base ... alloc_lines - 1] are allocated.  */
233*86d7f5d3SJohn Marino     int linbuf_base, buffered_lines, valid_lines, alloc_lines;
234*86d7f5d3SJohn Marino 
235*86d7f5d3SJohn Marino     /* Pointer to end of prefix of this file to ignore when hashing. */
236*86d7f5d3SJohn Marino     char const *prefix_end;
237*86d7f5d3SJohn Marino 
238*86d7f5d3SJohn Marino     /* Count of lines in the prefix.
239*86d7f5d3SJohn Marino        There are this many lines in the file before linbuf[0].  */
240*86d7f5d3SJohn Marino     int prefix_lines;
241*86d7f5d3SJohn Marino 
242*86d7f5d3SJohn Marino     /* Pointer to start of suffix of this file to ignore when hashing. */
243*86d7f5d3SJohn Marino     char const *suffix_begin;
244*86d7f5d3SJohn Marino 
245*86d7f5d3SJohn Marino     /* Vector, indexed by line number, containing an equivalence code for
246*86d7f5d3SJohn Marino        each line.  It is this vector that is actually compared with that
247*86d7f5d3SJohn Marino        of another file to generate differences. */
248*86d7f5d3SJohn Marino     int		   *equivs;
249*86d7f5d3SJohn Marino 
250*86d7f5d3SJohn Marino     /* Vector, like the previous one except that
251*86d7f5d3SJohn Marino        the elements for discarded lines have been squeezed out.  */
252*86d7f5d3SJohn Marino     int		   *undiscarded;
253*86d7f5d3SJohn Marino 
254*86d7f5d3SJohn Marino     /* Vector mapping virtual line numbers (not counting discarded lines)
255*86d7f5d3SJohn Marino        to real ones (counting those lines).  Both are origin-0.  */
256*86d7f5d3SJohn Marino     int		   *realindexes;
257*86d7f5d3SJohn Marino 
258*86d7f5d3SJohn Marino     /* Total number of nondiscarded lines. */
259*86d7f5d3SJohn Marino     int		    nondiscarded_lines;
260*86d7f5d3SJohn Marino 
261*86d7f5d3SJohn Marino     /* Vector, indexed by real origin-0 line number,
262*86d7f5d3SJohn Marino        containing 1 for a line that is an insertion or a deletion.
263*86d7f5d3SJohn Marino        The results of comparison are stored here.  */
264*86d7f5d3SJohn Marino     char	   *changed_flag;
265*86d7f5d3SJohn Marino 
266*86d7f5d3SJohn Marino     /* 1 if file ends in a line with no final newline. */
267*86d7f5d3SJohn Marino     int		    missing_newline;
268*86d7f5d3SJohn Marino 
269*86d7f5d3SJohn Marino     /* 1 more than the maximum equivalence value used for this or its
270*86d7f5d3SJohn Marino        sibling file. */
271*86d7f5d3SJohn Marino     int equiv_max;
272*86d7f5d3SJohn Marino };
273*86d7f5d3SJohn Marino 
274*86d7f5d3SJohn Marino /* Describe the two files currently being compared.  */
275*86d7f5d3SJohn Marino 
276*86d7f5d3SJohn Marino EXTERN struct file_data files[2];
277*86d7f5d3SJohn Marino 
278*86d7f5d3SJohn Marino /* Stdio stream to output diffs to.  */
279*86d7f5d3SJohn Marino 
280*86d7f5d3SJohn Marino EXTERN FILE *outfile;
281*86d7f5d3SJohn Marino 
282*86d7f5d3SJohn Marino /* Declare various functions.  */
283*86d7f5d3SJohn Marino 
284*86d7f5d3SJohn Marino /* analyze.c */
285*86d7f5d3SJohn Marino int diff_2_files PARAMS((struct file_data[], int));
286*86d7f5d3SJohn Marino 
287*86d7f5d3SJohn Marino /* context.c */
288*86d7f5d3SJohn Marino void print_context_header PARAMS((struct file_data[], int));
289*86d7f5d3SJohn Marino void print_context_script PARAMS((struct change *, int));
290*86d7f5d3SJohn Marino 
291*86d7f5d3SJohn Marino /* diff.c */
292*86d7f5d3SJohn Marino int excluded_filename PARAMS((char const *));
293*86d7f5d3SJohn Marino 
294*86d7f5d3SJohn Marino /* dir.c */
295*86d7f5d3SJohn Marino int diff_dirs PARAMS((struct file_data const[], int (*) PARAMS((char const *, char const *, char const *, char const *, int)), int));
296*86d7f5d3SJohn Marino 
297*86d7f5d3SJohn Marino /* ed.c */
298*86d7f5d3SJohn Marino void print_ed_script PARAMS((struct change *));
299*86d7f5d3SJohn Marino void pr_forward_ed_script PARAMS((struct change *));
300*86d7f5d3SJohn Marino 
301*86d7f5d3SJohn Marino /* ifdef.c */
302*86d7f5d3SJohn Marino void print_ifdef_script PARAMS((struct change *));
303*86d7f5d3SJohn Marino 
304*86d7f5d3SJohn Marino /* io.c */
305*86d7f5d3SJohn Marino int read_files PARAMS((struct file_data[], int));
306*86d7f5d3SJohn Marino int sip PARAMS((struct file_data *, int));
307*86d7f5d3SJohn Marino void slurp PARAMS((struct file_data *));
308*86d7f5d3SJohn Marino 
309*86d7f5d3SJohn Marino /* normal.c */
310*86d7f5d3SJohn Marino void print_normal_script PARAMS((struct change *));
311*86d7f5d3SJohn Marino 
312*86d7f5d3SJohn Marino /* rcs.c */
313*86d7f5d3SJohn Marino void print_rcs_script PARAMS((struct change *));
314*86d7f5d3SJohn Marino 
315*86d7f5d3SJohn Marino /* side.c */
316*86d7f5d3SJohn Marino void print_sdiff_script PARAMS((struct change *));
317*86d7f5d3SJohn Marino 
318*86d7f5d3SJohn Marino /* util.c */
319*86d7f5d3SJohn Marino VOID *xmalloc PARAMS((size_t));
320*86d7f5d3SJohn Marino VOID *xrealloc PARAMS((VOID *, size_t));
321*86d7f5d3SJohn Marino char *concat PARAMS((char const *, char const *, char const *));
322*86d7f5d3SJohn Marino char *dir_file_pathname PARAMS((char const *, char const *));
323*86d7f5d3SJohn Marino int change_letter PARAMS((int, int));
324*86d7f5d3SJohn Marino int line_cmp PARAMS((char const *, char const *));
325*86d7f5d3SJohn Marino int translate_line_number PARAMS((struct file_data const *, int));
326*86d7f5d3SJohn Marino struct change *find_change PARAMS((struct change *));
327*86d7f5d3SJohn Marino struct change *find_reverse_change PARAMS((struct change *));
328*86d7f5d3SJohn Marino void analyze_hunk PARAMS((struct change *, int *, int *, int *, int *, int *, int *));
329*86d7f5d3SJohn Marino void begin_output PARAMS((void));
330*86d7f5d3SJohn Marino void debug_script PARAMS((struct change *));
331*86d7f5d3SJohn Marino void diff_error PARAMS((char const *, char const *, char const *));
332*86d7f5d3SJohn Marino void fatal PARAMS((char const *));
333*86d7f5d3SJohn Marino void finish_output PARAMS((void));
334*86d7f5d3SJohn Marino void write_output PARAMS((char const *, size_t));
335*86d7f5d3SJohn Marino void printf_output PARAMS((char const *, ...))
336*86d7f5d3SJohn Marino #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 6)
337*86d7f5d3SJohn Marino      __attribute__ ((__format__ (__printf__, 1, 2)))
338*86d7f5d3SJohn Marino #endif
339*86d7f5d3SJohn Marino      ;
340*86d7f5d3SJohn Marino void flush_output PARAMS((void));
341*86d7f5d3SJohn Marino void message PARAMS((char const *, char const *, char const *));
342*86d7f5d3SJohn Marino void message5 PARAMS((char const *, char const *, char const *, char const *, char const *));
343*86d7f5d3SJohn Marino void output_1_line PARAMS((char const *, char const *, char const *, char const *));
344*86d7f5d3SJohn Marino void perror_with_name PARAMS((char const *));
345*86d7f5d3SJohn Marino void pfatal_with_name PARAMS((char const *));
346*86d7f5d3SJohn Marino void print_1_line PARAMS((char const *, char const * const *));
347*86d7f5d3SJohn Marino void print_message_queue PARAMS((void));
348*86d7f5d3SJohn Marino void print_number_range PARAMS((int, struct file_data *, int, int));
349*86d7f5d3SJohn Marino void print_script PARAMS((struct change *, struct change * (*) PARAMS((struct change *)), void (*) PARAMS((struct change *))));
350*86d7f5d3SJohn Marino void setup_output PARAMS((char const *, char const *, int));
351*86d7f5d3SJohn Marino void translate_range PARAMS((struct file_data const *, int, int, int *, int *));
352*86d7f5d3SJohn Marino 
353*86d7f5d3SJohn Marino /* version.c */
354*86d7f5d3SJohn Marino extern char const diff_version_string[];
355