summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--src/gdbmerrno.c1
-rw-r--r--src/gdbmtool.c6
-rw-r--r--src/hash.c6
-rw-r--r--src/lex.l2
-rw-r--r--src/proto.h1
-rw-r--r--src/util.c1
6 files changed, 10 insertions, 7 deletions
diff --git a/src/gdbmerrno.c b/src/gdbmerrno.c
index 50bcaf1..d6e5a31 100644
--- a/src/gdbmerrno.c
+++ b/src/gdbmerrno.c
@@ -133,6 +133,7 @@ const char * const gdbm_errlist[_GDBM_MAX_ERRNO+1] = {
[GDBM_DIR_OVERFLOW] = N_("Bucket directory overflow"),
[GDBM_BAD_BUCKET] = N_("Malformed bucket header"),
[GDBM_BAD_HEADER] = N_("Malformed database file header"),
+ /* TRANSLATORS: avail_block is a field name. Don't translate it. */
[GDBM_BAD_AVAIL] = N_("Malformed avail_block"),
[GDBM_BAD_HASH_TABLE] = N_("Malformed hash table"),
[GDBM_BAD_DIR_ENTRY] = N_("Invalid directory entry"),
diff --git a/src/gdbmtool.c b/src/gdbmtool.c
index e93e977..20e85ea 100644
--- a/src/gdbmtool.c
+++ b/src/gdbmtool.c
@@ -311,7 +311,7 @@ _gdbm_print_avail_list (FILE *fp, GDBM_FILE dbf)
if (gdbm_avail_block_validate (dbf, av_stk) == 0)
av_table_display (av_stk->av_table, av_stk->count, fp);
else
- terror (_("invalid avail_block"));
+ terror ("%s", gdbm_strerror (GDBM_BAD_AVAIL));
temp = av_stk->next_block;
}
free (av_stk);
@@ -1228,7 +1228,7 @@ struct command command_tab[] = {
{ NULL } },
FALSE,
REPEAT_NOARG,
- N_("nextkey") },
+ N_("continue iteration: get next key and datum") },
{ S(store), T_CMD,
checkdb_begin, store_handler, NULL,
{ { N_("KEY"), GDBM_ARG_DATUM, DS_KEY },
@@ -1242,7 +1242,7 @@ struct command command_tab[] = {
{ { NULL } },
FALSE,
REPEAT_NEVER,
- N_("firstkey") },
+ N_("begin iteration: get first key and datum") },
{ S(reorganize), T_CMD,
checkdb_begin, reorganize_handler, NULL,
{ { NULL } },
diff --git a/src/hash.c b/src/hash.c
index 21d15dc..52fbc82 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -33,11 +33,11 @@ _gdbm_hash (datum key)
int index; /* Used to cycle through random values. */
/* Set the initial value from key. */
- value = 0x238F13AF * key.dsize;
+ value = 0x238F13AFu * key.dsize;
for (index = 0; index < key.dsize; index++)
- value = (value + (key.dptr[index] << (index*5 % 24))) & 0x7FFFFFFF;
+ value = (value + (key.dptr[index] << ((unsigned) index * 5 % 24))) & 0x7FFFFFFF;
- value = (1103515243 * value + 12345) & 0x7FFFFFFF;
+ value = (1103515243u * value + 12345) & 0x7FFFFFFF;
/* Return the value. */
return((int) value);
diff --git a/src/lex.l b/src/lex.l
index 7840794..7faf046 100644
--- a/src/lex.l
+++ b/src/lex.l
@@ -136,11 +136,11 @@ input_context_pop (void)
cp = context_tos->parent;
free (context_tos);
context_tos = cp;
+ yy_delete_buffer (YY_CURRENT_BUFFER);
if (!cp)
return 1;
yylloc = cp->locus;
- yy_delete_buffer (YY_CURRENT_BUFFER);
yy_switch_to_buffer (cp->buf);
return 0;
diff --git a/src/proto.h b/src/proto.h
index 4ba5cc0..df5d83d 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -141,6 +141,7 @@ gdbm_file_sync (GDBM_FILE dbf)
GDBM_SET_ERRNO (dbf, GDBM_FILE_SYNC_ERROR, TRUE);
return 1;
}
+ return 0;
#else
sync ();
sync ();
diff --git a/src/util.c b/src/util.c
index 25daeed..aa56dc4 100644
--- a/src/util.c
+++ b/src/util.c
@@ -95,6 +95,7 @@ vgetyn (const char *prompt, va_list ap)
case 'N':
return 0;
default:
+ /* TRANSLATORS: Please, don't translate 'y' and 'n'. */
fprintf (stdout, "%s\n", _("Please, reply 'y' or 'n'"));
}
/* fall through */

Return to:

Send suggestions and report system problems to the System administrator.