Date: Wed, 27 Jun 2012 01:09:22 +0000 From: jhagewood@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r238363 - in soc2012/jhagewood/diff: . diff Message-ID: <20120627010922.40943106564A@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120627010922.40943106564A>