COHERENT manpages

This page displays the COHERENT manpage for gdbmerrno.h [Define error messages used by GDBM routines].

List of available manpages
Index


gdbmerrno.h -- Header File

Define error messages used by GDBM routines
#include <gdbmerrno.h>

Header  file <gdbmerrno.h>  defines  the error  codes  that the  GDBM
routines can write into global variable gdbm_errno, as follows:

GDBM_NO_ERROR
     All is well.
GDBM_MALLOC_ERROR
     The GDBM  routines call  malloc() to  allocate memory for  each record
     that they  retrieve from a  data base.  This message  indicates that a
     call to malloc() failed.
GDBM_BLOCK_SIZE_ERROR
     You tried  to set an  illegal block size  when you created  a new data
     base.
GDBM_FILE_OPEN_ERROR
     A data-base file could not be opened, for whatever reason.
GDBM_FILE_WRITE_ERROR
     A  process  could not  write  into a  data-base  file.  This  probably
     indicates a problem with permissions.
GDBM_FILE_SEEK_ERROR
     A GDBM  routine could not  move a data-base  file's seek pointer  to a
     place where  the data base's  hash table indicates a  given record was
     stored.   The  data  base  may  well  be  corrupt;  check  this  error
     seriously.
GDBM_FILE_READ_ERROR
     A process could not read  a data-base file.  This probably indicates a
     problem with permissions.
GDBM_BAD_MAGIC_NUMBER
     When the  GDBM function gdbm_open() create a new  data base, it stamps
     the file  with a ``magic number,'' which indicates  that that file is,
     in fact, a GDBM data base.   This error indicates that the file you're
     attempting to read is not a GDBM a data base.
GDBM_EMPTY_DATABASE
     The GDBM data base contains no data.
GDBM_CANT_BE_READER
     You failed in an attempt to open a GDBM data base into read mode.  The
     data base may have already been opened into write mode.
GDBM_CANT_BE_WRITER
     You failed  in an attempt  to open a  GDBM data base  into write mode.
     The data base may have already  been opened into write mode by another
     process.
GDBM_READER_CANT_DELETE
     You opened  a GDBM  data base  into read mode,  but then  attempted to
     delete a record.  This is illegal.
GDBM_READER_CANT_STORE
     You opened  a GDBM  data base  into read mode,  but then  attempted to
     write a record into it.  This is illegal.
GDBM_READER_CANT_REORGANIZE
     You opened  a GDBM  data base  into read mode,  but then  attempted to
     reorganize it.  This is illegal.
GDBM_UNKNOWN_UPDATE
     You attempted to update a record within a data base, but the data base
     does not contain a record with the given key.
GDBM_ITEM_NOT_FOUND
     You attempted  to read a  record from a  data base, but  the data base
     does not contain a record with the given key.
GDBM_REORGANIZE_FAILED
     An attempted  reorganization of a  file failed.  The data  base may be
     corrupt.
GDBM_CANNOT_REPLACE
     You attempted  to write a  new record into  a data base,  but the data
     base already contains a record with the given key.
GDBM_ILLEGAL_DATA
     You  attempted to  write a  record into  a data  base, but  the record
     contains illegal data (e.g., the field dptr is NULL).
GDBM_OPT_ALREADY_SET
     You called  gdbm_setopt() to set  an option on  a data base,  but that
     option is already set.
GDBM_OPT_ILLEGAL
     You called  gdbm_setopt() to  set an  option on a  data base,  but the
     requested option is illegal or unrecognized.

Function gdbm_strerror()  translates a GDBM  error code into  a string that
you can display.

See Also


Notes

For a statement  of copyright and permissions on this  header file, see the
Lexicon entry for libgdbm.