socsvn commit: r238318 - in soc2012/jhagewood/diff: . diff
jhagewood at FreeBSD.org
jhagewood at FreeBSD.org
Tue Jun 26 04:51:45 UTC 2012
Author: jhagewood
Date: Tue Jun 26 04:51:42 2012
New Revision: 238318
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=238318
Log:
Modified:
soc2012/jhagewood/diff/diff/diff.c
soc2012/jhagewood/diff/diff/pathnames.h
soc2012/jhagewood/diff/hagewood-diff.patch
Modified: soc2012/jhagewood/diff/diff/diff.c
==============================================================================
--- soc2012/jhagewood/diff/diff/diff.c Tue Jun 26 04:50:26 2012 (r238317)
+++ soc2012/jhagewood/diff/diff/diff.c Tue Jun 26 04:51:42 2012 (r238318)
@@ -357,13 +357,14 @@
newarg = optind != prevoptind;
prevoptind = optind;
+ /* For use when executing to-file and from-file options. */
if (ch != OPT_FFILE && ch != OPT_TOFILE) {
strcat(args, ch);
}
}
argc -= optind;
argv += optind;
-
+
if (Toflag || Fromflag) {
if (Toflag && Fromflag) {
(void)fprintf(stderr, "--from-file and --to-file both specified.");
Modified: soc2012/jhagewood/diff/diff/pathnames.h
==============================================================================
--- soc2012/jhagewood/diff/diff/pathnames.h Tue Jun 26 04:50:26 2012 (r238317)
+++ soc2012/jhagewood/diff/diff/pathnames.h Tue Jun 26 04:51:42 2012 (r238318)
@@ -23,4 +23,5 @@
#include <paths.h>
#define _PATH_PR "/usr/bin/pr"
+#define _PATH_DIFF "/usr/bin/diff"
#define _PATH_SDIFF "/usr/bin/sdiff"
Modified: soc2012/jhagewood/diff/hagewood-diff.patch
==============================================================================
--- soc2012/jhagewood/diff/hagewood-diff.patch Tue Jun 26 04:50:26 2012 (r238317)
+++ soc2012/jhagewood/diff/hagewood-diff.patch Tue Jun 26 04:51:42 2012 (r238318)
@@ -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-25 16:05:53.000000000 -0400
-+++ jhagewood/diff/diff/diff.c 2012-06-26 04:49:46.000000000 -0400
++++ jhagewood/diff/diff/diff.c 2012-06-26 04:51:13.000000000 -0400
@@ -1,4 +1,4 @@
-/*-
+/*
@@ -265,19 +265,21 @@
case OPT_STRIPCR:
strip_cr=1;
break;
-@@ -328,20 +356,44 @@ main(int argc, char **argv)
+@@ -328,20 +356,45 @@ main(int argc, char **argv)
lastch = ch;
newarg = optind != prevoptind;
prevoptind = optind;
+
++ /* For use when executing to-file and from-file options. */
+ if (ch != OPT_FFILE && ch != OPT_TOFILE) {
+ strcat(args, ch);
+ }
}
argc -= optind;
argv += optind;
-
+-
- if(yflag) {
++
+ if (Toflag || Fromflag) {
+ if (Toflag && Fromflag) {
+ (void)fprintf(stderr, "--from-file and --to-file both specified.");
@@ -314,7 +316,7 @@
execv(_PATH_SDIFF, oargv);
_exit(127);
}
-@@ -380,7 +432,10 @@ main(int argc, char **argv)
+@@ -380,7 +433,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)
@@ -326,7 +328,7 @@
diffdir(argv[0], argv[1]);
} else {
if (S_ISDIR(stb1.st_mode)) {
-@@ -402,11 +457,10 @@ main(int argc, char **argv)
+@@ -402,11 +458,10 @@ main(int argc, char **argv)
void *
emalloc(size_t n)
{
@@ -339,7 +341,7 @@
if ((p = malloc(n)) == NULL)
errx(2, NULL);
return (p);
-@@ -415,7 +469,7 @@ emalloc(size_t n)
+@@ -415,7 +470,7 @@ emalloc(size_t n)
void *
erealloc(void *p, size_t n)
{
@@ -348,7 +350,7 @@
if (n == 0)
errx(2, NULL);
-@@ -431,13 +485,12 @@ erealloc(void *p, size_t n)
+@@ -431,13 +486,12 @@ erealloc(void *p, size_t n)
int
easprintf(char **ret, const char *fmt, ...)
{
@@ -364,7 +366,7 @@
if (len < 0 || *ret == NULL)
errx(2, NULL);
return (len);
-@@ -446,11 +499,12 @@ easprintf(char **ret, const char *fmt, .
+@@ -446,11 +500,12 @@ easprintf(char **ret, const char *fmt, .
char *
estrdup(const char *str)
{
@@ -379,7 +381,7 @@
strlcpy(cp, str, len);
return (cp);
}
-@@ -531,6 +585,7 @@ push_ignore_pats(char *pattern)
+@@ -531,6 +586,7 @@ push_ignore_pats(char *pattern)
void
print_only(const char *path, size_t dirlen, const char *entry)
{
@@ -387,7 +389,7 @@
if (dirlen > 1)
dirlen--;
printf("Only in %.*s: %s\n", (int)dirlen, path, entry);
-@@ -539,45 +594,46 @@ print_only(const char *path, size_t dirl
+@@ -539,45 +595,46 @@ print_only(const char *path, size_t dirl
void
print_status(int val, char *path1, char *path2, char *entry)
{
@@ -445,7 +447,7 @@
break;
}
}
-@@ -585,6 +641,7 @@ print_status(int val, char *path1, char
+@@ -585,6 +642,7 @@ print_status(int val, char *path1, char
void
usage(void)
{
@@ -1254,3 +1256,12 @@
+ printf("%s %s\t%s\n", format == D_CONTEXT ? "---" : "+++",
+ file2, buf2);
}
+diff -rupN jhagewood/diff/diff-orig/pathnames.h jhagewood/diff/diff/pathnames.h
+--- jhagewood/diff/diff-orig/pathnames.h 2012-06-25 16:05:53.000000000 -0400
++++ jhagewood/diff/diff/pathnames.h 2012-06-26 04:51:36.000000000 -0400
+@@ -23,4 +23,5 @@
+ #include <paths.h>
+
+ #define _PATH_PR "/usr/bin/pr"
++#define _PATH_DIFF "/usr/bin/diff"
+ #define _PATH_SDIFF "/usr/bin/sdiff"
More information about the svn-soc-all
mailing list