diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2021-08-12 08:19:07 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2021-08-12 08:19:36 +0300 |
commit | cc7051ae2ea384863937083a3a60a5a008d511a5 (patch) | |
tree | 59cc1fdd4bb35ca0afafaaa56372ef631c3d1b59 /tests | |
parent | d19407eaa4b00a724c4ff3744c2f49269183da26 (diff) | |
download | gdbm-cc7051ae2ea384863937083a3a60a5a008d511a5.tar.gz gdbm-cc7051ae2ea384863937083a3a60a5a008d511a5.tar.bz2 |
gdbmshell: get rid of remaining globals
Use gdbmshell variables instead
* src/gdbmshell.c (file_name, file_descr)
(open_mode, open_format): Remove globals.
(opendb,checkdb)
(open_handler,import_handler)
(status_handler): Use variables instead of globals.
(command_tab): Mark the "open" parameter as optional.
* src/gdbmtool.c (gdbmtool_init): Use variables instead of globals.
* src/gdbmtool.h (file_name, file_descr)
(open_mode, open_format): Remove globals.
* src/lex.l: Use variables instead of globals.
* src/var.c (variable): Rename hook to sethook.
New field: typeconv.
(vartab): New variables: "filename", "fd".
(variable_get): Use typeconv if provided.
* tests/gdbmtool/base.exp: Fix expected output.
* tests/gdbmtool00.at: Likewise.
* tests/gdbmtool01.at: Likewise.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gdbmtool/base.exp | 2 | ||||
-rw-r--r-- | tests/gdbmtool00.at | 2 | ||||
-rw-r--r-- | tests/gdbmtool01.at | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/gdbmtool/base.exp b/tests/gdbmtool/base.exp index 6a831ac..84128d2 100644 --- a/tests/gdbmtool/base.exp +++ b/tests/gdbmtool/base.exp @@ -1,6 +1,6 @@ gdbmtool_start gdbmtool_test "status" \ - "No database name" \ + "Database file: junk.gdbm" \ "Database is not open" \ "define key string" \ "define content string" diff --git a/tests/gdbmtool00.at b/tests/gdbmtool00.at index 77c8f15..19b1bfc 100644 --- a/tests/gdbmtool00.at +++ b/tests/gdbmtool00.at @@ -28,7 +28,7 @@ quit gdbmtool -f input | sed 's/^GDBM version.*/GDBM version/' ], [0], -[No database name +[Database file: junk.gdbm Database is not open define key string define content string diff --git a/tests/gdbmtool01.at b/tests/gdbmtool01.at index 4700b7d..8668b3e 100644 --- a/tests/gdbmtool01.at +++ b/tests/gdbmtool01.at @@ -28,7 +28,7 @@ quit gdbmtool < input | sed 's/^GDBM version.*/GDBM version/' ], [0], -[No database name +[Database file: junk.gdbm Database is not open define key string define content string |