Module Name: src Committed By: rillig Date: Sun Oct 24 20:47:00 UTC 2021
Modified Files: src/usr.bin/indent: lexi.c Log Message: indent: define lexi_end as function instead of macro To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/usr.bin/indent/lexi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/indent/lexi.c diff -u src/usr.bin/indent/lexi.c:1.95 src/usr.bin/indent/lexi.c:1.96 --- src/usr.bin/indent/lexi.c:1.95 Sun Oct 24 19:14:33 2021 +++ src/usr.bin/indent/lexi.c Sun Oct 24 20:47:00 2021 @@ -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 @@ static char sccsid[] = "@(#)lexi.c 8.1 ( #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_print_buf(const char *name, const 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 @@ lexi_end(token_type ttype) 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)