/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
*
* @APPLE_LICENSE_HEADER_END@
*/
-/*
- * Copyright (c) 1990, 1993
+/*-
+ * Copyright (c) 1990, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* SUCH DAMAGE.
*/
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)rec_delete.c 8.7 (Berkeley) 7/14/94";
+#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
#include <sys/types.h>
#include <db.h>
#include "recno.h"
-static int rec_rdelete __P((BTREE *, recno_t));
+static int rec_rdelete(BTREE *, recno_t);
/*
* __REC_DELETE -- Delete the item(s) referenced by a key.
status = rec_rdelete(t, nrec);
break;
case R_CURSOR:
- if (!ISSET(t, B_SEQINIT))
+ if (!F_ISSET(&t->bt_cursor, CURS_INIT))
goto einval;
if (t->bt_nrecs == 0)
return (RET_SPECIAL);
- status = rec_rdelete(t, t->bt_rcursor - 1);
+ status = rec_rdelete(t, t->bt_cursor.rcursor - 1);
if (status == RET_SUCCESS)
- --t->bt_rcursor;
+ --t->bt_cursor.rcursor;
break;
default:
einval: errno = EINVAL;
}
if (status == RET_SUCCESS)
- SET(t, B_MODIFIED | R_MODIFIED);
+ F_SET(t, B_MODIFIED | R_MODIFIED);
return (status);
}
__rec_dleaf(t, h, index)
BTREE *t;
PAGE *h;
- indx_t index;
+ u_int32_t index;
{
- register RLEAF *rl;
- register indx_t *ip, cnt, offset;
- register size_t nbytes;
+ RLEAF *rl;
+ indx_t *ip, cnt, offset;
+ u_int32_t nbytes;
char *from;
void *to;