diff options
author | 2003-07-09 00:07:44 +0000 | |
---|---|---|
committer | 2003-07-09 00:07:44 +0000 | |
commit | b4bca33fcd90e52689100cb9afe3534ba75f7b3f (patch) | |
tree | a8ef442047ed152327bead66fbfd38ce91435794 /usr.bin/diff/diff.h | |
parent | The best read code of mice and men, ... (reviewed by /dev/null) (diff) | |
download | wireguard-openbsd-b4bca33fcd90e52689100cb9afe3534ba75f7b3f.tar.xz wireguard-openbsd-b4bca33fcd90e52689100cb9afe3534ba75f7b3f.zip |
Re-implement -l flag; diff -l now works correctly in non-directory
mode (like GNU diff).
Diffstat (limited to 'usr.bin/diff/diff.h')
-rw-r--r-- | usr.bin/diff/diff.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/usr.bin/diff/diff.h b/usr.bin/diff/diff.h index a2f63cc8d48..b08f10120f2 100644 --- a/usr.bin/diff/diff.h +++ b/usr.bin/diff/diff.h @@ -1,4 +1,4 @@ -/* $OpenBSD: diff.h,v 1.17 2003/07/06 22:17:21 millert Exp $ */ +/* $OpenBSD: diff.h,v 1.18 2003/07/09 00:07:44 millert Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -51,12 +51,23 @@ #define D_EMPTY1 2 /* Treat first file as empty (/dev/null) */ #define D_EMPTY2 4 /* Treat second file as empty (/dev/null) */ +/* + * Status values for print_status() and diffreg() return values + */ +#define D_SAME 0 /* Files are the same */ +#define D_DIFFER 1 /* Files are different */ +#define D_BINARY 2 /* Binary files are different */ +#define D_COMMON 3 /* Subdirectory common to both dirs */ +#define D_ONLY 4 /* Only exists in one directory */ +#define D_ERROR 5 /* An error ocurred */ + struct excludes { char *pattern; struct excludes *next; }; -extern int aflag, bflag, iflag, Nflag, Pflag, rflag, sflag, tflag, wflag; +extern int aflag, bflag, iflag, lflag, Nflag, Pflag, rflag, sflag, + tflag, wflag; extern char *start, *ifdefname; extern int format, context, status, anychange; extern char *tempfiles[], *diffargs; @@ -65,10 +76,12 @@ extern struct excludes *excludes_list; char *copytemp(const char *, int); char *splice(char *, char *); +int diffreg(char *, char *, int); +int easprintf(char **, const char *, ...); void *emalloc(size_t); void *erealloc(void *, size_t); void diffdir(char *, char *); -void diffreg(char *, char *, int); +void print_status(int, char *, char *, char *); void quit(int); __dead void error(const char *, ...); __dead void errorx(const char *, ...); |