Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/indent indent: remove 'global' from the list of keyw...
details: https://anonhg.NetBSD.org/src/rev/528e35bf610a
branches: trunk
changeset: 988674:528e35bf610a
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Oct 08 23:40:08 2021 +0000
description:
indent: remove 'global' from the list of keywords
Since 1978, 'global' has not been a keyword in C. Moreover, it was
declared as a type while its name would rather suggest a storage class.
Removing the keyword fixes the formatting of variables named 'global'.
diffstat:
tests/usr.bin/indent/opt-ldi.0 | 3 +--
tests/usr.bin/indent/opt-ldi.0.stdout | 5 ++---
usr.bin/indent/lexi.c | 5 ++---
3 files changed, 5 insertions(+), 8 deletions(-)
diffs (52 lines):
diff -r 734bb4190122 -r 528e35bf610a tests/usr.bin/indent/opt-ldi.0
--- a/tests/usr.bin/indent/opt-ldi.0 Fri Oct 08 23:08:06 2021 +0000
+++ b/tests/usr.bin/indent/opt-ldi.0 Fri Oct 08 23:40:08 2021 +0000
@@ -1,7 +1,6 @@
-/* $NetBSD: opt-ldi.0,v 1.2 2021/03/06 22:10:40 rillig Exp $ */
+/* $NetBSD: opt-ldi.0,v 1.3 2021/10/08 23:40:08 rillig Exp $ */
/* $FreeBSD$ */
-/* FIXME: Why does -ldi affect global variables? */
int global;
void
diff -r 734bb4190122 -r 528e35bf610a tests/usr.bin/indent/opt-ldi.0.stdout
--- a/tests/usr.bin/indent/opt-ldi.0.stdout Fri Oct 08 23:08:06 2021 +0000
+++ b/tests/usr.bin/indent/opt-ldi.0.stdout Fri Oct 08 23:40:08 2021 +0000
@@ -1,8 +1,7 @@
-/* $NetBSD: opt-ldi.0.stdout,v 1.2 2021/03/06 22:10:40 rillig Exp $ */
+/* $NetBSD: opt-ldi.0.stdout,v 1.3 2021/10/08 23:40:08 rillig Exp $ */
/* $FreeBSD$ */
-/* FIXME: Why does -ldi affect global variables? */
-int global;
+int global;
void
function(void)
diff -r 734bb4190122 -r 528e35bf610a usr.bin/indent/lexi.c
--- a/usr.bin/indent/lexi.c Fri Oct 08 23:08:06 2021 +0000
+++ b/usr.bin/indent/lexi.c Fri Oct 08 23:40:08 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lexi.c,v 1.84 2021/10/08 21:24:40 rillig Exp $ */
+/* $NetBSD: lexi.c,v 1.85 2021/10/08 23:40:08 rillig Exp $ */
/*-
* SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@
#include <sys/cdefs.h>
#if defined(__NetBSD__)
-__RCSID("$NetBSD: lexi.c,v 1.84 2021/10/08 21:24:40 rillig Exp $");
+__RCSID("$NetBSD: lexi.c,v 1.85 2021/10/08 23:40:08 rillig Exp $");
#elif defined(__FreeBSD__)
__FBSDID("$FreeBSD: head/usr.bin/indent/lexi.c 337862 2018-08-15 18:19:45Z pstef $");
#endif
@@ -81,7 +81,6 @@
{"extern", kw_storage_class},
{"float", kw_type},
{"for", kw_for_or_if_or_while},
- {"global", kw_type},
{"goto", kw_jump},
{"if", kw_for_or_if_or_while},
{"imaginary", kw_type},
Home |
Main Index |
Thread Index |
Old Index