diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2021-08-10 13:49:43 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2021-08-10 13:49:43 +0300 |
commit | 51504931f45e1342c64965a321d2c12603d8c2ae (patch) | |
tree | d7fe13760c8ab71a7eca72578ba27c221be1b5de /src/Makefile.am | |
parent | d2a7d621722b8f80caf3f3081a28fbd06781f405 (diff) | |
download | gdbm-51504931f45e1342c64965a321d2c12603d8c2ae.tar.gz gdbm-51504931f45e1342c64965a321d2c12603d8c2ae.tar.bz2 |
gdbmtool: rewrite handler parameter functions; fix memory leaks
* src/input-null.c: New file.
* src/Makefile.am: Add input-null.c
* src/mem.c (e2nrealloc): New function.
* src/gdbmapp.h (e2nrealloc): New proto.
* src/gdbmtool.c (quit_handler): Exit from parser instead of
exiting from the program.
(param): Remove global.
(param_expand,param_push_arg,param_free): New functions for
handling parameters.
(param_free_argv): Take a single argument. Clear all
parameters up to argc.
(run_command): Rewrite parameter handling using new functions.
(main): Call input_init() after the input stream has been set
up.
Call yylex_destroy when finished.
* src/gdbmtool.h (instream_null_create): New proto.
(handler_param): Change type of argc to size_t. New field
argmax.
(HANDLER_PARAM_INITIALIZER): New define.
(yylex_destroy): New proto.
* src/input-rl.c (history_file_name): New static.
(get_history_file_name): Initialize history_file_name.
(input_init): Initialize input history only in interactive mode.
(input_done): Free input history only in interactive mode.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 0d10f23..fa08bf3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -100,6 +100,7 @@ gdbmtool_SOURCES = \ gram.y\ input-argv.c\ input-file.c\ + input-null.c\ lex.l\ gdbmtool.h\ gdbmtool.c\ |