Source-Changes-HG archive

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

[src/trunk]: src/games/cgram cgram: rename local functions



details:   https://anonhg.NetBSD.org/src/rev/e91f0f65e762
branches:  trunk
changeset: 983071:e91f0f65e762
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat May 01 20:29:23 2021 +0000

description:
cgram: rename local functions

The word 'cleanup' should have been named clean_up all along, but 'done'
is even shorter.

No functional change.

diffstat:

 games/cgram/cgram.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (50 lines):

diff -r 5b473cc48f0a -r e91f0f65e762 games/cgram/cgram.c
--- a/games/cgram/cgram.c       Sat May 01 20:21:25 2021 +0000
+++ b/games/cgram/cgram.c       Sat May 01 20:29:23 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cgram.c,v 1.22 2021/04/29 20:17:20 rillig Exp $ */
+/* $NetBSD: cgram.c,v 1.23 2021/05/01 20:29:23 rillig Exp $ */
 
 /*-
  * Copyright (c) 2013, 2021 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.c,v 1.22 2021/04/29 20:17:20 rillig Exp $");
+__RCSID("$NetBSD: cgram.c,v 1.23 2021/05/01 20:29:23 rillig Exp $");
 #endif
 
 #include <assert.h>
@@ -143,7 +143,7 @@
 }
 
 static void
-stringarray_cleanup(struct stringarray *a)
+stringarray_done(struct stringarray *a)
 {
        for (size_t i = 0; i < a->num; i++)
                free(a->v[i].s);
@@ -584,12 +584,12 @@
 }
 
 static void
-clean_up(void)
+done(void)
 {
        endwin();
 
-       stringarray_cleanup(&sollines);
-       stringarray_cleanup(&lines);
+       stringarray_done(&sollines);
+       stringarray_done(&lines);
 }
 
 
@@ -611,5 +611,5 @@
 
        init(argc > 1 ? argv[1] : NULL);
        loop();
-       clean_up();
+       done();
 }



Home | Main Index | Thread Index | Old Index