# HG changeset patch # User Sean Halle # Date 1346709818 25200 # Node ID 18ec64d06e3583c3e9619e519f0250baa2d8db96 # Parent b398837ef4aaeba34d26f6c425e5fefabdad88c8 Renamed VMS to PR, in new branch diff -r b398837ef4aa -r 18ec64d06e35 PrivateHash.c --- a/PrivateHash.c Tue Jun 26 03:09:05 2012 -0700 +++ b/PrivateHash.c Mon Sep 03 15:03:38 2012 -0700 @@ -12,11 +12,11 @@ HashTable * makeHashTable( int numHashSlots, FreeEntryContentFnPtr freeFn ) { HashTable * retTable; - retTable = VMS_int__malloc( sizeof( HashTable ) ); + retTable = PR_int__malloc( sizeof( HashTable ) ); retTable->freeEntryContentFn = freeFn; - retTable->entries = VMS_int__malloc( numHashSlots * sizeof(HashEntry *) ); + retTable->entries = PR_int__malloc( numHashSlots * sizeof(HashEntry *) ); retTable->numEntries = 0; retTable->tableSz = numHashSlots; @@ -28,11 +28,11 @@ HashTable * makeHashTable_WL( int numHashSlots, FreeEntryContentFnPtr freeFn ) { HashTable * retTable; - retTable = VMS_WL__malloc( sizeof( HashTable ) ); + retTable = PR_WL__malloc( sizeof( HashTable ) ); retTable->freeEntryContentFn = freeFn; - retTable->entries = VMS_int__malloc( numHashSlots * sizeof(HashEntry *) ); + retTable->entries = PR_int__malloc( numHashSlots * sizeof(HashEntry *) ); retTable->numEntries = 0; retTable->tableSz = numHashSlots; @@ -50,7 +50,7 @@ oldEntries = table->entries; newTableSz = 2 * oldTableSz; - newEntries = VMS_int__malloc( newTableSz * sizeof(HashEntry *) ); + newEntries = PR_int__malloc( newTableSz * sizeof(HashEntry *) ); table->tableSz = newTableSz; table->entries = newEntries; @@ -97,10 +97,10 @@ int32 len = strlen(key); - hashEntry = (HashEntry*) VMS_int__malloc( sizeof( HashEntry ) ); + hashEntry = (HashEntry*) PR_int__malloc( sizeof( HashEntry ) ); if( hashEntry == NULL ) return NULL; - hashEntry->key = VMS_int__malloc( len + 1 ); + hashEntry->key = PR_int__malloc( len + 1 ); if( hashEntry->key == NULL ) return NULL; memcpy( hashEntry->key, key, len + 1 ); hashEntry->next = NULL; @@ -259,8 +259,8 @@ { if( entry->content != NULL ) (*(table->freeEntryContentFn))( entry->content ); - VMS_int__free( entry->key ); //was VMS_int__malloc'd above, so free it - VMS_int__free( entry ); + PR_int__free( entry->key ); //was PR_int__malloc'd above, so free it + PR_int__free( entry ); } void @@ -268,8 +268,8 @@ { if( entry->content != NULL ) (*(table->freeEntryContentFn))( entry->content ); - VMS_WL__free( entry->key ); //was VMS_int__malloc'd above, so free it - VMS_WL__free( entry ); + PR_WL__free( entry->key ); //was PR_int__malloc'd above, so free it + PR_WL__free( entry ); } void @@ -295,15 +295,15 @@ void freeHashEntryButNotContent( HashEntry *entry ) { - VMS_int__free( entry->key ); //was VMS_int__malloc'd above, so free it - VMS_int__free( entry ); + PR_int__free( entry->key ); //was PR_int__malloc'd above, so free it + PR_int__free( entry ); } void freeHashEntryButNotContent_WL( HashEntry *entry ) { - VMS_WL__free( entry->key ); //was VMS_int__malloc'd above, so free it - VMS_WL__free( entry ); + PR_WL__free( entry->key ); //was PR_int__malloc'd above, so free it + PR_WL__free( entry ); } @@ -322,7 +322,7 @@ { HashTable * retTable; int32 numHashSlots; - retTable = VMS_int__malloc( sizeof( HashTable ) ); + retTable = PR_int__malloc( sizeof( HashTable ) ); numHashSlots = 1 << powerOf2OfSz; retTable->hashMask = 0xffffffff >> 32 - powerOf2OfSz; @@ -330,7 +330,7 @@ retTable->freeEntryContentFn = freeFn; - retTable->entries = VMS_int__malloc( numHashSlots * sizeof(HashEntry *)); + retTable->entries = PR_int__malloc( numHashSlots * sizeof(HashEntry *)); retTable->numEntries = 0; retTable->tableSz = numHashSlots; @@ -349,9 +349,9 @@ makeHashEntry32( uint32 * key ) { HashEntry *hashEntry; - hashEntry = (HashEntry*) VMS_int__malloc( sizeof( HashEntry ) ); + hashEntry = (HashEntry*) PR_int__malloc( sizeof( HashEntry ) ); if( hashEntry == NULL ) return NULL; - hashEntry->key = VMS_int__malloc( sizeOfKey(key) ); + hashEntry->key = PR_int__malloc( sizeOfKey(key) ); if( hashEntry->key == NULL ) return NULL; memcpy( hashEntry->key, key, sizeOfKey(key) ); hashEntry->next = NULL; @@ -397,7 +397,7 @@ oldEntries = table->entries; newTableSz = 2 * oldTableSz; - newEntries = VMS_int__malloc( newTableSz * sizeof(HashEntry *) ); + newEntries = PR_int__malloc( newTableSz * sizeof(HashEntry *) ); table->tableSz = newTableSz; table->entries = newEntries; diff -r b398837ef4aa -r 18ec64d06e35 PrivateHash.h --- a/PrivateHash.h Tue Jun 26 03:09:05 2012 -0700 +++ b/PrivateHash.h Mon Sep 03 15:03:38 2012 -0700 @@ -13,8 +13,8 @@ #include #include -#include "VMS_impl/VMS_primitive_data_types.h" -#include "VMS_impl/Services_Offered_by_VMS/Memory_Handling/vmalloc.h" +#include "PR_impl/PR_primitive_data_types.h" +#include "PR_impl/Services_Offered_by_PR/Memory_Handling/vmalloc.h" //===================== defines ===================== #define TRUE 1 diff -r b398837ef4aa -r 18ec64d06e35 __brch__MC_shared --- a/__brch__MC_shared Tue Jun 26 03:09:05 2012 -0700 +++ b/__brch__MC_shared Mon Sep 03 15:03:38 2012 -0700 @@ -1,4 +1,4 @@ This branch is for the project structure defined Jan 2012.. the #includes reflect this directory structure. -More importantly, the MC_shared version of VMS requires a separat malloc implemeted by VMS code.. so this branch has modified the library to use the VMS-specific malloc. +More importantly, the MC_shared version of PR requires a separat malloc implemeted by PR code.. so this branch has modified the library to use the PR-specific malloc.