summaryrefslogtreecommitdiff
path: root/ext/sdbm
diff options
context:
space:
mode:
Diffstat (limited to 'ext/sdbm')
-rw-r--r--ext/sdbm/_sdbm.c18
-rw-r--r--ext/sdbm/init.c2
-rw-r--r--ext/sdbm/sdbm.h2
3 files changed, 11 insertions, 11 deletions
diff --git a/ext/sdbm/_sdbm.c b/ext/sdbm/_sdbm.c
index b3a598dbc6..0b46056af5 100644
--- a/ext/sdbm/_sdbm.c
+++ b/ext/sdbm/_sdbm.c
@@ -186,7 +186,7 @@ sdbm_prep(char *dirname, char *pagname, int flags, int mode)
db->blkptr = 0;
db->keyptr = 0;
/*
- * adjust user flags so that WRONLY becomes RDWR,
+ * adjust user flags so that WRONLY becomes RDWR,
* as required by this package. Also set our internal
* flag for RDONLY.
*/
@@ -407,7 +407,7 @@ makroom(register DBM *db, long int hash, int need)
* need to read in anything. BUT we have to write the current
* [deferred] page out, as the window of failure is too great.
*/
- db->curbit = 2 * db->curbit +
+ db->curbit = 2 * db->curbit +
((hash & (db->hmask + 1)) ? 2 : 1);
db->hmask |= (db->hmask + 1);
@@ -483,7 +483,7 @@ getpage(register DBM *db, register long int hash)
* see if the block we need is already in memory.
* note: this lookaside cache has about 10% hit rate.
*/
- if (pagb != db->pagbno) {
+ if (pagb != db->pagbno) {
/*
* note: here, we assume a "hole" is read as 0s.
* if not, must zero pagbuf first.
@@ -608,8 +608,8 @@ getnext(register DBM *db)
#define exhash(item) sdbm_hash((item).dptr, (item).dsize)
-/*
- * forward
+/*
+ * forward
*/
static int seepair proto((char *, int, char *, int));
@@ -829,7 +829,7 @@ splpage(char *pag, char *new, long int sbit)
n = GET_SHORT(ino,0);
for (ino++; n > 0; ino += 2) {
- key.dptr = cur + GET_SHORT(ino,0);
+ key.dptr = cur + GET_SHORT(ino,0);
key.dsize = off - GET_SHORT(ino,0);
val.dptr = cur + GET_SHORT(ino,1);
val.dsize = GET_SHORT(ino,0) - GET_SHORT(ino,1);
@@ -842,13 +842,13 @@ splpage(char *pag, char *new, long int sbit)
n -= 2;
}
- debug(("%d split %d/%d\n", ((short *) cur)[0] / 2,
+ debug(("%d split %d/%d\n", ((short *) cur)[0] / 2,
((short *) new)[0] / 2,
((short *) pag)[0] / 2));
}
/*
- * check page sanity:
+ * check page sanity:
* number of entries should be something
* reasonable, and all offsets in the index should be in order.
* this could be made more rigorous.
@@ -891,7 +891,7 @@ chkpage(char *pag)
* [this seems to work remarkably well, in fact better
* then the ndbm hash function. Replace at your own risk]
* use: 65599 nice.
- * 65587 even better.
+ * 65587 even better.
*/
long
sdbm_hash(register char *str, register int len)
diff --git a/ext/sdbm/init.c b/ext/sdbm/init.c
index f630dc3cc9..fdb7fd42c9 100644
--- a/ext/sdbm/init.c
+++ b/ext/sdbm/init.c
@@ -293,7 +293,7 @@ fsdbm_shift(VALUE obj)
fdbm_modify(obj);
GetDBM2(obj, dbmp, dbm);
- key = sdbm_firstkey(dbm);
+ key = sdbm_firstkey(dbm);
if (!key.dptr) return Qnil;
val = sdbm_fetch(dbm, key);
keystr = rb_external_str_new(key.dptr, key.dsize);
diff --git a/ext/sdbm/sdbm.h b/ext/sdbm/sdbm.h
index 0c7ed1ba9b..9691b29855 100644
--- a/ext/sdbm/sdbm.h
+++ b/ext/sdbm/sdbm.h
@@ -2,7 +2,7 @@
* sdbm - ndbm work-alike hashed database library
* based on Per-Ake Larson's Dynamic Hashing algorithms. BIT 18 (1978).
* author: oz@nexus.yorku.ca
- * status: public domain.
+ * status: public domain.
*/
#ifndef _SDBM_H_
#define _SDBM_H_