[Midnightbsd-cvs] src [11577] trunk/usr.bin/comm: sync with freebsd.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Jul 8 11:36:10 EDT 2018
Revision: 11577
http://svnweb.midnightbsd.org/src/?rev=11577
Author: laffer1
Date: 2018-07-08 11:36:10 -0400 (Sun, 08 Jul 2018)
Log Message:
-----------
sync with freebsd.
Modified Paths:
--------------
trunk/usr.bin/comm/Makefile
trunk/usr.bin/comm/comm.c
Added Paths:
-----------
trunk/usr.bin/comm/tests/
trunk/usr.bin/comm/tests/Makefile
trunk/usr.bin/comm/tests/legacy_test.sh
trunk/usr.bin/comm/tests/regress.00.out
trunk/usr.bin/comm/tests/regress.00a.in
trunk/usr.bin/comm/tests/regress.00b.in
trunk/usr.bin/comm/tests/regress.01.out
trunk/usr.bin/comm/tests/regress.01a.in
trunk/usr.bin/comm/tests/regress.01b.in
trunk/usr.bin/comm/tests/regress.02.out
trunk/usr.bin/comm/tests/regress.02a.in
trunk/usr.bin/comm/tests/regress.02b.in
trunk/usr.bin/comm/tests/regress.sh
Modified: trunk/usr.bin/comm/Makefile
===================================================================
--- trunk/usr.bin/comm/Makefile 2018-07-08 15:34:37 UTC (rev 11576)
+++ trunk/usr.bin/comm/Makefile 2018-07-08 15:36:10 UTC (rev 11577)
@@ -1,6 +1,13 @@
+# $MidnightBSD$
# @(#)Makefile 8.1 (Berkeley) 6/6/93
-# $MidnightBSD$
+# $FreeBSD: stable/10/usr.bin/comm/Makefile 264996 2014-04-27 01:15:10Z jmmv $
+.include <bsd.own.mk>
+
PROG= comm
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
.include <bsd.prog.mk>
Modified: trunk/usr.bin/comm/comm.c
===================================================================
--- trunk/usr.bin/comm/comm.c 2018-07-08 15:34:37 UTC (rev 11576)
+++ trunk/usr.bin/comm/comm.c 2018-07-08 15:36:10 UTC (rev 11577)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* Copyright (c) 1989, 1993, 1994
* The Regents of the University of California. All rights reserved.
@@ -43,7 +44,7 @@
#endif
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/comm/comm.c 227235 2011-11-06 18:49:10Z ed $");
#include <err.h>
#include <limits.h>
@@ -57,12 +58,12 @@
#include <wchar.h>
#include <wctype.h>
-int iflag;
-const char *tabs[] = { "", "\t", "\t\t" };
+static int iflag;
+static const char *tabs[] = { "", "\t", "\t\t" };
-FILE *file(const char *);
-wchar_t *convert(const char *);
-void show(FILE *, const char *, const char *, char **, size_t *);
+static FILE *file(const char *);
+static wchar_t *convert(const char *);
+static void show(FILE *, const char *, const char *, char **, size_t *);
static void usage(void);
int
@@ -189,7 +190,7 @@
exit(0);
}
-wchar_t *
+static wchar_t *
convert(const char *str)
{
size_t n;
@@ -212,7 +213,7 @@
return (buf);
}
-void
+static void
show(FILE *fp, const char *fn, const char *offset, char **bufp, size_t *buflenp)
{
ssize_t n;
@@ -228,7 +229,7 @@
err(1, "%s", fn);
}
-FILE *
+static FILE *
file(const char *name)
{
FILE *fp;
Added: trunk/usr.bin/comm/tests/Makefile
===================================================================
--- trunk/usr.bin/comm/tests/Makefile (rev 0)
+++ trunk/usr.bin/comm/tests/Makefile 2018-07-08 15:36:10 UTC (rev 11577)
@@ -0,0 +1,18 @@
+# $MidnightBSD$
+# $FreeBSD: stable/10/usr.bin/comm/tests/Makefile 313488 2017-02-09 22:49:48Z ngie $
+
+TAP_TESTS_SH= legacy_test
+
+FILESDIR= ${TESTSDIR}
+FILES= regress.00.out
+FILES+= regress.00a.in
+FILES+= regress.00b.in
+FILES+= regress.01.out
+FILES+= regress.01a.in
+FILES+= regress.01b.in
+FILES+= regress.02.out
+FILES+= regress.02a.in
+FILES+= regress.02b.in
+FILES+= regress.sh
+
+.include <bsd.test.mk>
Property changes on: trunk/usr.bin/comm/tests/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/usr.bin/comm/tests/legacy_test.sh
===================================================================
--- trunk/usr.bin/comm/tests/legacy_test.sh (rev 0)
+++ trunk/usr.bin/comm/tests/legacy_test.sh 2018-07-08 15:36:10 UTC (rev 11577)
@@ -0,0 +1,6 @@
+#!/bin/sh
+# $MidnightBSD$
+
+SRCDIR="$(dirname "${0}")"; export SRCDIR
+
+m4 "${SRCDIR}/../regress.m4" "${SRCDIR}/regress.sh" | sh
Property changes on: trunk/usr.bin/comm/tests/legacy_test.sh
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/usr.bin/comm/tests/regress.00.out
===================================================================
--- trunk/usr.bin/comm/tests/regress.00.out (rev 0)
+++ trunk/usr.bin/comm/tests/regress.00.out 2018-07-08 15:36:10 UTC (rev 11577)
@@ -0,0 +1,2 @@
+a b
+e f g
Property changes on: trunk/usr.bin/comm/tests/regress.00.out
___________________________________________________________________
Added: mnbsd:nokeywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: trunk/usr.bin/comm/tests/regress.00a.in
===================================================================
--- trunk/usr.bin/comm/tests/regress.00a.in (rev 0)
+++ trunk/usr.bin/comm/tests/regress.00a.in 2018-07-08 15:36:10 UTC (rev 11577)
@@ -0,0 +1,5 @@
+a b
+c d
+e f
+e f g
+h i
Property changes on: trunk/usr.bin/comm/tests/regress.00a.in
___________________________________________________________________
Added: mnbsd:nokeywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/usr.bin/comm/tests/regress.00b.in
===================================================================
--- trunk/usr.bin/comm/tests/regress.00b.in (rev 0)
+++ trunk/usr.bin/comm/tests/regress.00b.in 2018-07-08 15:36:10 UTC (rev 11577)
@@ -0,0 +1,2 @@
+a b
+e f g
Property changes on: trunk/usr.bin/comm/tests/regress.00b.in
___________________________________________________________________
Added: mnbsd:nokeywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/usr.bin/comm/tests/regress.01.out
===================================================================
--- trunk/usr.bin/comm/tests/regress.01.out (rev 0)
+++ trunk/usr.bin/comm/tests/regress.01.out 2018-07-08 15:36:10 UTC (rev 11577)
@@ -0,0 +1,2 @@
+a b
+e f g
Property changes on: trunk/usr.bin/comm/tests/regress.01.out
___________________________________________________________________
Added: mnbsd:nokeywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: trunk/usr.bin/comm/tests/regress.01a.in
===================================================================
--- trunk/usr.bin/comm/tests/regress.01a.in (rev 0)
+++ trunk/usr.bin/comm/tests/regress.01a.in 2018-07-08 15:36:10 UTC (rev 11577)
@@ -0,0 +1,5 @@
+a b
+c d
+e f
+e f g
+h i
Property changes on: trunk/usr.bin/comm/tests/regress.01a.in
___________________________________________________________________
Added: mnbsd:nokeywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/usr.bin/comm/tests/regress.01b.in
===================================================================
--- trunk/usr.bin/comm/tests/regress.01b.in (rev 0)
+++ trunk/usr.bin/comm/tests/regress.01b.in 2018-07-08 15:36:10 UTC (rev 11577)
@@ -0,0 +1,2 @@
+a b
+e f g
Property changes on: trunk/usr.bin/comm/tests/regress.01b.in
___________________________________________________________________
Added: mnbsd:nokeywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/usr.bin/comm/tests/regress.02.out
===================================================================
--- trunk/usr.bin/comm/tests/regress.02.out (rev 0)
+++ trunk/usr.bin/comm/tests/regress.02.out 2018-07-08 15:36:10 UTC (rev 11577)
@@ -0,0 +1,5 @@
+a
+b
+ c
+ d
+ e
Property changes on: trunk/usr.bin/comm/tests/regress.02.out
___________________________________________________________________
Added: mnbsd:nokeywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: trunk/usr.bin/comm/tests/regress.02a.in
===================================================================
--- trunk/usr.bin/comm/tests/regress.02a.in (rev 0)
+++ trunk/usr.bin/comm/tests/regress.02a.in 2018-07-08 15:36:10 UTC (rev 11577)
@@ -0,0 +1,3 @@
+a
+b
+c
\ No newline at end of file
Property changes on: trunk/usr.bin/comm/tests/regress.02a.in
___________________________________________________________________
Added: mnbsd:nokeywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/usr.bin/comm/tests/regress.02b.in
===================================================================
--- trunk/usr.bin/comm/tests/regress.02b.in (rev 0)
+++ trunk/usr.bin/comm/tests/regress.02b.in 2018-07-08 15:36:10 UTC (rev 11577)
@@ -0,0 +1,3 @@
+c
+d
+e
\ No newline at end of file
Property changes on: trunk/usr.bin/comm/tests/regress.02b.in
___________________________________________________________________
Added: mnbsd:nokeywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/usr.bin/comm/tests/regress.sh
===================================================================
--- trunk/usr.bin/comm/tests/regress.sh (rev 0)
+++ trunk/usr.bin/comm/tests/regress.sh 2018-07-08 15:36:10 UTC (rev 11577)
@@ -0,0 +1,11 @@
+# $MidnightBSD$
+
+echo 1..3
+
+REGRESSION_START($1)
+
+REGRESSION_TEST(`00', `comm -12 ${SRCDIR}/regress.00a.in ${SRCDIR}/regress.00b.in')
+REGRESSION_TEST(`01', `comm -12 ${SRCDIR}/regress.01a.in ${SRCDIR}/regress.01b.in')
+REGRESSION_TEST(`02', `comm ${SRCDIR}/regress.02a.in ${SRCDIR}/regress.02b.in')
+
+REGRESSION_END()
Property changes on: trunk/usr.bin/comm/tests/regress.sh
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
More information about the Midnightbsd-cvs
mailing list