Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Apr 2017 08:41:05 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r316637 - head/usr.bin/sdiff
Message-ID:  <201704080841.v388f5lD045218@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Sat Apr  8 08:41:05 2017
New Revision: 316637
URL: https://svnweb.freebsd.org/changeset/base/316637

Log:
  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

Modified:
  head/usr.bin/sdiff/sdiff.1
  head/usr.bin/sdiff/sdiff.c

Modified: head/usr.bin/sdiff/sdiff.1
==============================================================================
--- head/usr.bin/sdiff/sdiff.1	Sat Apr  8 08:24:25 2017	(r316636)
+++ head/usr.bin/sdiff/sdiff.1	Sat Apr  8 08:41:05 2017	(r316637)
@@ -4,7 +4,7 @@
 .\" Written by Raymond Lai <ray@cyth.net>.
 .\" 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: head/usr.bin/sdiff/sdiff.c
==============================================================================
--- head/usr.bin/sdiff/sdiff.c	Sat Apr  8 08:24:25 2017	(r316636)
+++ head/usr.bin/sdiff/sdiff.c	Sat Apr  8 08:41:05 2017	(r316637)
@@ -259,7 +259,6 @@ 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);
@@ -271,6 +270,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;
@@ -1151,7 +1153,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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704080841.v388f5lD045218>