Ruby 2.0.0p247(2013-06-27revision41674)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Macros | Functions | Variables
sdbm.h File Reference
`#include <stdio.h>`
Include dependency graph for sdbm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | DBM
struct | datum

## Macros
#define | DBLKSIZ 4096
#define | PBLKSIZ 1024
#define | PAIRMAX 1008 /* arbitrary on PBLKSIZ-N */
#define | SPLTMAX 10 /* maximum allowed splits */
#define | DIRFEXT ".dir"
#define | PAGFEXT ".pag"
#define | DBM_RDONLY 0x1 /* data base open read-only */
#define | DBM_IOERR 0x2 /* data base I/O error */
#define | sdbm_rdonly(db) ((db)->flags & DBM_RDONLY)
#define | sdbm_error(db) ((db)->flags & DBM_IOERR)
#define | sdbm_clearerr(db) ((db)->flags &= ~DBM_IOERR) /* ouch */
#define | sdbm_dirfno(db) ((db)->dirf)
#define | sdbm_pagfno(db) ((db)->pagf)
#define | proto(p) ()
#define | DBM_INSERT 0
#define | DBM_REPLACE 1

## Functions
DBM *sdbm_open | proto ((char *, int, int))
void sdbm_close | proto ((DBM *))
datum sdbm_fetch | proto ((DBM *, datum))
int sdbm_store | proto ((DBM *, datum, datum, int))
DBM *sdbm_prep | proto ((char *, char *, int, int))
long sdbm_hash | proto ((char *, int))

## Variables
datum | nullitem

## Macro Definition Documentation

#define DBLKSIZ 4096

Definition at line 12 of file sdbm.h.

Referenced by getdbit(), sdbm_prep(), and setdbit().

#define DBM_INSERT 0

Definition at line 66 of file sdbm.h.

#define DBM_IOERR 0x2 /* data base I/O error */

Definition at line 37 of file sdbm.h.

#define DBM_RDONLY 0x1 /* data base open read-only */

Definition at line 36 of file sdbm.h.

Referenced by sdbm_prep().

#define DBM_REPLACE 1

Definition at line 67 of file sdbm.h.

Referenced by fdbm_store(), fsdbm_store(), and sdbm_store().

#define DIRFEXT ".dir"

Definition at line 17 of file sdbm.h.

Referenced by sdbm_open().

#define PAGFEXT ".pag"

Definition at line 18 of file sdbm.h.

Referenced by sdbm_open().

#define PAIRMAX 1008 /* arbitrary on PBLKSIZ-N */

Definition at line 14 of file sdbm.h.

Referenced by sdbm_store().

#define PBLKSIZ 1024

Definition at line 13 of file sdbm.h.

Referenced by chkpage(), delpair(), fitpair(), getnext(), getnkey(), getpage(), makroom(), putpair(), sdbm_delete(), sdbm_firstkey(), sdbm_prep(), sdbm_store(), seepair(), and splpage().

#define proto | ( |  | p) |  | ()

Definition at line 60 of file sdbm.h.

Referenced by getaddrinfo(), sock_s_getservbyname(), and sock_s_getservbyport().

#define sdbm_clearerr | ( |  | db) |  | ((db)->flags &= ~DBM_IOERR) /* ouch */

Definition at line 45 of file sdbm.h.

Referenced by fsdbm_store().

#define sdbm_dirfno | ( |  | db) |  | ((db)->dirf)

Definition at line 47 of file sdbm.h.

#define sdbm_error | ( |  | db) |  | ((db)->flags & DBM_IOERR)

Definition at line 43 of file sdbm.h.

#define sdbm_pagfno | ( |  | db) |  | ((db)->pagf)

Definition at line 48 of file sdbm.h.

#define sdbm_rdonly | ( |  | db) |  | ((db)->flags & DBM_RDONLY)

Definition at line 42 of file sdbm.h.

Referenced by sdbm_delete(), and sdbm_store().

#define SPLTMAX 10 /* maximum allowed splits */

Definition at line 15 of file sdbm.h.

Referenced by makroom().

## Function Documentation

DBM* sdbm_open proto | ( | (char *, int, int) | ) |  |

datum sdbm_nextkey proto | ( | (DBM *) | ) |  |

int sdbm_delete proto | ( | (DBM *, datum) | ) |  |

int sdbm_store proto | ( | (DBM *, datum, datum, int) | ) |  |

DBM* sdbm_prep proto | ( | (char *, char *, int, int) | ) |  |

long sdbm_hash proto | ( | (char *, int) | ) |  |

## Variable Documentation

datum nullitem

Definition at line 146 of file _sdbm.c.

Referenced by getnext(), sdbm_fetch(), sdbm_firstkey(), and sdbm_nextkey().