Mercurial > cgi-bin > hgwebdir.cgi > VMS > C_Libraries > Hash_impl
changeset 29:18ec64d06e35 Rename_VMS_to_PR
Renamed VMS to PR, in new branch
| author | Sean Halle <seanhalle@yahoo.com> |
|---|---|
| date | Mon, 03 Sep 2012 15:03:38 -0700 |
| parents | b398837ef4aa |
| children | 1244508aaae4 |
| files | PrivateHash.c PrivateHash.h __brch__MC_shared |
| diffstat | 3 files changed, 23 insertions(+), 23 deletions(-) [+] |
line diff
1.1 --- a/PrivateHash.c Tue Jun 26 03:09:05 2012 -0700 1.2 +++ b/PrivateHash.c Mon Sep 03 15:03:38 2012 -0700 1.3 @@ -12,11 +12,11 @@ 1.4 HashTable * 1.5 makeHashTable( int numHashSlots, FreeEntryContentFnPtr freeFn ) 1.6 { HashTable * retTable; 1.7 - retTable = VMS_int__malloc( sizeof( HashTable ) ); 1.8 + retTable = PR_int__malloc( sizeof( HashTable ) ); 1.9 1.10 retTable->freeEntryContentFn = freeFn; 1.11 1.12 - retTable->entries = VMS_int__malloc( numHashSlots * sizeof(HashEntry *) ); 1.13 + retTable->entries = PR_int__malloc( numHashSlots * sizeof(HashEntry *) ); 1.14 retTable->numEntries = 0; 1.15 retTable->tableSz = numHashSlots; 1.16 1.17 @@ -28,11 +28,11 @@ 1.18 HashTable * 1.19 makeHashTable_WL( int numHashSlots, FreeEntryContentFnPtr freeFn ) 1.20 { HashTable * retTable; 1.21 - retTable = VMS_WL__malloc( sizeof( HashTable ) ); 1.22 + retTable = PR_WL__malloc( sizeof( HashTable ) ); 1.23 1.24 retTable->freeEntryContentFn = freeFn; 1.25 1.26 - retTable->entries = VMS_int__malloc( numHashSlots * sizeof(HashEntry *) ); 1.27 + retTable->entries = PR_int__malloc( numHashSlots * sizeof(HashEntry *) ); 1.28 retTable->numEntries = 0; 1.29 retTable->tableSz = numHashSlots; 1.30 1.31 @@ -50,7 +50,7 @@ 1.32 oldEntries = table->entries; 1.33 1.34 newTableSz = 2 * oldTableSz; 1.35 - newEntries = VMS_int__malloc( newTableSz * sizeof(HashEntry *) ); 1.36 + newEntries = PR_int__malloc( newTableSz * sizeof(HashEntry *) ); 1.37 1.38 table->tableSz = newTableSz; 1.39 table->entries = newEntries; 1.40 @@ -97,10 +97,10 @@ 1.41 1.42 int32 len = strlen(key); 1.43 1.44 - hashEntry = (HashEntry*) VMS_int__malloc( sizeof( HashEntry ) ); 1.45 + hashEntry = (HashEntry*) PR_int__malloc( sizeof( HashEntry ) ); 1.46 if( hashEntry == NULL ) return NULL; 1.47 1.48 - hashEntry->key = VMS_int__malloc( len + 1 ); 1.49 + hashEntry->key = PR_int__malloc( len + 1 ); 1.50 if( hashEntry->key == NULL ) return NULL; 1.51 memcpy( hashEntry->key, key, len + 1 ); 1.52 hashEntry->next = NULL; 1.53 @@ -259,8 +259,8 @@ 1.54 { 1.55 if( entry->content != NULL ) 1.56 (*(table->freeEntryContentFn))( entry->content ); 1.57 - VMS_int__free( entry->key ); //was VMS_int__malloc'd above, so free it 1.58 - VMS_int__free( entry ); 1.59 + PR_int__free( entry->key ); //was PR_int__malloc'd above, so free it 1.60 + PR_int__free( entry ); 1.61 } 1.62 1.63 void 1.64 @@ -268,8 +268,8 @@ 1.65 { 1.66 if( entry->content != NULL ) 1.67 (*(table->freeEntryContentFn))( entry->content ); 1.68 - VMS_WL__free( entry->key ); //was VMS_int__malloc'd above, so free it 1.69 - VMS_WL__free( entry ); 1.70 + PR_WL__free( entry->key ); //was PR_int__malloc'd above, so free it 1.71 + PR_WL__free( entry ); 1.72 } 1.73 1.74 void 1.75 @@ -295,15 +295,15 @@ 1.76 void 1.77 freeHashEntryButNotContent( HashEntry *entry ) 1.78 { 1.79 - VMS_int__free( entry->key ); //was VMS_int__malloc'd above, so free it 1.80 - VMS_int__free( entry ); 1.81 + PR_int__free( entry->key ); //was PR_int__malloc'd above, so free it 1.82 + PR_int__free( entry ); 1.83 } 1.84 1.85 void 1.86 freeHashEntryButNotContent_WL( HashEntry *entry ) 1.87 { 1.88 - VMS_WL__free( entry->key ); //was VMS_int__malloc'd above, so free it 1.89 - VMS_WL__free( entry ); 1.90 + PR_WL__free( entry->key ); //was PR_int__malloc'd above, so free it 1.91 + PR_WL__free( entry ); 1.92 } 1.93 1.94 1.95 @@ -322,7 +322,7 @@ 1.96 { HashTable * retTable; 1.97 int32 numHashSlots; 1.98 1.99 - retTable = VMS_int__malloc( sizeof( HashTable ) ); 1.100 + retTable = PR_int__malloc( sizeof( HashTable ) ); 1.101 1.102 numHashSlots = 1 << powerOf2OfSz; 1.103 retTable->hashMask = 0xffffffff >> 32 - powerOf2OfSz; 1.104 @@ -330,7 +330,7 @@ 1.105 1.106 retTable->freeEntryContentFn = freeFn; 1.107 1.108 - retTable->entries = VMS_int__malloc( numHashSlots * sizeof(HashEntry *)); 1.109 + retTable->entries = PR_int__malloc( numHashSlots * sizeof(HashEntry *)); 1.110 retTable->numEntries = 0; 1.111 retTable->tableSz = numHashSlots; 1.112 1.113 @@ -349,9 +349,9 @@ 1.114 makeHashEntry32( uint32 * key ) 1.115 { HashEntry *hashEntry; 1.116 1.117 - hashEntry = (HashEntry*) VMS_int__malloc( sizeof( HashEntry ) ); 1.118 + hashEntry = (HashEntry*) PR_int__malloc( sizeof( HashEntry ) ); 1.119 if( hashEntry == NULL ) return NULL; 1.120 - hashEntry->key = VMS_int__malloc( sizeOfKey(key) ); 1.121 + hashEntry->key = PR_int__malloc( sizeOfKey(key) ); 1.122 if( hashEntry->key == NULL ) return NULL; 1.123 memcpy( hashEntry->key, key, sizeOfKey(key) ); 1.124 hashEntry->next = NULL; 1.125 @@ -397,7 +397,7 @@ 1.126 oldEntries = table->entries; 1.127 1.128 newTableSz = 2 * oldTableSz; 1.129 - newEntries = VMS_int__malloc( newTableSz * sizeof(HashEntry *) ); 1.130 + newEntries = PR_int__malloc( newTableSz * sizeof(HashEntry *) ); 1.131 1.132 table->tableSz = newTableSz; 1.133 table->entries = newEntries;
2.1 --- a/PrivateHash.h Tue Jun 26 03:09:05 2012 -0700 2.2 +++ b/PrivateHash.h Mon Sep 03 15:03:38 2012 -0700 2.3 @@ -13,8 +13,8 @@ 2.4 #include <errno.h> 2.5 #include <stdlib.h> 2.6 2.7 -#include "VMS_impl/VMS_primitive_data_types.h" 2.8 -#include "VMS_impl/Services_Offered_by_VMS/Memory_Handling/vmalloc.h" 2.9 +#include "PR_impl/PR_primitive_data_types.h" 2.10 +#include "PR_impl/Services_Offered_by_PR/Memory_Handling/vmalloc.h" 2.11 2.12 //===================== defines ===================== 2.13 #define TRUE 1
3.1 --- a/__brch__MC_shared Tue Jun 26 03:09:05 2012 -0700 3.2 +++ b/__brch__MC_shared Mon Sep 03 15:03:38 2012 -0700 3.3 @@ -1,4 +1,4 @@ 3.4 This branch is for the project structure defined Jan 2012.. the #includes reflect this directory structure. 3.5 3.6 -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. 3.7 +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. 3.8
