Module Name:    src
Committed By:   rillig
Date:           Sun Jan 29 18:13:56 UTC 2023

Modified Files:
        src/usr.bin/xlint/lint1: cgram.y decl.c externs1.h func.c

Log Message:
lint: rename functions for function definition

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.431 -r1.432 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.304 -r1.305 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.171 -r1.172 src/usr.bin/xlint/lint1/externs1.h
cvs rdiff -u -r1.145 -r1.146 src/usr.bin/xlint/lint1/func.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/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.431 src/usr.bin/xlint/lint1/cgram.y:1.432
--- src/usr.bin/xlint/lint1/cgram.y:1.431	Sat Jan 21 13:48:40 2023
+++ src/usr.bin/xlint/lint1/cgram.y	Sun Jan 29 18:13:56 2023
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.431 2023/01/21 13:48:40 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.432 2023/01/29 18:13:56 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID)
-__RCSID("$NetBSD: cgram.y,v 1.431 2023/01/21 13:48:40 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.432 2023/01/29 18:13:56 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -1966,7 +1966,7 @@ function_definition:		/* C99 6.9.1 */
 			error(64);
 			YYERROR;
 		}
-		funcdef($1);
+		begin_function($1);
 		block_level++;
 		begin_declaration_level(DK_OLD_STYLE_ARG);
 		if (lwarn == LWARN_NONE)
@@ -1978,7 +1978,7 @@ function_definition:		/* C99 6.9.1 */
 		check_func_old_style_arguments();
 		begin_control_statement(CS_FUNCTION_BODY);
 	  } compound_statement {
-		funcend();
+		end_function();
 		end_control_statement(CS_FUNCTION_BODY);
 	  }
 	;

Index: src/usr.bin/xlint/lint1/decl.c
diff -u src/usr.bin/xlint/lint1/decl.c:1.304 src/usr.bin/xlint/lint1/decl.c:1.305
--- src/usr.bin/xlint/lint1/decl.c:1.304	Sat Jan 21 13:07:22 2023
+++ src/usr.bin/xlint/lint1/decl.c	Sun Jan 29 18:13:56 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.304 2023/01/21 13:07:22 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.305 2023/01/29 18:13:56 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID)
-__RCSID("$NetBSD: decl.c,v 1.304 2023/01/21 13:07:22 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.305 2023/01/29 18:13:56 rillig Exp $");
 #endif
 
 #include <sys/param.h>
@@ -639,7 +639,7 @@ end_declaration_level(void)
 		check_usage(di);
 		/* FALLTHROUGH */
 	case DK_PROTO_ARG:
-		/* usage of arguments will be checked by funcend() */
+		/* usage of arguments will be checked by end_function() */
 		rmsyms(di->d_dlsyms);
 		break;
 	case DK_EXTERN:
@@ -948,7 +948,7 @@ check_type(sym_t *sym)
 		t = tp->t_tspec;
 		/*
 		 * If this is the type of an old-style function definition,
-		 * a better warning is printed in funcdef().
+		 * a better warning is printed in begin_function().
 		 */
 		if (t == FUNC && !tp->t_proto &&
 		    !(to == NOTSPEC && sym->s_osdef)) {

Index: src/usr.bin/xlint/lint1/externs1.h
diff -u src/usr.bin/xlint/lint1/externs1.h:1.171 src/usr.bin/xlint/lint1/externs1.h:1.172
--- src/usr.bin/xlint/lint1/externs1.h:1.171	Fri Jan 13 19:41:50 2023
+++ src/usr.bin/xlint/lint1/externs1.h	Sun Jan 29 18:13:56 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: externs1.h,v 1.171 2023/01/13 19:41:50 rillig Exp $	*/
+/*	$NetBSD: externs1.h,v 1.172 2023/01/29 18:13:56 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -305,8 +305,8 @@ extern	bool	quadflg;
 extern	void	begin_control_statement(control_statement_kind);
 extern	void	end_control_statement(control_statement_kind);
 extern	void	check_statement_reachable(void);
-extern	void	funcdef(sym_t *);
-extern	void	funcend(void);
+extern	void	begin_function(sym_t *);
+extern	void	end_function(void);
 extern	void	named_label(sym_t *);
 extern	void	case_label(tnode_t *);
 extern	void	default_label(void);

Index: src/usr.bin/xlint/lint1/func.c
diff -u src/usr.bin/xlint/lint1/func.c:1.145 src/usr.bin/xlint/lint1/func.c:1.146
--- src/usr.bin/xlint/lint1/func.c:1.145	Sat Oct  1 09:42:40 2022
+++ src/usr.bin/xlint/lint1/func.c	Sun Jan 29 18:13:56 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: func.c,v 1.145 2022/10/01 09:42:40 rillig Exp $	*/
+/*	$NetBSD: func.c,v 1.146 2023/01/29 18:13:56 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID)
-__RCSID("$NetBSD: func.c,v 1.145 2022/10/01 09:42:40 rillig Exp $");
+__RCSID("$NetBSD: func.c,v 1.146 2023/01/29 18:13:56 rillig Exp $");
 #endif
 
 #include <stdlib.h>
@@ -224,7 +224,7 @@ check_statement_reachable(void)
  * redeclaration, etc.
  */
 void
-funcdef(sym_t *fsym)
+begin_function(sym_t *fsym)
 {
 	int	n;
 	bool	dowarn;
@@ -374,7 +374,7 @@ check_missing_return_value(void)
  * Called at the end of a function definition.
  */
 void
-funcend(void)
+end_function(void)
 {
 	sym_t	*arg;
 	int	n;

Reply via email to