From owner-svn-soc-all@FreeBSD.ORG Wed Jun 27 01:09:24 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 40943106564A for ; Wed, 27 Jun 2012 01:09:22 +0000 (UTC) (envelope-from jhagewood@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Wed, 27 Jun 2012 01:09:22 +0000 Date: Wed, 27 Jun 2012 01:09:22 +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: <20120627010922.40943106564A@hub.freebsd.org> Cc: Subject: socsvn commit: r238363 - 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: Wed, 27 Jun 2012 01:09:24 -0000 Author: jhagewood Date: Wed Jun 27 01:09:22 2012 New Revision: 238363 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=238363 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 Wed Jun 27 00:50:25 2012 (r238362) +++ soc2012/jhagewood/diff/diff/diff.c Wed Jun 27 01:09:22 2012 (r238363) @@ -304,8 +304,8 @@ case OPT_FFILE: Toflag = 1; break; - case OPT_TOFILE - Fromflag: + case OPT_TOFILE: + Fromflag = 1; break; case OPT_NEW_LF: case OPT_OLD_LF: @@ -367,21 +367,21 @@ if (Toflag || Fromflag) { if (Toflag && Fromflag) { - (void)fprintf(stderr, "--from-file and --to-file both specified."); + (void)fprintf(stderr, "--from-file and --to-file both specified.\n"); exit(2); } if (Toflag) { - if (exec1(_PATH_DIFF, args, argv[argc-2], optarg) || - exec1(_PATH_DIFF, args, argv[argc-1], optarg) { - (void)fprintf(stderr, "--to-file error."); + if (execl(_PATH_DIFF, args, argv[argc-2], optarg) || + execl(_PATH_DIFF, args, argv[argc-1], optarg)) { + (void)fprintf(stderr, "--to-file error.\n"); exit(2); } exit(127); } if (Fromflag) { - if (exec1(_PATH_DIFF, args, optarg, argv[argc-2]) || - exec1(_PATH_DIFF, args, optarg, argv[argc-1]) { - (void)fprintf(stderr, "--from-file error."); + if (execl(_PATH_DIFF, args, optarg, argv[argc-2]) || + execl(_PATH_DIFF, args, optarg, argv[argc-1])) { + (void)fprintf(stderr, "--from-file error.\n"); exit(2); } exit(127); Modified: soc2012/jhagewood/diff/hagewood-diff.patch ============================================================================== --- soc2012/jhagewood/diff/hagewood-diff.patch Wed Jun 27 00:50:25 2012 (r238362) +++ soc2012/jhagewood/diff/hagewood-diff.patch Wed Jun 27 01:09:22 2012 (r238363) @@ -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:52:40.000000000 -0400 ++++ jhagewood/diff/diff/diff.c 2012-06-27 01:08:55.000000000 -0400 @@ -1,4 +1,4 @@ -/*- +/* @@ -225,8 +225,8 @@ + case OPT_FFILE: + Toflag = 1; + break; -+ case OPT_TOFILE -+ Fromflag: ++ case OPT_TOFILE: ++ Fromflag = 1; + break; + case OPT_NEW_LF: + case OPT_OLD_LF: @@ -282,21 +282,21 @@ + + if (Toflag || Fromflag) { + if (Toflag && Fromflag) { -+ (void)fprintf(stderr, "--from-file and --to-file both specified."); ++ (void)fprintf(stderr, "--from-file and --to-file both specified.\n"); + exit(2); + } + if (Toflag) { -+ if (exec1(_PATH_DIFF, args, argv[argc-2], optarg) || -+ exec1(_PATH_DIFF, args, argv[argc-1], optarg) { -+ (void)fprintf(stderr, "--to-file error."); ++ if (execl(_PATH_DIFF, args, argv[argc-2], optarg) || ++ execl(_PATH_DIFF, args, argv[argc-1], optarg)) { ++ (void)fprintf(stderr, "--to-file error.\n"); + exit(2); + } + exit(127); + } + if (Fromflag) { -+ if (exec1(_PATH_DIFF, args, optarg, argv[argc-2]) || -+ exec1(_PATH_DIFF, args, optarg, argv[argc-1]) { -+ (void)fprintf(stderr, "--from-file error."); ++ if (execl(_PATH_DIFF, args, optarg, argv[argc-2]) || ++ execl(_PATH_DIFF, args, optarg, argv[argc-1])) { ++ (void)fprintf(stderr, "--from-file error.\n"); + exit(2); + } + exit(127);