summaryrefslogtreecommitdiffstats
path: root/lib/libc/db/recno/rec_seq.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/db/recno/rec_seq.c')
-rw-r--r--lib/libc/db/recno/rec_seq.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/libc/db/recno/rec_seq.c b/lib/libc/db/recno/rec_seq.c
index bc66d1c..f80992c 100644
--- a/lib/libc/db/recno/rec_seq.c
+++ b/lib/libc/db/recno/rec_seq.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1991, 1993
+ * Copyright (c) 1991, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)rec_seq.c 8.2 (Berkeley) 9/7/93";
+static char sccsid[] = "@(#)rec_seq.c 8.3 (Berkeley) 7/14/94";
#endif /* not lint */
#include <sys/types.h>
@@ -82,8 +82,8 @@ __rec_seq(dbp, key, data, flags)
goto einval;
break;
case R_NEXT:
- if (ISSET(t, B_SEQINIT)) {
- nrec = t->bt_rcursor + 1;
+ if (F_ISSET(&t->bt_cursor, CURS_INIT)) {
+ nrec = t->bt_cursor.rcursor + 1;
break;
}
/* FALLTHROUGH */
@@ -91,14 +91,14 @@ __rec_seq(dbp, key, data, flags)
nrec = 1;
break;
case R_PREV:
- if (ISSET(t, B_SEQINIT)) {
- if ((nrec = t->bt_rcursor - 1) == 0)
+ if (F_ISSET(&t->bt_cursor, CURS_INIT)) {
+ if ((nrec = t->bt_cursor.rcursor - 1) == 0)
return (RET_SPECIAL);
break;
}
/* FALLTHROUGH */
case R_LAST:
- if (!ISSET(t, R_EOF | R_INMEM) &&
+ if (!F_ISSET(t, R_EOF | R_INMEM) &&
t->bt_irec(t, MAX_REC_NUMBER) == RET_ERROR)
return (RET_ERROR);
nrec = t->bt_nrecs;
@@ -109,7 +109,7 @@ einval: errno = EINVAL;
}
if (t->bt_nrecs == 0 || nrec > t->bt_nrecs) {
- if (!ISSET(t, R_EOF | R_INMEM) &&
+ if (!F_ISSET(t, R_EOF | R_INMEM) &&
(status = t->bt_irec(t, nrec)) != RET_SUCCESS)
return (status);
if (t->bt_nrecs == 0 || nrec > t->bt_nrecs)
@@ -119,11 +119,11 @@ einval: errno = EINVAL;
if ((e = __rec_search(t, nrec - 1, SEARCH)) == NULL)
return (RET_ERROR);
- SET(t, B_SEQINIT);
- t->bt_rcursor = nrec;
+ F_SET(&t->bt_cursor, CURS_INIT);
+ t->bt_cursor.rcursor = nrec;
status = __rec_ret(t, e, nrec, key, data);
- if (ISSET(t, B_DB_LOCK))
+ if (F_ISSET(t, B_DB_LOCK))
mpool_put(t->bt_mp, e->page, 0);
else
t->bt_pinned = e->page;
OpenPOWER on IntegriCloud