aboutsummaryrefslogtreecommitdiff
path: root/src/gdbmtool.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-05-14 10:16:09 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2013-05-14 10:16:09 +0000
commite0fba6888fc9ee90d27ac03a06844b22bad101be (patch)
tree873f30cd678e3d2bfad4fd5e3ce4a9d878156037 /src/gdbmtool.c
parent10201217d141314a78a7937027bfdbdb7c994a43 (diff)
downloadgdbm-e0fba6888fc9ee90d27ac03a06844b22bad101be.tar.gz
gdbm-e0fba6888fc9ee90d27ac03a06844b22bad101be.tar.bz2
Cleanup.
* src/datconv.c (s_float): Use strtod. (datum_scan_notag, datum_scan_tag): Made static. (dsprint): New function. * src/gdbmtool.c (status_handler): Print ket and content definitions. (slist_new): Bugfix (missing return statement). * src/gdbmtool.h: Add new prototypes. * src/lex.l: Remove unused variables, set option nounput.
Diffstat (limited to 'src/gdbmtool.c')
-rw-r--r--src/gdbmtool.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gdbmtool.c b/src/gdbmtool.c
index 905c3fb..b9d771b 100644
--- a/src/gdbmtool.c
+++ b/src/gdbmtool.c
@@ -735,17 +735,13 @@ import_handler (struct handler_param *param)
}
}
-static const char *
-boolstr (int val)
-{
- return val ? _("yes") : _("no");
-}
-
/* S - print current program status */
void
status_handler (struct handler_param *param)
{
fprintf (param->fp, _("Database file: %s\n"), file_name);
+ dsprint (param->fp, DS_KEY, dsdef[DS_KEY]);
+ dsprint (param->fp, DS_CONTENT, dsdef[DS_CONTENT]);
}
void
@@ -864,7 +860,7 @@ struct command command_tab[] = {
{ { NULL } }, N_("quit the program") },
{ S(set), T_SET,
NULL, NULL, NULL,
- { { "[var=value...]" }, NULL }, N_("set or list variables") },
+ { { "[var=value...]" }, { NULL } }, N_("set or list variables") },
{ S(define), T_DEF,
NULL, NULL, NULL,
{ { "key|content", ARG_STRING },
@@ -960,6 +956,11 @@ command_lookup (const char *str, struct locus *loc, struct command **pcmd)
/* fall through */
case fcom_ambig:
fprintf (stderr, " %s\n", cmd->name);
+ break;
+
+ case fcom_abort:
+ /* should not happen */
+ abort ();
}
}
}
@@ -1033,6 +1034,7 @@ slist_new (char *s)
struct slist *lp = emalloc (sizeof (*lp));
lp->next = NULL;
lp->str = s;
+ return lp;
}
void

Return to:

Send suggestions and report system problems to the System administrator.