From owner-svn-soc-all@FreeBSD.ORG Mon Jun 25 16:52:25 2012 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 8C22D106566C for ; Mon, 25 Jun 2012 16:52:23 +0000 (UTC) (envelope-from jhagewood@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Mon, 25 Jun 2012 16:52:23 +0000 Date: Mon, 25 Jun 2012 16:52:23 +0000 From: jhagewood@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20120625165223.8C22D106566C@hub.freebsd.org> Cc: Subject: socsvn commit: r238271 - in soc2012/jhagewood: diff diff/diff diff3 mdocml X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2012 16:52:25 -0000 Author: jhagewood Date: Mon Jun 25 16:52:22 2012 New Revision: 238271 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=238271 Log: Modified: soc2012/jhagewood/diff/diff/diffreg.c soc2012/jhagewood/diff/hagewood-diff.patch soc2012/jhagewood/diff3/hagewood-diff3.patch soc2012/jhagewood/mdocml/hagewood-mdocml-ns.patch Modified: soc2012/jhagewood/diff/diff/diffreg.c ============================================================================== --- soc2012/jhagewood/diff/diff/diffreg.c Mon Jun 25 15:53:17 2012 (r238270) +++ soc2012/jhagewood/diff/diff/diffreg.c Mon Jun 25 16:52:22 2012 (r238271) @@ -1176,7 +1176,7 @@ if (format == D_NORMAL || format == D_IFDEF) { fetch(ixold, a, b, f1, '<', 1); if (a <= b && c <= d && format == D_NORMAL) - printf("---"); + printf("---\n"); } i = fetch(ixnew, c, d, f2, format == D_NORMAL ? '>' : '\0', 0); if (i != 0 && format == D_EDIT) { @@ -1345,7 +1345,7 @@ } static int -textfile(FILE *f) +istextfile(FILE *f) { char buf[BUFSIZ]; int i, cnt; @@ -1354,8 +1354,9 @@ return (1); rewind(f); cnt = fread(buf, 1, sizeof(buf), f); - if (!isprint(buf[0]) && !isspace(buf[1])) - return (0); + for (i = 0; i < cnt || i <= 30; i++) + if (!isprint(buf[i]) && !isspace(buf[i])) + return (1); return (1); } Modified: soc2012/jhagewood/diff/hagewood-diff.patch ============================================================================== --- soc2012/jhagewood/diff/hagewood-diff.patch Mon Jun 25 15:53:17 2012 (r238270) +++ soc2012/jhagewood/diff/hagewood-diff.patch Mon Jun 25 16:52:22 2012 (r238271) @@ -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-17 23:07:38.000000000 -0400 -+++ jhagewood/diff/diff/diff.c 2012-06-22 17:14:38.000000000 -0400 +--- jhagewood/diff/diff-orig/diff.c 2012-06-25 16:05:53.000000000 -0400 ++++ jhagewood/diff/diff/diff.c 2012-06-25 16:05:53.000000000 -0400 @@ -1,4 +1,4 @@ -/*- +/* @@ -56,7 +56,7 @@ /* Options which exceed manageable alphanumeric assignments */ -@@ -69,75 +67,77 @@ enum +@@ -69,75 +67,77 @@ enum OPT_STRIPCR, OPT_NORMAL, OPT_LEFTC, @@ -402,7 +402,7 @@ break; } } -@@ -585,6 +606,7 @@ print_status(int val, char *path1, char +@@ -585,6 +606,7 @@ print_status(int val, char *path1, char void usage(void) { @@ -410,9 +410,24 @@ (void)fprintf(stderr, "usage: diff [-abdilpqTtw] [-I pattern] [-c | -e | -f | -n | -u]\n" " [-L label] file1 file2\n" +diff -rupN jhagewood/diff/diff-orig/diff.h jhagewood/diff/diff/diff.h +--- jhagewood/diff/diff-orig/diff.h 2012-06-25 16:05:53.000000000 -0400 ++++ jhagewood/diff/diff/diff.h 2012-06-25 16:05:53.000000000 -0400 +@@ -75,9 +75,9 @@ struct excludes { + struct excludes *next; + }; + +-extern int aflag, bflag, dflag, iflag, lflag, Nflag, Pflag, pflag, rflag, ++extern int aflag, bflag, cflag, dflag, Eflag, iflag, lflag, Nflag, Pflag, pflag, rflag, + sflag, tflag, Tflag, wflag; +-extern int Bflag, strip_cr, tabsize; ++extern int Bflag, strip_cr, suppress_cl, tabsize; + extern int format, context, status; + extern char ignore_file_case; + extern char *start, *ifdefname, *diffargs, *label[2], *ignore_pats; diff -rupN jhagewood/diff/diff-orig/diffdir.c jhagewood/diff/diff/diffdir.c ---- jhagewood/diff/diff-orig/diffdir.c 2012-06-17 23:07:38.000000000 -0400 -+++ jhagewood/diff/diff/diffdir.c 2012-06-20 01:43:28.000000000 -0400 +--- jhagewood/diff/diff-orig/diffdir.c 2012-06-25 16:05:53.000000000 -0400 ++++ jhagewood/diff/diff/diffdir.c 2012-06-25 16:05:53.000000000 -0400 @@ -20,14 +20,13 @@ #include @@ -520,24 +535,9 @@ strlcpy(path1 + plen1, dp->d_name, MAXPATHLEN - plen1); if (stat(path1, &stb1) != 0) { -diff -rupN jhagewood/diff/diff-orig/diff.h jhagewood/diff/diff/diff.h ---- jhagewood/diff/diff-orig/diff.h 2012-06-17 23:07:38.000000000 -0400 -+++ jhagewood/diff/diff/diff.h 2012-06-22 14:44:50.000000000 -0400 -@@ -75,9 +75,9 @@ struct excludes { - struct excludes *next; - }; - --extern int aflag, bflag, dflag, iflag, lflag, Nflag, Pflag, pflag, rflag, -+extern int aflag, bflag, cflag, dflag, Eflag, iflag, lflag, Nflag, Pflag, pflag, rflag, - sflag, tflag, Tflag, wflag; --extern int Bflag, strip_cr, tabsize; -+extern int Bflag, strip_cr, suppress_cl, tabsize; - extern int format, context, status; - extern char ignore_file_case; - extern char *start, *ifdefname, *diffargs, *label[2], *ignore_pats; diff -rupN jhagewood/diff/diff-orig/diffreg.c jhagewood/diff/diff/diffreg.c ---- jhagewood/diff/diff-orig/diffreg.c 2012-06-17 23:07:38.000000000 -0400 -+++ jhagewood/diff/diff/diffreg.c 2012-06-22 17:05:42.000000000 -0400 +--- jhagewood/diff/diff-orig/diffreg.c 2012-06-25 16:05:53.000000000 -0400 ++++ jhagewood/diff/diff/diffreg.c 2012-06-25 16:48:21.000000000 -0400 @@ -62,15 +62,13 @@ * @(#)diffreg.c 8.1 (Berkeley) 6/6/93 */ @@ -601,7 +601,7 @@ anychange = 0; lastline = 0; -@@ -353,7 +357,6 @@ diffreg(char *ofile1, char *ofile2, int +@@ -353,7 +357,6 @@ diffreg(char *ofile1, char *ofile2, int status |= 2; goto closem; } @@ -609,7 +609,7 @@ switch (files_differ(f1, f2, flags)) { case 0: goto closem; -@@ -365,7 +368,7 @@ diffreg(char *ofile1, char *ofile2, int +@@ -365,7 +368,7 @@ diffreg(char *ofile1, char *ofile2, int goto closem; } @@ -945,7 +945,7 @@ fetch(ixold, a, b, f1, '<', 1); if (a <= b && c <= d && format == D_NORMAL) - puts("---"); -+ printf("---"); ++ printf("---\n"); } i = fetch(ixnew, c, d, f2, format == D_NORMAL ? '>' : '\0', 0); if (i != 0 && format == D_EDIT) { @@ -1042,12 +1042,12 @@ sum = 1; space = 0; -@@ -1306,19 +1345,17 @@ readhash(FILE *f) +@@ -1306,19 +1345,18 @@ readhash(FILE *f) } static int -asciifile(FILE *f) -+textfile(FILE *f) ++istextfile(FILE *f) { - char buf[BUFSIZ]; - int i, cnt; @@ -1060,14 +1060,14 @@ rewind(f); cnt = fread(buf, 1, sizeof(buf), f); - for (i = 0; i < cnt; i++) -- if (!isprint(buf[i]) && !isspace(buf[i])) ++ for (i = 0; i < cnt || i <= 30; i++) + if (!isprint(buf[i]) && !isspace(buf[i])) - return (0); -+ if (!isprint(buf[0]) && !isspace(buf[1])) -+ return (0); ++ return (1); return (1); } -@@ -1327,10 +1364,10 @@ asciifile(FILE *f) +@@ -1327,10 +1365,10 @@ asciifile(FILE *f) static char * match_function(const long *f, int pos, FILE *file) { @@ -1082,7 +1082,7 @@ lastline = pos; while (pos > last) { -@@ -1342,7 +1379,6 @@ match_function(const long *f, int pos, F +@@ -1342,7 +1380,6 @@ match_function(const long *f, int pos, F if (nc > 0) { buf[nc] = '\0'; buf[strcspn(buf, "\n")] = '\0'; @@ -1090,7 +1090,7 @@ if (isalpha(buf[0]) || buf[0] == '_' || buf[0] == '$') { if (begins_with(buf, "private:")) { if (!state) -@@ -1373,9 +1409,9 @@ static void +@@ -1373,9 +1410,9 @@ static void dump_context_vec(FILE *f1, FILE *f2) { struct context_vec *cvp = context_vec_start; @@ -1103,7 +1103,7 @@ if (context_vec_start > context_vec_ptr) return; -@@ -1390,8 +1426,8 @@ dump_context_vec(FILE *f1, FILE *f2) +@@ -1390,8 +1427,8 @@ dump_context_vec(FILE *f1, FILE *f2) if (pflag) { f = match_function(ixold, lowa-1, f1); if (f != NULL) { @@ -1114,7 +1114,7 @@ } } printf("\n*** "); -@@ -1478,9 +1514,9 @@ static void +@@ -1478,9 +1515,9 @@ static void dump_unified_vec(FILE *f1, FILE *f2) { struct context_vec *cvp = context_vec_start; @@ -1127,7 +1127,7 @@ if (context_vec_start > context_vec_ptr) return; -@@ -1491,19 +1527,19 @@ dump_unified_vec(FILE *f1, FILE *f2) +@@ -1491,19 +1528,19 @@ dump_unified_vec(FILE *f1, FILE *f2) lowc = MAX(1, cvp->c - context); upd = MIN(len[1], context_vec_ptr->d + context); @@ -1153,7 +1153,7 @@ /* * Output changes in "unified" diff format--the old and new lines -@@ -1551,16 +1587,43 @@ dump_unified_vec(FILE *f1, FILE *f2) +@@ -1551,16 +1588,43 @@ dump_unified_vec(FILE *f1, FILE *f2) static void print_header(const char *file1, const char *file2) { Modified: soc2012/jhagewood/diff3/hagewood-diff3.patch ============================================================================== --- soc2012/jhagewood/diff3/hagewood-diff3.patch Mon Jun 25 15:53:17 2012 (r238270) +++ soc2012/jhagewood/diff3/hagewood-diff3.patch Mon Jun 25 16:52:22 2012 (r238271) @@ -1,6 +1,17 @@ +diff -rupN jhagewood/diff3/diff3-orig/Makefile jhagewood/diff3/diff3/Makefile +--- jhagewood/diff3/diff3-orig/Makefile 2012-06-25 16:05:53.000000000 -0400 ++++ jhagewood/diff3/diff3/Makefile 2012-06-25 16:05:53.000000000 -0400 +@@ -6,6 +6,6 @@ BINDIR= /usr/libexec + + beforeinstall: + install ${INSTALL_COPY}c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ +- ${.CURDIR}/diff3.ksh ${DESTDIR}/usr/bin/diff3 ++ ${.CURDIR}/diff3.sh ${DESTDIR}/usr/bin/diff3 + + .include diff -rupN jhagewood/diff3/diff3-orig/diff3prog.c jhagewood/diff3/diff3/diff3prog.c ---- jhagewood/diff3/diff3-orig/diff3prog.c 2012-06-17 23:07:38.000000000 -0400 -+++ jhagewood/diff3/diff3/diff3prog.c 2012-06-17 23:07:38.000000000 -0400 +--- jhagewood/diff3/diff3-orig/diff3prog.c 2012-06-25 16:05:53.000000000 -0400 ++++ jhagewood/diff3/diff3/diff3prog.c 2012-06-25 16:05:53.000000000 -0400 @@ -64,19 +64,23 @@ * @(#)diff3.c 8.1 (Berkeley) 6/6/93 */ @@ -455,14 +466,3 @@ + fprintf(stderr, "usage: diff3 %s file1 file2 file3\n", OPTIONS); exit(EXIT_FAILURE); } -diff -rupN jhagewood/diff3/diff3-orig/Makefile jhagewood/diff3/diff3/Makefile ---- jhagewood/diff3/diff3-orig/Makefile 2012-06-17 23:07:38.000000000 -0400 -+++ jhagewood/diff3/diff3/Makefile 2012-06-17 23:07:38.000000000 -0400 -@@ -6,6 +6,6 @@ BINDIR= /usr/libexec - - beforeinstall: - install ${INSTALL_COPY}c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ -- ${.CURDIR}/diff3.ksh ${DESTDIR}/usr/bin/diff3 -+ ${.CURDIR}/diff3.sh ${DESTDIR}/usr/bin/diff3 - - .include Modified: soc2012/jhagewood/mdocml/hagewood-mdocml-ns.patch ============================================================================== --- soc2012/jhagewood/mdocml/hagewood-mdocml-ns.patch Mon Jun 25 15:53:17 2012 (r238270) +++ soc2012/jhagewood/mdocml/hagewood-mdocml-ns.patch Mon Jun 25 16:52:22 2012 (r238271) @@ -1,6 +1,6 @@ diff -rupN jhagewood/mdocml/mdocml-1.12.1-orig/man.h jhagewood/mdocml/mdocml-1.12.1/man.h ---- jhagewood/mdocml/mdocml-1.12.1-orig/man.h 2012-06-17 23:07:40.000000000 -0400 -+++ jhagewood/mdocml/mdocml-1.12.1/man.h 2012-06-17 23:07:42.000000000 -0400 +--- jhagewood/mdocml/mdocml-1.12.1-orig/man.h 2012-06-25 16:05:56.000000000 -0400 ++++ jhagewood/mdocml/mdocml-1.12.1/man.h 2012-06-25 16:05:59.000000000 -0400 @@ -43,6 +43,8 @@ enum mant { MAN_sp, MAN_nf, @@ -12,7 +12,7 @@ MAN_DT, diff -rupN jhagewood/mdocml/mdocml-1.12.1-orig/man.h.orig jhagewood/mdocml/mdocml-1.12.1/man.h.orig --- jhagewood/mdocml/mdocml-1.12.1-orig/man.h.orig 1969-12-31 19:00:00.000000000 -0500 -+++ jhagewood/mdocml/mdocml-1.12.1/man.h.orig 2012-06-17 23:07:42.000000000 -0400 ++++ jhagewood/mdocml/mdocml-1.12.1/man.h.orig 2012-06-25 16:05:59.000000000 -0400 @@ -0,0 +1,113 @@ +/* $Id: man.h,v 1.60 2012/01/03 15:16:24 kristaps Exp $ */ +/* @@ -128,8 +128,8 @@ + +#endif /*!MAN_H*/ diff -rupN jhagewood/mdocml/mdocml-1.12.1-orig/man_term.c jhagewood/mdocml/mdocml-1.12.1/man_term.c ---- jhagewood/mdocml/mdocml-1.12.1-orig/man_term.c 2012-06-17 23:07:40.000000000 -0400 -+++ jhagewood/mdocml/mdocml-1.12.1/man_term.c 2012-06-17 23:07:42.000000000 -0400 +--- jhagewood/mdocml/mdocml-1.12.1-orig/man_term.c 2012-06-25 16:05:56.000000000 -0400 ++++ jhagewood/mdocml/mdocml-1.12.1/man_term.c 2012-06-25 16:05:59.000000000 -0400 @@ -82,6 +82,8 @@ static int pre_alternate(DECL_ARGS); static int pre_ft(DECL_ARGS); static int pre_ign(DECL_ARGS); @@ -173,7 +173,7 @@ static int diff -rupN jhagewood/mdocml/mdocml-1.12.1-orig/man_term.c.orig jhagewood/mdocml/mdocml-1.12.1/man_term.c.orig --- jhagewood/mdocml/mdocml-1.12.1-orig/man_term.c.orig 1969-12-31 19:00:00.000000000 -0500 -+++ jhagewood/mdocml/mdocml-1.12.1/man_term.c.orig 2012-06-17 23:07:42.000000000 -0400 ++++ jhagewood/mdocml/mdocml-1.12.1/man_term.c.orig 2012-06-25 16:05:59.000000000 -0400 @@ -0,0 +1,1117 @@ +/* $Id: man_term.c,v 1.127 2012/01/03 15:16:24 kristaps Exp $ */ +/*