Lines Matching defs:diff

42 /* Different files within a three way diff.  */
47 /* A three way diff is built from two two-way diffs; the file which
51 /* Different files within a two way diff.
62 ADD, /* Two way diff add */
63 CHANGE, /* Two way diff change */
64 DELETE, /* Two way diff delete */
71 /* Two way diff */
79 /* Three way diff */
82 enum diff_type correspond; /* Type of diff */
89 /* Access the ranges on a diff block. */
90 #define D_LOWLINE(diff, filenum) \
91 ((diff)->ranges[filenum][RANGE_START])
92 #define D_HIGHLINE(diff, filenum) \
93 ((diff)->ranges[filenum][RANGE_END])
94 #define D_NUMLINES(diff, filenum) \
95 (D_HIGHLINE (diff, filenum) - D_LOWLINE (diff, filenum) + 1)
97 /* Access the line numbers in a file in a diff by relative line
98 numbers (i.e. line number within the diff itself). Note that these
100 #define D_RELNUM(diff, filenum, linenum) \
101 ((diff)->lines[filenum][linenum])
102 #define D_RELLEN(diff, filenum, linenum) \
103 ((diff)->lengths[filenum][linenum])
106 #define D_LINEARRAY(diff, filenum) \
107 ((diff)->lines[filenum])
108 #define D_LENARRAY(diff, filenum) \
109 ((diff)->lengths[filenum])
112 #define D_NEXT(diff) ((diff)->next)
115 #define D3_TYPE(diff) ((diff)->correspond)
118 diff, the second off of the bottom. */
119 #define D_HIGH_MAPLINE(diff, fromfile, tofile, linenum) \
121 - D_HIGHLINE ((diff), (fromfile)) \
122 + D_HIGHLINE ((diff), (tofile)))
124 #define D_LOW_MAPLINE(diff, fromfile, tofile, linenum) \
126 - D_LOWLINE ((diff), (fromfile)) \
127 + D_LOWLINE ((diff), (tofile)))
198 {"diff-program", 1, 0, DIFF_PROGRAM_OPTION},
330 (which is entirely possible since we don't use diff's -n option),
339 for compatibility, if this is a 3-way diff (not a merge or
347 call diff twice on stdin. Use the other arg as the common
375 /* Invoke diff twice on two pairs of input files, combine the two
440 N_("--diff-program=PROGRAM Use PROGRAM to compare files."),
471 Diff02 is the diff between 0 and 2.
472 Diff12 is the diff between 1 and 2.
476 current blocks (one from each diff) as being the low
480 b) Check the next block in the diff that the high water
498 needed from file2 (when there isn't a diff block, it's
499 identical to file2 within the range between diff blocks).
501 5) If the diff blocks used came from only one of the two
503 the common file in that diff) is the odd person out. If
504 diff blocks are used from both sets, check to see if files
515 /* Make a three way diff (chain of diff3_block's) from two two way
518 made "to" the same file). Return a three way diff pointer with
528 way diff; if no blocks from a particular thread are to be used,
537 lists. HIGH_WATER_DIFF is the diff from which the
541 LAST_USING[HIGH_WATER_THREAD]. OTHER_DIFF is the next diff to
547 LAST_DIFF is the last diff block produced by this routine, for
548 line correspondence purposes between that diff and the one
600 /* Make the diff you just got info from into the using class */
607 /* And mark the other diff */
611 /* Shuffle up the ladder, checking the other diff to see if it
617 /* Incorporate this diff into the using list. Note that
633 through this loop; since diff blocks within a given
644 /* Set the other diff */
657 fatal ("internal error: screwup in format of diff blocks");
669 /* Take two lists of blocks (from two separate diff threads) and put
677 line numbers for File0. LAST_DIFF3 contains the last diff produced
679 would still be identical to the state that diff ended in.
682 that are part of a normal two diff block, and the three diffs that
702 If using[d] is null, that means that the file to which that diff
737 before the first diff. */
764 /* Catch the lines between here and the next diff */
951 fprintf (stderr, _("%s: diff failed: "), program_name);
973 fatal ("internal error: invalid diff type in process_diff");
998 fatal ("invalid diff format; invalid change separator");
1063 /* Parse a normal format diff control string. Return the type of the
1064 diff (ERROR if the format is bad). All of the other important
1071 number, then both corresponding numbers in the diff block are set
1255 fatal ("invalid diff format; incomplete last line");
1291 /* Scan a regular diff line (consisting of > or <, followed by a
1304 fatal ("invalid diff format; incorrect leading line chars");
1334 /* Output a three way diff passed as a list of diff3_block's. The
1336 argument list) and contains the internal file number (from the diff
1338 terms of the argument list number, and the diff passed may have
1343 output_diff3 (FILE *outputfile, struct diff3_block *diff,
1356 for (ptr = diff; ptr; ptr = D_NEXT (ptr))
1377 fatal ("internal error: invalid diff type passed to output");
1480 according to the argument list to file number according to the diff
1491 output_diff3_edscript (FILE *outputfile, struct diff3_block *diff,
1500 for (b = reverse_diff3_blocklist (diff); b; b = b->next)
1600 As before, MAPPING maps from arg list file number to diff file
1607 output_diff3_merge (FILE *infile, FILE *outputfile, struct diff3_block *diff,
1618 for (b = diff; b; b = b->next)
1721 reverse_diff3_blocklist (struct diff3_block *diff)
1725 for (tmp = diff, prev = 0; tmp; tmp = next)