]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/hashed_db.c
ncurses 6.2 - patch 20200627
[ncurses.git] / ncurses / tinfo / hashed_db.c
index 1b3eb97dd92e3f6675fa1aa1f2fc1d9cc9cadf14..b78d98f874febc29ff20a8c1744915986a6df453 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 2006-2011,2013 Free Software Foundation, Inc.              *
+ * Copyright 2019,2020 Thomas E. Dickey                                     *
+ * Copyright 2006-2011,2013 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -36,7 +37,7 @@
 
 #if USE_HASHED_DB
 
 
 #if USE_HASHED_DB
 
-MODULE_ID("$Id: hashed_db.c,v 1.16 2013/02/16 21:50:03 tom Exp $")
+MODULE_ID("$Id: hashed_db.c,v 1.19 2020/02/02 23:34:34 tom Exp $")
 
 #if HASHED_DB_API >= 2
 static DBC *cursor;
 
 #if HASHED_DB_API >= 2
 static DBC *cursor;
@@ -273,7 +274,7 @@ _nc_db_next(DB * db, DBT * key, DBT * data)
        result = -1;
     }
 #else
        result = -1;
     }
 #else
-    result = db->seq(db, key, data, 0);
+    result = db->seq(db, key, data, R_NEXT);
 #endif
     return result;
 }
 #endif
     return result;
 }
@@ -286,7 +287,7 @@ NCURSES_EXPORT(bool)
 _nc_db_have_index(DBT * key, DBT * data, char **buffer, int *size)
 {
     bool result = FALSE;
 _nc_db_have_index(DBT * key, DBT * data, char **buffer, int *size)
 {
     bool result = FALSE;
-    int used = data->size - 1;
+    int used = (int) data->size - 1;
     char *have = (char *) data->data;
 
     (void) key;
     char *have = (char *) data->data;
 
     (void) key;
@@ -309,7 +310,7 @@ NCURSES_EXPORT(bool)
 _nc_db_have_data(DBT * key, DBT * data, char **buffer, int *size)
 {
     bool result = FALSE;
 _nc_db_have_data(DBT * key, DBT * data, char **buffer, int *size)
 {
     bool result = FALSE;
-    int used = data->size - 1;
+    int used = (int) data->size - 1;
     char *have = (char *) data->data;
 
     if (*have++ == 0) {
     char *have = (char *) data->data;
 
     if (*have++ == 0) {