Subject: bin/6151: [PATCH] Banner: patch to use const
To: None <gnats-bugs@gnats.netbsd.org>
From: Joseph Myers <jsm@octomino.demon.co.uk>
List: netbsd-bugs
Date: 09/13/1998 16:02:50
>Number: 6151
>Category: bin
>Synopsis: [PATCH] Banner: patch to use const
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Sep 13 09:20:02 1998
>Last-Modified:
>Originator: Joseph Samuel Myers
>Organization:
Trinity College, University of Cambridge, UK
>Release: NetBSD-current of 1998-09-12
>Environment:
[
System: Linux octomino 2.0.35 #1 Wed Aug 12 15:54:21 UTC 1998 i586 unknown
Architecture: i586
]
>Description:
The appended patch makes banner(6) use `const' where appropriate.
>How-To-Repeat:
>Fix:
diff -ruN banner/banner.c banner+/banner.c
--- banner/banner.c Fri Oct 10 11:22:45 1997
+++ banner+/banner.c Sun Sep 13 16:00:13 1998
@@ -64,7 +64,7 @@
#define NBYTES 9271
/* Pointers into data_table for each ASCII char */
-int asc_ptr[NCHARS] = {
+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,
@@ -91,7 +91,7 @@
* is the next elt in array) and goto second
* next element in array.
*/
-char data_table[NBYTES] = {
+const 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,
>Audit-Trail:
>Unformatted: