Lines Matching full:diff

41 /* Different files within a three way diff.  */
46 /* A three way diff is built from two two-way diffs; the file which
50 /* Different files within a two way diff.
61 ADD, /* Two way diff add */
62 CHANGE, /* Two way diff change */
63 DELETE, /* Two way diff delete */
70 /* Two way diff */
78 /* Three way diff */
81 enum diff_type correspond; /* Type of diff */
88 /* Access the ranges on a diff block. */
89 #define D_LOWLINE(diff, filenum) \ argument
90 ((diff)->ranges[filenum][RANGE_START])
91 #define D_HIGHLINE(diff, filenum) \ argument
92 ((diff)->ranges[filenum][RANGE_END])
93 #define D_NUMLINES(diff, filenum) \ argument
94 (D_HIGHLINE (diff, filenum) - D_LOWLINE (diff, filenum) + 1)
96 /* Access the line numbers in a file in a diff by relative line
97 numbers (i.e. line number within the diff itself). Note that these
99 #define D_RELNUM(diff, filenum, linenum) \ argument
100 ((diff)->lines[filenum][linenum])
101 #define D_RELLEN(diff, filenum, linenum) \ argument
102 ((diff)->lengths[filenum][linenum])
105 #define D_LINEARRAY(diff, filenum) \ argument
106 ((diff)->lines[filenum])
107 #define D_LENARRAY(diff, filenum) \ argument
108 ((diff)->lengths[filenum])
111 #define D_NEXT(diff) ((diff)->next) argument
114 #define D3_TYPE(diff) ((diff)->correspond) argument
117 diff, the second off of the bottom. */
118 #define D_HIGH_MAPLINE(diff, fromfile, tofile, linenum) \ argument
120 - D_HIGHLINE ((diff), (fromfile)) \
121 + D_HIGHLINE ((diff), (tofile)))
123 #define D_LOW_MAPLINE(diff, fromfile, tofile, linenum) \ argument
125 - D_LOWLINE ((diff), (fromfile)) \
126 + D_LOWLINE ((diff), (tofile)))
196 {"diff-program", 1, 0, DIFF_PROGRAM_OPTION},
328 (which is entirely possible since we don't use diff's -n option), in main()
337 for compatibility, if this is a 3-way diff (not a merge or in main()
345 call diff twice on stdin. Use the other arg as the common in main()
373 /* Invoke diff twice on two pairs of input files, combine the two in main()
438 N_("--diff-program=PROGRAM Use PROGRAM to compare files."),
468 Diff02 is the diff between 0 and 2.
469 Diff12 is the diff between 1 and 2.
473 current blocks (one from each diff) as being the low
477 b) Check the next block in the diff that the high water
495 needed from file2 (when there isn't a diff block, it's
496 identical to file2 within the range between diff blocks).
498 5) If the diff blocks used came from only one of the two
500 the common file in that diff) is the odd person out. If
501 diff blocks are used from both sets, check to see if files
512 /* Make a three way diff (chain of diff3_block's) from two two way
515 made "to" the same file). Return a three way diff pointer with
525 way diff; if no blocks from a particular thread are to be used, in make_3way_diff()
534 lists. HIGH_WATER_DIFF is the diff from which the in make_3way_diff()
538 LAST_USING[HIGH_WATER_THREAD]. OTHER_DIFF is the next diff to in make_3way_diff()
544 LAST_DIFF is the last diff block produced by this routine, for in make_3way_diff()
545 line correspondence purposes between that diff and the one in make_3way_diff()
597 /* Make the diff you just got info from into the using class */ in make_3way_diff()
604 /* And mark the other diff */ in make_3way_diff()
608 /* Shuffle up the ladder, checking the other diff to see if it in make_3way_diff()
614 /* Incorporate this diff into the using list. Note that in make_3way_diff()
630 through this loop; since diff blocks within a given in make_3way_diff()
641 /* Set the other diff */ in make_3way_diff()
654 fatal ("internal error: screwup in format of diff blocks"); in make_3way_diff()
666 /* Take two lists of blocks (from two separate diff threads) and put
674 line numbers for File0. LAST_DIFF3 contains the last diff produced
676 would still be identical to the state that diff ended in.
679 that are part of a normal two diff block, and the three diffs that
699 If using[d] is null, that means that the file to which that diff in using_to_diff3_block()
734 before the first diff. */ in using_to_diff3_block()
761 /* Catch the lines between here and the next diff */ in using_to_diff3_block()
947 fprintf (stderr, _("%s: diff failed: "), program_name); in process_diff()
969 fatal ("internal error: invalid diff type in process_diff"); in process_diff()
994 fatal ("invalid diff format; invalid change separator"); in process_diff()
1059 /* Parse a normal format diff control string. Return the type of the
1060 diff (ERROR if the format is bad). All of the other important
1067 number, then both corresponding numbers in the diff block are set
1251 fatal ("invalid diff format; incomplete last line"); in read_diff()
1287 /* Scan a regular diff line (consisting of > or <, followed by a
1300 fatal ("invalid diff format; incorrect leading line chars"); in scan_diff_line()
1330 /* Output a three way diff passed as a list of diff3_block's. The
1332 argument list) and contains the internal file number (from the diff
1334 terms of the argument list number, and the diff passed may have
1339 output_diff3 (FILE *outputfile, struct diff3_block *diff, in output_diff3() argument
1352 for (ptr = diff; ptr; ptr = D_NEXT (ptr)) in output_diff3()
1373 fatal ("internal error: invalid diff type passed to output"); in output_diff3()
1471 the set of diff3 blocks in DIFF; this gets
1476 according to the argument list to file number according to the diff
1487 output_diff3_edscript (FILE *outputfile, struct diff3_block *diff, in output_diff3_edscript() argument
1496 for (b = reverse_diff3_blocklist (diff); b; b = b->next) in output_diff3_edscript()
1592 DIFF as a merged file. This acts like 'ed file0
1596 As before, MAPPING maps from arg list file number to diff file
1603 output_diff3_merge (FILE *infile, FILE *outputfile, struct diff3_block *diff, in output_diff3_merge() argument
1614 for (b = diff; b; b = b->next) in output_diff3_merge()
1717 reverse_diff3_blocklist (struct diff3_block *diff) in reverse_diff3_blocklist() argument
1721 for (tmp = diff, prev = 0; tmp; tmp = next) in reverse_diff3_blocklist()