From owner-svn-src-stable@freebsd.org Tue Apr 11 16:32:47 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABD09D39E2B; Tue, 11 Apr 2017 16:32:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 638EFCDC; Tue, 11 Apr 2017 16:32:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3BGWkU6032739; Tue, 11 Apr 2017 16:32:46 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3BGWkWd032738; Tue, 11 Apr 2017 16:32:46 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201704111632.v3BGWkWd032738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 11 Apr 2017 16:32:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r316705 - stable/11/usr.bin/sdiff X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 16:32:47 -0000 Author: bapt Date: Tue Apr 11 16:32:46 2017 New Revision: 316705 URL: https://svnweb.freebsd.org/changeset/base/316705 Log: MFC r316637-r316638 r316637: When passingthrough from sdiff to diff the -H/--speed-large-files options rename it to the long version as GNU diff only support the long version of the option not the short version r316638: Remove a useless loop over the long options before passing through some options to diff(1) Modified: stable/11/usr.bin/sdiff/sdiff.1 stable/11/usr.bin/sdiff/sdiff.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/sdiff/sdiff.1 ============================================================================== --- stable/11/usr.bin/sdiff/sdiff.1 Tue Apr 11 15:20:32 2017 (r316704) +++ stable/11/usr.bin/sdiff/sdiff.1 Tue Apr 11 16:32:46 2017 (r316705) @@ -4,7 +4,7 @@ .\" Written by Raymond Lai . .\" Public domain. .\" -.Dd $Mdocdate: July 5 2012 $ +.Dd April 8, 2017 .Dt SDIFF 1 .Os .Sh NAME @@ -12,7 +12,7 @@ .Nd side-by-side diff .Sh SYNOPSIS .Nm -.Op Fl abdilstW +.Op Fl abdilstHW .Op Fl I Ar regexp .Op Fl o Ar outfile .Op Fl w Ar width Modified: stable/11/usr.bin/sdiff/sdiff.c ============================================================================== --- stable/11/usr.bin/sdiff/sdiff.c Tue Apr 11 15:20:32 2017 (r316704) +++ stable/11/usr.bin/sdiff/sdiff.c Tue Apr 11 16:32:46 2017 (r316705) @@ -214,7 +214,6 @@ main(int argc, char **argv) int ch, fd[2] = {-1}, status; pid_t pid=0; const char *outfile = NULL; - struct option *popt; char **diffargv, *diffprog = DIFF_PATH, *filename1, *filename2, *tmp1, *tmp2, *s1, *s2; int i; @@ -260,9 +259,7 @@ main(int argc, char **argv) case 'E': case 'i': case 't': - case 'H': case 'W': - for(popt = longopts; ch != popt->val && popt->name != NULL; popt++); diffargv[1] = realloc(diffargv[1], sizeof(char) * strlen(diffargv[1]) + 2); /* * In diff, the 'W' option is 'w' and the 'w' is 'W'. @@ -272,6 +269,9 @@ main(int argc, char **argv) else sprintf(diffargv[1], "%s%c", diffargv[1], ch); break; + case 'H': + diffargv[diffargc++] = "--speed-large-files"; + break; case DIFFPROG_OPT: diffargv[0] = diffprog = optarg; break; @@ -1152,7 +1152,7 @@ usage(void) { fprintf(stderr, - "usage: sdiff [-abdilstW] [-I regexp] [-o outfile] [-w width] file1" + "usage: sdiff [-abdilstHW] [-I regexp] [-o outfile] [-w width] file1" " file2\n"); exit(2); }