socsvn commit: r238520 - in soc2012/jhagewood/diff: . diff
jhagewood at FreeBSD.org
jhagewood at FreeBSD.org
Fri Jun 29 02:40:11 UTC 2012
Author: jhagewood
Date: Fri Jun 29 02:40:09 2012
New Revision: 238520
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=238520
Log:
Modified:
soc2012/jhagewood/diff/diff/diff.c
soc2012/jhagewood/diff/hagewood-diff.patch
Modified: soc2012/jhagewood/diff/diff/diff.c
==============================================================================
--- soc2012/jhagewood/diff/diff/diff.c Fri Jun 29 02:31:03 2012 (r238519)
+++ soc2012/jhagewood/diff/diff/diff.c Fri Jun 29 02:40:09 2012 (r238520)
@@ -178,6 +178,17 @@
"\t-y --side-by-side Output difference in two columns",
"\t--GTYPE-group-format=GFMT Format GTYPE input groups with GFMT",
"\t--LTYPE-line-format=LFMT Format LTYPE input lines with LFMT",
+"\t--from-file=FILE Compare FILE to all operands",
+"\t--to-file=FILE Compare all operands to FILE",
+"\t--ignore-file-name-case Ignore file name case",
+"\t--left-column Output the only the left column of common lines",
+"\t--line-format=LFMT Format all input lines with LFMT",
+"\t--no-ignore-file-name-case Do not ignore file name case",
+"\t--normal Output a normal diff (default output)",
+"\t--strip-trailing-cr Strip trailing carriage return",
+"\t--suppress-common-lines Do not output common lines",
+"\t--tabsize=NUM Tab stops every NUM (default 8) print columns",
+"\t--help Output this help message",
NULL,
};
char **help_strs = (char **)help_msg;
Modified: soc2012/jhagewood/diff/hagewood-diff.patch
==============================================================================
--- soc2012/jhagewood/diff/hagewood-diff.patch Fri Jun 29 02:31:03 2012 (r238519)
+++ soc2012/jhagewood/diff/hagewood-diff.patch Fri Jun 29 02:40:09 2012 (r238520)
@@ -1,6 +1,6 @@
diff -rupN jhagewood/diff/diff-orig/diff.c jhagewood/diff/diff/diff.c
--- jhagewood/diff/diff-orig/diff.c 2012-06-28 18:13:23.287983517 -0400
-+++ jhagewood/diff/diff/diff.c 2012-06-28 22:30:55.077962845 -0400
++++ jhagewood/diff/diff/diff.c 2012-06-28 22:39:58.023958340 -0400
@@ -1,4 +1,4 @@
-/*-
+/*
@@ -56,7 +56,7 @@
/* Options which exceed manageable alphanumeric assignments */
-@@ -69,84 +67,117 @@ enum
+@@ -69,84 +67,128 @@ enum
OPT_STRIPCR,
OPT_NORMAL,
OPT_LEFTC,
@@ -223,10 +223,21 @@
+"\t-y --side-by-side Output difference in two columns",
+"\t--GTYPE-group-format=GFMT Format GTYPE input groups with GFMT",
+"\t--LTYPE-line-format=LFMT Format LTYPE input lines with LFMT",
++"\t--from-file=FILE Compare FILE to all operands",
++"\t--to-file=FILE Compare all operands to FILE",
++"\t--ignore-file-name-case Ignore file name case",
++"\t--left-column Output the only the left column of common lines",
++"\t--line-format=LFMT Format all input lines with LFMT",
++"\t--no-ignore-file-name-case Do not ignore file name case",
++"\t--normal Output a normal diff (default output)",
++"\t--strip-trailing-cr Strip trailing carriage return",
++"\t--suppress-common-lines Do not output common lines",
++"\t--tabsize=NUM Tab stops every NUM (default 8) print columns",
++"\t--help Output this help message",
NULL,
};
char **help_strs = (char **)help_msg;
-@@ -162,11 +193,12 @@ void read_excludes_file(char *);
+@@ -162,11 +204,12 @@ void read_excludes_file(char *);
int
main(int argc, char **argv)
{
@@ -244,7 +255,7 @@
oargv = argv;
oargc = argc;
gotstdin = 0;
-@@ -197,6 +229,7 @@ main(int argc, char **argv)
+@@ -197,6 +240,7 @@ main(int argc, char **argv)
break;
case 'C':
case 'c':
@@ -252,7 +263,7 @@
format = D_CONTEXT;
if (optarg != NULL) {
l = strtol(optarg, &ep, 10);
-@@ -213,6 +246,9 @@ main(int argc, char **argv)
+@@ -213,6 +257,9 @@ main(int argc, char **argv)
case 'd':
dflag = 1;
break;
@@ -262,7 +273,7 @@
case 'e':
format = D_EDIT;
break;
-@@ -296,15 +332,52 @@ main(int argc, char **argv)
+@@ -296,15 +343,52 @@ main(int argc, char **argv)
case 'y':
yflag = 1;
break;
@@ -323,7 +334,7 @@
case OPT_STRIPCR:
strip_cr=1;
break;
-@@ -328,20 +401,58 @@ main(int argc, char **argv)
+@@ -328,20 +412,58 @@ main(int argc, char **argv)
lastch = ch;
newarg = optind != prevoptind;
prevoptind = optind;
@@ -387,7 +398,7 @@
execv(_PATH_SDIFF, oargv);
_exit(127);
}
-@@ -380,7 +491,10 @@ main(int argc, char **argv)
+@@ -380,7 +502,10 @@ main(int argc, char **argv)
set_argstr(oargv, argv);
if (S_ISDIR(stb1.st_mode) && S_ISDIR(stb2.st_mode)) {
if (format == D_IFDEF)
@@ -399,7 +410,7 @@
diffdir(argv[0], argv[1]);
} else {
if (S_ISDIR(stb1.st_mode)) {
-@@ -402,11 +516,10 @@ main(int argc, char **argv)
+@@ -402,11 +527,10 @@ main(int argc, char **argv)
void *
emalloc(size_t n)
{
@@ -412,7 +423,7 @@
if ((p = malloc(n)) == NULL)
errx(2, NULL);
return (p);
-@@ -415,7 +528,7 @@ emalloc(size_t n)
+@@ -415,7 +539,7 @@ emalloc(size_t n)
void *
erealloc(void *p, size_t n)
{
@@ -421,7 +432,7 @@
if (n == 0)
errx(2, NULL);
-@@ -431,13 +544,12 @@ erealloc(void *p, size_t n)
+@@ -431,13 +555,12 @@ erealloc(void *p, size_t n)
int
easprintf(char **ret, const char *fmt, ...)
{
@@ -437,7 +448,7 @@
if (len < 0 || *ret == NULL)
errx(2, NULL);
return (len);
-@@ -446,11 +558,12 @@ easprintf(char **ret, const char *fmt, .
+@@ -446,11 +569,12 @@ easprintf(char **ret, const char *fmt, .
char *
estrdup(const char *str)
{
@@ -452,7 +463,7 @@
strlcpy(cp, str, len);
return (cp);
}
-@@ -531,6 +644,7 @@ push_ignore_pats(char *pattern)
+@@ -531,6 +655,7 @@ push_ignore_pats(char *pattern)
void
print_only(const char *path, size_t dirlen, const char *entry)
{
@@ -460,7 +471,7 @@
if (dirlen > 1)
dirlen--;
printf("Only in %.*s: %s\n", (int)dirlen, path, entry);
-@@ -539,45 +653,46 @@ print_only(const char *path, size_t dirl
+@@ -539,45 +664,46 @@ print_only(const char *path, size_t dirl
void
print_status(int val, char *path1, char *path2, char *entry)
{
@@ -518,7 +529,7 @@
break;
}
}
-@@ -585,6 +700,7 @@ print_status(int val, char *path1, char
+@@ -585,6 +711,7 @@ print_status(int val, char *path1, char
void
usage(void)
{
More information about the svn-soc-all
mailing list