Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint1 lint: rename functions for handling cont...



details:   https://anonhg.NetBSD.org/src/rev/993f26f14e71
branches:  trunk
changeset: 953823:993f26f14e71
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Mar 21 14:49:21 2021 +0000

description:
lint: rename functions for handling control statements

No functional change.

diffstat:

 usr.bin/xlint/lint1/cgram.y    |  14 +++++++-------
 usr.bin/xlint/lint1/externs1.h |  12 ++++++------
 usr.bin/xlint/lint1/func.c     |  14 +++++++-------
 usr.bin/xlint/lint1/lex.c      |   6 +++---
 4 files changed, 23 insertions(+), 23 deletions(-)

diffs (167 lines):

diff -r c56abe1850c7 -r 993f26f14e71 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Sun Mar 21 14:36:59 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Sun Mar 21 14:49:21 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.195 2021/03/21 10:25:40 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.196 2021/03/21 14:49:21 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.y,v 1.195 2021/03/21 10:25:40 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.196 2021/03/21 14:49:21 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -1753,22 +1753,22 @@
 
 jump_statement:                        /* C99 6.8.6 */
          goto identifier T_SEMI {
-               dogoto(getsym($2));
+               do_goto(getsym($2));
          }
        | goto error T_SEMI {
                symtyp = FVFT;
          }
        | T_CONTINUE T_SEMI {
-               docont();
+               do_continue();
          }
        | T_BREAK T_SEMI {
-               dobreak();
+               do_break();
          }
        | T_RETURN T_SEMI {
-               doreturn(NULL);
+               do_return(NULL);
          }
        | T_RETURN expr T_SEMI {
-               doreturn($2);
+               do_return($2);
          }
        ;
 
diff -r c56abe1850c7 -r 993f26f14e71 usr.bin/xlint/lint1/externs1.h
--- a/usr.bin/xlint/lint1/externs1.h    Sun Mar 21 14:36:59 2021 +0000
+++ b/usr.bin/xlint/lint1/externs1.h    Sun Mar 21 14:49:21 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: externs1.h,v 1.80 2021/03/20 16:16:32 rillig Exp $     */
+/*     $NetBSD: externs1.h,v 1.81 2021/03/21 14:49:21 rillig Exp $     */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -271,15 +271,15 @@
 extern void    do2(tnode_t *);
 extern void    for1(tnode_t *, tnode_t *, tnode_t *);
 extern void    for2(void);
-extern void    dogoto(sym_t *);
-extern void    docont(void);
-extern void    dobreak(void);
-extern void    doreturn(tnode_t *);
+extern void    do_goto(sym_t *);
+extern void    do_continue(void);
+extern void    do_break(void);
+extern void    do_return(tnode_t *);
 extern void    global_clean_up_decl(bool);
 extern void    argsused(int);
 extern void    constcond(int);
 extern void    fallthru(int);
-extern void    notreach(int);
+extern void    not_reached(int);
 extern void    lintlib(int);
 extern void    linted(int);
 extern void    varargs(int);
diff -r c56abe1850c7 -r 993f26f14e71 usr.bin/xlint/lint1/func.c
--- a/usr.bin/xlint/lint1/func.c        Sun Mar 21 14:36:59 2021 +0000
+++ b/usr.bin/xlint/lint1/func.c        Sun Mar 21 14:49:21 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: func.c,v 1.88 2021/03/21 14:36:59 rillig Exp $ */
+/*     $NetBSD: func.c,v 1.89 2021/03/21 14:49:21 rillig Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: func.c,v 1.88 2021/03/21 14:36:59 rillig Exp $");
+__RCSID("$NetBSD: func.c,v 1.89 2021/03/21 14:49:21 rillig Exp $");
 #endif
 
 #include <stdlib.h>
@@ -940,7 +940,7 @@
  * T_GOTO identifier T_SEMI
  */
 void
-dogoto(sym_t *lab)
+do_goto(sym_t *lab)
 {
 
        mark_as_used(lab, false, false);
@@ -954,7 +954,7 @@
  * T_BREAK T_SEMI
  */
 void
-dobreak(void)
+do_break(void)
 {
        cstk_t  *ci;
 
@@ -980,7 +980,7 @@
  * T_CONTINUE T_SEMI
  */
 void
-docont(void)
+do_continue(void)
 {
        cstk_t  *ci;
 
@@ -1005,7 +1005,7 @@
  * T_RETURN expr T_SEMI
  */
 void
-doreturn(tnode_t *tn)
+do_return(tnode_t *tn)
 {
        tnode_t *ln, *rn;
        cstk_t  *ci;
@@ -1251,7 +1251,7 @@
  */
 /* ARGSUSED */
 void
-notreach(int n)
+not_reached(int n)
 {
 
        reached = false;
diff -r c56abe1850c7 -r 993f26f14e71 usr.bin/xlint/lint1/lex.c
--- a/usr.bin/xlint/lint1/lex.c Sun Mar 21 14:36:59 2021 +0000
+++ b/usr.bin/xlint/lint1/lex.c Sun Mar 21 14:49:21 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lex.c,v 1.14 2021/03/20 19:33:25 rillig Exp $ */
+/* $NetBSD: lex.c,v 1.15 2021/03/21 14:49:21 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: lex.c,v 1.14 2021/03/20 19:33:25 rillig Exp $");
+__RCSID("$NetBSD: lex.c,v 1.15 2021/03/21 14:49:21 rillig Exp $");
 #endif
 
 #include <ctype.h>
@@ -1170,7 +1170,7 @@
                { "LINTED",             true,   linted          },
                { "LONGLONG",           false,  longlong        },
                { "NOSTRICT",           true,   linted          },
-               { "NOTREACHED",         false,  notreach        },
+               { "NOTREACHED",         false,  not_reached     },
                { "PRINTFLIKE",         true,   printflike      },
                { "PROTOLIB",           true,   protolib        },
                { "SCANFLIKE",          true,   scanflike       },



Home | Main Index | Thread Index | Old Index