From owner-svn-soc-all@FreeBSD.ORG Tue Jun 26 04:52:50 2012 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 4CA61106564A for ; Tue, 26 Jun 2012 04:52:48 +0000 (UTC) (envelope-from jhagewood@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Tue, 26 Jun 2012 04:52:48 +0000 Date: Tue, 26 Jun 2012 04:52:48 +0000 From: jhagewood@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20120626045248.4CA61106564A@hub.freebsd.org> Cc: Subject: socsvn commit: r238319 - in soc2012/jhagewood/diff: . diff X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2012 04:52:50 -0000 Author: jhagewood Date: Tue Jun 26 04:52:48 2012 New Revision: 238319 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=238319 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 Tue Jun 26 04:51:42 2012 (r238318) +++ soc2012/jhagewood/diff/diff/diff.c Tue Jun 26 04:52:48 2012 (r238319) @@ -382,6 +382,7 @@ if (exec1(_PATH_DIFF, args, optarg, argv[argc-2]) || exec1(_PATH_DIFF, args, optarg, argv[argc-1]) { (void)fprintf(stderr, "--from-file error."); + exit(2); } exit(127); } Modified: soc2012/jhagewood/diff/hagewood-diff.patch ============================================================================== --- soc2012/jhagewood/diff/hagewood-diff.patch Tue Jun 26 04:51:42 2012 (r238318) +++ soc2012/jhagewood/diff/hagewood-diff.patch Tue Jun 26 04:52:48 2012 (r238319) @@ -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:51:13.000000000 -0400 ++++ jhagewood/diff/diff/diff.c 2012-06-26 04:52:40.000000000 -0400 @@ -1,4 +1,4 @@ -/*- +/* @@ -265,7 +265,7 @@ case OPT_STRIPCR: strip_cr=1; break; -@@ -328,20 +356,45 @@ main(int argc, char **argv) +@@ -328,20 +356,46 @@ main(int argc, char **argv) lastch = ch; newarg = optind != prevoptind; prevoptind = optind; @@ -297,6 +297,7 @@ + if (exec1(_PATH_DIFF, args, optarg, argv[argc-2]) || + exec1(_PATH_DIFF, args, optarg, argv[argc-1]) { + (void)fprintf(stderr, "--from-file error."); ++ exit(2); + } + exit(127); + } @@ -316,7 +317,7 @@ execv(_PATH_SDIFF, oargv); _exit(127); } -@@ -380,7 +433,10 @@ main(int argc, char **argv) +@@ -380,7 +434,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) @@ -328,7 +329,7 @@ diffdir(argv[0], argv[1]); } else { if (S_ISDIR(stb1.st_mode)) { -@@ -402,11 +458,10 @@ main(int argc, char **argv) +@@ -402,11 +459,10 @@ main(int argc, char **argv) void * emalloc(size_t n) { @@ -341,7 +342,7 @@ if ((p = malloc(n)) == NULL) errx(2, NULL); return (p); -@@ -415,7 +470,7 @@ emalloc(size_t n) +@@ -415,7 +471,7 @@ emalloc(size_t n) void * erealloc(void *p, size_t n) { @@ -350,7 +351,7 @@ if (n == 0) errx(2, NULL); -@@ -431,13 +486,12 @@ erealloc(void *p, size_t n) +@@ -431,13 +487,12 @@ erealloc(void *p, size_t n) int easprintf(char **ret, const char *fmt, ...) { @@ -366,7 +367,7 @@ if (len < 0 || *ret == NULL) errx(2, NULL); return (len); -@@ -446,11 +500,12 @@ easprintf(char **ret, const char *fmt, . +@@ -446,11 +501,12 @@ easprintf(char **ret, const char *fmt, . char * estrdup(const char *str) { @@ -381,7 +382,7 @@ strlcpy(cp, str, len); return (cp); } -@@ -531,6 +586,7 @@ push_ignore_pats(char *pattern) +@@ -531,6 +587,7 @@ push_ignore_pats(char *pattern) void print_only(const char *path, size_t dirlen, const char *entry) { @@ -389,7 +390,7 @@ if (dirlen > 1) dirlen--; printf("Only in %.*s: %s\n", (int)dirlen, path, entry); -@@ -539,45 +595,46 @@ print_only(const char *path, size_t dirl +@@ -539,45 +596,46 @@ print_only(const char *path, size_t dirl void print_status(int val, char *path1, char *path2, char *entry) { @@ -447,7 +448,7 @@ break; } } -@@ -585,6 +642,7 @@ print_status(int val, char *path1, char +@@ -585,6 +643,7 @@ print_status(int val, char *path1, char void usage(void) {