aboutsummaryrefslogtreecommitdiff
path: root/src/var.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-05-16 20:16:27 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2016-05-16 20:16:27 +0000
commitd229eb6b67b5c6c94453a7892280742809f5ad46 (patch)
tree603876dd37d329c801bf4d1aabc96c733a18b05f /src/var.c
parent230db2d8db54f9bd7f28169f4ce6b763304f2647 (diff)
downloadgdbm-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.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/var.c b/src/var.c
index 1194d81..65ea2a1 100644
--- a/src/var.c
+++ b/src/var.c
@@ -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 },

Return to:

Send suggestions and report system problems to the System administrator.