socsvn commit: r239094 - in soc2012/jhagewood/sdiff: . sdiff
jhagewood at FreeBSD.org
jhagewood at FreeBSD.org
Sat Jul 7 19:58:16 UTC 2012
Author: jhagewood
Date: Sat Jul 7 19:58:13 2012
New Revision: 239094
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=239094
Log:
Modified:
soc2012/jhagewood/sdiff/hagewood-sdiff.patch
soc2012/jhagewood/sdiff/sdiff/sdiff.c
Modified: soc2012/jhagewood/sdiff/hagewood-sdiff.patch
==============================================================================
--- soc2012/jhagewood/sdiff/hagewood-sdiff.patch Sat Jul 7 19:50:04 2012 (r239093)
+++ soc2012/jhagewood/sdiff/hagewood-sdiff.patch Sat Jul 7 19:58:13 2012 (r239094)
@@ -112,7 +112,7 @@
+
diff -rupN jhagewood/sdiff/sdiff-orig/sdiff.c jhagewood/sdiff/sdiff/sdiff.c
--- jhagewood/sdiff/sdiff-orig/sdiff.c 2012-07-07 19:37:22.000000000 -0400
-+++ jhagewood/sdiff/sdiff/sdiff.c 2012-07-07 19:48:42.000000000 -0400
++++ jhagewood/sdiff/sdiff/sdiff.c 2012-07-07 19:58:11.000000000 -0400
@@ -5,6 +5,14 @@
* Public domain.
*/
@@ -128,17 +128,45 @@
#include <sys/param.h>
#include <sys/queue.h>
#include <sys/stat.h>
-@@ -101,7 +109,8 @@ enum {
+@@ -76,8 +84,8 @@ FILE *outfp; /* file to save changes to
+ const char *tmpdir; /* TMPDIR or /tmp */
+
+ enum {
+- HELP_OPT = CHAR_MAX + 1,
+- NORMAL_OPT,
++ HELP_OPT = CHAR_MAX + 1,
++ NORMAL_OPT,
+ FCASE_SENSITIVE_OPT,
+ FCASE_IGNORE_OPT,
+ FROMFILE_OPT,
+@@ -89,19 +97,19 @@ enum {
+ SUPCL_OPT,
+ LF_OPT,
+ /* the following groupings must be in sequence */
+- OLDGF_OPT,
+- NEWGF_OPT,
++ OLDGF_OPT,
++ NEWGF_OPT,
+ UNCGF_OPT,
+- CHGF_OPT,
+- OLDLF_OPT,
+- NEWLF_OPT,
+- UNCLF_OPT,
++ CHGF_OPT,
++ OLDLF_OPT,
++ NEWLF_OPT,
++ UNCLF_OPT,
+ /* end order-sensitive enums */
+ TSIZE_OPT,
HLINES_OPT,
LFILES_OPT,
DIFFPROG_OPT,
-
+ PIPE_FD,
-+
/* pid from the diff parent (if applicable) */
DIFF_PID,
-@@ -113,7 +122,7 @@ static struct option longopts[] = {
+@@ -113,7 +121,7 @@ static struct option longopts[] = {
{ "left-column", no_argument, NULL, LEFTC_OPT },
{ "suppress-common-lines", no_argument, NULL, 's' },
{ "width", required_argument, NULL, 'w' },
@@ -147,7 +175,7 @@
{ "output", required_argument, NULL, 'o' },
{ "diff-program", required_argument, NULL, DIFFPROG_OPT },
-@@ -134,9 +143,29 @@ static struct option longopts[] = {
+@@ -134,9 +142,35 @@ static struct option longopts[] = {
{ "ignore-case", no_argument, NULL, 'i' },
{ "expand-tabs", no_argument, NULL, 't' },
{ "speed-large-files", no_argument, NULL, 'H' },
@@ -171,6 +199,12 @@
+ "\t\t-i, --ignore-case, Do a case-insensitive comparison.",
+ "\t\t-t, --expand-tabs Expand tabs to spaces.",
+ "\t\t-W, --ignore-all-spaces, Ignore all spaces.",
++ "\t\t--speed-large-files, Assume large file with scattered changes.",
++ "\t\t--strip-trailing-cr, Strip trailing carriage return.",
++ "\t\t--ignore-file-name-case, Ignore case of file names.",
++ "\t\t--no-ignore-file-name-case, Do not ignore file name case",
++ "\t\t--tabsize NUM, Change size of tabs (default 8.)",
++
+ NULL,
+};
+char **help_strs = (char **)help_msg;
@@ -178,7 +212,7 @@
/*
* Create temporary file if source_file is not a regular file.
* Returns temporary file name if one was malloced, NULL if unnecessary.
-@@ -240,18 +269,13 @@ main(int argc, char **argv)
+@@ -240,18 +274,13 @@ main(int argc, char **argv)
const char *errstr;
switch (ch) {
@@ -197,7 +231,7 @@
/* combine no-arg single switches */
case 'a':
case 'B':
-@@ -261,11 +285,11 @@ main(int argc, char **argv)
+@@ -261,11 +290,11 @@ main(int argc, char **argv)
case 'i':
case 't':
case 'H':
@@ -211,7 +245,7 @@
case DIFFPROG_OPT:
diffargv[0] = diffprog = optarg;
break;
-@@ -289,26 +313,23 @@ main(int argc, char **argv)
+@@ -289,26 +318,23 @@ main(int argc, char **argv)
if (errstr)
errx(2, "width is %s: %s", errstr, optarg);
break;
@@ -243,7 +277,7 @@
/* no single switches were used */
if( strcmp( diffargv[1], "-" ) == 0 )
{
-@@ -362,19 +383,19 @@ main(int argc, char **argv)
+@@ -362,19 +388,19 @@ main(int argc, char **argv)
/* Add NULL to end of array to indicate end of array. */
diffargv[diffargc++] = NULL;
@@ -268,7 +302,7 @@
case 0:
/* child */
/* We don't read from the pipe. */
-@@ -383,7 +404,6 @@ main(int argc, char **argv)
+@@ -383,7 +409,6 @@ main(int argc, char **argv)
err(2, "child could not duplicate descriptor");
/* Free unused descriptor. */
close(fd[1]);
@@ -276,7 +310,7 @@
execvp(diffprog, diffargv);
err(2, "could not execute diff: %s", diffprog);
break;
-@@ -461,6 +481,7 @@ main(int argc, char **argv)
+@@ -461,6 +486,7 @@ main(int argc, char **argv)
static void
printcol(const char *s, size_t *col, const size_t col_max)
{
@@ -284,7 +318,7 @@
for (; *s && *col < col_max; ++s) {
size_t new_col;
-@@ -484,11 +505,9 @@ printcol(const char *s, size_t *col, con
+@@ -484,11 +510,9 @@ printcol(const char *s, size_t *col, con
return;
*col = new_col;
break;
@@ -296,7 +330,7 @@
putchar(*s);
}
}
-@@ -527,30 +546,24 @@ prompt(const char *s1, const char *s2)
+@@ -527,30 +551,24 @@ prompt(const char *s1, const char *s2)
/* Choose left column as-is. */
if (s1 != NULL)
fprintf(outfp, "%s\n", s1);
@@ -329,7 +363,7 @@
default:
/* Interactive usage help. */
USAGE:
-@@ -570,7 +583,7 @@ PROMPT:
+@@ -570,7 +588,7 @@ PROMPT:
* If there was no error, we received an EOF from stdin, so we
* should quit.
*/
@@ -338,7 +372,7 @@
fclose(outfp);
exit(0);
}
-@@ -1103,24 +1116,22 @@ printd(FILE *file1, size_t file1end)
+@@ -1103,24 +1121,22 @@ printd(FILE *file1, size_t file1end)
static void
int_usage(void)
{
Modified: soc2012/jhagewood/sdiff/sdiff/sdiff.c
==============================================================================
--- soc2012/jhagewood/sdiff/sdiff/sdiff.c Sat Jul 7 19:50:04 2012 (r239093)
+++ soc2012/jhagewood/sdiff/sdiff/sdiff.c Sat Jul 7 19:58:13 2012 (r239094)
@@ -84,8 +84,8 @@
const char *tmpdir; /* TMPDIR or /tmp */
enum {
- HELP_OPT = CHAR_MAX + 1,
- NORMAL_OPT,
+ HELP_OPT = CHAR_MAX + 1,
+ NORMAL_OPT,
FCASE_SENSITIVE_OPT,
FCASE_IGNORE_OPT,
FROMFILE_OPT,
@@ -97,20 +97,19 @@
SUPCL_OPT,
LF_OPT,
/* the following groupings must be in sequence */
- OLDGF_OPT,
- NEWGF_OPT,
+ OLDGF_OPT,
+ NEWGF_OPT,
UNCGF_OPT,
- CHGF_OPT,
- OLDLF_OPT,
- NEWLF_OPT,
- UNCLF_OPT,
+ CHGF_OPT,
+ OLDLF_OPT,
+ NEWLF_OPT,
+ UNCLF_OPT,
/* end order-sensitive enums */
TSIZE_OPT,
HLINES_OPT,
LFILES_OPT,
DIFFPROG_OPT,
PIPE_FD,
-
/* pid from the diff parent (if applicable) */
DIFF_PID,
@@ -162,6 +161,12 @@
"\t\t-i, --ignore-case, Do a case-insensitive comparison.",
"\t\t-t, --expand-tabs Expand tabs to spaces.",
"\t\t-W, --ignore-all-spaces, Ignore all spaces.",
+ "\t\t--speed-large-files, Assume large file with scattered changes.",
+ "\t\t--strip-trailing-cr, Strip trailing carriage return.",
+ "\t\t--ignore-file-name-case, Ignore case of file names.",
+ "\t\t--no-ignore-file-name-case, Do not ignore file name case",
+ "\t\t--tabsize NUM, Change size of tabs (default 8.)",
+
NULL,
};
char **help_strs = (char **)help_msg;
More information about the svn-soc-all
mailing list