/*
- * Copyright (c) 2000,2002 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000, 2002, 2005 Apple Computer, Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
// local routines
static OSErr CheckBTreeKey(const BTreeKey *key, const BTreeControlBlock *btcb);
-static Boolean ValidHFSRecord(const void *record, const BTreeControlBlock *btcb, UInt16 recordSize);
+static Boolean ValidHFSRecord(const void *record, const BTreeControlBlock *btcb, u_int16_t recordSize);
-OSErr SearchBTreeRecord(FileReference refNum, const void* key, UInt32 hint, void* foundKey, void* data, UInt16 *dataSize, UInt32 *newHint)
+OSErr SearchBTreeRecord(__unused FileReference refNum, __unused const void* key, __unused u_int32_t hint, __unused void* foundKey, __unused void* data, __unused u_int16_t *dataSize, __unused u_int32_t *newHint)
{
panic("SearchBTreeRecord is dead code!");
return (-1);
}
-OSErr ReplaceBTreeRecord(FileReference refNum, const void* key, UInt32 hint, void *newData, UInt16 dataSize, UInt32 *newHint)
+OSErr ReplaceBTreeRecord(FileReference refNum, const void* key, u_int32_t hint, void *newData, u_int16_t dataSize, u_int32_t *newHint)
{
FSBufferDescriptor btRecord;
BTreeIterator iterator;
iterator.hint.nodeNum = hint;
- result = CheckBTreeKey((BTreeKey *) key, btcb);
+ result = CheckBTreeKey((const BTreeKey *) key, btcb);
ExitOnError(result);
- BlockMoveData(key, &iterator.key, CalcKeySize(btcb, (BTreeKey *) key)); //\80\80 should we range check against maxkeylen?
+ BlockMoveData(key, &iterator.key, CalcKeySize(btcb, (const BTreeKey *) key)); //\80\80 should we range check against maxkeylen?
if ( DEBUG_BUILD && !ValidHFSRecord(newData, btcb, dataSize) )
DebugStr("\pReplaceBTreeRecord: bad record?");
static OSErr CheckBTreeKey(const BTreeKey *key, const BTreeControlBlock *btcb)
{
- UInt16 keyLen;
+ u_int16_t keyLen;
if ( btcb->attributes & kBTBigKeysMask )
keyLen = key->length16;
}
-static Boolean ValidHFSRecord(const void *record, const BTreeControlBlock *btcb, UInt16 recordSize)
+static Boolean ValidHFSRecord(const void *record, const BTreeControlBlock *btcb, u_int16_t recordSize)
{
- UInt32 cNodeID;
+ u_int32_t cNodeID;
if ( btcb->maxKeyLength == kHFSExtentKeyMaximumLength )
{
}
else // Catalog record
{
- CatalogRecord *catalogRecord = (CatalogRecord*) record;
+ const CatalogRecord *catalogRecord = (const CatalogRecord*) record;
switch(catalogRecord->recordType)
{
case kHFSFileRecord:
{
-// UInt16 i;
+// u_int16_t i;
HFSExtentDescriptor *dataExtent;
HFSExtentDescriptor *rsrcExtent;
case kHFSPlusFileRecord:
{
-// UInt16 i;
+// u_int16_t i;
HFSPlusExtentDescriptor *dataExtent;
HFSPlusExtentDescriptor *rsrcExtent;