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: define lexi_end as function instead o...



details:   https://anonhg.NetBSD.org/src/rev/b72aa10f6332
branches:  trunk
changeset: 1024463:b72aa10f6332
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Oct 24 20:47:00 2021 +0000

description:
indent: define lexi_end as function instead of macro

diffstat:

 usr.bin/indent/lexi.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 53b185661452 -r b72aa10f6332 usr.bin/indent/lexi.c
--- a/usr.bin/indent/lexi.c     Sun Oct 24 20:43:27 2021 +0000
+++ b/usr.bin/indent/lexi.c     Sun Oct 24 20:47:00 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lexi.c,v 1.95 2021/10/24 19:14:33 rillig Exp $ */
+/*     $NetBSD: lexi.c,v 1.96 2021/10/24 20:47:00 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.95 2021/10/24 19:14:33 rillig Exp $");
+__RCSID("$NetBSD: lexi.c,v 1.96 2021/10/24 20:47:00 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/lexi.c 337862 2018-08-15 18:19:45Z pstef $");
 #endif
@@ -247,10 +247,12 @@
        debug_vis_range("\"", buf->s, buf->e, "\"");
     }
 }
+#endif
 
 static token_type
 lexi_end(token_type ttype)
 {
+#ifdef debug
     debug_printf("in line %d, lexi returns '%s'",
        line_no, token_type_name(ttype));
     debug_print_buf("token", &token);
@@ -258,12 +260,10 @@
     debug_print_buf("code", &code);
     debug_print_buf("comment", &com);
     debug_printf("\n");
+#endif
 
     return ttype;
 }
-#else
-#define lexi_end(tk) (tk)
-#endif
 
 static void
 lex_number(void)



Home | Main Index | Thread Index | Old Index