diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-05-16 20:16:27 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-05-16 20:16:27 +0000 |
commit | d229eb6b67b5c6c94453a7892280742809f5ad46 (patch) | |
tree | 603876dd37d329c801bf4d1aabc96c733a18b05f /src/var.c | |
parent | 230db2d8db54f9bd7f28169f4ce6b763304f2647 (diff) | |
download | gdbm-d229eb6b67b5c6c94453a7892280742809f5ad46.tar.gz gdbm-d229eb6b67b5c6c94453a7892280742809f5ad46.tar.bz2 |
Minor improvements
* src/gdbmtool.c (_gdbm_print_bucket_cache): Use %zu to print
size_t.
* src/gdbmtool.h (variable_unset): New proto.
(yyerror): Argument is char const *.
src/gram.y: Likewise.
* src/lex.l: Add option noinput
* src/parseopt.c (print_option_descr): Use fwrite instead of
printf.
* src/var.c: Fix initializers to suppress warnings.
Diffstat (limited to 'src/var.c')
-rw-r--r-- | src/var.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -45,20 +45,20 @@ static int open_hook (struct variable *, union value *); static struct variable vartab[] = { /* Top-level prompt */ - { "ps1", VART_STRING, VARF_INIT, { "%p>%_" } }, + { "ps1", VART_STRING, VARF_INIT, { .string = "%p>%_" } }, /* Second-level prompt (used within "def" block) */ - { "ps2", VART_STRING, VARF_INIT, { "%_>%_" } }, + { "ps2", VART_STRING, VARF_INIT, { .string = "%_>%_" } }, /* This delimits array members */ - { "delim1", VART_STRING, VARF_INIT|VARF_PROT, { "," } }, + { "delim1", VART_STRING, VARF_INIT|VARF_PROT, { .string = "," } }, /* This delimits structure members */ - { "delim2", VART_STRING, VARF_INIT|VARF_PROT, { "," } }, - { "confirm", VART_BOOL, VARF_INIT, { .num = 1 } }, + { "delim2", VART_STRING, VARF_INIT|VARF_PROT, { .string = "," } }, + { "confirm", VART_BOOL, VARF_INIT, { .bool = 1 } }, { "cachesize", VART_INT, VARF_DFL }, { "blocksize", VART_INT, VARF_DFL }, { "open", VART_STRING, VARF_DFL, { NULL }, open_hook }, - { "lock", VART_BOOL, VARF_INIT, { .num = 1 } }, - { "mmap", VART_BOOL, VARF_INIT, { .num = 1 } }, - { "sync", VART_BOOL, VARF_INIT, { .num = 0 } }, + { "lock", VART_BOOL, VARF_INIT, { .bool = 1 } }, + { "mmap", VART_BOOL, VARF_INIT, { .bool = 1 } }, + { "sync", VART_BOOL, VARF_INIT, { .bool = 0 } }, { "filemode", VART_INT, VARF_INIT|VARF_OCTAL|VARF_PROT, { .num = 0644 } }, { "pager", VART_STRING, VARF_DFL }, { "quiet", VART_BOOL, VARF_DFL }, |