[Midnightbsd-cvs] src [11458] trunk/usr.bin/nl/nl.c: sync nl with freebsd 10 stable
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Jul 7 12:51:02 EDT 2018
Revision: 11458
http://svnweb.midnightbsd.org/src/?rev=11458
Author: laffer1
Date: 2018-07-07 12:51:00 -0400 (Sat, 07 Jul 2018)
Log Message:
-----------
sync nl with freebsd 10 stable
Modified Paths:
--------------
trunk/usr.bin/nl/Makefile
trunk/usr.bin/nl/nl.1
trunk/usr.bin/nl/nl.c
Property Changed:
----------------
trunk/usr.bin/nl/nl.1
Modified: trunk/usr.bin/nl/Makefile
===================================================================
--- trunk/usr.bin/nl/Makefile 2018-07-07 16:50:29 UTC (rev 11457)
+++ trunk/usr.bin/nl/Makefile 2018-07-07 16:51:00 UTC (rev 11458)
@@ -1,7 +1,6 @@
# $MidnightBSD$
+# $FreeBSD: stable/10/usr.bin/nl/Makefile 226362 2011-10-14 07:28:39Z ed $
PROG= nl
-WARNS?= 2
-
.include <bsd.prog.mk>
Modified: trunk/usr.bin/nl/nl.1
===================================================================
--- trunk/usr.bin/nl/nl.1 2018-07-07 16:50:29 UTC (rev 11457)
+++ trunk/usr.bin/nl/nl.1 2018-07-07 16:51:00 UTC (rev 11458)
@@ -1,4 +1,5 @@
.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/usr.bin/nl/nl.1 213573 2010-10-08 12:40:16Z uqs $
.\"
.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
.\" All rights reserved.
Property changes on: trunk/usr.bin/nl/nl.1
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.bin/nl/nl.c
===================================================================
--- trunk/usr.bin/nl/nl.c 2018-07-07 16:50:29 UTC (rev 11457)
+++ trunk/usr.bin/nl/nl.c 2018-07-07 16:51:00 UTC (rev 11458)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -32,7 +33,7 @@
__COPYRIGHT(
"@(#) Copyright (c) 1999\
The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$MidnightBSD$");
+__RCSID("$FreeBSD: stable/10/usr.bin/nl/nl.c 226362 2011-10-14 07:28:39Z ed $");
#endif
#define _WITH_GETLINE
@@ -73,9 +74,9 @@
#define NP_LAST HEADER
static struct numbering_property numbering_properties[NP_LAST + 1] = {
- { "footer", number_none },
- { "body", number_nonempty },
- { "header", number_none }
+ { .name = "footer", .type = number_none },
+ { .name = "body", .type = number_nonempty },
+ { .name = "header", .type = number_none }
};
#define max(a, b) ((a) > (b) ? (a) : (b))
@@ -128,9 +129,7 @@
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
int c;
long val;
@@ -258,7 +257,7 @@
delimlen = delim1len + delim2len;
/* Allocate a buffer suitable for preformatting line number. */
- intbuffersize = max(INT_STRLEN_MAXIMUM, width) + 1; /* NUL */
+ intbuffersize = max((int)INT_STRLEN_MAXIMUM, width) + 1; /* NUL */
if ((intbuffer = malloc(intbuffersize)) == NULL)
err(EXIT_FAILURE, "cannot allocate preformatting buffer");
@@ -270,7 +269,7 @@
}
static void
-filter()
+filter(void)
{
char *buffer;
size_t buffersize;
@@ -359,9 +358,7 @@
*/
static void
-parse_numbering(argstr, section)
- const char *argstr;
- int section;
+parse_numbering(const char *argstr, int section)
{
int error;
char errorbuf[NL_TEXTMAX];
@@ -403,7 +400,7 @@
}
static void
-usage()
+usage(void)
{
(void)fprintf(stderr,
More information about the Midnightbsd-cvs
mailing list