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: rename process_keyword_do to process_...



details:   https://anonhg.NetBSD.org/src/rev/2d891f4c3809
branches:  trunk
changeset: 991048:2d891f4c3809
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Nov 05 19:42:48 2021 +0000

description:
indent: rename process_keyword_do to process_do, same for 'else'

Before the symbols from the tokenizer had the prefix 'lsym', the symbols
could not be simply called 'else' and 'do'. The functions for processing
the tokens followed that naming scheme.

When the prefix 'lsym' was introduced, the word 'keyword' was no longer
needed, neither in the constants nor in the function names.

No functional change.

diffstat:

 usr.bin/indent/indent.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (50 lines):

diff -r 58abb6366349 -r 2d891f4c3809 usr.bin/indent/indent.c
--- a/usr.bin/indent/indent.c   Fri Nov 05 19:33:28 2021 +0000
+++ b/usr.bin/indent/indent.c   Fri Nov 05 19:42:48 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: indent.c,v 1.208 2021/11/05 19:33:28 rillig Exp $      */
+/*     $NetBSD: indent.c,v 1.209 2021/11/05 19:42:48 rillig Exp $      */
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: indent.c,v 1.208 2021/11/05 19:33:28 rillig Exp $");
+__RCSID("$NetBSD: indent.c,v 1.209 2021/11/05 19:42:48 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/indent.c 340138 2018-11-04 19:24:49Z oshogbo $");
 #endif
@@ -1084,7 +1084,7 @@
 }
 
 static void
-process_keyword_do(bool *force_nl, bool *last_else)
+process_do(bool *force_nl, bool *last_else)
 {
     ps.in_stmt = false;
 
@@ -1101,7 +1101,7 @@
 }
 
 static void
-process_keyword_else(bool *force_nl, bool *last_else)
+process_else(bool *force_nl, bool *last_else)
 {
     ps.in_stmt = false;
 
@@ -1491,11 +1491,11 @@
            goto copy_token;
 
        case lsym_do:
-           process_keyword_do(&force_nl, &last_else);
+           process_do(&force_nl, &last_else);
            goto copy_token;
 
        case lsym_else:
-           process_keyword_else(&force_nl, &last_else);
+           process_else(&force_nl, &last_else);
            goto copy_token;
 
        case lsym_typedef:



Home | Main Index | Thread Index | Old Index