aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2021-01-09 12:40:58 +0200
committerSergey Poznyakoff <gray@gnu.org>2021-01-09 12:40:58 +0200
commit05fdfccddc4b67f484adaa1232301f81e1a67a76 (patch)
tree7efe0aa2ad05e23412e50959a1887207645abb57
parentf6072091fe3049768fa0c3a8a19a7ba4e4901d49 (diff)
parent0c38baeca4d8caeb2b16faaf42acd61f4e72bde7 (diff)
downloadgdbm-05fdfccddc4b67f484adaa1232301f81e1a67a76.tar.gz
gdbm-05fdfccddc4b67f484adaa1232301f81e1a67a76.tar.bz2
Merge branch 'master' into newcache
-rw-r--r--src/gdbmerrno.c1
-rw-r--r--src/gdbmtool.c6
-rw-r--r--src/hash.c6
-rw-r--r--src/lex.l4
-rw-r--r--src/proto.h1
-rw-r--r--src/util.c1
6 files changed, 11 insertions, 8 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.