diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-05-16 15:32:45 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-05-16 15:32:45 +0000 |
commit | 979486e1b46a894fc9de2abe6eb8985536a5013c (patch) | |
tree | e9e61bcfd9d1945c612a54e080d4fdc2e87cbad5 /src/gram.y | |
parent | e5fccca3abee9093f4d1e50823addca8e6c778a6 (diff) | |
download | gdbm-979486e1b46a894fc9de2abe6eb8985536a5013c.tar.gz gdbm-979486e1b46a894fc9de2abe6eb8985536a5013c.tar.bz2 |
Improve handling of the variables.
* src/gdbmtool.c (opendb): Allow for unset variables.
* src/gram.y: Improve error detection.
* src/lex.l: Handle multiline strings.
(pe_file_name): file_name can be NULL.
* src/var.c (VARF_PROT): New flag. Protects the variable
from being unset.
(vartab): Use VARF_PROT if needed.
(s2b): Fix return values.
(variable_set, variable_unset): Return error if attempting
to unset a variable marked with VARF_PROT.
* doc/gdbm.info: Update.
* doc/gdbmtool.1: Update.
Diffstat (limited to 'src/gram.y')
-rw-r--r-- | src/gram.y | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -280,6 +280,9 @@ asgn : T_IDENT case VAR_ERR_BADTYPE: lerror (&@1, _("%s is not a boolean variable"), varname); break; + + default: + lerror (&@1, _("unexpected error setting %s: %d"), $1, rc); } free($1); } @@ -302,8 +305,11 @@ asgn : T_IDENT case VAR_ERR_BADVALUE: lerror (&@1, _("%s: value %s is not allowed"), $1, $3); break; + + default: + lerror (&@1, _("unexpected error setting %s: %d"), $1, rc); } - free($1); + free ($1); free ($3); } ; |