Lines Matching defs:file2
70 static size_t file1ln, file2ln; /* line number of file1 and file2 */
119 "usage: sdiff [-abdilstW] [-I regexp] [-o outfile] [-w width] file1 file2\n",
121 "-o OUTFILE, --output=OUTFILE: interactively merge file1 and file2 into outfile.",
126 "\t-a, --text: treat file1 and file2 as text files.",
210 FILE *diffpipe, *file1, *file2;
227 * file1, and file2 won't have arguments so doubling them will
339 * or file2 are not regular files. This allows sdiff and diff
346 /* file1 and file2 are the same, so copy to same temp file. */
350 /* Copy file1 and file2 into separate temp files. */
360 if ((file2 = fopen(filename2, "r")) == NULL)
362 if (!istextfile(file1) || !istextfile(file2)) {
363 ret = bindiff(file1, filename1, file2, filename2);
408 while (parsecmd(diffpipe, file1, file2) != EOF)
425 s2 = xfgets(file2);
432 fclose(file2);
708 * to change or delete) or file2 (lines to add or change).
712 parsecmd(FILE *diffpipe, FILE *file1, FILE *file2)
763 errx(2, "file2 start is %s: %s", errstr, line);
770 errx(2, "invalid line range in file2: %c: %s", c, line);
776 errx(2, "file2 end is %s: %s", errstr, line);
778 errx(2, "invalid line range in file2: %s", line);
797 errx(2, "delete cannot have a file2 range: %s",
800 errx(2, "file2 line range too high: %s", line);
805 * Continue reading file1 and file2 until we reach line numbers
814 if (!(s2 = xfgets(file2)))
815 errx(2, "file2 shorter than expected");
847 if (!(s = xfgets(file2)))
848 errx(2, "file2 shorter than expected");
862 printa(file2, file2end);
866 printc(file1, file1end, file2, file2end);
1066 printc(FILE *file1, size_t file1end, FILE *file2, size_t file2end)
1097 if (!(add = xfgets(file2)))
1116 if (!(add = xfgets(file2)))
1176 " file2\n");