Lines Matching refs:file2

74 static size_t file1ln, file2ln;	/* line number of file1 and file2 */
121 "usage: sdiff [-abdilstW] [-I regexp] [-o outfile] [-w width] file1 file2\n",
123 "-o OUTFILE, --output=OUTFILE: interactively merge file1 and file2 into outfile.",
128 "\t-a, --text: treat file1 and file2 as text files.",
212 FILE *diffpipe=NULL, *file1, *file2;
228 * file1, and file2 won't have arguments so doubling them will
335 * or file2 are not regular files. This allows sdiff and diff
342 /* file1 and file2 are the same, so copy to same temp file. */
346 /* Copy file1 and file2 into separate temp files. */
396 if ((file2 = fopen(filename2, "r")) == NULL)
398 if (!istextfile(file1) || !istextfile(file2)) {
401 fclose(file2);
418 while (parsecmd(diffpipe, file1, file2) != EOF)
445 s2 = xfgets(file2);
452 fclose(file2);
688 * to change or delete) or file2 (lines to add or change).
692 parsecmd(FILE *diffpipe, FILE *file1, FILE *file2)
743 errx(2, "file2 start is %s: %s", errstr, line);
750 errx(2, "invalid line range in file2: %c: %s", c, line);
756 errx(2, "file2 end is %s: %s", errstr, line);
758 errx(2, "invalid line range in file2: %s", line);
777 errx(2, "delete cannot have a file2 range: %s",
780 errx(2, "file2 line range too high: %s", line);
785 * Continue reading file1 and file2 until we reach line numbers
794 if (!(s2 = xfgets(file2)))
795 errx(2, "file2 shorter than expected");
827 if (!(s = xfgets(file2)))
828 errx(2, "file2 shorter than expected");
842 printa(file2, file2end);
846 printc(file1, file1end, file2, file2end);
1046 printc(FILE *file1, size_t file1end, FILE *file2, size_t file2end)
1077 if (!(add = xfgets(file2)))
1096 if (!(add = xfgets(file2)))
1156 " file2\n");