svn commit: r310955 - user/bapt/diff
Baptiste Daroussin
bapt at FreeBSD.org
Sat Dec 31 12:16:01 UTC 2016
Author: bapt
Date: Sat Dec 31 12:16:00 2016
New Revision: 310955
URL: https://svnweb.freebsd.org/changeset/base/310955
Log:
Implement diff --normal
Modified:
user/bapt/diff/diff.c
Modified: user/bapt/diff/diff.c
==============================================================================
--- user/bapt/diff/diff.c Sat Dec 31 12:14:25 2016 (r310954)
+++ user/bapt/diff/diff.c Sat Dec 31 12:16:00 2016 (r310955)
@@ -53,6 +53,7 @@ enum {
OPT_STRIPCR,
OPT_IGN_FN_CASE,
OPT_NO_IGN_FN_CASE,
+ OPT_NORMAL,
};
static struct option longopts[] = {
@@ -83,6 +84,7 @@ static struct option longopts[] = {
{ "exclude-from", required_argument, 0, 'X' },
{ "ignore-file-name-case", no_argument, NULL, OPT_IGN_FN_CASE },
{ "no-ignore-file-name-case", no_argument, NULL, OPT_NO_IGN_FN_CASE },
+ { "normal", no_argument, NULL, OPT_NORMAL },
{ "strip-trailing-cr", no_argument, NULL, OPT_STRIPCR },
{ "tabsize", optional_argument, NULL, OPT_TSIZE },
{ NULL, 0, 0, '\0'}
@@ -229,6 +231,9 @@ main(int argc, char **argv)
case OPT_NO_IGN_FN_CASE:
ignore_file_case = 0;
break;
+ case OPT_NORMAL:
+ diff_format = D_NORMAL;
+ break;
case OPT_TSIZE:
tabsize = (int) strtonum(optarg, 1, INT_MAX, &errstr);
if (errstr) {
More information about the svn-src-user
mailing list