diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-08-01 11:22:50 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-08-01 11:22:50 +0000 |
commit | a5088330ed9d2e672152b81720f3f35ad15a3bce (patch) | |
tree | dee3cdcf3719c3c80ace9ca7ac75a65282587fff /src/gdbmstore.c | |
parent | e11023671fa3e05c404d1277a6fe6855c79ce923 (diff) | |
download | gdbm-a5088330ed9d2e672152b81720f3f35ad15a3bce.tar.gz gdbm-a5088330ed9d2e672152b81720f3f35ad15a3bce.tar.bz2 |
Use GDBM_FILE instead of gdbm_file_info *.
Diffstat (limited to 'src/gdbmstore.c')
-rw-r--r-- | src/gdbmstore.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gdbmstore.c b/src/gdbmstore.c index cc2bee7..26874fe 100644 --- a/src/gdbmstore.c +++ b/src/gdbmstore.c @@ -12,41 +12,40 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Include system configuration before all else. */ #include "autoconf.h" #include "gdbmdefs.h" -#include "gdbmerrno.h" /* Add a new element to the database. CONTENT is keyed by KEY. The file on disk is updated to reflect the structure of the new database before returning from this procedure. The FLAGS define the action to take when the KEY is already in the database. The value GDBM_REPLACE asks that the old data be replaced by the new CONTENT. The value GDBM_INSERT asks that an error be returned and no action taken. A return value of 0 means no errors. A return value of -1 means that the item was not stored in the data base because the caller was not an official writer. A return value of 0 means that the item was not stored because the argument FLAGS was GDBM_INSERT and the KEY was already in the database. */ int -gdbm_store (gdbm_file_info *dbf, datum key, datum content, int flags) +gdbm_store (GDBM_FILE dbf, datum key, datum content, int flags) { int new_hash_val; /* The new hash value. */ int elem_loc; /* The location in hash bucket. */ off_t file_adr; /* The address of new space in the file. */ off_t file_pos; /* The position after a lseek. */ int num_bytes; /* Used for error detection. */ off_t free_adr; /* For keeping track of a freed section. */ int free_size; int new_size; /* Used in allocating space. */ char *temp; /* Used in _gdbm_findkey call. */ |