Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/libcurses/director tests/libcurses: add const to s...



details:   https://anonhg.NetBSD.org/src/rev/c485d38b6868
branches:  trunk
changeset: 980537:c485d38b6868
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Feb 07 18:32:20 2021 +0000

description:
tests/libcurses: add const to some function parameters

diffstat:

 tests/lib/libcurses/director/testlang_parse.y |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (60 lines):

diff -r 1b246fc4baff -r c485d38b6868 tests/lib/libcurses/director/testlang_parse.y
--- a/tests/lib/libcurses/director/testlang_parse.y     Sun Feb 07 18:22:51 2021 +0000
+++ b/tests/lib/libcurses/director/testlang_parse.y     Sun Feb 07 18:32:20 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/*     $NetBSD: testlang_parse.y,v 1.29 2021/02/07 18:14:43 rillig Exp $       */
+/*     $NetBSD: testlang_parse.y,v 1.30 2021/02/07 18:32:20 rillig Exp $       */
 
 /*-
  * Copyright 2009 Brett Lymn <blymn%NetBSD.org@localhost>
@@ -124,7 +124,7 @@
 static int     check_function_table(char *, const char *[], int);
 static int     find_var_index(const char *);
 static void    assign_arg(data_enum_t, void *);
-static int     assign_var(char *);
+static int     assign_var(const char *);
 void           init_parse_variables(int);
 static void    validate(int, void *);
 static void    validate_return(const char *, const char *, int);
@@ -136,11 +136,11 @@
 static void    write_cmd_pipe_args(data_enum_t, void *);
 static void    read_cmd_pipe(ct_data_t *);
 static void    write_func_and_args(void);
-static void    compare_streams(char *, bool);
+static void    compare_streams(const char *, bool);
 static void    do_function_call(size_t);
 static void    save_slave_output(bool);
 static void    validate_type(data_enum_t, ct_data_t *, int);
-static void    set_var(data_enum_t, char *, void *);
+static void    set_var(data_enum_t, const char *, void *);
 static void    validate_reference(int, void *);
 static char *  numeric_or(char *, char *);
 static char *  get_numeric_var(const char *);
@@ -741,7 +741,7 @@
  * Assign the value given to the named variable.
  */
 static void
-set_var(data_enum_t type, char *name, void *value)
+set_var(data_enum_t type, const char *name, void *value)
 {
        int i;
        char *number;
@@ -836,7 +836,7 @@
  * when a test function call returns.
  */
 static int
-assign_var(char *varname)
+assign_var(const char *varname)
 {
        var_t *temp;
        char *name;
@@ -998,7 +998,7 @@
  * any differences.
  */
 static void
-compare_streams(char *filename, bool discard)
+compare_streams(const char *filename, bool discard)
 {
        char check_file[PATH_MAX], drain[100], ref, data;
        struct pollfd fds[2];



Home | Main Index | Thread Index | Old Index