ndbm.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /* ndbm.h - The include file for ndbm users. */
  2. /* This file is part of GDBM, the GNU data base manager, by Philip A. Nelson.
  3. Copyright (C) 1990, 1991, 1993 Free Software Foundation, Inc.
  4. GDBM is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2, or (at your option)
  7. any later version.
  8. GDBM is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GDBM; see the file COPYING. If not, write to
  14. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  15. You may contact the author by:
  16. e-mail: phil@cs.wwu.edu
  17. us-mail: Philip A. Nelson
  18. Computer Science Department
  19. Western Washington University
  20. Bellingham, WA 98226
  21. *************************************************************************/
  22. /* Parameters to dbm_store for simple insertion or replacement. */
  23. #define DBM_INSERT 0
  24. #define DBM_REPLACE 1
  25. /* The data and key structure. This structure is defined for compatibility. */
  26. typedef struct {
  27. char *dptr;
  28. int dsize;
  29. } datum;
  30. /* The file information header. This is good enough for most applications. */
  31. typedef struct {int dummy[10];} DBM;
  32. /* These are the routines (with some macros defining them!) */
  33. extern DBM *dbm_open ();
  34. extern void dbm_close ();
  35. extern datum dbm_fetch ();
  36. extern int dbm_store ();
  37. extern int dbm_delete ();
  38. extern int dbm_delete ();
  39. extern datum dbm_firstkey ();
  40. extern datum dbm_nextkey ();
  41. #define dbm_error(dbf) (0)
  42. #define dbm_clearerr(dbf)
  43. extern int dbm_dirfno ();
  44. extern int dbm_pagfno ();
  45. extern int dbm_rdonly ();