[Midnightbsd-cvs] src [11442] trunk/usr.bin/banner/banner.c: make things static
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Jul 7 11:53:48 EDT 2018
Revision: 11442
http://svnweb.midnightbsd.org/src/?rev=11442
Author: laffer1
Date: 2018-07-07 11:53:47 -0400 (Sat, 07 Jul 2018)
Log Message:
-----------
make things static
Modified Paths:
--------------
trunk/usr.bin/banner/Makefile
trunk/usr.bin/banner/banner.6
trunk/usr.bin/banner/banner.c
Property Changed:
----------------
trunk/usr.bin/banner/banner.6
Modified: trunk/usr.bin/banner/Makefile
===================================================================
--- trunk/usr.bin/banner/Makefile 2018-07-07 15:53:09 UTC (rev 11441)
+++ trunk/usr.bin/banner/Makefile 2018-07-07 15:53:47 UTC (rev 11442)
@@ -1,5 +1,6 @@
+# $MidnightBSD$
# @(#)Makefile 8.1 (Berkeley) 6/6/93
-# $MidnightBSD$
+# $FreeBSD: stable/10/usr.bin/banner/Makefile 90415 2002-02-08 22:31:43Z markm $
PROG= banner
MAN= banner.6
Modified: trunk/usr.bin/banner/banner.6
===================================================================
--- trunk/usr.bin/banner/banner.6 2018-07-07 15:53:09 UTC (rev 11441)
+++ trunk/usr.bin/banner/banner.6 2018-07-07 15:53:47 UTC (rev 11442)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
.\" Copyright (c) 1980, 1993, 1995
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -26,7 +27,7 @@
.\" SUCH DAMAGE.
.\"
.\" From: @(#)banner.6 8.2 (Berkeley) 4/29/95
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/usr.bin/banner/banner.6 216370 2010-12-11 08:32:16Z joel $
.\"
.Dd January 26, 2005
.Dt BANNER 6
Property changes on: trunk/usr.bin/banner/banner.6
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.bin/banner/banner.c
===================================================================
--- trunk/usr.bin/banner/banner.c 2018-07-07 15:53:09 UTC (rev 11441)
+++ trunk/usr.bin/banner/banner.c 2018-07-07 15:53:47 UTC (rev 11442)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* Copyright (c) 1980, 1993, 1994
* The Regents of the University of California. All rights reserved.
@@ -40,7 +41,7 @@
#endif
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/banner/banner.c 319256 2017-05-30 21:58:53Z asomers $");
/*
* banner - prints large signs
@@ -59,7 +60,7 @@
#define NBYTES 9271
/* Pointers into data_table for each ASCII char */
-const int asc_ptr[NCHARS] = {
+static const int asc_ptr[NCHARS] = {
/* ^@ */ 0, 0, 0, 0, 0, 0, 0, 0,
/* ^H */ 0, 0, 0, 0, 0, 0, 0, 0,
/* ^P */ 0, 0, 0, 0, 0, 0, 0, 0,
@@ -86,7 +87,7 @@
* is the next elt in array) and goto second
* next element in array.
*/
-const unsigned char data_table[NBYTES] = {
+static const unsigned char data_table[NBYTES] = {
/* 0 1 2 3 4 5 6 7 8 9 */
/* 0 */ 129, 227, 130, 34, 6, 90, 19, 129, 32, 10,
/* 10 */ 74, 40, 129, 31, 12, 64, 53, 129, 30, 14,
@@ -1018,11 +1019,11 @@
/* 9270 */ 193
};
-char line[DWIDTH];
-char *message;
-char print[DWIDTH];
-int debug, i, j, linen, max, nchars, pc, term, trace, x, y;
-int width = DWIDTH; /* -w option: scrunch letters to 80 columns */
+static char line[DWIDTH];
+static char *message;
+static char print[DWIDTH];
+static int debug, i, j, linen, max, nchars, pc, term, trace, x, y;
+static int width = DWIDTH; /* -w option: scrunch letters to 80 columns */
static void usage(void);
@@ -1064,8 +1065,8 @@
err(1, "malloc");
strcpy(message, *argv);
while (*++argv) {
- strcat(message, " ");
- strcat(message, *argv);
+ strlcat(message, " ", j);
+ strlcat(message, *argv, j);
}
nchars = strlen(message);
} else {
More information about the Midnightbsd-cvs
mailing list