Date: Thu, 05 Jul 2012 19:48:27 +0000 From: jhagewood@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r239011 - in soc2012/jhagewood/sdiff: . sdiff Message-ID: <20120705194827.E89A21065670@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhagewood Date: Thu Jul 5 19:48:27 2012 New Revision: 239011 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=239011 Log: Modified: soc2012/jhagewood/sdiff/TODO soc2012/jhagewood/sdiff/hagewood-sdiff.patch soc2012/jhagewood/sdiff/sdiff/sdiff.c Modified: soc2012/jhagewood/sdiff/TODO ============================================================================== --- soc2012/jhagewood/sdiff/TODO Thu Jul 5 18:57:39 2012 (r239010) +++ soc2012/jhagewood/sdiff/TODO Thu Jul 5 19:48:27 2012 (r239011) @@ -3,7 +3,6 @@ Adapt code to FreeBSD style guidelines INCOMPLETE Fix --width output indention IN PROGRESS --help COMPLETE -Adapt source to FreBSD style(9) INCOMPLETE Add more information to man file. INCOMPLETE NOTES: Modified: soc2012/jhagewood/sdiff/hagewood-sdiff.patch ============================================================================== --- soc2012/jhagewood/sdiff/hagewood-sdiff.patch Thu Jul 5 18:57:39 2012 (r239010) +++ soc2012/jhagewood/sdiff/hagewood-sdiff.patch Thu Jul 5 19:48:27 2012 (r239011) @@ -1,6 +1,6 @@ diff -rupN jhagewood/sdiff/sdiff-orig/sdiff.c jhagewood/sdiff/sdiff/sdiff.c --- jhagewood/sdiff/sdiff-orig/sdiff.c 2012-07-02 15:05:58.000000000 -0400 -+++ jhagewood/sdiff/sdiff/sdiff.c 2012-07-05 18:12:04.000000000 -0400 ++++ jhagewood/sdiff/sdiff/sdiff.c 2012-07-05 19:48:01.000000000 -0400 @@ -34,7 +34,7 @@ #include "common.h" #include "extern.h" @@ -20,24 +20,25 @@ /* pid from the diff parent (if applicable) */ DIFF_PID, -@@ -137,6 +138,24 @@ static struct option longopts[] = { +@@ -137,6 +138,25 @@ static struct option longopts[] = { { NULL, 0, NULL, '\0'} }; + +static const char *help_msg[] = { -+ "-l, --left-column, Only print the left column for identical lines.", -+ "-o OUTFILE, --output=OUTFILE, nteractively merge file1 and file2 into outfile.", -+ "-s, --suppress-common-lines, Skip identical lines.", -+ "-w WIDTH, --width=WIDTH, Print a maximum of WIDTH characters on each line.", -+ "Options passed to diff(1) are:", -+ "\t-a, --text, Treat file1 and file2 as text files.", -+ "\t-b, --ignore-trailing-cr, Ignore trailing blank spaces.", -+ "\t-d, --minimal, Minimize diff size.", -+ "\t-I RE, --ignore-matching-lines=RE, Ignore changes whose line matches RE.", -+ "\t-i, --ignore-case, Do a case-insensitive comparison.", -+ "\t-t, --expand-tabs Expand tabs to spaces.", -+ "\t-W, --ignore-all-spaces, Ignore all spaces.", ++ "\nusage: sdiff [-abdilstW] [-I regexp] [-o outfile] [-w width] file1 file2\n", ++ "\t-l, --left-column, Only print the left column for identical lines.", ++ "\t-o OUTFILE, --output=OUTFILE, nteractively merge file1 and file2 into outfile.", ++ "\t-s, --suppress-common-lines, Skip identical lines.", ++ "\t-w WIDTH, --width=WIDTH, Print a maximum of WIDTH characters on each line.", ++ "\tOptions passed to diff(1) are:", ++ "\t\t-a, --text, Treat file1 and file2 as text files.", ++ "\t\t-b, --ignore-trailing-cr, Ignore trailing blank spaces.", ++ "\t\t-d, --minimal, Minimize diff size.", ++ "\t\t-I RE, --ignore-matching-lines=RE, Ignore changes whose line matches RE.", ++ "\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.", + NULL, +}; +char **help_strs = (char **)help_msg; @@ -45,7 +46,7 @@ /* * Create temporary file if source_file is not a regular file. * Returns temporary file name if one was malloced, NULL if unnecessary. -@@ -289,17 +308,17 @@ main(int argc, char **argv) +@@ -289,17 +309,17 @@ main(int argc, char **argv) if (errstr) errx(2, "width is %s: %s", errstr, optarg); break; @@ -67,7 +68,7 @@ default: usage(); break; -@@ -363,7 +382,7 @@ main(int argc, char **argv) +@@ -363,7 +383,7 @@ main(int argc, char **argv) diffargv[diffargc++] = NULL; /* Subtract column divider and divide by two. */ @@ -76,7 +77,7 @@ /* Make sure line_width can fit in size_t. */ if (width > (SIZE_MAX - 3) / 2) errx(2, "width is too large: %zu", width); -@@ -383,7 +402,6 @@ main(int argc, char **argv) +@@ -383,7 +403,6 @@ main(int argc, char **argv) err(2, "child could not duplicate descriptor"); /* Free unused descriptor. */ close(fd[1]); @@ -84,7 +85,7 @@ execvp(diffprog, diffargv); err(2, "could not execute diff: %s", diffprog); break; -@@ -1117,10 +1135,8 @@ int_usage(void) +@@ -1117,10 +1136,8 @@ int_usage(void) static void usage(void) { Modified: soc2012/jhagewood/sdiff/sdiff/sdiff.c ============================================================================== --- soc2012/jhagewood/sdiff/sdiff/sdiff.c Thu Jul 5 18:57:39 2012 (r239010) +++ soc2012/jhagewood/sdiff/sdiff/sdiff.c Thu Jul 5 19:48:27 2012 (r239011) @@ -140,18 +140,19 @@ }; static const char *help_msg[] = { - "-l, --left-column, Only print the left column for identical lines.", - "-o OUTFILE, --output=OUTFILE, nteractively merge file1 and file2 into outfile.", - "-s, --suppress-common-lines, Skip identical lines.", - "-w WIDTH, --width=WIDTH, Print a maximum of WIDTH characters on each line.", - "Options passed to diff(1) are:", - "\t-a, --text, Treat file1 and file2 as text files.", - "\t-b, --ignore-trailing-cr, Ignore trailing blank spaces.", - "\t-d, --minimal, Minimize diff size.", - "\t-I RE, --ignore-matching-lines=RE, Ignore changes whose line matches RE.", - "\t-i, --ignore-case, Do a case-insensitive comparison.", - "\t-t, --expand-tabs Expand tabs to spaces.", - "\t-W, --ignore-all-spaces, Ignore all spaces.", + "\nusage: sdiff [-abdilstW] [-I regexp] [-o outfile] [-w width] file1 file2\n", + "\t-l, --left-column, Only print the left column for identical lines.", + "\t-o OUTFILE, --output=OUTFILE, nteractively merge file1 and file2 into outfile.", + "\t-s, --suppress-common-lines, Skip identical lines.", + "\t-w WIDTH, --width=WIDTH, Print a maximum of WIDTH characters on each line.", + "\tOptions passed to diff(1) are:", + "\t\t-a, --text, Treat file1 and file2 as text files.", + "\t\t-b, --ignore-trailing-cr, Ignore trailing blank spaces.", + "\t\t-d, --minimal, Minimize diff size.", + "\t\t-I RE, --ignore-matching-lines=RE, Ignore changes whose line matches RE.", + "\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.", NULL, }; char **help_strs = (char **)help_msg;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120705194827.E89A21065670>