added -n flag from rcs diff
[unix-history] / usr / src / usr.bin / diff / diff / diff.h
CommitLineData
a3e88724 1/* diff.h 4.7 85/08/16 */
d519abda
BJ
2
3/*
4 * diff - common declarations
5 */
6
7#include <stdio.h>
8#include <ctype.h>
3d9f6a35 9#include <sys/param.h>
d519abda 10#include <sys/stat.h>
e5a20f80 11#include <sys/dir.h>
d519abda 12#include <signal.h>
d519abda
BJ
13
14/*
15 * Output format options
16 */
17int opt;
18
19#define D_NORMAL 0 /* Normal output */
20#define D_EDIT -1 /* Editor script out */
21#define D_REVERSE 1 /* Reverse editor script */
22#define D_CONTEXT 2 /* Diff with context */
23#define D_IFDEF 3 /* Diff with merged #ifdef's */
a3e88724
VJ
24#define D_NREVERSE 4 /* Reverse ed script with numbered
25 lines and no trailing . */
d519abda 26
c470b1f1
VJ
27int tflag; /* expand tabs on output */
28
d519abda
BJ
29/*
30 * Algorithm related options
31 */
32int hflag; /* -h, use halfhearted DIFFH */
c470b1f1
VJ
33int bflag; /* ignore blanks in comparisons */
34int wflag; /* totally ignore blanks in comparisons */
35int iflag; /* ignore case in comparisons */
d519abda
BJ
36
37/*
38 * Options on hierarchical diffs.
39 */
40int lflag; /* long output format with header */
41int rflag; /* recursively trace directories */
42int sflag; /* announce files which are same */
43char *start; /* do file only if name >= this */
44
45/*
46 * Variables for -I D_IFDEF option.
47 */
48int wantelses; /* -E */
49char *ifdef1; /* String for -1 */
50char *ifdef2; /* String for -2 */
51char *endifname; /* What we will print on next #endif */
52int inifdef;
53
54/*
55 * Variables for -c context option.
56 */
57int context; /* lines of context to be printed */
58
59/*
60 * State for exit status.
61 */
62int status;
63int anychange;
64char *tempfile; /* used when comparing against std input */
65
66/*
67 * Variables for diffdir.
68 */
69char **diffargv; /* option list to pass to recursive diffs */
70
71/*
72 * Input file names.
73 * With diffdir, file1 and file2 are allocated BUFSIZ space,
74 * and padded with a '/', and then efile0 and efile1 point after
75 * the '/'.
76 */
77char *file1, *file2, *efile1, *efile2;
78struct stat stb1, stb2;
d519abda 79
d519abda
BJ
80char *malloc(), *talloc(), *ralloc();
81char *savestr(), *splice(), *splicen();
82char *mktemp(), *copytemp(), *rindex();
83int done();
84
85extern char diffh[], diff[], pr[];