1: /* @(#)diff.h 4.1 10/9/80" */
   2: 
   3: /*
   4:  * diff - common declarations
   5:  */
   6: 
   7: #include <stdio.h>
   8: #include <ctype.h>
   9: #include <sys/types.h>
  10: #include <sys/stat.h>
  11: #include <signal.h>
  12: #include <sys/dir.h>
  13: 
  14: /*
  15:  * Output format options
  16:  */
  17: int 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 */
  24: 
  25: /*
  26:  * Algorithm related options
  27:  */
  28: int hflag;          /* -h, use halfhearted DIFFH */
  29: int bflag;          /* ignore blanks in comparisions */
  30: 
  31: /*
  32:  * Options on hierarchical diffs.
  33:  */
  34: int lflag;          /* long output format with header */
  35: int rflag;          /* recursively trace directories */
  36: int sflag;          /* announce files which are same */
  37: char    *start;         /* do file only if name >= this */
  38: 
  39: /*
  40:  * Variables for -I D_IFDEF option.
  41:  */
  42: int wantelses;      /* -E */
  43: char    *ifdef1;        /* String for -1 */
  44: char    *ifdef2;        /* String for -2 */
  45: char    *endifname;     /* What we will print on next #endif */
  46: int inifdef;
  47: 
  48: /*
  49:  * Variables for -c context option.
  50:  */
  51: int context;        /* lines of context to be printed */
  52: 
  53: /*
  54:  * State for exit status.
  55:  */
  56: int status;
  57: int anychange;
  58: char    *tempfile;      /* used when comparing against std input */
  59: 
  60: /*
  61:  * Variables for diffdir.
  62:  */
  63: char    **diffargv;     /* option list to pass to recursive diffs */
  64: 
  65: /*
  66:  * Input file names.
  67:  * With diffdir, file1 and file2 are allocated BUFSIZ space,
  68:  * and padded with a '/', and then efile0 and efile1 point after
  69:  * the '/'.
  70:  */
  71: char    *file1, *file2, *efile1, *efile2;
  72: struct  stat stb1, stb2;
  73: struct  stat stb1, stb2;
  74: 
  75: /*
  76:  * This is allocated early, and used
  77:  * to reset the free storage pointer to effect space compaction.
  78:  */
  79: char    *dummy;
  80: 
  81: char    *malloc(), *talloc(), *ralloc();
  82: char    *savestr(), *splice(), *splicen();
  83: char    *mktemp(), *copytemp(), *rindex();
  84: int done();
  85: 
  86: extern  char diffh[], diff[], pr[];

Defined variables

anychange defined in line 57; used 6 times
bflag defined in line 29; used 3 times
context defined in line 51; used 6 times
diffargv defined in line 63; used 8 times
dummy defined in line 79; used 3 times
efile1 defined in line 71; used 5 times
efile2 defined in line 71; used 5 times
endifname defined in line 45; used 7 times
file1 defined in line 71; used 27 times
file2 defined in line 71; used 28 times
hflag defined in line 28; used 3 times
ifdef1 defined in line 43; used 5 times
ifdef2 defined in line 44; used 6 times
inifdef defined in line 46; used 6 times
lflag defined in line 34; used 10 times
opt defined in line 17; used 36 times
rflag defined in line 35; used 2 times
sflag defined in line 36; used 3 times
start defined in line 37; used 3 times
stb1 defined in line 73; used 9 times
stb2 defined in line 73; used 9 times
tempfile defined in line 58; used 6 times
wantelses defined in line 42; used 4 times

Defined macros

D_EDIT defined in line 20; used 7 times
D_IFDEF defined in line 23; used 11 times
D_NORMAL defined in line 19; used 5 times
D_REVERSE defined in line 21; used 2 times

Usage of this include

Last modified: 1980-10-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 908
Valid CSS Valid XHTML 1.0 Strict