From 3e187dd129ac1697efe4b2dad3d01396ea403c69 Mon Sep 17 00:00:00 2001 From: sdixon Date: Thu, 25 Jan 2024 10:20:15 +0000 Subject: [PATCH] renaming struct api functions to include uda keyword e.g. udaAddMalloc() --- source/c_api/accAPI.cpp | 2 +- source/client/udaClient.cpp | 16 +- source/client2/handle.cpp | 4 +- source/clientserver/protocolXML.cpp | 28 +- source/clientserver/protocolXML2.cpp | 52 +- source/clientserver/protocolXML2Put.cpp | 118 ++-- source/clientserver/udaStructs.cpp | 4 +- source/clientserver/xdrlib.cpp | 14 +- source/plugins/help/help_plugin.cpp | 12 +- source/plugins/testplugin/testplugin.cpp | 640 +++++++++---------- source/plugins/testplugin/teststructs.cpp | 44 +- source/plugins/udaPlugin.cpp | 4 +- source/server/fatServer.cpp | 22 +- source/server/serverPlugin.cpp | 8 +- source/server/serverSubsetData.cpp | 8 +- source/server/udaLegacyServer.cpp | 4 +- source/server/udaServer.cpp | 24 +- source/server2/server.cpp | 16 +- source/server2/server_plugin.cpp | 8 +- source/server2/server_subset_data.cpp | 8 +- source/structures/accessors.cpp | 34 +- source/structures/parseIncludeFile.cpp | 22 +- source/structures/struct.cpp | 720 +++++++++++----------- source/structures/xdrUserDefinedData.cpp | 92 +-- source/wrappers/c++/main.cpp | 32 +- source/wrappers/c++/treenode.cpp | 136 ++-- source/wrappers/idl/idamStructs.c | 162 ++--- 27 files changed, 1117 insertions(+), 1117 deletions(-) diff --git a/source/c_api/accAPI.cpp b/source/c_api/accAPI.cpp index 87352771..3980083f 100644 --- a/source/c_api/accAPI.cpp +++ b/source/c_api/accAPI.cpp @@ -3900,7 +3900,7 @@ int udaSetDataTree(int handle) void* opaque_block = udaGetDataOpaqueBlock(handle); setUserDefinedTypeList(((GENERAL_BLOCK*)opaque_block)->userdefinedtypelist); setLogMallocList(((GENERAL_BLOCK*)opaque_block)->logmalloclist); - setLastMallocIndexValue(&(((GENERAL_BLOCK*)opaque_block)->lastMallocIndex)); + udaSetLastMallocIndexValue(&(((GENERAL_BLOCK*)opaque_block)->lastMallocIndex)); return 1; // Return TRUE } diff --git a/source/client/udaClient.cpp b/source/client/udaClient.cpp index 8f2c094c..2ff490aa 100644 --- a/source/client/udaClient.cpp +++ b/source/client/udaClient.cpp @@ -377,7 +377,7 @@ int idamClient(REQUEST_BLOCK* request_block, int* indices) #endif LOGSTRUCTLIST log_struct_list; - initLogStructList(&log_struct_list); + udaInitLogStructList(&log_struct_list); unsigned int* private_flags = udaPrivateFlags(); CLIENT_FLAGS* client_flags = udaClientFlags(); @@ -1256,15 +1256,15 @@ void udaFree(int handle) #ifndef FATCLIENT if (g_user_defined_type_list == general_block->userdefinedtypelist) { // Is this the current setting? - freeUserDefinedTypeList(g_user_defined_type_list); + udaFreeUserDefinedTypeList(g_user_defined_type_list); free(g_user_defined_type_list); g_user_defined_type_list = nullptr; } else { - freeUserDefinedTypeList(general_block->userdefinedtypelist); + udaFreeUserDefinedTypeList(general_block->userdefinedtypelist); free(general_block->userdefinedtypelist); } #else - freeUserDefinedTypeList(general_block->userdefinedtypelist); + udaFreeUserDefinedTypeList(general_block->userdefinedtypelist); free(general_block->userdefinedtypelist); #endif } @@ -1272,22 +1272,22 @@ void udaFree(int handle) if (general_block->logmalloclist != nullptr) { #ifndef FATCLIENT if (g_log_malloc_list == general_block->logmalloclist) { - freeMallocLogList(g_log_malloc_list); + udaFreeMallocLogList(g_log_malloc_list); free(g_log_malloc_list); g_log_malloc_list = nullptr; } else { - freeMallocLogList(general_block->logmalloclist); + udaFreeMallocLogList(general_block->logmalloclist); free(general_block->logmalloclist); } #else - freeMallocLogList(general_block->logmalloclist); + udaFreeMallocLogList(general_block->logmalloclist); free(general_block->logmalloclist); #endif } #ifndef FATCLIENT if (general_block->userdefinedtype != nullptr) { - freeUserDefinedType(general_block->userdefinedtype); + udaFreeUserDefinedType(general_block->userdefinedtype); free(general_block->userdefinedtype); } diff --git a/source/client2/handle.cpp b/source/client2/handle.cpp index f4045c51..ffa51eba 100644 --- a/source/client2/handle.cpp +++ b/source/client2/handle.cpp @@ -40,12 +40,12 @@ void uda::client::free_handle(int handle) auto general_block = (GENERAL_BLOCK*)data_block->opaque_block; if (general_block->userdefinedtypelist != nullptr) { - freeUserDefinedTypeList(general_block->userdefinedtypelist); + udaFreeUserDefinedTypeList(general_block->userdefinedtypelist); free(general_block->userdefinedtypelist); } if (general_block->logmalloclist != nullptr) { - freeMallocLogList(general_block->logmalloclist); + udaFreeMallocLogList(general_block->logmalloclist); free(general_block->logmalloclist); } } diff --git a/source/clientserver/protocolXML.cpp b/source/clientserver/protocolXML.cpp index 7cb0ade8..4732a9db 100644 --- a/source/clientserver/protocolXML.cpp +++ b/source/clientserver/protocolXML.cpp @@ -151,7 +151,7 @@ int protocolXML(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLOC if (udt == nullptr || u == nullptr) { err = 999; UDA_LOG(UDA_LOG_DEBUG, "protocolXML: nullptr SARRAY User defined data Structure Definition\n"); - printUserDefinedTypeListTable(*userdefinedtypelist); + udaPrintUserDefinedTypeListTable(*userdefinedtypelist); udaAddError(UDA_CODE_ERROR_TYPE, "protocolXML", err, "nullptr User defined data Structure Definition"); break; @@ -159,14 +159,14 @@ int protocolXML(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLOC UDA_LOG(UDA_LOG_DEBUG, "protocolXML: Creating SARRAY carrier structure\n"); - initSArray(&sarray); + udaInitSArray(&sarray); sarray.count = data_block->data_n; // Number of this structure sarray.rank = 1; // Array Data Rank? sarray.shape = &shape; // Only if rank > 1? sarray.data = (void*)data_block->data; // Pointer to the data to be passed strcpy(sarray.type, udt->name); // The name of the type data = (void*)&psarray; // Pointer to the SARRAY array pointer - addNonMalloc(logmalloclist, (void*)&shape, 1, sizeof(int), "int"); + udaAddNonMalloc(logmalloclist, (void*)&shape, 1, sizeof(int), "int"); UDA_LOG(UDA_LOG_DEBUG, "protocolXML: sending Structure Definitions\n"); @@ -240,7 +240,7 @@ int protocolXML(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLOC UDA_LOG(UDA_LOG_DEBUG, "protocolXML: Structure Definitions sent: rc = %d\n", rc); // send the Data - rc = rc && xdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, u, (void**)data, + rc = rc && udaXdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, u, (void**)data, protocolVersion, xdr_stdio_flag, log_struct_list, malloc_source); UDA_LOG(UDA_LOG_DEBUG, "protocolXML: Data sent: rc = %d\n", rc); @@ -377,12 +377,12 @@ int protocolXML(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLOC if (option == 1 || option == 2) { logmalloclist = (LOGMALLOCLIST*)malloc(sizeof(LOGMALLOCLIST)); - initLogMallocList(logmalloclist); + udaInitLogMallocList(logmalloclist); userdefinedtypelist = (USERDEFINEDTYPELIST*)malloc(sizeof(USERDEFINEDTYPELIST)); auto udt_received = (USERDEFINEDTYPE*)malloc(sizeof(USERDEFINEDTYPE)); - initUserDefinedTypeList(userdefinedtypelist); + udaInitUserDefinedTypeList(userdefinedtypelist); UDA_LOG(UDA_LOG_DEBUG, "protocolXML: xdr_userdefinedtypelist #A\n"); @@ -439,14 +439,14 @@ int protocolXML(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLOC "Failure receiving Structure Definitions"); break; } - UDA_LOG(UDA_LOG_DEBUG, "protocolXML: xdrUserDefinedTypeData #A\n"); - initUserDefinedType(udt_received); + UDA_LOG(UDA_LOG_DEBUG, "protocolXML: udaXdrUserDefinedTypeData #A\n"); + udaInitUserDefinedType(udt_received); - rc = rc && xdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, udt_received, &data, + rc = rc && udaXdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, udt_received, &data, protocolVersion, xdr_stdio_flag, log_struct_list, malloc_source); // receive the Data - UDA_LOG(UDA_LOG_DEBUG, "protocolXML: xdrUserDefinedTypeData #B\n"); + UDA_LOG(UDA_LOG_DEBUG, "protocolXML: udaXdrUserDefinedTypeData #B\n"); if (!rc) { err = 999; udaAddError(UDA_CODE_ERROR_TYPE, "protocolXML", err, @@ -567,12 +567,12 @@ int protocolXML(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLOC // Unpack the data Structures logmalloclist = (LOGMALLOCLIST*)malloc(sizeof(LOGMALLOCLIST)); - initLogMallocList(logmalloclist); + udaInitLogMallocList(logmalloclist); userdefinedtypelist = (USERDEFINEDTYPELIST*)malloc(sizeof(USERDEFINEDTYPELIST)); auto udt_received = (USERDEFINEDTYPE*)malloc(sizeof(USERDEFINEDTYPE)); - initUserDefinedTypeList(userdefinedtypelist); + udaInitUserDefinedTypeList(userdefinedtypelist); // Create input xdr file stream @@ -598,9 +598,9 @@ int protocolXML(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLOC break; } - initUserDefinedType(udt_received); + udaInitUserDefinedType(udt_received); - rc = rc && xdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, udt_received, + rc = rc && udaXdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, udt_received, &data, protocolVersion, xdr_stdio_flag, log_struct_list, malloc_source); // receive the Data diff --git a/source/clientserver/protocolXML2.cpp b/source/clientserver/protocolXML2.cpp index b7fb67d1..bb90bfd3 100644 --- a/source/clientserver/protocolXML2.cpp +++ b/source/clientserver/protocolXML2.cpp @@ -176,7 +176,7 @@ int protocolXML2(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLO if (udt == nullptr || u == nullptr) { err = 999; UDA_LOG(UDA_LOG_DEBUG, "nullptr SARRAY User defined data Structure Definition\n"); - printUserDefinedTypeListTable(*userdefinedtypelist); + udaPrintUserDefinedTypeListTable(*userdefinedtypelist); udaAddError(UDA_CODE_ERROR_TYPE, "protocolXML", err, "nullptr User defined data Structure Definition"); break; @@ -184,14 +184,14 @@ int protocolXML2(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLO UDA_LOG(UDA_LOG_DEBUG, "Creating SARRAY carrier structure\n"); - initSArray(&sarray); + udaInitSArray(&sarray); sarray.count = data_block->data_n; // Number of this structure sarray.rank = 1; // Array Data Rank? sarray.shape = &shape; // Only if rank > 1? sarray.data = (void*)data_block->data; // Pointer to the data to be passed strcpy(sarray.type, udt->name); // The name of the type data = (void*)&psarray; // Pointer to the SARRAY array pointer - addNonMalloc(logmalloclist, (void*)&shape, 1, sizeof(int), "int"); + udaAddNonMalloc(logmalloclist, (void*)&shape, 1, sizeof(int), "int"); UDA_LOG(UDA_LOG_DEBUG, "sending Structure Definitions\n"); @@ -326,7 +326,7 @@ int protocolXML2(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLO break; } - rc = rc && xdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, u, (void**)data, + rc = rc && udaXdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, u, (void**)data, protocolVersion, xdr_stdio_flag, log_struct_list, malloc_source); // send the Data @@ -602,12 +602,12 @@ int protocolXML2(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLO // Unpack data structures if (option == 1 || option == 2 || option == 5) { logmalloclist = (LOGMALLOCLIST*)malloc(sizeof(LOGMALLOCLIST)); - initLogMallocList(logmalloclist); + udaInitLogMallocList(logmalloclist); userdefinedtypelist = (USERDEFINEDTYPELIST*)malloc(sizeof(USERDEFINEDTYPELIST)); auto udt_received = (USERDEFINEDTYPE*)malloc(sizeof(USERDEFINEDTYPE)); - initUserDefinedTypeList(userdefinedtypelist); + udaInitUserDefinedTypeList(userdefinedtypelist); UDA_LOG(UDA_LOG_DEBUG, "xdr_userdefinedtypelist #A\n"); @@ -707,14 +707,14 @@ int protocolXML2(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLO break; } - UDA_LOG(UDA_LOG_DEBUG, "xdrUserDefinedTypeData #A\n"); - initUserDefinedType(udt_received); + UDA_LOG(UDA_LOG_DEBUG, "udaXdrUserDefinedTypeData #A\n"); + udaInitUserDefinedType(udt_received); - rc = rc && xdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, udt_received, &data, + rc = rc && udaXdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, udt_received, &data, protocolVersion, xdr_stdio_flag, log_struct_list, malloc_source); // receive the Data - UDA_LOG(UDA_LOG_DEBUG, "xdrUserDefinedTypeData #B\n"); + UDA_LOG(UDA_LOG_DEBUG, "udaXdrUserDefinedTypeData #B\n"); if (!rc) { err = 999; udaAddError(UDA_CODE_ERROR_TYPE, "protocolXML", err, @@ -874,12 +874,12 @@ int protocolXML2(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLO // Unpack the data Structures logmalloclist = (LOGMALLOCLIST*)malloc(sizeof(LOGMALLOCLIST)); - initLogMallocList(logmalloclist); + udaInitLogMallocList(logmalloclist); userdefinedtypelist = (USERDEFINEDTYPELIST*)malloc(sizeof(USERDEFINEDTYPELIST)); USERDEFINEDTYPE* udt_received = (USERDEFINEDTYPE*)malloc(sizeof(USERDEFINEDTYPE)); - initUserDefinedTypeList(userdefinedtypelist); + udaInitUserDefinedTypeList(userdefinedtypelist); // Close current input xdr stream and create a memory stream @@ -902,9 +902,9 @@ int protocolXML2(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLO break; } - initUserDefinedType(udt_received); + udaInitUserDefinedType(udt_received); - rc = rc && xdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, udt_received, + rc = rc && udaXdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, udt_received, &data, protocolVersion, xdr_stdio_flag, log_struct_list, malloc_source); // receive the Data @@ -1002,12 +1002,12 @@ int protocolXML2(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLO // Unpack the data Structures logmalloclist = (LOGMALLOCLIST*)malloc(sizeof(LOGMALLOCLIST)); - initLogMallocList(logmalloclist); + udaInitLogMallocList(logmalloclist); userdefinedtypelist = (USERDEFINEDTYPELIST*)malloc(sizeof(USERDEFINEDTYPELIST)); USERDEFINEDTYPE* udt_received = (USERDEFINEDTYPE*)malloc(sizeof(USERDEFINEDTYPE)); - initUserDefinedTypeList(userdefinedtypelist); + udaInitUserDefinedTypeList(userdefinedtypelist); // Create input xdr file stream @@ -1037,9 +1037,9 @@ int protocolXML2(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLO break; } - initUserDefinedType(udt_received); + udaInitUserDefinedType(udt_received); - rc = rc && xdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, udt_received, + rc = rc && udaXdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, udt_received, &data, protocolVersion, xdr_stdio_flag, log_struct_list, malloc_source); // receive the Data @@ -1189,12 +1189,12 @@ int unpackXDRFile(LOGMALLOCLIST* logmalloclist, XDR* xdrs, unsigned char* filena // Unpack the data Structures logmalloclist = (LOGMALLOCLIST*)malloc(sizeof(LOGMALLOCLIST)); - initLogMallocList(logmalloclist); + udaInitLogMallocList(logmalloclist); auto userdefinedtypelist = (USERDEFINEDTYPELIST*)malloc(sizeof(USERDEFINEDTYPELIST)); auto udt_received = (USERDEFINEDTYPE*)malloc(sizeof(USERDEFINEDTYPE)); - initUserDefinedTypeList(userdefinedtypelist); + udaInitUserDefinedTypeList(userdefinedtypelist); // Close current input xdr stream and create a file stream @@ -1227,9 +1227,9 @@ int unpackXDRFile(LOGMALLOCLIST* logmalloclist, XDR* xdrs, unsigned char* filena // Unpack the Data - initUserDefinedType(udt_received); + udaInitUserDefinedType(udt_received); - rc = rc && xdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, udt_received, &data, + rc = rc && udaXdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, udt_received, &data, protocolVersion, xdr_stdio_flag, log_struct_list, malloc_source); if (!rc) { @@ -1305,12 +1305,12 @@ int unpackXDRObject(LOGMALLOCLIST* logmalloclist, XDR* xdrs, unsigned char* obje // Unpack the data Structures logmalloclist = (LOGMALLOCLIST*)malloc(sizeof(LOGMALLOCLIST)); - initLogMallocList(logmalloclist); + udaInitLogMallocList(logmalloclist); auto userdefinedtypelist = (USERDEFINEDTYPELIST*)malloc(sizeof(USERDEFINEDTYPELIST)); auto udt_received = (USERDEFINEDTYPE*)malloc(sizeof(USERDEFINEDTYPE)); - initUserDefinedTypeList(userdefinedtypelist); + udaInitUserDefinedTypeList(userdefinedtypelist); // Create a memory stream @@ -1337,9 +1337,9 @@ int unpackXDRObject(LOGMALLOCLIST* logmalloclist, XDR* xdrs, unsigned char* obje // Unpack the Data - initUserDefinedType(udt_received); + udaInitUserDefinedType(udt_received); - rc = rc && xdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, udt_received, &data, + rc = rc && udaXdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, udt_received, &data, protocolVersion, xdr_stdio_flag, log_struct_list, malloc_source); if (!rc) { diff --git a/source/clientserver/protocolXML2Put.cpp b/source/clientserver/protocolXML2Put.cpp index 7d1bf322..a9f57070 100644 --- a/source/clientserver/protocolXML2Put.cpp +++ b/source/clientserver/protocolXML2Put.cpp @@ -87,21 +87,21 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST if (index == 0 && datacount > 0) { *data = malloc(datacount * userdefinedtype->size); if (structRank > 1 && structShape != nullptr) { - addMalloc2(logmalloclist, *data, datacount, userdefinedtype->size, userdefinedtype->name, structRank, + udaAddMalloc2(logmalloclist, *data, datacount, userdefinedtype->size, userdefinedtype->name, structRank, structShape); } else { - addMalloc(logmalloclist, *data, datacount, userdefinedtype->size, userdefinedtype->name); + udaAddMalloc(logmalloclist, *data, datacount, userdefinedtype->size, userdefinedtype->name); } structRank = 0; } newNTree = (NTREE*)malloc(sizeof(NTREE)); // this is the parent node for the received structure // dgm 15Nov2011 - addMalloc(logmalloclist, (void*)newNTree, 1, sizeof(NTREE), "NTREE"); + udaAddMalloc(logmalloclist, (void*)newNTree, 1, sizeof(NTREE), "NTREE"); *NTree = newNTree; // Return the new tree node address - initNTree(newNTree); + udaInitNTree(newNTree); newNTree->data = nullptr; newNTree->userdefinedtype = userdefinedtype; // preserve Pairing of data and data type } @@ -159,7 +159,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST shape = nullptr; } d = (char*)malloc(count * sizeof(float)); - addMalloc2(logmalloclist, (void*)d, count, sizeof(float), "float", rank, shape); + udaAddMalloc2(logmalloclist, (void*)d, count, sizeof(float), "float", rank, shape); *p = (VOIDTYPE)d; } else { break; @@ -175,14 +175,14 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST break; } - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); // Assume 0 means No Pointer data to send! // Allocation of pointer data within SOAP is problematic. // Data malloc'd within SOAP are typed "unknown". // Generally, pointer class data are preceded within the data binding structures with integer // elements named __size followed by the name of the element. The value stored by this element - // is the equivalent of the count parameter required from findMalloc. + // is the equivalent of the count parameter required from udaFindMalloc. // // Other data creators, e.g., XML DOM, also have types "unknown" // In these cases, a best guess is made to the type and count based on expectations and the heap @@ -256,7 +256,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST shape = nullptr; } d = (char*)malloc(count * sizeof(double)); - addMalloc2(logmalloclist, (void*)d, count, sizeof(double), "double", rank, shape); + udaAddMalloc2(logmalloclist, (void*)d, count, sizeof(double), "double", rank, shape); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { break; @@ -269,7 +269,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST break; } - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); // Assume count of 0 means No Pointer data to send! if (type != nullptr && STR_EQUALS(type, "unknown")) { @@ -342,7 +342,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST shape = nullptr; } d = (char*)malloc(count * sizeof(short)); - addMalloc2(logmalloclist, (void*)d, count, sizeof(short), "short", rank, shape); + udaAddMalloc2(logmalloclist, (void*)d, count, sizeof(short), "short", rank, shape); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { break; @@ -354,7 +354,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST rc = rc && xdr_int(xdrs, &count); // No data to send break; } - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); // Assume count of 0 means No Pointer data to send! if (type != nullptr && STR_EQUALS(type, "unknown")) { @@ -425,7 +425,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST shape = nullptr; } d = (char*)malloc(count * sizeof(unsigned short)); - addMalloc2(logmalloclist, (void*)d, count, sizeof(unsigned short), "unsigned short", rank, + udaAddMalloc2(logmalloclist, (void*)d, count, sizeof(unsigned short), "unsigned short", rank, shape); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { @@ -438,7 +438,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST rc = rc && xdr_int(xdrs, &count); // No data to send break; } - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); // Assume count of 0 means No Pointer data to send! if (type != nullptr && STR_EQUALS(type, "unknown")) { @@ -511,7 +511,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST shape = nullptr; } d = (char*)malloc(count * sizeof(int)); - addMalloc2(logmalloclist, (void*)d, count, sizeof(int), "int", rank, shape); + udaAddMalloc2(logmalloclist, (void*)d, count, sizeof(int), "int", rank, shape); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { break; @@ -523,7 +523,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST rc = rc && xdr_int(xdrs, &count); // No data to send break; } - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); // Assume count of 0 means No Pointer data to send! if (type != nullptr && STR_EQUALS(type, "unknown")) { @@ -595,7 +595,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST shape = nullptr; } d = (char*)malloc(count * sizeof(unsigned int)); - addMalloc2(logmalloclist, (void*)d, count, sizeof(unsigned int), "unsigned int", rank, + udaAddMalloc2(logmalloclist, (void*)d, count, sizeof(unsigned int), "unsigned int", rank, shape); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { @@ -608,7 +608,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST rc = rc && xdr_int(xdrs, &count); // No data to send break; } - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); // Assume count of 0 means No Pointer data to send! if (type != nullptr && STR_EQUALS(type, "unknown")) { @@ -677,7 +677,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST shape = nullptr; } d = (char*)malloc(count * sizeof(long long)); - addMalloc2(logmalloclist, (void*)d, count, sizeof(long long), "long long", rank, shape); + udaAddMalloc2(logmalloclist, (void*)d, count, sizeof(long long), "long long", rank, shape); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { break; @@ -689,7 +689,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST rc = rc && xdr_int(xdrs, &count); // No data to send break; } - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); // Assume count of 0 means No Pointer data to send! if (type != nullptr && STR_EQUALS(type, "unknown")) { @@ -759,7 +759,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST shape = nullptr; } d = (char*)malloc(count * sizeof(unsigned long long)); - addMalloc2(logmalloclist, (void*)d, count, sizeof(unsigned long long), "unsigned long long", + udaAddMalloc2(logmalloclist, (void*)d, count, sizeof(unsigned long long), "unsigned long long", rank, shape); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { @@ -772,7 +772,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST rc = rc && xdr_int(xdrs, &count); // No data to send break; } - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); // Assume count of 0 means No Pointer data to send! if (type != nullptr && STR_EQUALS(type, "unknown")) { @@ -846,7 +846,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST shape = nullptr; } d = (char*)malloc(count * sizeof(char)); - addMalloc2(logmalloclist, (void*)d, count, sizeof(char), "char", rank, shape); + udaAddMalloc2(logmalloclist, (void*)d, count, sizeof(char), "char", rank, shape); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { break; @@ -858,7 +858,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST rc = rc && xdr_int(xdrs, &count); // No data to send break; } - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); // Assume count of 0 means No Pointer data to send! if (type != nullptr && STR_EQUALS(type, "unknown")) { @@ -960,7 +960,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST &count); // Count is known from the client's malloc log and passed by the sender if (count > 0) { d = (char*)malloc(count * sizeof(char)); - addMalloc(logmalloclist, (void*)d, count, sizeof(char), "STRING"); + udaAddMalloc(logmalloclist, (void*)d, count, sizeof(char), "STRING"); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { break; @@ -979,7 +979,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST break; } - findMalloc(logmalloclist, (void*)p, &count, &size, + udaFindMalloc(logmalloclist, (void*)p, &count, &size, &type); // Assume 0 means No Pointer data to send! if (malloc_source == UDA_MALLOC_SOURCE_DOM && (count == 0 || size == 0) && d != nullptr) { @@ -1049,12 +1049,12 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST rc = rc && xdr_int(xdrs, &nstr); // Number of strings if (nstr > 0) { char** str = (char**)malloc(nstr * sizeof(char*)); - addMalloc(logmalloclist, (void*)str, nstr, sizeof(char*), "STRING *"); + udaAddMalloc(logmalloclist, (void*)str, nstr, sizeof(char*), "STRING *"); for (istr = 0; istr < nstr; istr++) { rc = rc && xdr_int(xdrs, &count); if (count > 0) { d = (char*)malloc(count * sizeof(char)); - addMalloc(logmalloclist, (void*)d, count, sizeof(char), "char"); + udaAddMalloc(logmalloclist, (void*)d, count, sizeof(char), "char"); rc = rc && WrapXDRString(xdrs, d, count); str[istr] = d; } @@ -1079,12 +1079,12 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST } strarr = (char**)malloc(nstr * sizeof(char*)); // nstr is the length of the array, not the strings - addMalloc2(logmalloclist, (void*)strarr, nstr, sizeof(char*), "STRING", rank, shape); + udaAddMalloc2(logmalloclist, (void*)strarr, nstr, sizeof(char*), "STRING", rank, shape); *p = (VOIDTYPE)strarr; // Save pointer: First String will be written here for (istr = 0; istr < nstr; istr++) { // Receive individual String lengths, then the string rc = rc && xdr_int(xdrs, &count); strarr[istr] = (char*)malloc(count * sizeof(char)); - addMalloc(logmalloclist, (void*)strarr[istr], count, sizeof(char), "STRING"); + udaAddMalloc(logmalloclist, (void*)strarr[istr], count, sizeof(char), "STRING"); rc = rc && WrapXDRString(xdrs, strarr[istr], count); if (rank == 0 && nstr == 1) { *p = (VOIDTYPE)strarr[0]; @@ -1097,11 +1097,11 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST if (STR_EQUALS(userdefinedtype->compoundfield[j].type, "STRING *")) { char** str = (char**)*p; - findMalloc(logmalloclist, (void*)&str, &nstr, &size, &type); + udaFindMalloc(logmalloclist, (void*)&str, &nstr, &size, &type); rc = rc && xdr_int(xdrs, &nstr); // Number of strings if (nstr > 0) { for (istr = 0; istr < nstr; istr++) { - findMalloc(logmalloclist, (void*)&str[istr], &count, &size, &type); + udaFindMalloc(logmalloclist, (void*)&str[istr], &count, &size, &type); rc = rc && xdr_int(xdrs, &count); if (count > 0) { d = str[istr]; @@ -1119,7 +1119,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST break; } - findMalloc2(logmalloclist, (void*)p, &nstr, &size, &type, &rank, + udaFindMalloc2(logmalloclist, (void*)p, &nstr, &size, &type, &rank, &shape); // Assume 0 means No Pointer data to send! // or heap allocated in external library! @@ -1175,12 +1175,12 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST rc = rc && xdr_int(xdrs, &count); // Arbitrary String length if (count > 0) { d = (char*)malloc(count * sizeof(char)); - addMalloc(logmalloclist, (void*)d, count, sizeof(char), "STRING"); + udaAddMalloc(logmalloclist, (void*)d, count, sizeof(char), "STRING"); rc = rc && WrapXDRString(xdrs, d, count); str[istr] = d; } // Save pointer: data will be written here } else { - findMalloc(logmalloclist, (void*)&str[istr], &count, &size, &type); + udaFindMalloc(logmalloclist, (void*)&str[istr], &count, &size, &type); rc = rc && xdr_int(xdrs, &count); if (count > 0) { d = (char*)str[istr]; @@ -1210,7 +1210,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST &count); // Count is known from the client's malloc log and passed by the sender if (count > 0) { d = (char*)malloc(count * sizeof(char)); - addMalloc(logmalloclist, (void*)d, count, sizeof(char), "STRING"); + udaAddMalloc(logmalloclist, (void*)d, count, sizeof(char), "STRING"); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { break; @@ -1222,7 +1222,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST rc = rc && xdr_int(xdrs, &count); // No data to send break; } - findMalloc(logmalloclist, (void*)p, &count, &size, + udaFindMalloc(logmalloclist, (void*)p, &count, &size, &type); // Assume 0 means No string to send! if (count == 1 && STR_EQUALS(type, "unknown")) { // ***** Fix for SOAP sources incomplete! count = size; @@ -1256,7 +1256,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST if (userdefinedtype->compoundfield[j].pointer) { if (xdrs->x_op != XDR_DECODE) { - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &structRank, &structShape); + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &structRank, &structShape); // Interpret an 'unknown' void data type using knowledge of the gSOAP or DOM systems @@ -1340,7 +1340,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST // Non Pointer types: Heap already allocated (pass 0 count to xdrUserDefinedData) // Size and Type also known. Type cannot be 'void'. - addNonMalloc(logmalloclist, (void*)p, userdefinedtype->compoundfield[j].count, + udaAddNonMalloc(logmalloclist, (void*)p, userdefinedtype->compoundfield[j].count, userdefinedtype->compoundfield[j].size, userdefinedtype->compoundfield[j].type); loopcount = userdefinedtype->compoundfield[j].count; @@ -1389,7 +1389,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST char* stype; void* heap; heap = p; - id = findStructId(heap, &stype, log_struct_list); + id = udaFindStructId(heap, &stype, log_struct_list); } if (id == 0) { // Only send/receive new structures @@ -1417,7 +1417,7 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST if (newNTree->children == nullptr && newNTree->branches == 0) { newNTree->children = (NTREE**)malloc(loopcount * sizeof(NTREE*)); // Allocate the node array - addMalloc(logmalloclist, (void*)newNTree->children, loopcount, sizeof(NTREE*), + udaAddMalloc(logmalloclist, (void*)newNTree->children, loopcount, sizeof(NTREE*), "NTREE *"); } else { // Multiple branches (user types) originating in the same node auto old = (VOIDTYPE)newNTree->children; @@ -1425,11 +1425,11 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST (void*)old, (newNTree->branches + loopcount) * sizeof(NTREE*)); // Individual node addresses remain valid - changeMalloc(logmalloclist, old, (void*)newNTree->children, + udaChangeMalloc(logmalloclist, old, (void*)newNTree->children, newNTree->branches + loopcount, sizeof(NTREE*), "NTREE *"); } } - addNTree(newNTree, subNTree); // Only first call creates new tree node + udaAddNTree(newNTree, subNTree); // Only first call creates new tree node } } } @@ -1439,9 +1439,9 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST // Must be a voided atomic type - if (gettypeof(type) != UDA_TYPE_UNKNOWN) { + if (udaGettypeof(type) != UDA_TYPE_UNKNOWN) { char* z = (char*)*p; - rc = rc && xdrAtomicData(logmalloclist, xdrs, type, count, size, &z); // Must be an Atomic Type + rc = rc && udaXdrAtomicData(logmalloclist, xdrs, type, count, size, &z); // Must be an Atomic Type *p = (VOIDTYPE)z; break; } else { @@ -1470,13 +1470,13 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST // Send/Receive Array of Structures -int xdrUserDefinedTypeDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFINEDTYPELIST* userdefinedtypelist, +int udaXdrUserDefinedTypeDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFINEDTYPELIST* userdefinedtypelist, USERDEFINEDTYPE* userdefinedtype, void** data, int protocolVersion, LOGSTRUCTLIST* log_struct_list, int malloc_source) { int rc = 1; - initLogStructList(log_struct_list); // Initialise Linked List Structure Log + udaInitLogStructList(log_struct_list); // Initialise Linked List Structure Log if (xdrs->x_op == XDR_DECODE) { @@ -1493,7 +1493,7 @@ int xdrUserDefinedTypeDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFIN } else { if (userdefinedtype == nullptr) { - udaAddError(UDA_CODE_ERROR_TYPE, "xdrUserDefinedTypeData", 999, + udaAddError(UDA_CODE_ERROR_TYPE, "udaXdrUserDefinedTypeData", 999, "No User Defined Type passed - cannot send!"); return 0; } @@ -1509,7 +1509,7 @@ int xdrUserDefinedTypeDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFIN */ } - freeLogStructList(log_struct_list); // Free Linked List Structure Log heap + udaFreeLogStructList(log_struct_list); // Free Linked List Structure Log heap return rc; } @@ -1532,7 +1532,7 @@ bool_t xdr_userdefinedtypelistPut(XDR* xdrs, USERDEFINEDTYPELIST* str) if (xdrs->x_op == XDR_DECODE) { // Receiving array so allocate Heap for it then initialise str->userdefinedtype = (USERDEFINEDTYPE*)malloc(str->listCount * sizeof(USERDEFINEDTYPE)); for (int i = 0; i < str->listCount; i++) { - initUserDefinedType(&str->userdefinedtype[i]); + udaInitUserDefinedType(&str->userdefinedtype[i]); } } @@ -1580,7 +1580,7 @@ int protocolXML2Put(XDR* xdrs, int protocol_id, int direction, int* token, LOGMA if (udt == nullptr || u == nullptr) { err = 999; UDA_LOG(UDA_LOG_DEBUG, "nullptr SARRAY User defined data Structure Definition\n"); - printUserDefinedTypeListTable(*userdefinedtypelist); + udaPrintUserDefinedTypeListTable(*userdefinedtypelist); udaAddError(UDA_CODE_ERROR_TYPE, "protocolXML2Put", err, "nullptr User defined data Structure Definition"); break; @@ -1588,14 +1588,14 @@ int protocolXML2Put(XDR* xdrs, int protocol_id, int direction, int* token, LOGMA UDA_LOG(UDA_LOG_DEBUG, "Creating SARRAY carrier structure to Send\n"); - initSArray(&sarray); + udaInitSArray(&sarray); sarray.count = data_block->data_n; // Number of this structure sarray.rank = 1; // Array Data Rank? sarray.shape = &shape; // Only if rank > 1? sarray.data = (void*)data_block->data; // Pointer to the data to be passed strcpy(sarray.type, udt->name); // The name of the type data = (void*)&psarray; // Pointer to the SARRAY array pointer - addNonMalloc(logmalloclist, (void*)&shape, 1, sizeof(int), "int"); + udaAddNonMalloc(logmalloclist, (void*)&shape, 1, sizeof(int), "int"); rc = 1; @@ -1613,7 +1613,7 @@ int protocolXML2Put(XDR* xdrs, int protocol_id, int direction, int* token, LOGMA UDA_LOG(UDA_LOG_DEBUG, "Structure Definitions sent: rc = %d\n", rc); - rc = rc && xdrUserDefinedTypeDataPut(xdrs, logmalloclist, userdefinedtypelist, u, (void**)data, + rc = rc && udaXdrUserDefinedTypeDataPut(xdrs, logmalloclist, userdefinedtypelist, u, (void**)data, protocolVersion, log_struct_list, malloc_source); // send the Data @@ -1657,12 +1657,12 @@ int protocolXML2Put(XDR* xdrs, int protocol_id, int direction, int* token, LOGMA if (option == 1) { logmalloclist = (LOGMALLOCLIST*)malloc(sizeof(LOGMALLOCLIST)); - initLogMallocList(logmalloclist); + udaInitLogMallocList(logmalloclist); userdefinedtypelist = (USERDEFINEDTYPELIST*)malloc(sizeof(USERDEFINEDTYPELIST)); auto udt_received = (USERDEFINEDTYPE*)malloc(sizeof(USERDEFINEDTYPE)); - initUserDefinedTypeList(userdefinedtypelist); + udaInitUserDefinedTypeList(userdefinedtypelist); rc = rc && xdr_userdefinedtypelistPut( xdrs, @@ -1677,14 +1677,14 @@ int protocolXML2Put(XDR* xdrs, int protocol_id, int direction, int* token, LOGMA break; } - initUserDefinedType(udt_received); + udaInitUserDefinedType(udt_received); - rc = rc && xdrUserDefinedTypeDataPut(xdrs, logmalloclist, userdefinedtypelist, udt_received, + rc = rc && udaXdrUserDefinedTypeDataPut(xdrs, logmalloclist, userdefinedtypelist, udt_received, &data, protocolVersion, log_struct_list, malloc_source); // receive the Data - // rc = rc && xdrUserDefinedTypeData(xdrs, udt_received, &data); // receive the Data + // rc = rc && udaXdrUserDefinedTypeData(xdrs, udt_received, &data); // receive the Data - UDA_LOG(UDA_LOG_DEBUG, "xdrUserDefinedTypeData received\n"); + UDA_LOG(UDA_LOG_DEBUG, "udaXdrUserDefinedTypeData received\n"); if (!rc) { err = 999; diff --git a/source/clientserver/udaStructs.cpp b/source/clientserver/udaStructs.cpp index 255ddee2..07a7ea49 100644 --- a/source/clientserver/udaStructs.cpp +++ b/source/clientserver/udaStructs.cpp @@ -63,7 +63,7 @@ void freeDataBlock(DATA_BLOCK* data_block) case UDA_OPAQUE_TYPE_STRUCTURES: { if (data_block->opaque_block != nullptr) { // if (logmalloclist != nullptr) { - // freeMallocLogList(logmalloclist); + // udaFreeMallocLogList(logmalloclist); // free(logmalloclist); // logmalloclist = nullptr; // } @@ -220,7 +220,7 @@ void freeReducedDataBlock(DATA_BLOCK* data_block) } // if(logmalloclist != nullptr) { - // freeMallocLogList(logmalloclist); + // udaFreeMallocLogList(logmalloclist); // free((void *)logmalloclist); // logmalloclist = nullptr; // } diff --git a/source/clientserver/xdrlib.cpp b/source/clientserver/xdrlib.cpp index 1bd594fb..e76e96db 100644 --- a/source/clientserver/xdrlib.cpp +++ b/source/clientserver/xdrlib.cpp @@ -455,14 +455,14 @@ bool_t xdr_serialise_object(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFINED return 0; } - initSArray(&sarray); + udaInitSArray(&sarray); sarray.count = str->data_n; // Number of this structure sarray.rank = 1; // Array Data Rank? sarray.shape = &shape; // Only if rank > 1? sarray.data = (void*)str->data; // Pointer to the data to be passed strcpy(sarray.type, udt->name); // The name of the type data = (void*)&psarray; // Pointer to the SARRAY array pointer - addNonMalloc(logmalloclist, (void*)&shape, 1, sizeof(int), "int"); + udaAddNonMalloc(logmalloclist, (void*)&shape, 1, sizeof(int), "int"); packageType = UDA_PACKAGE_XDROBJECT; // The package is an XDR serialised object @@ -472,7 +472,7 @@ bool_t xdr_serialise_object(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFINED rc = rc && xdr_userdefinedtypelist(xdrs, userdefinedtypelist, xdr_stdio_flag); // send the full set of known named structures - rc = rc && xdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, u, (void**)data, protocolVersion, + rc = rc && udaXdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, u, (void**)data, protocolVersion, xdr_stdio_flag, log_struct_list, malloc_source); // send the Data if (!rc) { @@ -494,12 +494,12 @@ bool_t xdr_serialise_object(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFINED // Heap allocations log logmalloclist = (LOGMALLOCLIST*)malloc(sizeof(LOGMALLOCLIST)); - initLogMallocList(logmalloclist); + udaInitLogMallocList(logmalloclist); // Data structure definitions userdefinedtypelist = (USERDEFINEDTYPELIST*)malloc(sizeof(USERDEFINEDTYPELIST)); - initUserDefinedTypeList(userdefinedtypelist); + udaInitUserDefinedTypeList(userdefinedtypelist); // receive the full set of known named structures rc = rc && xdr_userdefinedtypelist(xdrs, userdefinedtypelist, xdr_stdio_flag); @@ -513,9 +513,9 @@ bool_t xdr_serialise_object(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFINED // Receive data auto udt_received = (USERDEFINEDTYPE*)malloc(sizeof(USERDEFINEDTYPE)); - initUserDefinedType(udt_received); + udaInitUserDefinedType(udt_received); - rc = rc && xdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, udt_received, &data, + rc = rc && udaXdrUserDefinedTypeData(xdrs, logmalloclist, userdefinedtypelist, udt_received, &data, protocolVersion, xdr_stdio_flag, log_struct_list, malloc_source); // receive the Data diff --git a/source/plugins/help/help_plugin.cpp b/source/plugins/help/help_plugin.cpp index ffe73848..f1d20eeb 100644 --- a/source/plugins/help/help_plugin.cpp +++ b/source/plugins/help/help_plugin.cpp @@ -50,8 +50,8 @@ int HelpPlugin::ping(IDAM_PLUGIN_INTERFACE* plugin_interface) USERDEFINEDTYPE usertype; COMPOUNDFIELD field; - initUserDefinedType(&usertype); // New structure definition - initCompoundField(&field); + udaInitUserDefinedType(&usertype); // New structure definition + udaInitCompoundField(&field); strcpy(usertype.name, "HELP_PING"); strcpy(usertype.source, "idamServerHelp"); @@ -63,17 +63,17 @@ int HelpPlugin::ping(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; defineField(&field, "seconds", "Server time in seconds from the epoch start", &offset, SCALARUINT); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); defineField(&field, "microseconds", "Server inter-second time in microseconds", &offset, SCALARUINT); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // assign the returned data structure auto data = (HELP_PING*)malloc(sizeof(HELP_PING)); - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(HELP_PING), "HELP_PING"); // Register + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(HELP_PING), "HELP_PING"); // Register data->seconds = (unsigned int)serverTime.tv_sec; data->microseconds = (unsigned int)serverTime.tv_usec; diff --git a/source/plugins/testplugin/testplugin.cpp b/source/plugins/testplugin/testplugin.cpp index 5a01bfbe..7ea08c01 100644 --- a/source/plugins/testplugin/testplugin.cpp +++ b/source/plugins/testplugin/testplugin.cpp @@ -352,7 +352,7 @@ int TestPlugin::test4(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST4* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST4"); strcpy(usertype.source, "Test #4"); @@ -365,7 +365,7 @@ int TestPlugin::test4(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_STRING; @@ -382,17 +382,17 @@ int TestPlugin::test4(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(char); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data data = (TEST4*)malloc(sizeof(TEST4)); // Structured Data Must be a heap variable strcpy(data->value, "012345678901234567890"); - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST4), "TEST4"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST4), "TEST4"); // Pass Data @@ -423,7 +423,7 @@ int TestPlugin::test5(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST5* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST5"); strcpy(usertype.source, "Test #5"); @@ -436,7 +436,7 @@ int TestPlugin::test5(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_STRING; @@ -454,11 +454,11 @@ int TestPlugin::test5(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(char); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data @@ -466,7 +466,7 @@ int TestPlugin::test5(IDAM_PLUGIN_INTERFACE* plugin_interface) strcpy(data->value[0], "012345678901234567890"); strcpy(data->value[1], "QWERTY KEYBOARD"); strcpy(data->value[2], "MAST TOKAMAK"); - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST5), "TEST5"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST5), "TEST5"); // Pass Data @@ -497,7 +497,7 @@ int TestPlugin::test6(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST6* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST6"); strcpy(usertype.source, "Test #6"); @@ -510,7 +510,7 @@ int TestPlugin::test6(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_STRING; @@ -526,19 +526,19 @@ int TestPlugin::test6(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(char*); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data data = (TEST6*)malloc(sizeof(TEST6)); // Structured Data Must be a heap variable data->value = (char*)malloc(56 * sizeof(char)); strcpy(data->value, "PI=3.1415927"); - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST6), "TEST6"); - addMalloc(plugin_interface->logmalloclist, (void*)data->value, 1, 56 * sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST6), "TEST6"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data->value, 1, 56 * sizeof(char), "char"); // Pass Data @@ -569,7 +569,7 @@ int TestPlugin::test7(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST7* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST7"); strcpy(usertype.source, "Test #7"); @@ -582,7 +582,7 @@ int TestPlugin::test7(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_STRING; @@ -599,24 +599,24 @@ int TestPlugin::test7(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(char*); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data data = (TEST7*)malloc(sizeof(TEST7)); // Structured Data Must be a heap variable - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST7), "TEST7"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST7), "TEST7"); data->value[0] = (char*)malloc(56 * sizeof(char)); data->value[1] = (char*)malloc(55 * sizeof(char)); data->value[2] = (char*)malloc(54 * sizeof(char)); - addMalloc(plugin_interface->logmalloclist, (void*)data->value[0], 56, sizeof(char), "char"); - addMalloc(plugin_interface->logmalloclist, (void*)data->value[1], 55, sizeof(char), "char"); - addMalloc(plugin_interface->logmalloclist, (void*)data->value[2], 54, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data->value[0], 56, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data->value[1], 55, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data->value[2], 54, sizeof(char), "char"); strcpy(data->value[0], "012345678901234567890"); strcpy(data->value[1], "QWERTY KEYBOARD"); @@ -651,7 +651,7 @@ int TestPlugin::test8(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST8* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST8"); strcpy(usertype.source, "Test #8"); @@ -664,7 +664,7 @@ int TestPlugin::test8(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_STRING; @@ -680,27 +680,27 @@ int TestPlugin::test8(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(char**); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data data = (TEST8*)malloc(sizeof(TEST8)); // Structured Data Must be a heap variable - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST8), "TEST8"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST8), "TEST8"); data->value = (char**)malloc(3 * sizeof(char*)); - addMalloc(plugin_interface->logmalloclist, (void*)data->value, 3, sizeof(char*), "STRING *"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data->value, 3, sizeof(char*), "STRING *"); data->value[0] = (char*)malloc(56 * sizeof(char)); data->value[1] = (char*)malloc(55 * sizeof(char)); data->value[2] = (char*)malloc(54 * sizeof(char)); - addMalloc(plugin_interface->logmalloclist, (void*)data->value[0], 56, sizeof(char), "char"); - addMalloc(plugin_interface->logmalloclist, (void*)data->value[1], 55, sizeof(char), "char"); - addMalloc(plugin_interface->logmalloclist, (void*)data->value[2], 54, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data->value[0], 56, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data->value[1], 55, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data->value[2], 54, sizeof(char), "char"); strcpy(data->value[0], "012345678901234567890"); strcpy(data->value[1], "QWERTY KEYBOARD"); @@ -731,7 +731,7 @@ int TestPlugin::test9(IDAM_PLUGIN_INTERFACE* plugin_interface) // Create Data TEST9* data = (TEST9*)malloc(4 * sizeof(TEST9)); // Structured Data Must be a heap variable - addMalloc(plugin_interface->logmalloclist, (void*)data, 4, sizeof(TEST9), "TEST9"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 4, sizeof(TEST9), "TEST9"); { for (int i = 0; i < 4; i++) { @@ -742,26 +742,26 @@ int TestPlugin::test9(IDAM_PLUGIN_INTERFACE* plugin_interface) data[i].v3 = (char*)malloc(56 * sizeof(char)); strcpy(data[i].v3, "PI=3.1415927"); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v3, 1, 56 * sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v3, 1, 56 * sizeof(char), "char"); data[i].v4[0] = (char*)malloc(56 * sizeof(char)); data[i].v4[1] = (char*)malloc(55 * sizeof(char)); data[i].v4[2] = (char*)malloc(54 * sizeof(char)); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v4[0], 56, sizeof(char), "char"); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v4[1], 55, sizeof(char), "char"); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v4[2], 54, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v4[0], 56, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v4[1], 55, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v4[2], 54, sizeof(char), "char"); strcpy(data[i].v4[0], "012345678901234567890"); strcpy(data[i].v4[1], "QWERTY KEYBOARD"); strcpy(data[i].v4[2], "MAST TOKAMAK"); data[i].v5 = (char**)malloc(3 * sizeof(char*)); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v5, 3, sizeof(char*), "STRING *"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v5, 3, sizeof(char*), "STRING *"); data[i].v5[0] = (char*)malloc(56 * sizeof(char)); data[i].v5[1] = (char*)malloc(55 * sizeof(char)); data[i].v5[2] = (char*)malloc(54 * sizeof(char)); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v5[0], 56, sizeof(char), "char"); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v5[1], 55, sizeof(char), "char"); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v5[2], 54, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v5[0], 56, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v5[1], 55, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v5[2], 54, sizeof(char), "char"); strcpy(data[i].v5[0], "012345678901234567890"); strcpy(data[i].v5[1], "QWERTY KEYBOARD"); strcpy(data[i].v5[2], "MAST TOKAMAK"); @@ -808,7 +808,7 @@ int TestPlugin::test9A(IDAM_PLUGIN_INTERFACE* plugin_interface) // Create Data TEST9A* data = (TEST9A*)malloc(4 * sizeof(TEST9A)); // Structured Data Must be a heap variable - addMalloc(plugin_interface->logmalloclist, (void*)data, 4, sizeof(TEST9A), "TEST9A"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 4, sizeof(TEST9A), "TEST9A"); { for (int i = 0; i < 4; i++) { @@ -819,26 +819,26 @@ int TestPlugin::test9A(IDAM_PLUGIN_INTERFACE* plugin_interface) data[i].v3 = (char*)malloc(56 * sizeof(char)); strcpy(data[i].v3, "PI=3.1415927"); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v3, 1, 56 * sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v3, 1, 56 * sizeof(char), "char"); data[i].v4[0] = (char*)malloc(56 * sizeof(char)); data[i].v4[1] = (char*)malloc(55 * sizeof(char)); data[i].v4[2] = (char*)malloc(54 * sizeof(char)); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v4[0], 56, sizeof(char), "char"); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v4[1], 55, sizeof(char), "char"); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v4[2], 54, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v4[0], 56, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v4[1], 55, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v4[2], 54, sizeof(char), "char"); strcpy(data[i].v4[0], "012345678901234567890"); strcpy(data[i].v4[1], "QWERTY KEYBOARD"); strcpy(data[i].v4[2], "MAST TOKAMAK"); data[i].v5 = (char**)malloc(3 * sizeof(char*)); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v5, 3, sizeof(char*), "STRING *"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v5, 3, sizeof(char*), "STRING *"); data[i].v5[0] = (char*)malloc(56 * sizeof(char)); data[i].v5[1] = (char*)malloc(55 * sizeof(char)); data[i].v5[2] = (char*)malloc(54 * sizeof(char)); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v5[0], 56, sizeof(char), "char"); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v5[1], 55, sizeof(char), "char"); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v5[2], 54, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v5[0], 56, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v5[1], 55, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v5[2], 54, sizeof(char), "char"); strcpy(data[i].v5[0], "012345678901234567890"); strcpy(data[i].v5[1], "QWERTY KEYBOARD"); strcpy(data[i].v5[2], "MAST TOKAMAK"); @@ -850,26 +850,26 @@ int TestPlugin::test9A(IDAM_PLUGIN_INTERFACE* plugin_interface) data[i].v6.v3 = (char*)malloc(56 * sizeof(char)); strcpy(data[i].v6.v3, "PI=3.1415927"); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v6.v3, 1, 56 * sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v6.v3, 1, 56 * sizeof(char), "char"); data[i].v6.v4[0] = (char*)malloc(56 * sizeof(char)); data[i].v6.v4[1] = (char*)malloc(55 * sizeof(char)); data[i].v6.v4[2] = (char*)malloc(54 * sizeof(char)); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v6.v4[0], 56, sizeof(char), "char"); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v6.v4[1], 55, sizeof(char), "char"); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v6.v4[2], 54, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v6.v4[0], 56, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v6.v4[1], 55, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v6.v4[2], 54, sizeof(char), "char"); strcpy(data[i].v6.v4[0], "012345678901234567890"); strcpy(data[i].v6.v4[1], "QWERTY KEYBOARD"); strcpy(data[i].v6.v4[2], "MAST TOKAMAK"); data[i].v6.v5 = (char**)malloc(3 * sizeof(char*)); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v6.v5, 3, sizeof(char*), "STRING *"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v6.v5, 3, sizeof(char*), "STRING *"); data[i].v6.v5[0] = (char*)malloc(56 * sizeof(char)); data[i].v6.v5[1] = (char*)malloc(55 * sizeof(char)); data[i].v6.v5[2] = (char*)malloc(54 * sizeof(char)); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v6.v5[0], 56, sizeof(char), "char"); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v6.v5[1], 55, sizeof(char), "char"); - addMalloc(plugin_interface->logmalloclist, (void*)data[i].v6.v5[2], 54, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v6.v5[0], 56, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v6.v5[1], 55, sizeof(char), "char"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[i].v6.v5[2], 54, sizeof(char), "char"); strcpy(data[i].v6.v5[0], "012345678901234567890"); strcpy(data[i].v6.v5[1], "QWERTY KEYBOARD"); strcpy(data[i].v6.v5[2], "MAST TOKAMAK"); @@ -942,7 +942,7 @@ int TestPlugin::test11(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST11* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST11"); strcpy(usertype.source, "Test #11"); @@ -955,7 +955,7 @@ int TestPlugin::test11(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_INT; @@ -971,17 +971,17 @@ int TestPlugin::test11(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(int); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data data = (TEST11*)malloc(sizeof(TEST11)); // Structured Data Must be a heap variable data[0].value = 11; - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST11), "TEST11"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST11), "TEST11"); // Pass Data @@ -1012,7 +1012,7 @@ int TestPlugin::test12(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST12* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST12"); strcpy(usertype.source, "Test #12"); @@ -1025,7 +1025,7 @@ int TestPlugin::test12(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_INT; @@ -1041,11 +1041,11 @@ int TestPlugin::test12(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(int); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data @@ -1053,7 +1053,7 @@ int TestPlugin::test12(IDAM_PLUGIN_INTERFACE* plugin_interface) data[0].value[0] = 10; data[0].value[1] = 11; data[0].value[2] = 12; - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST12), "TEST12"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST12), "TEST12"); // Pass Data @@ -1084,7 +1084,7 @@ int TestPlugin::test13(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST13* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST13"); strcpy(usertype.source, "Test #13"); @@ -1097,7 +1097,7 @@ int TestPlugin::test13(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_INT; @@ -1114,11 +1114,11 @@ int TestPlugin::test13(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(int); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data @@ -1129,7 +1129,7 @@ int TestPlugin::test13(IDAM_PLUGIN_INTERFACE* plugin_interface) data[0].value[1][0] = 10; data[0].value[1][1] = 11; data[0].value[1][2] = 12; - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST13), "TEST13"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST13), "TEST13"); // Pass Data @@ -1160,7 +1160,7 @@ int TestPlugin::test14(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST14* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST14"); strcpy(usertype.source, "Test #14"); @@ -1173,7 +1173,7 @@ int TestPlugin::test14(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_INT; @@ -1189,19 +1189,19 @@ int TestPlugin::test14(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(int*); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data data = (TEST14*)malloc(sizeof(TEST14)); // Structured Data Must be a heap variable - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST14), "TEST14"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST14), "TEST14"); data[0].value = (int*)malloc(sizeof(int)); - addMalloc(plugin_interface->logmalloclist, (void*)data[0].value, 1, sizeof(int), "int"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[0].value, 1, sizeof(int), "int"); data[0].value[0] = 14; @@ -1234,7 +1234,7 @@ int TestPlugin::test15(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST15* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST15"); strcpy(usertype.source, "Test #15"); @@ -1247,7 +1247,7 @@ int TestPlugin::test15(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_INT; @@ -1262,20 +1262,20 @@ int TestPlugin::test15(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(int*); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data data = (TEST15*)malloc(sizeof(TEST15)); // Structured Data Must be a heap variable - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST15), "TEST15"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST15), "TEST15"); data[0].value = (int*)malloc(3 * sizeof(int)); int shape[] = {3}; - addMalloc2(plugin_interface->logmalloclist, (void*)data[0].value, 3, sizeof(int), "int", 1, shape); + udaAddMalloc2(plugin_interface->logmalloclist, (void*)data[0].value, 3, sizeof(int), "int", 1, shape); data[0].value[0] = 13; data[0].value[1] = 14; @@ -1310,7 +1310,7 @@ int TestPlugin::test16(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST16* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST16"); strcpy(usertype.source, "Test #16"); @@ -1323,7 +1323,7 @@ int TestPlugin::test16(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_INT; @@ -1338,16 +1338,16 @@ int TestPlugin::test16(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(int*); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data data = (TEST16*)malloc(sizeof(TEST16)); // Structured Data Must be a heap variable - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST16), "TEST16"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST16), "TEST16"); int* shape = (int*)malloc(2 * sizeof(int)); shape[0] = 2; @@ -1355,7 +1355,7 @@ int TestPlugin::test16(IDAM_PLUGIN_INTERFACE* plugin_interface) int count = shape[0] * shape[1]; int rank = 2; data[0].value = (int*)malloc(count * sizeof(int)); - addMalloc2(plugin_interface->logmalloclist, (void*)data[0].value, count, sizeof(int), "int", rank, shape); + udaAddMalloc2(plugin_interface->logmalloclist, (void*)data[0].value, count, sizeof(int), "int", rank, shape); data[0].value[0] = 0; data[0].value[1] = 1; @@ -1393,7 +1393,7 @@ int TestPlugin::test18(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST18* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST18"); strcpy(usertype.source, "Test #18"); @@ -1406,7 +1406,7 @@ int TestPlugin::test18(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_INT; @@ -1422,11 +1422,11 @@ int TestPlugin::test18(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(int); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data @@ -1438,7 +1438,7 @@ int TestPlugin::test18(IDAM_PLUGIN_INTERFACE* plugin_interface) data[i].value = i; } } - addMalloc(plugin_interface->logmalloclist, (void*)data, data_block->data_n, sizeof(TEST18), "TEST18"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, data_block->data_n, sizeof(TEST18), "TEST18"); // Pass Data @@ -1478,7 +1478,7 @@ int TestPlugin::test19(IDAM_PLUGIN_INTERFACE* plugin_interface) } TEST19A; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST19A"); strcpy(usertype.source, "Test #19"); @@ -1491,7 +1491,7 @@ int TestPlugin::test19(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_INT; @@ -1507,11 +1507,11 @@ int TestPlugin::test19(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(int); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); typedef struct Test19 { int value; @@ -1520,7 +1520,7 @@ int TestPlugin::test19(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST19* data; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST19"); strcpy(usertype.source, "Test #19"); @@ -1532,7 +1532,7 @@ int TestPlugin::test19(IDAM_PLUGIN_INTERFACE* plugin_interface) offset = 0; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_INT; @@ -1548,11 +1548,11 @@ int TestPlugin::test19(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(int); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); + field.alignment = udaGetalignmentof(field.type); offset = field.offset + field.size; // Next Offset - addCompoundField(&usertype, field); // Single Structure element + udaAddCompoundField(&usertype, field); // Single Structure element - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "vals"); field.atomictype = UDA_TYPE_UNKNOWN; @@ -1569,10 +1569,10 @@ int TestPlugin::test19(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(TEST19A); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data @@ -1587,7 +1587,7 @@ int TestPlugin::test19(IDAM_PLUGIN_INTERFACE* plugin_interface) } } } - addMalloc(plugin_interface->logmalloclist, (void*)data, data_block->data_n, sizeof(TEST19), "TEST19"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, data_block->data_n, sizeof(TEST19), "TEST19"); // Pass Data @@ -1652,7 +1652,7 @@ int TestPlugin::test21(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST21* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST21"); strcpy(usertype.source, "Test #21"); @@ -1665,7 +1665,7 @@ int TestPlugin::test21(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_SHORT; @@ -1681,17 +1681,17 @@ int TestPlugin::test21(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(short); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data data = (TEST21*)malloc(sizeof(TEST21)); // Structured Data Must be a heap variable data[0].value = 21; - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST21), "TEST21"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST21), "TEST21"); // Pass Data @@ -1722,7 +1722,7 @@ int TestPlugin::test22(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST22* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST22"); strcpy(usertype.source, "Test #22"); @@ -1735,7 +1735,7 @@ int TestPlugin::test22(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_SHORT; @@ -1751,11 +1751,11 @@ int TestPlugin::test22(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(short); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data @@ -1763,7 +1763,7 @@ int TestPlugin::test22(IDAM_PLUGIN_INTERFACE* plugin_interface) data[0].value[0] = 20; data[0].value[1] = 21; data[0].value[2] = 22; - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST22), "TEST22"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST22), "TEST22"); // Pass Data @@ -1794,7 +1794,7 @@ int TestPlugin::test23(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST23* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST23"); strcpy(usertype.source, "Test #23"); @@ -1807,7 +1807,7 @@ int TestPlugin::test23(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_SHORT; @@ -1824,11 +1824,11 @@ int TestPlugin::test23(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(short); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data @@ -1839,7 +1839,7 @@ int TestPlugin::test23(IDAM_PLUGIN_INTERFACE* plugin_interface) data[0].value[1][0] = 10; data[0].value[1][1] = 11; data[0].value[1][2] = 12; - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST23), "TEST23"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST23), "TEST23"); // Pass Data @@ -1870,7 +1870,7 @@ int TestPlugin::test24(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST24* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST24"); strcpy(usertype.source, "Test #24"); @@ -1883,7 +1883,7 @@ int TestPlugin::test24(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_SHORT; @@ -1899,19 +1899,19 @@ int TestPlugin::test24(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(short*); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data data = (TEST24*)malloc(sizeof(TEST24)); // Structured Data Must be a heap variable - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST24), "TEST24"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST24), "TEST24"); data[0].value = (short*)malloc(sizeof(short)); - addMalloc(plugin_interface->logmalloclist, (void*)data[0].value, 1, sizeof(short), "short"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data[0].value, 1, sizeof(short), "short"); data[0].value[0] = 24; @@ -1944,7 +1944,7 @@ int TestPlugin::test25(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST25* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST25"); strcpy(usertype.source, "Test #25"); @@ -1957,7 +1957,7 @@ int TestPlugin::test25(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_SHORT; @@ -1972,20 +1972,20 @@ int TestPlugin::test25(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(short*); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data data = (TEST25*)malloc(sizeof(TEST25)); // Structured Data Must be a heap variable - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST25), "TEST25"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST25), "TEST25"); data[0].value = (short*)malloc(3 * sizeof(short)); int shape[] = {3}; - addMalloc2(plugin_interface->logmalloclist, (void*)data[0].value, 3, sizeof(short), "short", 1, shape); + udaAddMalloc2(plugin_interface->logmalloclist, (void*)data[0].value, 3, sizeof(short), "short", 1, shape); data[0].value[0] = 13; data[0].value[1] = 14; @@ -2020,7 +2020,7 @@ int TestPlugin::test26(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST26* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST26"); strcpy(usertype.source, "Test #26"); @@ -2033,7 +2033,7 @@ int TestPlugin::test26(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_SHORT; @@ -2048,16 +2048,16 @@ int TestPlugin::test26(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(short*); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data Structure data = (TEST26*)malloc(sizeof(TEST26)); // Structured Data Must be a heap variable - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST26), "TEST26"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST26), "TEST26"); // Data is a compact Fortran like rank 2 array @@ -2065,7 +2065,7 @@ int TestPlugin::test26(IDAM_PLUGIN_INTERFACE* plugin_interface) int* shape = (int*)malloc(2 * sizeof(int)); shape[0] = 3; shape[1] = 2; - addMalloc2(plugin_interface->logmalloclist, (void*)data[0].value, 6, sizeof(short), "short", 2, shape); + udaAddMalloc2(plugin_interface->logmalloclist, (void*)data[0].value, 6, sizeof(short), "short", 2, shape); data[0].value[0] = 13; data[0].value[1] = 14; @@ -2104,7 +2104,7 @@ int TestPlugin::test27(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST27* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST27"); strcpy(usertype.source, "Test #27"); @@ -2117,7 +2117,7 @@ int TestPlugin::test27(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_SHORT; @@ -2135,11 +2135,11 @@ int TestPlugin::test27(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(short); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data @@ -2171,7 +2171,7 @@ int TestPlugin::test27(IDAM_PLUGIN_INTERFACE* plugin_interface) data[0].value[1][2][2] = 122; data[0].value[1][2][3] = 123; - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST27), "TEST27"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST27), "TEST27"); // Pass Data @@ -2202,7 +2202,7 @@ int TestPlugin::test28(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST28* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST28"); strcpy(usertype.source, "Test #28"); @@ -2215,7 +2215,7 @@ int TestPlugin::test28(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "value"); field.atomictype = UDA_TYPE_SHORT; @@ -2230,16 +2230,16 @@ int TestPlugin::test28(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(short*); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data Structure data = (TEST28*)malloc(sizeof(TEST28)); // Structured Data Must be a heap variable - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST28), "TEST28"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST28), "TEST28"); // Data is a compact Fortran like rank 3 array @@ -2248,7 +2248,7 @@ int TestPlugin::test28(IDAM_PLUGIN_INTERFACE* plugin_interface) shape[0] = 4; shape[1] = 3; shape[2] = 2; - addMalloc2(plugin_interface->logmalloclist, (void*)data[0].value, 24, sizeof(short), "short", 3, shape); + udaAddMalloc2(plugin_interface->logmalloclist, (void*)data[0].value, 24, sizeof(short), "short", 3, shape); int index = 0; data[0].value[index++] = 0; @@ -2306,7 +2306,7 @@ int TestPlugin::test30(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST30* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST30"); strcpy(usertype.source, "Test #30"); @@ -2320,25 +2320,25 @@ int TestPlugin::test30(IDAM_PLUGIN_INTERFACE* plugin_interface) COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "R", "double structure element", &offset, SCALARDOUBLE); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "Z", "double structure element", &offset, SCALARDOUBLE); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data data = (TEST30*)malloc(sizeof(TEST30)); // Structured Data Must be a heap variable data[0].R = 1.0; data[0].Z = 2.0; - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST30), "TEST30"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST30), "TEST30"); // Pass Data @@ -2370,7 +2370,7 @@ int TestPlugin::test31(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST30* data; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST30"); strcpy(usertype.source, "Test #31"); @@ -2384,18 +2384,18 @@ int TestPlugin::test31(IDAM_PLUGIN_INTERFACE* plugin_interface) COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "R", "double structure element", &offset, SCALARDOUBLE); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "Z", "double structure element", &offset, SCALARDOUBLE); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data @@ -2417,7 +2417,7 @@ int TestPlugin::test31(IDAM_PLUGIN_INTERFACE* plugin_interface) shape[0] = 5; shape[1] = 20; - addMalloc2(plugin_interface->logmalloclist, (void*)data, count, sizeof(TEST30), "TEST30", rank, shape); + udaAddMalloc2(plugin_interface->logmalloclist, (void*)data, count, sizeof(TEST30), "TEST30", rank, shape); // Pass Data @@ -2447,7 +2447,7 @@ int TestPlugin::test32(IDAM_PLUGIN_INTERFACE* plugin_interface) } TEST32A; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST32A"); strcpy(usertype.source, "Test #32"); @@ -2461,18 +2461,18 @@ int TestPlugin::test32(IDAM_PLUGIN_INTERFACE* plugin_interface) COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "R", "double structure element", &offset, SCALARDOUBLE); - addCompoundField(&usertype, field); // Single Structure element + udaAddCompoundField(&usertype, field); // Single Structure element - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "Z", "double structure element", &offset, SCALARDOUBLE); - addCompoundField(&usertype, field); // Single Structure element + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); typedef struct Test32 { int count; @@ -2481,7 +2481,7 @@ int TestPlugin::test32(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST32* data; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST32"); strcpy(usertype.source, "Test #32"); @@ -2493,12 +2493,12 @@ int TestPlugin::test32(IDAM_PLUGIN_INTERFACE* plugin_interface) offset = 0; - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "count", "int structure element", &offset, SCALARINT); - addCompoundField(&usertype, field); // Single Structure element + udaAddCompoundField(&usertype, field); // Single Structure element - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "coords"); field.atomictype = UDA_TYPE_UNKNOWN; @@ -2515,17 +2515,17 @@ int TestPlugin::test32(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(TEST32A); field.offset = offsetof(TEST32, coords); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); + field.alignment = udaGetalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + udaAddCompoundField(&usertype, field); // Single Structure element - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data data_block->data_n = 1; data = (TEST32*)malloc(data_block->data_n * sizeof(TEST32)); // Structured Data Must be a heap variable - addMalloc(plugin_interface->logmalloclist, (void*)data, data_block->data_n, sizeof(TEST32), "TEST32"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, data_block->data_n, sizeof(TEST32), "TEST32"); data[0].count = field.count; @@ -2562,7 +2562,7 @@ int TestPlugin::test33(IDAM_PLUGIN_INTERFACE* plugin_interface) } TEST33A; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST33A"); strcpy(usertype.source, "Test #33"); @@ -2576,18 +2576,18 @@ int TestPlugin::test33(IDAM_PLUGIN_INTERFACE* plugin_interface) COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "R", "double structure element", &offset, SCALARDOUBLE); - addCompoundField(&usertype, field); // Single Structure element + udaAddCompoundField(&usertype, field); // Single Structure element - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "Z", "double structure element", &offset, SCALARDOUBLE); - addCompoundField(&usertype, field); // Single Structure element + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); typedef struct Test33 { int count; @@ -2596,7 +2596,7 @@ int TestPlugin::test33(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST33* data; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST33"); strcpy(usertype.source, "Test #33"); @@ -2608,12 +2608,12 @@ int TestPlugin::test33(IDAM_PLUGIN_INTERFACE* plugin_interface) offset = 0; - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "count", "int structure element", &offset, SCALARINT); - addCompoundField(&usertype, field); // Single Structure element + udaAddCompoundField(&usertype, field); // Single Structure element - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "coords"); field.atomictype = UDA_TYPE_UNKNOWN; @@ -2628,17 +2628,17 @@ int TestPlugin::test33(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(TEST33A*); field.offset = offsetof(TEST33, coords); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); + field.alignment = udaGetalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + udaAddCompoundField(&usertype, field); // Single Structure element - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data data_block->data_n = 1; data = (TEST33*)malloc(data_block->data_n * sizeof(TEST33)); // Structured Data Must be a heap variable - addMalloc(plugin_interface->logmalloclist, (void*)data, data_block->data_n, sizeof(TEST33), "TEST33"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, data_block->data_n, sizeof(TEST33), "TEST33"); data->count = 100; data->coords = (TEST33A*)malloc(data->count * sizeof(TEST33A)); @@ -2648,7 +2648,7 @@ int TestPlugin::test33(IDAM_PLUGIN_INTERFACE* plugin_interface) shape[0] = 5; shape[1] = 20; - addMalloc2(plugin_interface->logmalloclist, (void*)data->coords, data->count, sizeof(TEST33A), "TEST33A", rank, + udaAddMalloc2(plugin_interface->logmalloclist, (void*)data->coords, data->count, sizeof(TEST33A), "TEST33A", rank, shape); for (int i = 0; i < data->count; i++) { @@ -2684,7 +2684,7 @@ int TestPlugin::test34(IDAM_PLUGIN_INTERFACE* plugin_interface) } TEST33A; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST33A"); strcpy(usertype.source, "Test #33"); @@ -2698,24 +2698,24 @@ int TestPlugin::test34(IDAM_PLUGIN_INTERFACE* plugin_interface) COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); field.count = 1; field.rank = 0; field.shape = nullptr; defineField(&field, "R", "unsigned char structure element", &offset, ARRAYUCHAR); - addCompoundField(&usertype, field); // Single Structure element + udaAddCompoundField(&usertype, field); // Single Structure element - initCompoundField(&field); + udaInitCompoundField(&field); field.count = 1; field.rank = 0; field.shape = nullptr; defineField(&field, "Z", "unsigned char structure element", &offset, ARRAYUCHAR); - addCompoundField(&usertype, field); // Single Structure element + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); typedef struct Test33 { int count; @@ -2724,7 +2724,7 @@ int TestPlugin::test34(IDAM_PLUGIN_INTERFACE* plugin_interface) TEST33* data; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST33"); strcpy(usertype.source, "Test #33"); @@ -2736,12 +2736,12 @@ int TestPlugin::test34(IDAM_PLUGIN_INTERFACE* plugin_interface) offset = 0; - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "count", "int structure element", &offset, SCALARINT); - addCompoundField(&usertype, field); // Single Structure element + udaAddCompoundField(&usertype, field); // Single Structure element - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "coords"); field.atomictype = UDA_TYPE_UNKNOWN; @@ -2756,17 +2756,17 @@ int TestPlugin::test34(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(TEST33A*); field.offset = (int)offsetof(TEST33, coords); field.offpad = (int)padding((size_t)offset, field.type); - field.alignment = getalignmentof(field.type); + field.alignment = udaGetalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + udaAddCompoundField(&usertype, field); // Single Structure element - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data data_block->data_n = 1; data = (TEST33*)malloc(data_block->data_n * sizeof(TEST33)); // Structured Data Must be a heap variable - addMalloc(plugin_interface->logmalloclist, (void*)data, data_block->data_n, sizeof(TEST33), "TEST33"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, data_block->data_n, sizeof(TEST33), "TEST33"); data->count = 100; data->coords = (TEST33A*)malloc(data->count * sizeof(TEST33A)); @@ -2776,16 +2776,16 @@ int TestPlugin::test34(IDAM_PLUGIN_INTERFACE* plugin_interface) shape[0] = 5; shape[1] = 20; - addMalloc2(plugin_interface->logmalloclist, (void*)data->coords, data->count, sizeof(TEST33A), "TEST33A", rank, + udaAddMalloc2(plugin_interface->logmalloclist, (void*)data->coords, data->count, sizeof(TEST33A), "TEST33A", rank, shape); for (int i = 0; i < data->count; i++) { data->coords[i].R = (unsigned char*)malloc(10 * sizeof(unsigned char)); data->coords[i].Z = (unsigned char*)malloc(10 * sizeof(unsigned char)); - addMalloc(plugin_interface->logmalloclist, (void*)data->coords[i].R, 10, sizeof(unsigned char), + udaAddMalloc(plugin_interface->logmalloclist, (void*)data->coords[i].R, 10, sizeof(unsigned char), "unsigned char *"); - addMalloc(plugin_interface->logmalloclist, (void*)data->coords[i].Z, 10, sizeof(unsigned char), + udaAddMalloc(plugin_interface->logmalloclist, (void*)data->coords[i].Z, 10, sizeof(unsigned char), "unsigned char *"); for (int j = 0; j < 10; ++j) { @@ -2839,7 +2839,7 @@ int TestPlugin::test40(IDAM_PLUGIN_INTERFACE* plugin_interface) REQUEST_BLOCK* request_block = plugin_interface->request_block; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST40"); strcpy(usertype.source, "Test #40"); @@ -2852,7 +2852,7 @@ int TestPlugin::test40(IDAM_PLUGIN_INTERFACE* plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); // The number of data blocks is given by: request_block->putDataBlockList.blockCount // For this test, all blocks must be of the same type: request_block->putDataBlockList.putDataBlock[0].data_type; @@ -2880,9 +2880,9 @@ int TestPlugin::test40(IDAM_PLUGIN_INTERFACE* plugin_interface) break; } - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST41"); strcpy(usertype.source, "Test #41"); @@ -2893,7 +2893,7 @@ int TestPlugin::test40(IDAM_PLUGIN_INTERFACE* plugin_interface) usertype.idamclass = UDA_TYPE_COMPOUND; offset = 0; - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "count", "the number of data blocks", &offset, SCALARUINT); @@ -2910,19 +2910,19 @@ int TestPlugin::test40(IDAM_PLUGIN_INTERFACE* plugin_interface) field.size = field.count * sizeof(TEST40); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); + field.alignment = udaGetalignmentof(field.type); offset = field.offset + field.size; // Next Offset - addCompoundField(&usertype, field); // Single Structure element + udaAddCompoundField(&usertype, field); // Single Structure element - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); // Create Data TEST41* data = (TEST41*)malloc(sizeof(TEST41)); TEST40* blocks = (TEST40*)malloc(request_block->putDataBlockList.blockCount * sizeof(TEST40)); - addMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST41), "TEST41"); - addMalloc(plugin_interface->logmalloclist, (void*)blocks, request_block->putDataBlockList.blockCount, + udaAddMalloc(plugin_interface->logmalloclist, (void*)data, 1, sizeof(TEST41), "TEST41"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)blocks, request_block->putDataBlockList.blockCount, sizeof(TEST40), "TEST40"); data->count = request_block->putDataBlockList.blockCount; @@ -2934,19 +2934,19 @@ int TestPlugin::test40(IDAM_PLUGIN_INTERFACE* plugin_interface) UDA_LOG(UDA_LOG_DEBUG, "data type : %d\n", request_block->putDataBlockList.putDataBlock[0].data_type); UDA_LOG(UDA_LOG_DEBUG, "data count: %d\n", request_block->putDataBlockList.putDataBlock[0].count); - // Data blocks already allocated and will be freed by a separate process so use addNonMalloc instead of - // addMalloc + // Data blocks already allocated and will be freed by a separate process so use udaAddNonMalloc instead of + // udaAddMalloc switch (request_block->putDataBlockList.putDataBlock[0].data_type) { case UDA_TYPE_INT: - addNonMalloc(blocks[i].data, blocks[i].dataCount, sizeof(int), "int"); + udaAddNonMalloc(blocks[i].data, blocks[i].dataCount, sizeof(int), "int"); break; case UDA_TYPE_FLOAT: - addNonMalloc(blocks[i].data, blocks[i].dataCount, sizeof(float), "float"); + udaAddNonMalloc(blocks[i].data, blocks[i].dataCount, sizeof(float), "float"); float* f = (float*)blocks[i].data; break; case UDA_TYPE_DOUBLE: - addNonMalloc(blocks[i].data, blocks[i].dataCount, sizeof(double), "double"); + udaAddNonMalloc(blocks[i].data, blocks[i].dataCount, sizeof(double), "double"); break; } } @@ -3050,8 +3050,8 @@ int TestPlugin::test60(IDAM_PLUGIN_INTERFACE* plugin_interface) enumlist->enummember[0].value = (long long)1; enumlist->enummember[1].value = (long long)2; enumlist->enummember[2].value = (long long)3; - addMalloc(plugin_interface->logmalloclist, (void*)enumlist, 1, sizeof(ENUMLIST60), "ENUMLIST60"); - addMalloc(plugin_interface->logmalloclist, (void*)enumlist->enummember, enumlist->count, sizeof(ENUMMEMBER60), + udaAddMalloc(plugin_interface->logmalloclist, (void*)enumlist, 1, sizeof(ENUMLIST60), "ENUMLIST60"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)enumlist->enummember, enumlist->count, sizeof(ENUMMEMBER60), "ENUMMEMBER60"); int count = 10; @@ -3072,13 +3072,13 @@ int TestPlugin::test60(IDAM_PLUGIN_INTERFACE* plugin_interface) enumlist->arraydata_shape = (int*)malloc(sizeof(int)); enumlist->arraydata_shape[0] = count; - addMalloc(plugin_interface->logmalloclist, (void*)enumlist->arraydata, count, sizeof(unsigned short), + udaAddMalloc(plugin_interface->logmalloclist, (void*)enumlist->arraydata, count, sizeof(unsigned short), "unsigned short"); count = 1; int rank = 1; int shape[] = {1}; // Shape of the shape array! - addMalloc2(plugin_interface->logmalloclist, (void*)enumlist->arraydata_shape, count, sizeof(int), "int", rank, + udaAddMalloc2(plugin_interface->logmalloclist, (void*)enumlist->arraydata_shape, count, sizeof(int), "int", rank, shape); USERDEFINEDTYPE usertype; @@ -3086,7 +3086,7 @@ int TestPlugin::test60(IDAM_PLUGIN_INTERFACE* plugin_interface) COMPOUNDFIELD field; USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "ENUMMEMBER60"); strcpy(usertype.source, "Test #60 ENUMMEMBER structure"); usertype.ref_id = 0; @@ -3097,7 +3097,7 @@ int TestPlugin::test60(IDAM_PLUGIN_INTERFACE* plugin_interface) offset = 0; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "name"); field.atomictype = UDA_TYPE_STRING; strcpy(field.type, "STRING"); // convert atomic type to a string label @@ -3111,16 +3111,16 @@ int TestPlugin::test60(IDAM_PLUGIN_INTERFACE* plugin_interface) field.offset = offsetof(ENUMMEMBER60, name); offset = field.offset + field.size; field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "value", "The ENUM value", &offset, SCALARLONG64); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "ENUMLIST60"); strcpy(usertype.source, "Test #60 ENUMLIST structure"); usertype.ref_id = 0; @@ -3131,7 +3131,7 @@ int TestPlugin::test60(IDAM_PLUGIN_INTERFACE* plugin_interface) offset = 0; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "name"); field.atomictype = UDA_TYPE_STRING; strcpy(field.type, "STRING"); // convert atomic type to a string label @@ -3146,18 +3146,18 @@ int TestPlugin::test60(IDAM_PLUGIN_INTERFACE* plugin_interface) field.offset = offsetof(ENUMLIST60, name); offset = field.offset + field.size; field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "type", "The ENUM base integer atomic type", &offset, SCALARINT); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "count", "The number of ENUM values", &offset, SCALARINT); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "enummember"); field.atomictype = UDA_TYPE_UNKNOWN; strcpy(field.type, "ENUMMEMBER60"); @@ -3170,10 +3170,10 @@ int TestPlugin::test60(IDAM_PLUGIN_INTERFACE* plugin_interface) field.offset = offsetof(ENUMLIST60, enummember); // Different to newoffset offset = field.offset + field.size; field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); - initCompoundField(&field); + udaInitCompoundField(&field); switch (enumlist->type) { case (UDA_TYPE_UNSIGNED_SHORT): { defineField(&field, "arraydata", "The array of values defined by the ENUM", &offset, ARRAYUSHORT); @@ -3200,19 +3200,19 @@ int TestPlugin::test60(IDAM_PLUGIN_INTERFACE* plugin_interface) break; } } - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "arraydata_rank", "The rank of arraydata", &offset, SCALARINT); - addCompoundField(&usertype, field); - initCompoundField(&field); + udaAddCompoundField(&usertype, field); + udaInitCompoundField(&field); defineField(&field, "arraydata_count", "The count of arraydata", &offset, SCALARINT); - addCompoundField(&usertype, field); - initCompoundField(&field); + udaAddCompoundField(&usertype, field); + udaInitCompoundField(&field); defineField(&field, "arraydata_shape", "The shape of arraydata", &offset, ARRAYINT); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); DATA_BLOCK* data_block = plugin_interface->data_block; initDataBlock(data_block); @@ -3244,8 +3244,8 @@ int TestPlugin::test61(IDAM_PLUGIN_INTERFACE* plugin_interface) enumlist->enummember[0].value = (long long)1; enumlist->enummember[1].value = (long long)2; enumlist->enummember[2].value = (long long)3; - addMalloc(plugin_interface->logmalloclist, (void*)enumlist, 1, sizeof(ENUMLIST60), "ENUMLIST60"); - addMalloc(plugin_interface->logmalloclist, (void*)enumlist->enummember, enumlist->count, sizeof(ENUMMEMBER60), + udaAddMalloc(plugin_interface->logmalloclist, (void*)enumlist, 1, sizeof(ENUMLIST60), "ENUMLIST60"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)enumlist->enummember, enumlist->count, sizeof(ENUMMEMBER60), "ENUMMEMBER60"); int count = 10; @@ -3266,13 +3266,13 @@ int TestPlugin::test61(IDAM_PLUGIN_INTERFACE* plugin_interface) enumlist->arraydata_shape = (int*)malloc(sizeof(int)); enumlist->arraydata_shape[0] = count; - addMalloc(plugin_interface->logmalloclist, (void*)enumlist->arraydata, count, sizeof(unsigned long long), + udaAddMalloc(plugin_interface->logmalloclist, (void*)enumlist->arraydata, count, sizeof(unsigned long long), "unsigned long long"); count = 1; int rank = 1; int shape[] = {1}; // Shape of the shape array! - addMalloc2(plugin_interface->logmalloclist, (void*)enumlist->arraydata_shape, count, sizeof(int), "int", rank, + udaAddMalloc2(plugin_interface->logmalloclist, (void*)enumlist->arraydata_shape, count, sizeof(int), "int", rank, shape); USERDEFINEDTYPE usertype; @@ -3280,7 +3280,7 @@ int TestPlugin::test61(IDAM_PLUGIN_INTERFACE* plugin_interface) COMPOUNDFIELD field; USERDEFINEDTYPELIST* userdefinedtypelist = plugin_interface->userdefinedtypelist; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "ENUMMEMBER60"); strcpy(usertype.source, "Test #61 ENUMMEMBER structure"); usertype.ref_id = 0; @@ -3291,7 +3291,7 @@ int TestPlugin::test61(IDAM_PLUGIN_INTERFACE* plugin_interface) offset = 0; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "name"); field.atomictype = UDA_TYPE_STRING; strcpy(field.type, "STRING"); // convert atomic type to a string label @@ -3305,16 +3305,16 @@ int TestPlugin::test61(IDAM_PLUGIN_INTERFACE* plugin_interface) field.offset = offsetof(ENUMMEMBER60, name); offset = field.offset + field.size; field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "value", "The ENUM value", &offset, SCALARLONG64); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "ENUMLIST60"); strcpy(usertype.source, "Test #61 ENUMLIST structure"); usertype.ref_id = 0; @@ -3325,7 +3325,7 @@ int TestPlugin::test61(IDAM_PLUGIN_INTERFACE* plugin_interface) offset = 0; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "name"); field.atomictype = UDA_TYPE_STRING; strcpy(field.type, "STRING"); // convert atomic type to a string label @@ -3339,18 +3339,18 @@ int TestPlugin::test61(IDAM_PLUGIN_INTERFACE* plugin_interface) field.offset = offsetof(ENUMLIST60, name); offset = field.offset + field.size; field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "type", "The ENUM base integer atomic type", &offset, SCALARINT); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "count", "The number of ENUM values", &offset, SCALARINT); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "enummember"); field.atomictype = UDA_TYPE_UNKNOWN; strcpy(field.type, "ENUMMEMBER60"); @@ -3363,24 +3363,24 @@ int TestPlugin::test61(IDAM_PLUGIN_INTERFACE* plugin_interface) field.offset = offsetof(ENUMLIST60, enummember); // Different to newoffset offset = field.offset + field.size; field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "arraydata", "Data with this enumerated type", &offset, ARRAYULONG64); // Data need to be converted to this type - addCompoundField(&usertype, field); - initCompoundField(&field); + udaAddCompoundField(&usertype, field); + udaInitCompoundField(&field); defineField(&field, "arraydata_rank", "The rank of arraydata", &offset, SCALARINT); - addCompoundField(&usertype, field); - initCompoundField(&field); + udaAddCompoundField(&usertype, field); + udaInitCompoundField(&field); defineField(&field, "arraydata_count", "The count of arraydata", &offset, SCALARINT); - addCompoundField(&usertype, field); - initCompoundField(&field); + udaAddCompoundField(&usertype, field); + udaInitCompoundField(&field); defineField(&field, "arraydata_shape", "The shape of arraydata", &offset, ARRAYINT); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); DATA_BLOCK* data_block = plugin_interface->data_block; initDataBlock(data_block); @@ -3412,8 +3412,8 @@ int TestPlugin::test62(IDAM_PLUGIN_INTERFACE* plugin_interface) enumlist->enummember[0].value = (long long)1; enumlist->enummember[1].value = (long long)2; enumlist->enummember[2].value = (long long)3; - addMalloc(plugin_interface->logmalloclist, (void*)enumlist, 1, sizeof(ENUMLIST), "ENUMLIST"); - addMalloc(plugin_interface->logmalloclist, (void*)enumlist->enummember, enumlist->count, sizeof(ENUMMEMBER), + udaAddMalloc(plugin_interface->logmalloclist, (void*)enumlist, 1, sizeof(ENUMLIST), "ENUMLIST"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)enumlist->enummember, enumlist->count, sizeof(ENUMMEMBER), "ENUMMEMBER"); int count = 10; @@ -3434,13 +3434,13 @@ int TestPlugin::test62(IDAM_PLUGIN_INTERFACE* plugin_interface) enumlist->enumarray_shape = (int*)malloc(sizeof(int)); enumlist->enumarray_shape[0] = count; - addMalloc(plugin_interface->logmalloclist, (void*)enumlist->enumarray, count, sizeof(unsigned long long), + udaAddMalloc(plugin_interface->logmalloclist, (void*)enumlist->enumarray, count, sizeof(unsigned long long), "unsigned long long"); // count = 1; // int rank = 1; // int shape[] = {1}; // Shape of the shape array! - addMalloc(plugin_interface->logmalloclist, (void*)enumlist->enumarray_shape, 1, sizeof(int), "int"); + udaAddMalloc(plugin_interface->logmalloclist, (void*)enumlist->enumarray_shape, 1, sizeof(int), "int"); DATA_BLOCK* data_block = plugin_interface->data_block; initDataBlock(data_block); @@ -3457,11 +3457,11 @@ int TestPlugin::test62(IDAM_PLUGIN_INTERFACE* plugin_interface) data_block->opaque_block = (void*)findUserDefinedType(plugin_interface->userdefinedtypelist, "ENUMLIST", 0); /* - int id = findUserDefinedTypeId(userdefinedtypelist, "ENUMLIST"); - changeUserDefinedTypeElementProperty(userdefinedtypelist, id, "data", "name", (void *)"arraydata"); + int id = udaFindUserDefinedTypeId(userdefinedtypelist, "ENUMLIST"); + udaChangeUserDefinedTypeElementProperty(userdefinedtypelist, id, "data", "name", (void *)"arraydata"); int value = UDA_TYPE_UNSIGNED_LONG64; - changeUserDefinedTypeElementProperty(userdefinedtypelist, id, "arraydata", "atomictype", (void *)&value); - changeUserDefinedTypeElementProperty(userdefinedtypelist, id, "arraydata", "type", (void *)"unsigned long long"); + udaChangeUserDefinedTypeElementProperty(userdefinedtypelist, id, "arraydata", "atomictype", (void *)&value); + udaChangeUserDefinedTypeElementProperty(userdefinedtypelist, id, "arraydata", "type", (void *)"unsigned long long"); */ return 0; } diff --git a/source/plugins/testplugin/teststructs.cpp b/source/plugins/testplugin/teststructs.cpp index 9df8133d..8c549835 100644 --- a/source/plugins/testplugin/teststructs.cpp +++ b/source/plugins/testplugin/teststructs.cpp @@ -8,7 +8,7 @@ void init_structure_definitions(IDAM_PLUGIN_INTERFACE* idam_plugin_interface) USERDEFINEDTYPE* old; USERDEFINEDTYPE usertype; - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "TEST9"); strcpy(usertype.source, "Test #9"); @@ -21,7 +21,7 @@ void init_structure_definitions(IDAM_PLUGIN_INTERFACE* idam_plugin_interface) int offset = 0; COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "v1"); field.atomictype = UDA_TYPE_STRING; strcpy(field.type, "STRING"); // convert atomic type to a string label @@ -34,11 +34,11 @@ void init_structure_definitions(IDAM_PLUGIN_INTERFACE* idam_plugin_interface) field.size = field.count * sizeof(char); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); + field.alignment = udaGetalignmentof(field.type); offset = field.offset + field.size; // Next Offset - addCompoundField(&usertype, field); // Single Structure element + udaAddCompoundField(&usertype, field); // Single Structure element - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "v2"); field.atomictype = UDA_TYPE_STRING; strcpy(field.type, "STRING"); // convert atomic type to a string label @@ -52,11 +52,11 @@ void init_structure_definitions(IDAM_PLUGIN_INTERFACE* idam_plugin_interface) field.size = field.count * sizeof(char); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); + field.alignment = udaGetalignmentof(field.type); offset = field.offset + field.size; // Next Offset - addCompoundField(&usertype, field); // Single Structure element + udaAddCompoundField(&usertype, field); // Single Structure element - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "v3"); field.atomictype = UDA_TYPE_STRING; strcpy(field.type, "STRING"); // convert atomic type to a string label @@ -68,11 +68,11 @@ void init_structure_definitions(IDAM_PLUGIN_INTERFACE* idam_plugin_interface) field.size = field.count * sizeof(char*); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); + field.alignment = udaGetalignmentof(field.type); offset = field.offset + field.size; // Next Offset - addCompoundField(&usertype, field); // Single Structure element + udaAddCompoundField(&usertype, field); // Single Structure element - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "v4"); field.atomictype = UDA_TYPE_STRING; strcpy(field.type, "STRING *"); // Array of String pointers @@ -85,11 +85,11 @@ void init_structure_definitions(IDAM_PLUGIN_INTERFACE* idam_plugin_interface) field.size = field.count * sizeof(char*); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); + field.alignment = udaGetalignmentof(field.type); offset = field.offset + field.size; // Next Offset - addCompoundField(&usertype, field); // Single Structure element + udaAddCompoundField(&usertype, field); // Single Structure element - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "v5"); field.atomictype = UDA_TYPE_STRING; strcpy(field.type, "STRING *"); // Array of String pointers @@ -101,16 +101,16 @@ void init_structure_definitions(IDAM_PLUGIN_INTERFACE* idam_plugin_interface) field.size = field.count * sizeof(char**); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element USERDEFINEDTYPELIST* userdefinedtypelist = idam_plugin_interface->userdefinedtypelist; - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); UDA_LOG(UDA_LOG_DEBUG, "Type TEST9 defined\n"); old = findUserDefinedType(userdefinedtypelist, "TEST9", 0); // Clone existing structure & modify - copyUserDefinedType(old, &usertype); + udaCopyUserDefinedType(old, &usertype); UDA_LOG(UDA_LOG_DEBUG, "Type TEST9 located\n"); @@ -120,7 +120,7 @@ void init_structure_definitions(IDAM_PLUGIN_INTERFACE* idam_plugin_interface) offset = old->size; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "v6"); field.atomictype = UDA_TYPE_UNKNOWN; strcpy(field.type, "TEST9"); // Array of String pointers @@ -132,10 +132,10 @@ void init_structure_definitions(IDAM_PLUGIN_INTERFACE* idam_plugin_interface) field.size = field.count * sizeof(TEST9); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); // Single Structure element + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // Single Structure element - addUserDefinedType(userdefinedtypelist, usertype); + udaAddUserDefinedType(userdefinedtypelist, usertype); UDA_LOG(UDA_LOG_DEBUG, "Type TEST9A defined\n"); } diff --git a/source/plugins/udaPlugin.cpp b/source/plugins/udaPlugin.cpp index 2496a985..3acee77e 100644 --- a/source/plugins/udaPlugin.cpp +++ b/source/plugins/udaPlugin.cpp @@ -45,9 +45,9 @@ IDAM_PLUGIN_INTERFACE* udaCreatePluginInterface(const char* request) void udaFreePluginInterface(IDAM_PLUGIN_INTERFACE* plugin_interface) { free(plugin_interface->request_data); - freeUserDefinedTypeList(plugin_interface->userdefinedtypelist); + udaFreeUserDefinedTypeList(plugin_interface->userdefinedtypelist); free(plugin_interface->userdefinedtypelist); - freeMallocLogList(plugin_interface->logmalloclist); + udaFreeMallocLogList(plugin_interface->logmalloclist); free(plugin_interface->logmalloclist); freePluginList((PLUGINLIST*)plugin_interface->pluginList); free((PLUGINLIST*)plugin_interface->pluginList); diff --git a/source/server/fatServer.cpp b/source/server/fatServer.cpp index 2d11c9b2..3adc5ddd 100644 --- a/source/server/fatServer.cpp +++ b/source/server/fatServer.cpp @@ -98,7 +98,7 @@ int fatServer(CLIENT_BLOCK client_block, SERVER_BLOCK* server_block, REQUEST_BLO ACTIONS actions_sig; LOGSTRUCTLIST log_struct_list; - initLogStructList(&log_struct_list); + udaInitLogStructList(&log_struct_list); int server_tot_block_time = 0; int server_timeout = TIMEOUT; // user specified Server Lifetime @@ -120,19 +120,19 @@ int fatServer(CLIENT_BLOCK client_block, SERVER_BLOCK* server_block, REQUEST_BLO USERDEFINEDTYPELIST parseduserdefinedtypelist; - getInitialUserDefinedTypeList(&user_defined_type_list); + udaGetInitialUserDefinedTypeList(&user_defined_type_list); parseduserdefinedtypelist = *user_defined_type_list; - // printUserDefinedTypeList(*userdefinedtypelist); + // udaPrintUserDefinedTypeList(*userdefinedtypelist); log_malloc_list = (LOGMALLOCLIST*)malloc(sizeof(LOGMALLOCLIST)); - initLogMallocList(log_malloc_list); + udaInitLogMallocList(log_malloc_list); int err = startupFatServer(server_block, parseduserdefinedtypelist); if (err != 0) { return err; } - copyUserDefinedTypeList(&user_defined_type_list, &parseduserdefinedtypelist); + udaCopyUserDefinedTypeList(&user_defined_type_list, &parseduserdefinedtypelist); err = handleRequestFat(&request_block, request_block0, &client_block, server_block, &metadata_block, &data_blocks, &actions_desc, &actions_sig); @@ -150,11 +150,11 @@ int fatServer(CLIENT_BLOCK client_block, SERVER_BLOCK* server_block, REQUEST_BLO err = doFatServerClosedown(server_block, &data_blocks, &actions_desc, &actions_sig, data_blocks0); - freeUserDefinedTypeList(user_defined_type_list); + udaFreeUserDefinedTypeList(user_defined_type_list); free(user_defined_type_list); user_defined_type_list = nullptr; - // freeMallocLogList(logmalloclist); + // udaFreeMallocLogList(logmalloclist); // free(logmalloclist); return err; @@ -424,9 +424,9 @@ int startupFatServer(SERVER_BLOCK* server_block, USERDEFINEDTYPELIST& parseduser //---------------------------------------------------------------------- // Initialise General Structure Passing - getInitialUserDefinedTypeList(&user_defined_type_list); + udaGetInitialUserDefinedTypeList(&user_defined_type_list); parseduserdefinedtypelist = *user_defined_type_list; - printUserDefinedTypeList(*user_defined_type_list); + udaPrintUserDefinedTypeList(*user_defined_type_list); user_defined_type_list = nullptr; // Startup State /* @@ -436,7 +436,7 @@ int startupFatServer(SERVER_BLOCK* server_block, USERDEFINEDTYPELIST& parseduser if (!fileParsed) { fileParsed = 1; - initUserDefinedTypeList(&parseduserdefinedtypelist); + udaInitUserDefinedTypeList(&parseduserdefinedtypelist); userdefinedtypelist = &parseduserdefinedtypelist; // Switch before Parsing input file char* token = nullptr; @@ -447,7 +447,7 @@ int startupFatServer(SERVER_BLOCK* server_block, USERDEFINEDTYPELIST& parseduser UDA_LOG(UDA_LOG_DEBUG, "Parsing structure definition file: %s\n", token); parseIncludeFile(userdefinedtypelist, token); // file containing the SARRAY structure definition parseduserdefinedtypelist = *userdefinedtypelist; // Switch back - printUserDefinedTypeList(parseduserdefinedtypelist); + udaPrintUserDefinedTypeList(parseduserdefinedtypelist); } */ diff --git a/source/server/serverPlugin.cpp b/source/server/serverPlugin.cpp index f35b1653..ba77f468 100644 --- a/source/server/serverPlugin.cpp +++ b/source/server/serverPlugin.cpp @@ -422,10 +422,10 @@ int udaProvenancePlugin(CLIENT_BLOCK* client_block, REQUEST_DATA* original_reque } USERDEFINEDTYPELIST userdefinedtypelist; - initUserDefinedTypeList(&userdefinedtypelist); + udaInitUserDefinedTypeList(&userdefinedtypelist); LOGMALLOCLIST logmalloclist; - initLogMallocList(&logmalloclist); + udaInitLogMallocList(&logmalloclist); idam_plugin_interface.interfaceVersion = 1; idam_plugin_interface.pluginVersion = 0; @@ -574,10 +574,10 @@ int udaServerMetaDataPlugin(const PLUGINLIST* plugin_list, int plugin_id, REQUES data_block.signal_rec = signal_rec; USERDEFINEDTYPELIST userdefinedtypelist; - initUserDefinedTypeList(&userdefinedtypelist); + udaInitUserDefinedTypeList(&userdefinedtypelist); LOGMALLOCLIST logmalloclist; - initLogMallocList(&logmalloclist); + udaInitLogMallocList(&logmalloclist); idam_plugin_interface.interfaceVersion = 1; idam_plugin_interface.pluginVersion = 0; diff --git a/source/server/serverSubsetData.cpp b/source/server/serverSubsetData.cpp index b8581ccd..a75a9927 100644 --- a/source/server/serverSubsetData.cpp +++ b/source/server/serverSubsetData.cpp @@ -210,7 +210,7 @@ int process_subset_operation(int ii, SUBSET subset, DATA_BLOCK* data_block, LOGM // Properties Must be identical for all structure array elements extract = *(char**)&data_block->data[jj * udt->size + udt->compoundfield[i].offset]; - findMalloc2(logmalloclist, (void*)extract, &count, &size, &type_name, &rank, &shape); + udaFindMalloc2(logmalloclist, (void*)extract, &count, &size, &type_name, &rank, &shape); if (jj > 0) { if (count != count_p || size != size_p || rank != rank_p || strcmp(type_name, type_name_p) != 0) { @@ -238,7 +238,7 @@ int process_subset_operation(int ii, SUBSET subset, DATA_BLOCK* data_block, LOGM } else { extract = *(char**)&data_block->data[udt->compoundfield[i].offset]; - findMalloc2(logmalloclist, (void*)extract, &count, &size, &type_name, &rank, &shape); + udaFindMalloc2(logmalloclist, (void*)extract, &count, &size, &type_name, &rank, &shape); } if (mapType == 3) { @@ -246,7 +246,7 @@ int process_subset_operation(int ii, SUBSET subset, DATA_BLOCK* data_block, LOGM "member is also an array. (Functionality has not been implemented!)"); } - int type = gettypeof(type_name); + int type = udaGettypeof(type_name); switch (type) { case UDA_TYPE_DOUBLE: { @@ -340,7 +340,7 @@ int process_subset_operation(int ii, SUBSET subset, DATA_BLOCK* data_block, LOGM } if (logmalloclist != nullptr) { - freeMallocLogList(logmalloclist); + udaFreeMallocLogList(logmalloclist); free(logmalloclist); logmalloclist = nullptr; } diff --git a/source/server/udaLegacyServer.cpp b/source/server/udaLegacyServer.cpp index 2571ceed..f05e2576 100644 --- a/source/server/udaLegacyServer.cpp +++ b/source/server/udaLegacyServer.cpp @@ -61,7 +61,7 @@ int legacyServer(CLIENT_BLOCK client_block, const PLUGINLIST* pluginlist, LOGMAL ACTIONS actions_sig; LOGSTRUCTLIST log_struct_list; - initLogStructList(&log_struct_list); + udaInitLogStructList(&log_struct_list); int server_tot_block_time = 0; int server_timeout = TIMEOUT; // user specified Server Lifetime @@ -782,7 +782,7 @@ int legacyServer(CLIENT_BLOCK client_block, const PLUGINLIST* pluginlist, LOGMAL //---------------------------------------------------------------------------- // Free Structure Definition List (don't free the structure as stack variable) - freeUserDefinedTypeList(&parseduserdefinedtypelist); + udaFreeUserDefinedTypeList(&parseduserdefinedtypelist); //---------------------------------------------------------------------------- // Close the Socket Connections to Other Data Servers diff --git a/source/server/udaServer.cpp b/source/server/udaServer.cpp index de61bc36..591326ee 100644 --- a/source/server/udaServer.cpp +++ b/source/server/udaServer.cpp @@ -116,7 +116,7 @@ int udaServer(CLIENT_BLOCK client_block) XDR* server_output = nullptr; LOGSTRUCTLIST log_struct_list; - initLogStructList(&log_struct_list); + udaInitLogStructList(&log_struct_list); int server_tot_block_time = 0; int server_timeout = TIMEOUT; // user specified Server Lifetime @@ -841,14 +841,14 @@ int doServerLoop(REQUEST_BLOCK* request_block, DATA_BLOCK_LIST* data_block_list, UDA_LOG(UDA_LOG_DEBUG, "Start of Server Wait Loop\n"); // Create a new userdefinedtypelist for the request by copying the parseduserdefinedtypelist structure - // copyUserDefinedTypeList(&userdefinedtypelist); + // udaCopyUserDefinedTypeList(&userdefinedtypelist); - getInitialUserDefinedTypeList(&user_defined_type_list); + udaGetInitialUserDefinedTypeList(&user_defined_type_list); parsed_user_defined_type_list = *user_defined_type_list; - printUserDefinedTypeList(*user_defined_type_list); + udaPrintUserDefinedTypeList(*user_defined_type_list); log_malloc_list = (LOGMALLOCLIST*)malloc(sizeof(LOGMALLOCLIST)); - initLogMallocList(log_malloc_list); + udaInitLogMallocList(log_malloc_list); int server_closedown = 0; err = handleRequest(request_block, client_block, server_block, metadata_block, actions_desc, actions_sig, @@ -876,11 +876,11 @@ int doServerLoop(REQUEST_BLOCK* request_block, DATA_BLOCK_LIST* data_block_list, //---------------------------------------------------------------------------- // Free Data Block Heap Memory - UDA_LOG(UDA_LOG_DEBUG, "freeUserDefinedTypeList\n"); - freeUserDefinedTypeList(user_defined_type_list); + UDA_LOG(UDA_LOG_DEBUG, "udaFreeUserDefinedTypeList\n"); + udaFreeUserDefinedTypeList(user_defined_type_list); user_defined_type_list = nullptr; - freeMallocLogList(log_malloc_list); + udaFreeMallocLogList(log_malloc_list); free(log_malloc_list); log_malloc_list = nullptr; @@ -946,14 +946,14 @@ int doServerClosedown(CLIENT_BLOCK* client_block, REQUEST_BLOCK* request_block, //---------------------------------------------------------------------------- // Free Structure Definition List (don't free the structure as stack variable) - // freeUserDefinedTypeList(&parseduserdefinedtypelist); + // udaFreeUserDefinedTypeList(&parseduserdefinedtypelist); //---------------------------------------------------------------------------- // Free Plugin List and Close all open library entries freePluginList(&pluginList); - freeMallocLogList(log_malloc_list); + udaFreeMallocLogList(log_malloc_list); free(log_malloc_list); log_malloc_list = nullptr; @@ -1175,7 +1175,7 @@ int startupServer(SERVER_BLOCK* server_block, XDR*& server_input, XDR*& server_o /* if (!fileParsed) { fileParsed = 1; - initUserDefinedTypeList(&parseduserdefinedtypelist); + udaInitUserDefinedTypeList(&parseduserdefinedtypelist); char* token = nullptr; if ((token = getenv("UDA_SARRAY_CONFIG")) == nullptr) { @@ -1184,7 +1184,7 @@ int startupServer(SERVER_BLOCK* server_block, XDR*& server_input, XDR*& server_o UDA_LOG(UDA_LOG_DEBUG, "Parsing structure definition file: %s\n", token); parseIncludeFile(&parseduserdefinedtypelist, token); // file containing the SARRAY structure definition - printUserDefinedTypeList(parseduserdefinedtypelist); + udaPrintUserDefinedTypeList(parseduserdefinedtypelist); } */ diff --git a/source/server2/server.cpp b/source/server2/server.cpp index a8134cbd..ab974db8 100644 --- a/source/server2/server.cpp +++ b/source/server2/server.cpp @@ -188,7 +188,7 @@ void uda::Server::close() //---------------------------------------------------------------------------- // Free Structure Definition List (don't free the structure as stack variable) - // freeUserDefinedTypeList(&parseduserdefinedtypelist); + // udaFreeUserDefinedTypeList(&parseduserdefinedtypelist); //---------------------------------------------------------------------------- // Free Plugin List and Close all open library entries @@ -225,14 +225,14 @@ void uda::Server::loop() UDA_LOG(UDA_LOG_DEBUG, "Start of Server Wait Loop\n"); // Create a new userdefinedtypelist for the request by copying the parseduserdefinedtypelist structure - // copyUserDefinedTypeList(&userdefinedtypelist); + // udaCopyUserDefinedTypeList(&userdefinedtypelist); - getInitialUserDefinedTypeList(&user_defined_type_list_); + udaGetInitialUserDefinedTypeList(&user_defined_type_list_); parsed_user_defined_type_list_ = *user_defined_type_list_; - // printUserDefinedTypeList(*user_defined_type_list_); + // udaPrintUserDefinedTypeList(*user_defined_type_list_); log_malloc_list_ = (LOGMALLOCLIST*)malloc(sizeof(LOGMALLOCLIST)); - initLogMallocList(log_malloc_list_); + udaInitLogMallocList(log_malloc_list_); server_closedown_ = false; @@ -258,11 +258,11 @@ void uda::Server::loop() //---------------------------------------------------------------------------- // Free Data Block Heap Memory - UDA_LOG(UDA_LOG_DEBUG, "freeUserDefinedTypeList\n"); - freeUserDefinedTypeList(user_defined_type_list_); + UDA_LOG(UDA_LOG_DEBUG, "udaFreeUserDefinedTypeList\n"); + udaFreeUserDefinedTypeList(user_defined_type_list_); user_defined_type_list_ = nullptr; - freeMallocLogList(log_malloc_list_); + udaFreeMallocLogList(log_malloc_list_); ::free(log_malloc_list_); log_malloc_list_ = nullptr; diff --git a/source/server2/server_plugin.cpp b/source/server2/server_plugin.cpp index bb36f475..88ba6ae2 100644 --- a/source/server2/server_plugin.cpp +++ b/source/server2/server_plugin.cpp @@ -337,10 +337,10 @@ int uda::provenancePlugin(ClientBlock* client_block, RequestData* original_reque } USERDEFINEDTYPELIST userdefinedtypelist; - initUserDefinedTypeList(&userdefinedtypelist); + udaInitUserDefinedTypeList(&userdefinedtypelist); LOGMALLOCLIST logmalloclist; - initLogMallocList(&logmalloclist); + udaInitLogMallocList(&logmalloclist); auto plugin_list = plugins.as_plugin_list(); plugin_interface.interfaceVersion = 1; @@ -486,10 +486,10 @@ int uda::call_metadata_plugin(const PluginData& plugin, RequestData* request_blo data_block.signal_rec = &metadata.signal_rec; UserDefinedTypeList userdefinedtypelist = {}; - initUserDefinedTypeList(&userdefinedtypelist); + udaInitUserDefinedTypeList(&userdefinedtypelist); LogMallocList logmalloclist = {}; - initLogMallocList(&logmalloclist); + udaInitLogMallocList(&logmalloclist); auto plugin_list = plugins.as_plugin_list(); idam_plugin_interface.interfaceVersion = 1; diff --git a/source/server2/server_subset_data.cpp b/source/server2/server_subset_data.cpp index 49e0fc89..83393b56 100644 --- a/source/server2/server_subset_data.cpp +++ b/source/server2/server_subset_data.cpp @@ -240,7 +240,7 @@ int uda::serverSubsetData(DATA_BLOCK* data_block, ACTION action, LOGMALLOCLIST* for (int jj = 0; jj < data_n; jj++) { // Properties Must be identical for all structure array elements extract = *(char**)&data_block->data[jj * udt->size + udt->compoundfield[i].offset]; - findMalloc2(logmalloclist, (void*)extract, &count, &size, &type_name, &rank, + udaFindMalloc2(logmalloclist, (void*)extract, &count, &size, &type_name, &rank, &shape); if (jj > 0) { if (count != count_p || size != size_p || rank != rank_p || @@ -270,7 +270,7 @@ int uda::serverSubsetData(DATA_BLOCK* data_block, ACTION action, LOGMALLOCLIST* } else { extract = *(char**)&data_block->data[udt->compoundfield[i].offset]; - findMalloc2(logmalloclist, (void*)extract, &count, &size, &type_name, &rank, &shape); + udaFindMalloc2(logmalloclist, (void*)extract, &count, &size, &type_name, &rank, &shape); } if (count == 1 && data_n >= 1) { @@ -285,7 +285,7 @@ int uda::serverSubsetData(DATA_BLOCK* data_block, ACTION action, LOGMALLOCLIST* } } - type = gettypeof(type_name); + type = udaGettypeof(type_name); switch (type) { case UDA_TYPE_DOUBLE: { @@ -379,7 +379,7 @@ int uda::serverSubsetData(DATA_BLOCK* data_block, ACTION action, LOGMALLOCLIST* } if (logmalloclist != nullptr) { - freeMallocLogList(logmalloclist); + udaFreeMallocLogList(logmalloclist); free(logmalloclist); logmalloclist = nullptr; } diff --git a/source/structures/accessors.cpp b/source/structures/accessors.cpp index a26f5201..17dce831 100644 --- a/source/structures/accessors.cpp +++ b/source/structures/accessors.cpp @@ -136,7 +136,7 @@ NTREE* findNTreeStructureComponent2(LOGMALLOCLIST* logmalloclist, NTREE* ntree, if ((strchr(target, '.') != nullptr) || strchr(target, '/') != nullptr) { int ntargets; - char** targetlist = parseTarget(target, &ntargets); // Deconstruct the Name and search for each hierarchy group + char** targetlist = udaParseTarget(target, &ntargets); // Deconstruct the Name and search for each hierarchy group *lastname = targetlist[ntargets - 1]; // Preserve the last element name @@ -165,7 +165,7 @@ NTREE* findNTreeStructureComponent2(LOGMALLOCLIST* logmalloclist, NTREE* ntree, child = found; } - addMalloc(logmalloclist, (void*)targetlist[ntargets - 1], (int)strlen(targetlist[ntargets - 1]) + 1, + udaAddMalloc(logmalloclist, (void*)targetlist[ntargets - 1], (int)strlen(targetlist[ntargets - 1]) + 1, sizeof(char), "char"); const char* last_target = targetlist[ntargets - 1]; @@ -230,7 +230,7 @@ NTREE* findNTreeStructure2(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const cha char** targetlist = nullptr; NTREE* child = ntree; - targetlist = parseTarget(target, &ntargets); // Deconstruct Name and search for each hierarchy group + targetlist = udaParseTarget(target, &ntargets); // Deconstruct Name and search for each hierarchy group for (int i = 0; i < ntargets; i++) { // Drill Down to requested named structure element if (i < ntargets - 1) { @@ -253,7 +253,7 @@ NTREE* findNTreeStructure2(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const cha *lastname = targetlist[ntargets - 1]; // Preserve the last element name - addMalloc(logmalloclist, (void*)targetlist[ntargets - 1], (int)strlen(targetlist[ntargets - 1]) + 1, + udaAddMalloc(logmalloclist, (void*)targetlist[ntargets - 1], (int)strlen(targetlist[ntargets - 1]) + 1, sizeof(char), "char"); for (int i = 0; i < ntargets - 1; i++) { // Free all others @@ -413,7 +413,7 @@ NTREE* findNTreeStructureDefinition(NTREE* ntree, const char* target) char** targetlist = nullptr; NTREE* child = ntree; - targetlist = parseTarget(target, &ntargets); // Deconstruct the Name and search for each hierarchy group + targetlist = udaParseTarget(target, &ntargets); // Deconstruct the Name and search for each hierarchy group for (int i = 0; i < ntargets; i++) { // Drill Down to requested named structure type if ((child = findNTreeStructureDefinition(child, targetlist[i])) == nullptr) { @@ -602,7 +602,7 @@ int udaRegulariseVlenStructures(LOGMALLOCLIST* logmalloclist, NTREE* tree, USERD vlen->data = realloc(vlen->data, count * child->size); // Expand Heap to regularise newnew = vlen->data; size = child->size; - changeMalloc(logmalloclist, old, vlen->data, count, child->size, child->name); + udaChangeMalloc(logmalloclist, old, vlen->data, count, child->size, child->name); tree->data = (void*)vlen; // Write new data array to Original Tree Nodes @@ -632,10 +632,10 @@ int udaRegulariseVlenStructures(LOGMALLOCLIST* logmalloclist, NTREE* tree, USERD unsigned int ui; for (ui = (unsigned int)resetBranches; ui < count; ui++) { tree->children[ui] = (NTREE*)malloc(sizeof(NTREE)); - addMalloc(logmalloclist, (void*)tree->children[ui], 1, sizeof(NTREE), "NTREE"); + udaAddMalloc(logmalloclist, (void*)tree->children[ui], 1, sizeof(NTREE), "NTREE"); memcpy(tree->children[ui], tree->children[0], sizeof(NTREE)); } - changeMalloc(logmalloclist, old, (void*)tree->children, count, sizeof(NTREE), "NTREE"); + udaChangeMalloc(logmalloclist, old, (void*)tree->children, count, sizeof(NTREE), "NTREE"); // Update All new Child Nodes with array element addresses @@ -702,7 +702,7 @@ int getNodeStructureDataCount(LOGMALLOCLIST* logmalloclist, NTREE* ntree) if (ntree == nullptr) { ntree = udaGetFullNTree(); } - findMalloc(logmalloclist, (void*)&ntree->data, &count, &size, &type); + udaFindMalloc(logmalloclist, (void*)&ntree->data, &count, &size, &type); return count; } @@ -720,7 +720,7 @@ int getNodeStructureDataSize(LOGMALLOCLIST* logmalloclist, NTREE* ntree) if (ntree == nullptr) { ntree = udaGetFullNTree(); } - findMalloc(logmalloclist, (void*)&ntree->data, &count, &size, &type); + udaFindMalloc(logmalloclist, (void*)&ntree->data, &count, &size, &type); return size; } @@ -739,7 +739,7 @@ int getNodeStructureDataRank(LOGMALLOCLIST* logmalloclist, NTREE* ntree) if (ntree == nullptr) { ntree = udaGetFullNTree(); } - findMalloc2(logmalloclist, (void*)&ntree->data, &count, &size, &type, &rank, &shape); + udaFindMalloc2(logmalloclist, (void*)&ntree->data, &count, &size, &type, &rank, &shape); return rank; } @@ -777,7 +777,7 @@ int* getNodeStructureDataShape(LOGMALLOCLIST* logmalloclist, NTREE* ntree) fflush(stdout); } - findMalloc2(logmalloclist, (void*)&ntree->data, &count, &size, &type, &rank, &shape); + udaFindMalloc2(logmalloclist, (void*)&ntree->data, &count, &size, &type, &rank, &shape); return shape; } @@ -795,7 +795,7 @@ const char* getNodeStructureDataDataType(LOGMALLOCLIST* logmalloclist, NTREE* nt if (ntree == nullptr) { ntree = udaGetFullNTree(); } - findMalloc(logmalloclist, (void*)&ntree->data, &count, &size, &type); + udaFindMalloc(logmalloclist, (void*)&ntree->data, &count, &size, &type); return type; } @@ -853,7 +853,7 @@ void printImage(const char* image, int imagecount) */ void defineField(COMPOUNDFIELD* field, const char* name, const char* desc, int* offset, unsigned short type_id) { - initCompoundField(field); + udaInitCompoundField(field); strcpy(field->name, name); field->pointer = 0; // default for scalar values @@ -986,7 +986,7 @@ void defineField(COMPOUNDFIELD* field, const char* name, const char* desc, int* field->offset = (int)newoffset((size_t)*offset, "char *"); // must be an explicit char pointer (STRING Convention!) field->offpad = (int)padding((size_t)*offset, "char *"); - field->alignment = getalignmentof("char *"); + field->alignment = udaGetalignmentof("char *"); break; case ARRAYSTRING: // Bug Fix dgm 07Jul2014: atomictype was missing! @@ -1024,7 +1024,7 @@ void defineField(COMPOUNDFIELD* field, const char* name, const char* desc, int* if (type_id != SCALARSTRING) { field->offset = (int)newoffset(*offset, field->type); field->offpad = (int)padding(*offset, field->type); - field->alignment = getalignmentof(field->type); + field->alignment = udaGetalignmentof(field->type); } *offset = field->offset + field->size; // Next Offset @@ -1032,7 +1032,7 @@ void defineField(COMPOUNDFIELD* field, const char* name, const char* desc, int* void defineCompoundField(COMPOUNDFIELD* field, const char* type, const char* name, char* desc, int offset, int size) { - initCompoundField(field); + udaInitCompoundField(field); strcpy(field->name, name); field->atomictype = UDA_TYPE_UNKNOWN; diff --git a/source/structures/parseIncludeFile.cpp b/source/structures/parseIncludeFile.cpp index 70f70d93..a70292a7 100644 --- a/source/structures/parseIncludeFile.cpp +++ b/source/structures/parseIncludeFile.cpp @@ -306,7 +306,7 @@ int parseIncludeFile(USERDEFINEDTYPELIST* userdefinedtypelist, const char* heade image = nullptr; imagecount = 0; - addImage(&image, &imagecount, buffer); + udaAddImage(&image, &imagecount, buffer); if (model == 1) { strcpy(name, &buffer[7]); @@ -331,10 +331,10 @@ int parseIncludeFile(USERDEFINEDTYPELIST* userdefinedtypelist, const char* heade if (model != 0 && STR_STARTSWITH(buffer, "}")) { if (model == 1) { - addImage(&image, &imagecount, "};\n"); + udaAddImage(&image, &imagecount, "};\n"); } - addImage(&image, &imagecount, buffer); - addImage(&image, &imagecount, "\n"); + udaAddImage(&image, &imagecount, buffer); + udaAddImage(&image, &imagecount, "\n"); if (model == 1) { if (buffer[0] == '}') { // No typedef statement @@ -382,7 +382,7 @@ int parseIncludeFile(USERDEFINEDTYPELIST* userdefinedtypelist, const char* heade (userdefinedtypelist->listCount + 1) * sizeof(USERDEFINEDTYPE)); userdefinedtype = &userdefinedtypelist->userdefinedtype[userdefinedtypelist->listCount]; - initUserDefinedType(userdefinedtype); + udaInitUserDefinedType(userdefinedtype); userdefinedtypelist->listCount = userdefinedtypelist->listCount + 1; @@ -395,7 +395,7 @@ int parseIncludeFile(USERDEFINEDTYPELIST* userdefinedtypelist, const char* heade byteCount = 0; maxAlign = 0; for (int i = 0; i < itemCount; i++) { - initCompoundField(&userdefinedtype->compoundfield[i]); + udaInitCompoundField(&userdefinedtype->compoundfield[i]); strcpy(userdefinedtype->compoundfield[i].name, item[i]); strcpy(userdefinedtype->compoundfield[i].type, type[i]); strcpy(userdefinedtype->compoundfield[i].desc, desc[i]); @@ -404,14 +404,14 @@ int parseIncludeFile(USERDEFINEDTYPELIST* userdefinedtypelist, const char* heade userdefinedtype->compoundfield[i].offset = offset[i]; userdefinedtype->compoundfield[i].offpad = offpad[i]; if (pointer[i]) { - userdefinedtype->compoundfield[i].alignment = getalignmentof("*"); + userdefinedtype->compoundfield[i].alignment = udaGetalignmentof("*"); } else { - userdefinedtype->compoundfield[i].alignment = getalignmentof(type[i]); + userdefinedtype->compoundfield[i].alignment = udaGetalignmentof(type[i]); } if (userdefinedtype->compoundfield[i].alignment > maxAlign) { maxAlign = userdefinedtype->compoundfield[i].alignment; } - userdefinedtype->compoundfield[i].atomictype = gettypeof(type[i]); + userdefinedtype->compoundfield[i].atomictype = udaGettypeof(type[i]); userdefinedtype->compoundfield[i].rank = rank[i]; userdefinedtype->compoundfield[i].count = count[i]; if (rank[i] > 0) { @@ -453,8 +453,8 @@ int parseIncludeFile(USERDEFINEDTYPELIST* userdefinedtypelist, const char* heade if (buffer[0] != '}' && strlen(buffer) > 0) { // Structure Contents - expandImage(buffer, defnames, defvalues, defCount, work); - addImage(&image, &imagecount, work); + udaExpandImage(buffer, defnames, defvalues, defCount, work); + udaAddImage(&image, &imagecount, work); convertNonPrintable2(buffer); LeftTrimString(buffer); diff --git a/source/structures/struct.cpp b/source/structures/struct.cpp index 2ae26f85..80fd0e0e 100644 --- a/source/structures/struct.cpp +++ b/source/structures/struct.cpp @@ -16,7 +16,7 @@ // // Send the Data // -// rc = xdrUserDefinedTypeData(xdrs, udtype, (void *)&mystruct); +// rc = udaXdrUserDefinedTypeData(xdrs, udtype, (void *)&mystruct); // // Arrays of User Defined Structures are ported using a special structure names SARRAY .... // @@ -28,11 +28,11 @@ // Create an empty structure definition // // USERDEFINEDTYPE udtype; -// initUserDefinedType(&udtype); +// udaInitUserDefinedType(&udtype); // // Receive the Data and its structure definition // -// rc = xdrUserDefinedTypeData(xdrs, &udtype, (void *)&mystruct); +// rc = udaXdrUserDefinedTypeData(xdrs, &udtype, (void *)&mystruct); // // //============================================================================================================== @@ -79,7 +79,7 @@ void udaSetFullNTree(NTREE* ntree) full_ntree = ntree; } -void setLastMallocIndexValue(unsigned int* lastMallocIndexValue_in) +void udaSetLastMallocIndexValue(unsigned int* lastMallocIndexValue_in) { last_malloc_index_value = lastMallocIndexValue_in; last_malloc_index = *last_malloc_index_value; @@ -93,7 +93,7 @@ void setLastMallocIndexValue(unsigned int* lastMallocIndexValue_in) * @param str A pointer to a SARRAY data structure instance. * @return Void. */ -void initSArray(SARRAY* str) +void udaInitSArray(SARRAY* str) { str->count = 0; str->rank = 0; @@ -108,7 +108,7 @@ void initSArray(SARRAY* str) * @param str A SARRAY data structure instance. * @return Void. */ -void printSarray(SARRAY str) +void udaPrintSarray(SARRAY str) { UDA_LOG(UDA_LOG_DEBUG, "SARRAY Contents\n"); UDA_LOG(UDA_LOG_DEBUG, "Type : %s\n", str.type); @@ -133,11 +133,11 @@ void printSarray(SARRAY str) * @param node A NTREE node to add. * @return Void. */ -void addNTreeList(LOGMALLOCLIST* logmalloclist, NTREE* node, NTREELIST* ntree_list) +void udaAddNTreeList(LOGMALLOCLIST* logmalloclist, NTREE* node, NTREELIST* ntree_list) { VOIDTYPE old = (VOIDTYPE)ntree_list->forrest; ntree_list->forrest = (NTREE*)realloc((void*)ntree_list->forrest, (++ntree_list->listCount) * sizeof(NTREE*)); - changeMalloc(logmalloclist, old, (void*)ntree_list->forrest, ntree_list->listCount, sizeof(NTREE*), "NTREE *"); + udaChangeMalloc(logmalloclist, old, (void*)ntree_list->forrest, ntree_list->listCount, sizeof(NTREE*), "NTREE *"); ntree_list->forrest[ntree_list->listCount] = *node; } @@ -147,7 +147,7 @@ void addNTreeList(LOGMALLOCLIST* logmalloclist, NTREE* node, NTREELIST* ntree_li * @param child A NTREE node to add to the existing set of child nodes * @return Void. */ -void addNTree(NTREE* parent, NTREE* child) +void udaAddNTree(NTREE* parent, NTREE* child) { int branch; if (child == nullptr || parent == nullptr) { @@ -164,14 +164,14 @@ void addNTree(NTREE* parent, NTREE* child) * @param ntree A NTREE node with or without a set of child nodes * @return Void. */ -void freeNTreeNode(NTREE* ntree) +void udaFreeNTreeNode(NTREE* ntree) { if (ntree == nullptr) { return; } if (ntree->branches > 0 && ntree->children != nullptr) { for (int i = 0; i < ntree->branches; i++) { - freeNTreeNode(ntree->children[i]); + udaFreeNTreeNode(ntree->children[i]); } free(ntree->children); } @@ -184,7 +184,7 @@ void freeNTreeNode(NTREE* ntree) * @param line A new image line to add to the existing image. * @return Both image and image count are updated on return. */ -void addImage(char** image, int* imagecount, const char* line) +void udaAddImage(char** image, int* imagecount, const char* line) { int len; void* old = (void*)*image; @@ -208,7 +208,7 @@ void addImage(char** image, int* imagecount, const char* line) * @param expand A pre-allocated array of char to be used to receive the expanded buffer string. * @return expand An expanded Image line. */ -void expandImage(char* buffer, char defnames[MAXELEMENTS][MAXELEMENTNAME], int* defvalues, int defCount, char* expand) +void udaExpandImage(char* buffer, char defnames[MAXELEMENTS][MAXELEMENTNAME], int* defvalues, int defCount, char* expand) { // Insert values with #define names int len, lstr; @@ -263,7 +263,7 @@ void expandImage(char* buffer, char defnames[MAXELEMENTS][MAXELEMENTNAME], int* * @param str A pointer to a LOGMALLOCLIST data structure instance. * @return Void. */ -void initLogMallocList(LOGMALLOCLIST* str) +void udaInitLogMallocList(LOGMALLOCLIST* str) { str->listcount = 0; str->listsize = 0; @@ -275,7 +275,7 @@ void initLogMallocList(LOGMALLOCLIST* str) * @param str A pointer to a LOGMALLOC data structure instance. * @return Void. */ -void initLogMalloc(LOGMALLOC* str) +void udaInitLogMalloc(LOGMALLOC* str) { str->count = 0; str->rank = 0; @@ -290,7 +290,7 @@ void initLogMalloc(LOGMALLOC* str) * * @return Void. */ -void initLogStructList(LOGSTRUCTLIST* log_struct_list) +void udaInitLogStructList(LOGSTRUCTLIST* log_struct_list) { log_struct_list->listcount = 0; log_struct_list->listsize = 0; @@ -302,7 +302,7 @@ void initLogStructList(LOGSTRUCTLIST* log_struct_list) * @param str A pointer to a LOGSTRUCT data structure instance. * @return Void. */ -void initLogStruct(LOGSTRUCT* str) +void udaInitLogStruct(LOGSTRUCT* str) { str->id = 0; str->type[0] = '\0'; @@ -314,7 +314,7 @@ void initLogStruct(LOGSTRUCT* str) * @param str A pointer to a COMPOUNDFIELD data structure instance. * @return Void. */ -void initCompoundField(COMPOUNDFIELD* str) +void udaInitCompoundField(COMPOUNDFIELD* str) { str->size = 0; str->offset = 0; @@ -335,7 +335,7 @@ void initCompoundField(COMPOUNDFIELD* str) * @param str A pointer to a USERDEFINEDTYPE data structure instance. * @return Void. */ -void initUserDefinedType(USERDEFINEDTYPE* str) +void udaInitUserDefinedType(USERDEFINEDTYPE* str) { str->idamclass = UDA_TYPE_UNKNOWN; str->ref_id = 0; @@ -353,7 +353,7 @@ void initUserDefinedType(USERDEFINEDTYPE* str) * @param str A pointer to a USERDEFINEDTYPELIST data structure instance. * @return Void. */ -void initUserDefinedTypeList(USERDEFINEDTYPELIST* str) +void udaInitUserDefinedTypeList(USERDEFINEDTYPELIST* str) { str->listCount = 0; str->userdefinedtype = nullptr; @@ -364,7 +364,7 @@ void initUserDefinedTypeList(USERDEFINEDTYPELIST* str) * @param str A pointer to a GENERAL_BLOCK data structure instance. * @return Void. */ -void initGeneralBlock(GENERAL_BLOCK* str) +void udaInitGeneralBlock(GENERAL_BLOCK* str) { str->userdefinedtype = nullptr; str->userdefinedtypelist = nullptr; @@ -378,7 +378,7 @@ void initGeneralBlock(GENERAL_BLOCK* str) * @param str A COMPOUNDFIELD data structure instance. * @return Void. */ -void printCompoundField(COMPOUNDFIELD str) +void udaPrintCompoundField(COMPOUNDFIELD str) { UDA_LOG(UDA_LOG_DEBUG, "COMPOUNDFIELD Contents\n"); UDA_LOG(UDA_LOG_DEBUG, "name : %s\n", str.name); @@ -411,7 +411,7 @@ void printCompoundField(COMPOUNDFIELD str) * @param str A COMPOUNDFIELD data structure instance. * @return Void. */ -void printCompoundFieldTable(COMPOUNDFIELD str) +void udaPrintCompoundFieldTable(COMPOUNDFIELD str) { UDA_LOG(UDA_LOG_DEBUG, "\t%20s\t%16s\t%d\t%d\t%d\t%d\t%d\t%d\n", str.name, str.type, str.pointer, str.size, str.count, str.offset, str.offpad, str.alignment); @@ -423,7 +423,7 @@ void printCompoundFieldTable(COMPOUNDFIELD str) * @param str A USERDEFINEDTYPE data structure instance. * @return Void. */ -void printUserDefinedType(USERDEFINEDTYPE str) +void udaPrintUserDefinedType(USERDEFINEDTYPE str) { UDA_LOG(UDA_LOG_DEBUG, "USERDEFINEDTYPE Contents\n"); UDA_LOG(UDA_LOG_DEBUG, "name : %s\n", str.name); @@ -437,7 +437,7 @@ void printUserDefinedType(USERDEFINEDTYPE str) if (str.compoundfield != nullptr) { for (int i = 0; i < str.fieldcount; i++) { - printCompoundField(str.compoundfield[i]); + udaPrintCompoundField(str.compoundfield[i]); } } UDA_LOG(UDA_LOG_DEBUG, "\n"); @@ -449,7 +449,7 @@ void printUserDefinedType(USERDEFINEDTYPE str) * @param str A USERDEFINEDTYPE data structure instance. * @return Void. */ -void printUserDefinedTypeTable(USERDEFINEDTYPELIST* userdefinedtypelist, USERDEFINEDTYPE str) +void udaPrintUserDefinedTypeTable(USERDEFINEDTYPELIST* userdefinedtypelist, USERDEFINEDTYPE str) { UDA_LOG(UDA_LOG_DEBUG, "USERDEFINEDTYPE name: %s size: %d [%d] fieldcount: %d ref_id: %d \n", str.name, str.size, getStructureSize(userdefinedtypelist, &str), str.fieldcount, str.ref_id); @@ -457,7 +457,7 @@ void printUserDefinedTypeTable(USERDEFINEDTYPELIST* userdefinedtypelist, USERDEF UDA_LOG(UDA_LOG_DEBUG, "\t Item\t type\tpointer\tsize\tcount\toffset\toffpad\talignment\n"); for (int i = 0; i < str.fieldcount; i++) { - printCompoundFieldTable(str.compoundfield[i]); + udaPrintCompoundFieldTable(str.compoundfield[i]); } } } @@ -468,7 +468,7 @@ void printUserDefinedTypeTable(USERDEFINEDTYPELIST* userdefinedtypelist, USERDEF * @param str A USERDEFINEDTYPE data structure instance. * @return Void. */ -void printZeroSizedUserDefinedTypeTable(USERDEFINEDTYPE str) +void udaPrintZeroSizedUserDefinedTypeTable(USERDEFINEDTYPE str) { int size1 = 0, size2 = 0; UDA_LOG(UDA_LOG_DEBUG, "USERDEFINEDTYPE name: %s size: %d fieldcount %d\n", str.name, str.size, str.fieldcount); @@ -479,7 +479,7 @@ void printZeroSizedUserDefinedTypeTable(USERDEFINEDTYPE str) if (str.compoundfield[i].size > 0) { continue; } - printCompoundFieldTable(str.compoundfield[i]); + udaPrintCompoundFieldTable(str.compoundfield[i]); if (str.compoundfield[i].pointer) { size1 = size1 + str.compoundfield[i].size; } else { @@ -503,12 +503,12 @@ void printZeroSizedUserDefinedTypeTable(USERDEFINEDTYPE str) * @param str A USERDEFINEDTYPELIST data structure instance. * @return Void. */ -void printUserDefinedTypeList(USERDEFINEDTYPELIST str) +void udaPrintUserDefinedTypeList(USERDEFINEDTYPELIST str) { UDA_LOG(UDA_LOG_DEBUG, "USERDEFINEDTYPELIST Contents\n"); UDA_LOG(UDA_LOG_DEBUG, "listCount : %d\n", str.listCount); for (int i = 0; i < str.listCount; i++) { - printUserDefinedType(str.userdefinedtype[i]); + udaPrintUserDefinedType(str.userdefinedtype[i]); } UDA_LOG(UDA_LOG_DEBUG, "\n"); } @@ -519,12 +519,12 @@ void printUserDefinedTypeList(USERDEFINEDTYPELIST str) * @param str A USERDEFINEDTYPELIST data structure instance. * @return Void. */ -void printUserDefinedTypeListTable(USERDEFINEDTYPELIST str) +void udaPrintUserDefinedTypeListTable(USERDEFINEDTYPELIST str) { UDA_LOG(UDA_LOG_DEBUG, "USERDEFINEDTYPELIST Contents\n"); UDA_LOG(UDA_LOG_DEBUG, "listCount : %d\n", str.listCount); for (int i = 0; i < str.listCount; i++) { - printUserDefinedTypeTable(&str, str.userdefinedtype[i]); + udaPrintUserDefinedTypeTable(&str, str.userdefinedtype[i]); } UDA_LOG(UDA_LOG_DEBUG, "\n\n"); } @@ -535,12 +535,12 @@ void printUserDefinedTypeListTable(USERDEFINEDTYPELIST str) * @param str A USERDEFINEDTYPELIST data structure instance. * @return Void. */ -void printZeroSizedUserDefinedTypeListTable(USERDEFINEDTYPELIST str) +void udaPrintZeroSizedUserDefinedTypeListTable(USERDEFINEDTYPELIST str) { UDA_LOG(UDA_LOG_DEBUG, "Zero Size USERDEFINEDTYPELIST Contents\n"); UDA_LOG(UDA_LOG_DEBUG, "listCount : %d\n", str.listCount); for (int i = 0; i < str.listCount; i++) { - printZeroSizedUserDefinedTypeTable(str.userdefinedtype[i]); + udaPrintZeroSizedUserDefinedTypeTable(str.userdefinedtype[i]); } UDA_LOG(UDA_LOG_DEBUG, "\n\n"); } @@ -551,7 +551,7 @@ void printZeroSizedUserDefinedTypeListTable(USERDEFINEDTYPELIST str) * @param str A LOGMALLOC data structure instance. * @return Void. */ -void printMallocLog(LOGMALLOC str) +void udaPrintMallocLog(LOGMALLOC str) { UDA_LOG(UDA_LOG_DEBUG, "%p\t%d\t%d\t%d\t%s\n", (void*)str.heap, str.count, str.size, str.freed, str.type); if (str.rank > 1 && str.shape != nullptr) { @@ -568,14 +568,14 @@ void printMallocLog(LOGMALLOC str) * @param fd A File Descriptor. * @return Void. */ -void printMallocLogList(const LOGMALLOCLIST* logmalloclist) +void udaPrintMallocLogList(const LOGMALLOCLIST* logmalloclist) { UDA_LOG(UDA_LOG_DEBUG, "MALLOC LOG List Contents\n"); UDA_LOG(UDA_LOG_DEBUG, "listCount : %d\n", logmalloclist->listcount); UDA_LOG(UDA_LOG_DEBUG, "Address\t\tCount\tSize\tFreed\tType\n"); for (int i = 0; i < logmalloclist->listcount; i++) { UDA_LOG(UDA_LOG_DEBUG, "[%3d] ", i); - printMallocLog(logmalloclist->logmalloc[i]); + udaPrintMallocLog(logmalloclist->logmalloc[i]); } UDA_LOG(UDA_LOG_DEBUG, "\n\n"); } @@ -591,7 +591,7 @@ void printMallocLogList(const LOGMALLOCLIST* logmalloclist) * @param type The name of the type allocated. * @return void. */ -void addNonMalloc(LOGMALLOCLIST* logmalloclist, void* stack, int count, size_t size, const char* type) +void udaAddNonMalloc(LOGMALLOCLIST* logmalloclist, void* stack, int count, size_t size, const char* type) { // Put a non malloc'd memory location on the malloc log flagging it as freed @@ -624,7 +624,7 @@ void addNonMalloc(LOGMALLOCLIST* logmalloclist, void* stack, int count, size_t s * @return void. */ -void addNonMalloc2(LOGMALLOCLIST* logmalloclist, void* stack, int count, size_t size, const char* type, int rank, +void udaAddNonMalloc2(LOGMALLOCLIST* logmalloclist, void* stack, int count, size_t size, const char* type, int rank, int* shape) { // Put a non malloc'd memory location on the malloc log flagging it as freed @@ -659,7 +659,7 @@ void addNonMalloc2(LOGMALLOCLIST* logmalloclist, void* stack, int count, size_t * @param type The name of the type allocated. * @return void. */ -void addMalloc(LOGMALLOCLIST* logmalloclist, void* heap, int count, size_t size, const char* type) +void udaAddMalloc(LOGMALLOCLIST* logmalloclist, void* heap, int count, size_t size, const char* type) { // Log all Heap allocations for Data from User Defined Structures // Grow the list when necessary @@ -698,7 +698,7 @@ void addMalloc(LOGMALLOCLIST* logmalloclist, void* heap, int count, size_t size, * @param shape The shape of the allocated array. Only required when rank > 1. * @return void. */ -void addMalloc2(LOGMALLOCLIST* logmalloclist, void* heap, int count, size_t size, const char* type, int rank, +void udaAddMalloc2(LOGMALLOCLIST* logmalloclist, void* heap, int count, size_t size, const char* type, int rank, int* shape) { // Log all Heap allocations for Data from User Defined Structures @@ -739,11 +739,11 @@ void addMalloc2(LOGMALLOCLIST* logmalloclist, void* heap, int count, size_t size * @param type The name of the type allocated. * @return void. */ -void changeMalloc(LOGMALLOCLIST* logmalloclist, VOIDTYPE old, void* anew, int count, size_t size, const char* type) +void udaChangeMalloc(LOGMALLOCLIST* logmalloclist, VOIDTYPE old, void* anew, int count, size_t size, const char* type) { // Change a List Entry if (old == 0) { - addMalloc(logmalloclist, anew, count, size, type); + udaAddMalloc(logmalloclist, anew, count, size, type); return; } auto target = (VOIDTYPE)((VOIDTYPE*)old); @@ -769,13 +769,13 @@ void changeMalloc(LOGMALLOCLIST* logmalloclist, VOIDTYPE old, void* anew, int co * @param type The name of the type allocated. * @return void. */ -void changeNonMalloc(LOGMALLOCLIST* logmalloclist, void* old, void* anew, int count, size_t size, const char* type) +void udaChangeNonMalloc(LOGMALLOCLIST* logmalloclist, void* old, void* anew, int count, size_t size, const char* type) { // Change a non-malloc List Entry VOIDTYPE target, candidate; if (old == nullptr) { - addNonMalloc(logmalloclist, anew, count, size, type); + udaAddNonMalloc(logmalloclist, anew, count, size, type); return; } target = (VOIDTYPE)((VOIDTYPE*)old); @@ -814,7 +814,7 @@ static int compare_ulong(const void* a, const void* b) } #endif -int dupCountMallocLog(LOGMALLOCLIST* str) +int udaDupCountMallocLog(LOGMALLOCLIST* str) { int sortCount = 0, dupCount = 0; int compare_ulonglong(const void*, const void*); @@ -854,7 +854,7 @@ int dupCountMallocLog(LOGMALLOCLIST* str) * * @return void. */ -void freeMallocLog(LOGMALLOCLIST* str) +void udaFreeMallocLog(LOGMALLOCLIST* str) { if (str == nullptr) { return; @@ -877,17 +877,17 @@ void freeMallocLog(LOGMALLOCLIST* str) * * @return void. */ -void freeMallocLogList(LOGMALLOCLIST* str) +void udaFreeMallocLogList(LOGMALLOCLIST* str) { if (str == nullptr) { return; } - freeMallocLog(str); + udaFreeMallocLog(str); if (str->logmalloc != nullptr) { free(str->logmalloc); } str->logmalloc = nullptr; - initLogMallocList(str); + udaInitLogMallocList(str); } /** Find the meta data associated with a specific memory location. @@ -898,7 +898,7 @@ void freeMallocLogList(LOGMALLOCLIST* str) * @param type The returned allocation type. * @return void. */ -void findMalloc(LOGMALLOCLIST* logmalloclist, void* heap, int* count, int* size, const char** type) +void udaFindMalloc(LOGMALLOCLIST* logmalloclist, void* heap, int* count, int* size, const char** type) { // Find a specific Heap allocation for Data within User Defined Structures @@ -955,7 +955,7 @@ void findMalloc(LOGMALLOCLIST* logmalloclist, void* heap, int* count, int* size, * @return void. */ -void findMalloc2(LOGMALLOCLIST* logmalloclist, void* heap, int* count, int* size, const char** type, int* rank, +void udaFindMalloc2(LOGMALLOCLIST* logmalloclist, void* heap, int* count, int* size, const char** type, int* rank, int** shape) { // Find a specific Heap allocation for Data within User Defined Structures @@ -1018,7 +1018,7 @@ void findMalloc2(LOGMALLOCLIST* logmalloclist, void* heap, int* count, int* size * @param type The name of the type allocated. * @return void. */ -void addStruct(void* heap, const char* type, LOGSTRUCTLIST* log_struct_list) +void udaAddStruct(void* heap, const char* type, LOGSTRUCTLIST* log_struct_list) { // Log all dispatched/received Structures // Grow the list when necessary @@ -1044,10 +1044,10 @@ void addStruct(void* heap, const char* type, LOGSTRUCTLIST* log_struct_list) * * @return void. */ -void freeLogStructList(LOGSTRUCTLIST* log_struct_list) +void udaFreeLogStructList(LOGSTRUCTLIST* log_struct_list) { free(log_struct_list->logstruct); - initLogStructList(log_struct_list); + udaInitLogStructList(log_struct_list); } /** Find the meta data associated with a specific Structure. @@ -1056,7 +1056,7 @@ void freeLogStructList(LOGSTRUCTLIST* log_struct_list) * @param type The returned structure type. * @return The structure id. */ -int findStructId(void* heap, char** type, LOGSTRUCTLIST* log_struct_list) +int udaFindStructId(void* heap, char** type, LOGSTRUCTLIST* log_struct_list) { // Find a specific Data Structure @@ -1081,7 +1081,7 @@ int findStructId(void* heap, char** type, LOGSTRUCTLIST* log_struct_list) * @param type The returned structure type. * @return The heap memory location */ -void* findStructHeap(int id, char** type, LOGSTRUCTLIST* log_struct_list) +void* udaFindStructHeap(int id, char** type, LOGSTRUCTLIST* log_struct_list) { // Find a specific Data Structure @@ -1105,16 +1105,16 @@ void* findStructHeap(int id, char** type, LOGSTRUCTLIST* log_struct_list) * @param anew The copy of the type definition. * @return void. */ -void copyUserDefinedType(USERDEFINEDTYPE* old, USERDEFINEDTYPE* anew) +void udaCopyUserDefinedType(USERDEFINEDTYPE* old, USERDEFINEDTYPE* anew) { USERDEFINEDTYPE udt; - initUserDefinedType(&udt); + udaInitUserDefinedType(&udt); udt = *old; udt.image = (char*)malloc((old->imagecount) * sizeof(char)); memcpy(udt.image, old->image, old->imagecount); udt.compoundfield = (COMPOUNDFIELD*)malloc((old->fieldcount) * sizeof(COMPOUNDFIELD)); for (int i = 0; i < old->fieldcount; i++) { - initCompoundField(&udt.compoundfield[i]); + udaInitCompoundField(&udt.compoundfield[i]); udt.compoundfield[i] = old->compoundfield[i]; if (old->compoundfield[i].rank > 0) { udt.compoundfield[i].shape = (int*)malloc(old->compoundfield[i].rank * sizeof(int)); @@ -1132,17 +1132,17 @@ void copyUserDefinedType(USERDEFINEDTYPE* old, USERDEFINEDTYPE* anew) * @return void. */ #if defined(SERVERBUILD) -void copyUserDefinedTypeList(USERDEFINEDTYPELIST** anew, const USERDEFINEDTYPELIST* parseduserdefinedtypelist) +void udaCopyUserDefinedTypeList(USERDEFINEDTYPELIST** anew, const USERDEFINEDTYPELIST* parseduserdefinedtypelist) { USERDEFINEDTYPELIST* list = (USERDEFINEDTYPELIST*)malloc(sizeof(USERDEFINEDTYPELIST)); - initUserDefinedTypeList(list); + udaInitUserDefinedTypeList(list); list->listCount = parseduserdefinedtypelist->listCount; // Copy the standard set of structure definitions list->userdefinedtype = (USERDEFINEDTYPE*)malloc(parseduserdefinedtypelist->listCount * sizeof(USERDEFINEDTYPE)); for (int i = 0; i < list->listCount; i++) { USERDEFINEDTYPE usertypeOld = parseduserdefinedtypelist->userdefinedtype[i]; USERDEFINEDTYPE usertypeNew; - initUserDefinedType(&usertypeNew); + udaInitUserDefinedType(&usertypeNew); usertypeNew = usertypeOld; usertypeNew.image = (char*)malloc(usertypeOld.imagecount * sizeof(char)); // Copy pointer type (prevents double free) @@ -1151,7 +1151,7 @@ void copyUserDefinedTypeList(USERDEFINEDTYPELIST** anew, const USERDEFINEDTYPELI usertypeNew.compoundfield = (COMPOUNDFIELD*)malloc(usertypeOld.fieldcount * sizeof(COMPOUNDFIELD)); for (int j = 0; j < usertypeOld.fieldcount; j++) { - initCompoundField(&usertypeNew.compoundfield[j]); + udaInitCompoundField(&usertypeNew.compoundfield[j]); usertypeNew.compoundfield[j] = usertypeOld.compoundfield[j]; if (usertypeOld.compoundfield[j].rank > 0) { usertypeNew.compoundfield[j].shape = (int*)malloc(usertypeOld.compoundfield[j].rank * sizeof(int)); @@ -1167,7 +1167,7 @@ void copyUserDefinedTypeList(USERDEFINEDTYPELIST** anew, const USERDEFINEDTYPELI } #else -void copyUserDefinedTypeList(USERDEFINEDTYPELIST** anew, const USERDEFINEDTYPELIST* parseduserdefinedtypelist) +void udaCopyUserDefinedTypeList(USERDEFINEDTYPELIST** anew, const USERDEFINEDTYPELIST* parseduserdefinedtypelist) { UDA_LOG(UDA_LOG_DEBUG, "Not SERVERBUILD - USERDEFINEDTYPELIST is not allocated\n"); } @@ -1179,10 +1179,10 @@ void copyUserDefinedTypeList(USERDEFINEDTYPELIST** anew, const USERDEFINEDTYPELI * @param anew The initial type definition list. * @return void. */ -void getInitialUserDefinedTypeList(USERDEFINEDTYPELIST** anew) +void udaGetInitialUserDefinedTypeList(USERDEFINEDTYPELIST** anew) { auto list = (USERDEFINEDTYPELIST*)malloc(sizeof(USERDEFINEDTYPELIST)); - initUserDefinedTypeList(list); + udaInitUserDefinedTypeList(list); USERDEFINEDTYPE usertype; COMPOUNDFIELD field; @@ -1192,11 +1192,11 @@ void getInitialUserDefinedTypeList(USERDEFINEDTYPELIST** anew) //---------------------------------------------------------------------------------------------------------------- // SARRAY - initUserDefinedType(&usertype); // New structure definition - initCompoundField(&field); + udaInitUserDefinedType(&usertype); // New structure definition + udaInitCompoundField(&field); strcpy(usertype.name, "SARRAY"); - strcpy(usertype.source, "getInitialUserDefinedTypeList"); + strcpy(usertype.source, "udaGetInitialUserDefinedTypeList"); usertype.ref_id = 0; usertype.imagecount = 0; // No Structure Image data usertype.image = nullptr; @@ -1206,15 +1206,15 @@ void getInitialUserDefinedTypeList(USERDEFINEDTYPELIST** anew) offset = 0; defineField(&field, "count", "Number of data array elements", &offset, SCALARINT); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); defineField(&field, "rank", "Rank of the data array", &offset, SCALARINT); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); defineField(&field, "shape", "Shape of the data array", &offset, ARRAYINT); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); defineField(&field, "data", "Location of the Structure Array", &offset, ARRAYVOID); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "type"); field.atomictype = UDA_TYPE_STRING; strcpy(field.type, "STRING"); @@ -1227,16 +1227,16 @@ void getInitialUserDefinedTypeList(USERDEFINEDTYPELIST** anew) field.size = field.count * sizeof(char); field.offset = newoffset(offset, field.type); field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); + field.alignment = udaGetalignmentof(field.type); offset = field.offset + field.size; - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); - addUserDefinedType(list, usertype); + udaAddUserDefinedType(list, usertype); //---------------------------------------------------------------------------------------------------------------- // ENUMMEMBER - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "ENUMMEMBER"); strcpy(usertype.source, "ENUMMEMBER structure: for labels and values"); usertype.ref_id = 0; @@ -1247,7 +1247,7 @@ void getInitialUserDefinedTypeList(USERDEFINEDTYPELIST** anew) offset = 0; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "name"); field.atomictype = UDA_TYPE_STRING; strcpy(field.type, "STRING"); // convert atomic type to a string label @@ -1261,19 +1261,19 @@ void getInitialUserDefinedTypeList(USERDEFINEDTYPELIST** anew) field.offset = offsetof(ENUMMEMBER, name); offset = field.offset + field.size; field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "value", "The ENUM value", &offset, SCALARLONG64); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); - addUserDefinedType(list, usertype); + udaAddUserDefinedType(list, usertype); //---------------------------------------------------------------------------------------------------------------- // ENUMLIST - initUserDefinedType(&usertype); // New structure definition + udaInitUserDefinedType(&usertype); // New structure definition strcpy(usertype.name, "ENUMLIST"); strcpy(usertype.source, "Array of ENUM values with properties"); usertype.ref_id = 0; @@ -1284,7 +1284,7 @@ void getInitialUserDefinedTypeList(USERDEFINEDTYPELIST** anew) offset = 0; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "name"); field.atomictype = UDA_TYPE_STRING; strcpy(field.type, "STRING"); // convert atomic type to a string label @@ -1298,18 +1298,18 @@ void getInitialUserDefinedTypeList(USERDEFINEDTYPELIST** anew) field.offset = offsetof(ENUMLIST, name); offset = field.offset + field.size; field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "type", "The ENUM base integer atomic type", &offset, SCALARINT); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "count", "The number of ENUM values", &offset, SCALARINT); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, "enummember"); field.atomictype = UDA_TYPE_UNKNOWN; strcpy(field.type, "ENUMMEMBER"); @@ -1322,8 +1322,8 @@ void getInitialUserDefinedTypeList(USERDEFINEDTYPELIST** anew) field.offset = offsetof(ENUMLIST, enummember); // Different to newoffset offset = field.offset + field.size; field.offpad = padding(offset, field.type); - field.alignment = getalignmentof(field.type); - addCompoundField(&usertype, field); + field.alignment = udaGetalignmentof(field.type); + udaAddCompoundField(&usertype, field); // defineField(&field, "data", "Generalised data pointer for all integer type arrays", &offset, ARRAYVOID); // ARRAYVOID doesn't work - not implemented in the middleware! @@ -1332,21 +1332,21 @@ void getInitialUserDefinedTypeList(USERDEFINEDTYPELIST** anew) // Make the necessary changes to the structure definition when ENUMLIST is used or // Convert data to standard unsigned long64 - initCompoundField(&field); + udaInitCompoundField(&field); defineField(&field, "enumarray", "Data with this enumerated type", &offset, ARRAYULONG64); // Data need to be converted to this type - addCompoundField(&usertype, field); - initCompoundField(&field); + udaAddCompoundField(&usertype, field); + udaInitCompoundField(&field); defineField(&field, "enumarray_rank", "The rank of arraydata", &offset, SCALARINT); - addCompoundField(&usertype, field); - initCompoundField(&field); + udaAddCompoundField(&usertype, field); + udaInitCompoundField(&field); defineField(&field, "enumarray_count", "The count of arraydata", &offset, SCALARINT); - addCompoundField(&usertype, field); - initCompoundField(&field); + udaAddCompoundField(&usertype, field); + udaInitCompoundField(&field); defineField(&field, "enumarray_shape", "The shape of arraydata", &offset, ARRAYINT); - addCompoundField(&usertype, field); + udaAddCompoundField(&usertype, field); - addUserDefinedType(list, usertype); + udaAddUserDefinedType(list, usertype); *anew = list; } @@ -1357,11 +1357,11 @@ void getInitialUserDefinedTypeList(USERDEFINEDTYPELIST** anew) * @param field The Compound field type. * @return void. */ -void addCompoundField(USERDEFINEDTYPE* str, COMPOUNDFIELD field) +void udaAddCompoundField(USERDEFINEDTYPE* str, COMPOUNDFIELD field) { str->compoundfield = (COMPOUNDFIELD*)realloc((void*)str->compoundfield, (str->fieldcount + 1) * sizeof(COMPOUNDFIELD)); - initCompoundField(&str->compoundfield[str->fieldcount]); + udaInitCompoundField(&str->compoundfield[str->fieldcount]); str->compoundfield[str->fieldcount++] = field; } @@ -1371,11 +1371,11 @@ void addCompoundField(USERDEFINEDTYPE* str, COMPOUNDFIELD field) * @param type The new definition to add to the list. * @return void. */ -void addUserDefinedType(USERDEFINEDTYPELIST* str, USERDEFINEDTYPE type) +void udaAddUserDefinedType(USERDEFINEDTYPELIST* str, USERDEFINEDTYPE type) { str->userdefinedtype = (USERDEFINEDTYPE*)realloc((void*)str->userdefinedtype, (str->listCount + 1) * sizeof(USERDEFINEDTYPE)); - initUserDefinedType(&str->userdefinedtype[str->listCount]); + udaInitUserDefinedType(&str->userdefinedtype[str->listCount]); str->userdefinedtype[str->listCount++] = type; } @@ -1386,7 +1386,7 @@ void addUserDefinedType(USERDEFINEDTYPELIST* str, USERDEFINEDTYPE type) * @param type The definition to add into the list. * @return void. */ -void updateUserDefinedType(USERDEFINEDTYPELIST* str, int typeId, USERDEFINEDTYPE type) +void udaUpdateUserDefinedType(USERDEFINEDTYPELIST* str, int typeId, USERDEFINEDTYPE type) { str->userdefinedtype[typeId] = type; // replace existing entry } @@ -1400,7 +1400,7 @@ void updateUserDefinedType(USERDEFINEDTYPELIST* str, int typeId, USERDEFINEDTYPE * @param value The new property value * @return void. */ -void changeUserDefinedTypeElementProperty(USERDEFINEDTYPELIST* str, int typeId, char* element, char* property, +void udaChangeUserDefinedTypeElementProperty(USERDEFINEDTYPELIST* str, int typeId, char* element, char* property, void* value) { USERDEFINEDTYPE* userdefinedtype = str->userdefinedtype; // Target this definition @@ -1424,7 +1424,7 @@ void changeUserDefinedTypeElementProperty(USERDEFINEDTYPELIST* str, int typeId, * @param str The list of structure definitions. * @return The count of structured types. */ -int countUserDefinedType(USERDEFINEDTYPELIST* str) +int udaCountUserDefinedType(USERDEFINEDTYPELIST* str) { return str->listCount; // Number of user defined types } @@ -1434,7 +1434,7 @@ int countUserDefinedType(USERDEFINEDTYPELIST* str) * @param str The Compound Field. * @return void. */ -void freeCompoundField(COMPOUNDFIELD* str) +void udaFreeCompoundField(COMPOUNDFIELD* str) { if (str == nullptr) { return; @@ -1448,13 +1448,13 @@ void freeCompoundField(COMPOUNDFIELD* str) * @param type The User Defined Type. * @return void. */ -void freeUserDefinedType(USERDEFINEDTYPE* type) +void udaFreeUserDefinedType(USERDEFINEDTYPE* type) { if (type == nullptr) { return; } for (int i = 0; i < type->fieldcount; i++) { - freeCompoundField(&type->compoundfield[i]); + udaFreeCompoundField(&type->compoundfield[i]); } free(type->compoundfield); type->compoundfield = nullptr; @@ -1468,7 +1468,7 @@ void freeUserDefinedType(USERDEFINEDTYPE* type) * @param userdefinedtypelist The User Defined Type List. * @return void. */ -void freeUserDefinedTypeList(USERDEFINEDTYPELIST* userdefinedtypelist) +void udaFreeUserDefinedTypeList(USERDEFINEDTYPELIST* userdefinedtypelist) { if (userdefinedtypelist == nullptr) { return; @@ -1480,10 +1480,10 @@ void freeUserDefinedTypeList(USERDEFINEDTYPELIST* userdefinedtypelist) return; } for (int i = 0; i < userdefinedtypelist->listCount; i++) { - freeUserDefinedType(&userdefinedtypelist->userdefinedtype[i]); + udaFreeUserDefinedType(&userdefinedtypelist->userdefinedtype[i]); } free(userdefinedtypelist->userdefinedtype); - initUserDefinedTypeList(userdefinedtypelist); + udaInitUserDefinedTypeList(userdefinedtypelist); } /** The size or byte count of an atomic or structured type @@ -1587,7 +1587,7 @@ size_t getsizeof(USERDEFINEDTYPELIST* userdefinedtypelist, const char* type) * @param type The name of the atomic type * @return The integer value of the corresponding IDAM enumeration. */ -int gettypeof(const char* type) +int udaGettypeof(const char* type) { // **** const unsigned .... if (type == nullptr) { return UDA_TYPE_UNKNOWN; @@ -1692,7 +1692,7 @@ int gettypeof(const char* type) * * */ -int getalignmentof(const char* type) +int udaGetalignmentof(const char* type) { int is32 = (sizeof(void*) == POINTER_SIZE32); // Test architecture const char* base = type; @@ -1834,13 +1834,13 @@ int getalignmentof(const char* type) size_t newoffset(size_t offset, const char* type) { - int alignment = getalignmentof(type); + int alignment = udaGetalignmentof(type); return (offset + ((alignment - (offset % alignment)) % alignment)); } size_t padding(size_t offset, const char* type) { - int alignment = getalignmentof(type); + int alignment = udaGetalignmentof(type); return ((alignment - (offset % alignment)) % alignment); } @@ -1906,10 +1906,10 @@ size_t getStructureSize(USERDEFINEDTYPELIST* userdefinedtypelist, USERDEFINEDTYP if (str->compoundfield[i].pointer) { size = sizeof(void*); - alignment = getalignmentof("*"); + alignment = udaGetalignmentof("*"); } else { size = getsizeof(userdefinedtypelist, str->compoundfield[i].type); - alignment = getalignmentof(str->compoundfield[i].type); + alignment = udaGetalignmentof(str->compoundfield[i].type); } size_t space = size * str->compoundfield[i].count; @@ -1953,7 +1953,7 @@ size_t getStructureSize(USERDEFINEDTYPELIST* userdefinedtypelist, USERDEFINEDTYP * @param msg The message to print. * @return The size in bytes. */ -void printError(int warning, int line, char* file, char* msg) +void udaPrintError(int warning, int line, char* file, char* msg) { if (warning) { UDA_LOG(UDA_LOG_DEBUG, "WARNING: line %d, file %s\n%s\n", line, file, msg); @@ -1979,13 +1979,13 @@ void printError(int warning, int line, char* file, char* msg) // The count of data structures to be received is passed ... // -int xdrAtomicData(LOGMALLOCLIST* logmalloclist, XDR* xdrs, const char* type, int count, int size, char** data) +int udaXdrAtomicData(LOGMALLOCLIST* logmalloclist, XDR* xdrs, const char* type, int count, int size, char** data) { - int type_id = gettypeof(type); + int type_id = udaGettypeof(type); char* d; if (xdrs->x_op == XDR_DECODE) { d = (char*)malloc(count * size); - addMalloc(logmalloclist, (void*)d, count, size, type); + udaAddMalloc(logmalloclist, (void*)d, count, size, type); *data = d; } else { d = *data; @@ -2084,13 +2084,13 @@ int xdrAtomicData(LOGMALLOCLIST* logmalloclist, XDR* xdrs, const char* type, int // Send/Receive Array of Structures -int xdrUserDefinedTypeData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFINEDTYPELIST* userdefinedtypelist, +int udaXdrUserDefinedTypeData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFINEDTYPELIST* userdefinedtypelist, USERDEFINEDTYPE* userdefinedtype, void** data, int protocolVersion, bool xdr_stdio_flag, LOGSTRUCTLIST* log_struct_list, int malloc_source) { int rc; - initLogStructList(log_struct_list); // Initialise Linked List Structure Log + udaInitLogStructList(log_struct_list); // Initialise Linked List Structure Log if (xdrs->x_op == XDR_DECODE) { @@ -2111,7 +2111,7 @@ int xdrUserDefinedTypeData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFINEDT } else { if (userdefinedtype == nullptr) { - udaAddError(UDA_CODE_ERROR_TYPE, "xdrUserDefinedTypeData", 999, + udaAddError(UDA_CODE_ERROR_TYPE, "udaXdrUserDefinedTypeData", 999, "No User Defined Type passed - cannot send!"); return 0; } @@ -2126,12 +2126,12 @@ int xdrUserDefinedTypeData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFINEDT } } - freeLogStructList(log_struct_list); // Free Linked List Structure Log heap + udaFreeLogStructList(log_struct_list); // Free Linked List Structure Log heap return rc; } -int findUserDefinedTypeId(USERDEFINEDTYPELIST* userdefinedtypelist, const char* name) +int udaFindUserDefinedTypeId(USERDEFINEDTYPELIST* userdefinedtypelist, const char* name) { // Return the List Index key for a Named User Defined Structure @@ -2206,7 +2206,7 @@ USERDEFINEDTYPE* findUserDefinedType(USERDEFINEDTYPELIST* userdefinedtypelist, c return nullptr; } -int testUserDefinedType(USERDEFINEDTYPELIST* userdefinedtypelist, USERDEFINEDTYPE* udt) +int udaTestUserDefinedType(USERDEFINEDTYPELIST* userdefinedtypelist, USERDEFINEDTYPE* udt) { // Test a Structure Definition is a member of the Structure Type List // Return True (1) if the structure definition is found, False (0) otherwise. @@ -2278,7 +2278,7 @@ bool_t xdr_userdefinedtype(XDR* xdrs, USERDEFINEDTYPELIST* userdefinedtypelist, rc = rc && xdr_int(xdrs, &str->imagecount); rc = rc && xdr_int(xdrs, &str->fieldcount); - printUserDefinedType(*str); + udaPrintUserDefinedType(*str); if (xdrs->x_op == XDR_DECODE) { // Receiving an array so allocate Heap for it then initialise if (str->imagecount > 0) { @@ -2289,7 +2289,7 @@ bool_t xdr_userdefinedtype(XDR* xdrs, USERDEFINEDTYPELIST* userdefinedtypelist, if (str->fieldcount > 0) { str->compoundfield = (COMPOUNDFIELD*)malloc(str->fieldcount * sizeof(COMPOUNDFIELD)); for (int i = 0; i < str->fieldcount; i++) { - initCompoundField(&str->compoundfield[i]); + udaInitCompoundField(&str->compoundfield[i]); } } else { str->compoundfield = nullptr; @@ -2317,7 +2317,7 @@ bool_t xdr_userdefinedtype(XDR* xdrs, USERDEFINEDTYPELIST* userdefinedtypelist, // Non-atomic types (structures) will already have been adjusted size = getsizeof(userdefinedtypelist, str->compoundfield[i].type); } - alignment = getalignmentof(str->compoundfield[i].type); + alignment = udaGetalignmentof(str->compoundfield[i].type); // Adjustment required adjust = (alignment != str->compoundfield[i].alignment || size != (size_t)str->compoundfield[i].size); } @@ -2331,10 +2331,10 @@ bool_t xdr_userdefinedtype(XDR* xdrs, USERDEFINEDTYPELIST* userdefinedtypelist, if (str->compoundfield[i].pointer) { size = sizeof(void*); - alignment = getalignmentof("*"); + alignment = udaGetalignmentof("*"); } else { size = getsizeof(userdefinedtypelist, str->compoundfield[i].type); - alignment = getalignmentof(str->compoundfield[i].type); + alignment = udaGetalignmentof(str->compoundfield[i].type); } space = size * str->compoundfield[i].count; @@ -2376,7 +2376,7 @@ bool_t xdr_userdefinedtype(XDR* xdrs, USERDEFINEDTYPELIST* userdefinedtypelist, str->size = byteCount; - printUserDefinedType(*str); + udaPrintUserDefinedType(*str); } return rc; @@ -2407,7 +2407,7 @@ bool_t xdr_userdefinedtypelist(XDR* xdrs, USERDEFINEDTYPELIST* str, bool xdr_std if (xdrs->x_op == XDR_DECODE) { // Receiving array so allocate Heap for it then initialise str->userdefinedtype = (USERDEFINEDTYPE*)malloc(str->listCount * sizeof(USERDEFINEDTYPE)); for (int i = 0; i < str->listCount; i++) { - initUserDefinedType(&str->userdefinedtype[i]); + udaInitUserDefinedType(&str->userdefinedtype[i]); } } @@ -2437,7 +2437,7 @@ bool_t xdr_userdefinedtypelist(XDR* xdrs, USERDEFINEDTYPELIST* str, bool xdr_std * @param label A label to print before the value. * @return Void */ -void printAtomicData(void* data, int atomictype, int count, const char* label) +void udaPrintAtomicData(void* data, int atomictype, int count, const char* label) { if (data == nullptr || count == 0) { UDA_LOG(UDA_LOG_DEBUG, "%40s: null\n", label); @@ -2577,7 +2577,7 @@ void printAtomicData(void* data, int atomictype, int count, const char* label) * \todo {When the structure is an array, either print data from a single array element or print data from * all structure elements} */ -void printAtomicType(LOGMALLOCLIST* logmalloclist, NTREE* tree, const char* target) +void udaPrintAtomicType(LOGMALLOCLIST* logmalloclist, NTREE* tree, const char* target) { USERDEFINEDTYPE* userdefinedtype = tree->userdefinedtype; char* p; @@ -2596,13 +2596,13 @@ void printAtomicType(LOGMALLOCLIST* logmalloclist, NTREE* tree, const char* targ UDA_LOG(UDA_LOG_DEBUG, "%40s: null\n", target); return; } - findMalloc(logmalloclist, &data, &count, &size, &type); + udaFindMalloc(logmalloclist, &data, &count, &size, &type); if (count > 0) { - printAtomicData(data, gettypeof(type), count, target); + udaPrintAtomicData(data, udaGettypeof(type), count, target); } } else { data = (void*)&p[userdefinedtype->compoundfield[i].offset]; - printAtomicData(data, userdefinedtype->compoundfield[i].atomictype, + udaPrintAtomicData(data, userdefinedtype->compoundfield[i].atomictype, userdefinedtype->compoundfield[i].count, target); } } else { @@ -2621,13 +2621,13 @@ void printAtomicType(LOGMALLOCLIST* logmalloclist, NTREE* tree, const char* targ * @param target The name of a Structure element. * @return Void */ -void printTypeCount(NTREE* ntree, const char* target) +void udaPrintTypeCount(NTREE* ntree, const char* target) { USERDEFINEDTYPE* userdefinedtype = ntree->userdefinedtype; int fieldcount = ntree->userdefinedtype->fieldcount; for (int i = 0; i < fieldcount; i++) { if (!strcmp(userdefinedtype->compoundfield[i].name, target)) { - printCompoundField(userdefinedtype->compoundfield[i]); + udaPrintCompoundField(userdefinedtype->compoundfield[i]); UDA_LOG(UDA_LOG_DEBUG, "%s[ %d ]\n", target, userdefinedtype->compoundfield[i].count); } } @@ -2679,7 +2679,7 @@ COMPOUNDFIELD* getNodeStructureComponent(LOGMALLOCLIST* logmalloclist, NTREE* nt * @param ntargets A returned count of the number of names in the returned list. * @return the list of structure component names. */ -char** parseTarget(const char* target, int* ntargets) +char** udaParseTarget(const char* target, int* ntargets) { char** targetlist = nullptr; char *buffer = nullptr, *work, *p; @@ -2725,7 +2725,7 @@ char** parseTarget(const char* target, int* ntargets) * @param tree A pointer to a tree node. If nullptr the root node is assumed. * @return Void */ -void printNode(NTREE* tree) +void udaPrintNode(NTREE* tree) { if (tree == nullptr) { tree = full_ntree; @@ -2745,7 +2745,7 @@ void printNode(NTREE* tree) UDA_LOG(UDA_LOG_DEBUG, "Children[%d]: %p (%x) \n", i, (void*)tree->children[i], (UVOIDTYPE)tree->children[i]); } #endif - printUserDefinedType(*tree->userdefinedtype); + udaPrintUserDefinedType(*tree->userdefinedtype); } /** Print the Contents of a tree node with the specified User Defined Structure name to a specified File Descriptor. @@ -2755,7 +2755,7 @@ void printNode(NTREE* tree) * of the root node is used. * @return Void */ -void printNodeStructureDefinition(const char* target) +void udaPrintNodeStructureDefinition(const char* target) { NTREE* ntree = nullptr; if (target[0] != '\0') { @@ -2764,7 +2764,7 @@ void printNodeStructureDefinition(const char* target) return; } } - printNode(ntree); + udaPrintNode(ntree); } /** Print an Image of the Named Structure Definition to a specified File Descriptor. @@ -2774,7 +2774,7 @@ void printNodeStructureDefinition(const char* target) * @return Void */ -void printNodeStructureImage(const char* target) +void udaPrintNodeStructureImage(const char* target) { NTREE* ntree = nullptr; if (target[0] != '\0') { @@ -2807,7 +2807,7 @@ USERDEFINEDTYPE* getNodeUserDefinedType(NTREE* ntree) * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return the name of the User Defined Type Structure. */ -char* getNodeStructureName(NTREE* ntree) +char* udaGetNodeStructureName(NTREE* ntree) { if (ntree == nullptr) { ntree = udaGetFullNTree(); @@ -2820,7 +2820,7 @@ char* getNodeStructureName(NTREE* ntree) * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return the Type of the User Defined Type Structure. */ -char* getNodeStructureType(NTREE* ntree) +char* udaGetNodeStructureType(NTREE* ntree) { if (ntree == nullptr) { ntree = udaGetFullNTree(); @@ -2833,7 +2833,7 @@ char* getNodeStructureType(NTREE* ntree) * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return the Size (Bytes) of the User Defined Type Structure. */ -int getNodeStructureSize(NTREE* ntree) +int udaGetNodeStructureSize(NTREE* ntree) { if (ntree == nullptr) { ntree = udaGetFullNTree(); @@ -2847,18 +2847,18 @@ int getNodeStructureSize(NTREE* ntree) * @param index The array index * @return a Pointer to a Structure Array element. */ -void* getNodeStructureArrayData(LOGMALLOCLIST* logmalloclist, NTREE* ntree, int index) +void* udaGetNodeStructureArrayData(LOGMALLOCLIST* logmalloclist, NTREE* ntree, int index) { char* p; if (index < 0) { - udaAddError(UDA_CODE_ERROR_TYPE, "getNodeStructureArrayData", 999, "The Tree Node array index < 0"); + udaAddError(UDA_CODE_ERROR_TYPE, "udaGetNodeStructureArrayData", 999, "The Tree Node array index < 0"); return nullptr; } if (ntree == nullptr) { ntree = udaGetFullNTree(); } if (getNodeStructureDataCount(logmalloclist, ntree) < (index + 1)) { - udaAddError(UDA_CODE_ERROR_TYPE, "getNodeStructureArrayData", 999, + udaAddError(UDA_CODE_ERROR_TYPE, "udaGetNodeStructureArrayData", 999, "The Tree Node array index > allocated array dimension"); return nullptr; } @@ -2874,7 +2874,7 @@ void* getNodeStructureArrayData(LOGMALLOCLIST* logmalloclist, NTREE* ntree, int * @param componentindex The structure element index * @return a Pointer to a Component Structure Array element. */ -void* getNodeStructureComponentArrayData(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target, +void* udaGetNodeStructureComponentArrayData(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target, int structureindex, int componentindex) { int offset, count, size; @@ -2882,11 +2882,11 @@ void* getNodeStructureComponentArrayData(LOGMALLOCLIST* logmalloclist, NTREE* nt char* pp; const char* type; if (structureindex < 0) { - udaAddError(UDA_CODE_ERROR_TYPE, "getNodeStructureComponentArrayData", 999, + udaAddError(UDA_CODE_ERROR_TYPE, "udaGetNodeStructureComponentArrayData", 999, "The Tree Node Structure array index < 0"); } if (componentindex < 0) { - udaAddError(UDA_CODE_ERROR_TYPE, "getNodeStructureComponentArrayData", 999, + udaAddError(UDA_CODE_ERROR_TYPE, "udaGetNodeStructureComponentArrayData", 999, "The Tree Node Structure Component array index < 0"); return nullptr; } @@ -2894,7 +2894,7 @@ void* getNodeStructureComponentArrayData(LOGMALLOCLIST* logmalloclist, NTREE* nt ntree = udaGetFullNTree(); } - if ((pp = (char*)getNodeStructureArrayData(logmalloclist, ntree, structureindex)) == nullptr) { + if ((pp = (char*)udaGetNodeStructureArrayData(logmalloclist, ntree, structureindex)) == nullptr) { return nullptr; } @@ -2903,7 +2903,7 @@ void* getNodeStructureComponentArrayData(LOGMALLOCLIST* logmalloclist, NTREE* nt offset = ntree->userdefinedtype->compoundfield[i].offset; if (ntree->userdefinedtype->compoundfield[i].pointer) { p = (char*)*((VOIDTYPE*)&pp[offset]); // Data Element from the single Structure Array Element - findMalloc(logmalloclist, p, &count, &size, &type); + udaFindMalloc(logmalloclist, p, &count, &size, &type); } else { p = &pp[offset]; size = ntree->userdefinedtype->compoundfield[i].size; @@ -2913,14 +2913,14 @@ void* getNodeStructureComponentArrayData(LOGMALLOCLIST* logmalloclist, NTREE* nt return nullptr; } if (count <= componentindex) { - udaAddError(UDA_CODE_ERROR_TYPE, "getNodeStructureComponentArrayData", 999, + udaAddError(UDA_CODE_ERROR_TYPE, "udaGetNodeStructureComponentArrayData", 999, "The Tree Node Structure Component array index > allocated array dimension"); return nullptr; } return (void*)&p[componentindex * size]; } } - udaAddError(UDA_CODE_ERROR_TYPE, "getNodeStructureComponentArrayData", 999, + udaAddError(UDA_CODE_ERROR_TYPE, "udaGetNodeStructureComponentArrayData", 999, "The named Tree Node Structure Component array is not a member of the Data structure"); return nullptr; } @@ -2930,7 +2930,7 @@ void* getNodeStructureComponentArrayData(LOGMALLOCLIST* logmalloclist, NTREE* nt * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return the name of the User Defined Type Structure. */ -int getNodeChildrenCount(NTREE* ntree) +int udaGetNodeChildrenCount(NTREE* ntree) { if (ntree == nullptr) { ntree = udaGetFullNTree(); @@ -2944,7 +2944,7 @@ int getNodeChildrenCount(NTREE* ntree) * @param child A integer index identifying which child from the child array to return * @return the Child Node. */ -NTREE* getNodeChild(NTREE* ntree, int child) +NTREE* udaGetNodeChild(NTREE* ntree, int child) { if (ntree == nullptr) { ntree = udaGetFullNTree(); @@ -2961,7 +2961,7 @@ NTREE* getNodeChild(NTREE* ntree, int child) * @param child A ipointer to a Child tree node. * @return the Child Node's ID. */ -int getNodeChildId(NTREE* ntree, NTREE* child) +int udaGetNodeChildId(NTREE* ntree, NTREE* child) { if (ntree == nullptr) { ntree = udaGetFullNTree(); @@ -2986,7 +2986,7 @@ int getNodeChildId(NTREE* ntree, NTREE* child) * @return the Array of children. */ -NTREE** getNodeChildren(NTREE* ntree) +NTREE** udaGetNodeChildren(NTREE* ntree) { if (ntree == nullptr) { ntree = udaGetFullNTree(); @@ -2999,7 +2999,7 @@ NTREE** getNodeChildren(NTREE* ntree) * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return the Parent Node. */ -NTREE* getNodeParent(NTREE* ntree) +NTREE* udaGetNodeParent(NTREE* ntree) { if (ntree == nullptr) { ntree = udaGetFullNTree(); @@ -3012,7 +3012,7 @@ NTREE* getNodeParent(NTREE* ntree) * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return a Pointer to the Data. */ -void* getNodeData(NTREE* ntree) +void* udaGetNodeData(NTREE* ntree) { if (ntree == nullptr) { ntree = udaGetFullNTree(); @@ -3026,7 +3026,7 @@ void* getNodeData(NTREE* ntree) * @return the Count of Structured types. */ -int getNodeStructureCount(NTREE* ntree) +int udaGetNodeStructureCount(NTREE* ntree) { int count = 0; if (ntree == nullptr) { @@ -3046,7 +3046,7 @@ int getNodeStructureCount(NTREE* ntree) * @return the Count of Atomic types. */ -int getNodeAtomicCount(NTREE* ntree) +int udaGetNodeAtomicCount(NTREE* ntree) { int count = 0; if (ntree == nullptr) { @@ -3066,18 +3066,18 @@ int getNodeAtomicCount(NTREE* ntree) * @return the List of Structure names. */ -char** getNodeStructureNames(LOGMALLOCLIST* logmalloclist, NTREE* ntree) +char** udaGetNodeStructureNames(LOGMALLOCLIST* logmalloclist, NTREE* ntree) { int count; char** names; if (ntree == nullptr) { ntree = udaGetFullNTree(); } - if ((count = getNodeStructureCount(ntree)) == 0) { + if ((count = udaGetNodeStructureCount(ntree)) == 0) { return nullptr; } names = (char**)malloc(count * sizeof(char*)); - addMalloc(logmalloclist, (void*)names, count, sizeof(char*), "char *"); + udaAddMalloc(logmalloclist, (void*)names, count, sizeof(char*), "char *"); count = 0; for (int i = 0; i < ntree->userdefinedtype->fieldcount; i++) { if (ntree->userdefinedtype->compoundfield[i].atomictype == UDA_TYPE_UNKNOWN) { @@ -3093,18 +3093,18 @@ char** getNodeStructureNames(LOGMALLOCLIST* logmalloclist, NTREE* ntree) * @return the List of Atomic element names. */ -char** getNodeAtomicNames(LOGMALLOCLIST* logmalloclist, NTREE* ntree) +char** udaGetNodeAtomicNames(LOGMALLOCLIST* logmalloclist, NTREE* ntree) { int count; char** names; if (ntree == nullptr) { ntree = udaGetFullNTree(); } - if ((count = getNodeAtomicCount(ntree)) == 0) { + if ((count = udaGetNodeAtomicCount(ntree)) == 0) { return nullptr; } names = (char**)malloc(count * sizeof(char*)); - addMalloc(logmalloclist, (void*)names, count, sizeof(char*), "char *"); + udaAddMalloc(logmalloclist, (void*)names, count, sizeof(char*), "char *"); count = 0; for (int i = 0; i < ntree->userdefinedtype->fieldcount; i++) { @@ -3121,18 +3121,18 @@ char** getNodeAtomicNames(LOGMALLOCLIST* logmalloclist, NTREE* ntree) * @return the List of Structure Type names. */ -char** getNodeStructureTypes(LOGMALLOCLIST* logmalloclist, NTREE* ntree) +char** udaGetNodeStructureTypes(LOGMALLOCLIST* logmalloclist, NTREE* ntree) { int count; char** names; if (ntree == nullptr) { ntree = udaGetFullNTree(); } - if ((count = getNodeStructureCount(ntree)) == 0) { + if ((count = udaGetNodeStructureCount(ntree)) == 0) { return nullptr; } names = (char**)malloc(count * sizeof(char*)); - addMalloc(logmalloclist, (void*)names, count, sizeof(char*), "char *"); + udaAddMalloc(logmalloclist, (void*)names, count, sizeof(char*), "char *"); count = 0; for (int i = 0; i < ntree->userdefinedtype->fieldcount; i++) { if (ntree->userdefinedtype->compoundfield[i].atomictype == UDA_TYPE_UNKNOWN) { @@ -3148,18 +3148,18 @@ char** getNodeStructureTypes(LOGMALLOCLIST* logmalloclist, NTREE* ntree) * @return the List of Atomic Type names. */ -char** getNodeAtomicTypes(LOGMALLOCLIST* logmalloclist, NTREE* ntree) +char** udaGetNodeAtomicTypes(LOGMALLOCLIST* logmalloclist, NTREE* ntree) { int count; char** names; if (ntree == nullptr) { ntree = udaGetFullNTree(); } - if ((count = getNodeAtomicCount(ntree)) == 0) { + if ((count = udaGetNodeAtomicCount(ntree)) == 0) { return nullptr; } names = (char**)malloc(count * sizeof(char*)); - addMalloc(logmalloclist, (void*)names, count, sizeof(char*), "char *"); + udaAddMalloc(logmalloclist, (void*)names, count, sizeof(char*), "char *"); count = 0; for (int i = 0; i < ntree->userdefinedtype->fieldcount; i++) { if (ntree->userdefinedtype->compoundfield[i].atomictype != UDA_TYPE_UNKNOWN) { @@ -3175,18 +3175,18 @@ char** getNodeAtomicTypes(LOGMALLOCLIST* logmalloclist, NTREE* ntree) * @return the List of Structure Pointer Properties. */ -int* getNodeStructurePointers(LOGMALLOCLIST* logmalloclist, NTREE* ntree) +int* udaGetNodeStructurePointers(LOGMALLOCLIST* logmalloclist, NTREE* ntree) { int count; int* pointers; if (ntree == nullptr) { ntree = udaGetFullNTree(); } - if ((count = getNodeStructureCount(ntree)) == 0) { + if ((count = udaGetNodeStructureCount(ntree)) == 0) { return nullptr; } pointers = (int*)malloc(count * sizeof(int)); - addMalloc(logmalloclist, (void*)pointers, count, sizeof(int), "int"); + udaAddMalloc(logmalloclist, (void*)pointers, count, sizeof(int), "int"); count = 0; for (int i = 0; i < ntree->userdefinedtype->fieldcount; i++) { if (ntree->userdefinedtype->compoundfield[i].atomictype == UDA_TYPE_UNKNOWN) { @@ -3203,18 +3203,18 @@ int* getNodeStructurePointers(LOGMALLOCLIST* logmalloclist, NTREE* ntree) * @return the List of Atomic Pointer Properties. */ -int* getNodeAtomicPointers(LOGMALLOCLIST* logmalloclist, NTREE* ntree) +int* udaGetNodeAtomicPointers(LOGMALLOCLIST* logmalloclist, NTREE* ntree) { int count; int* pointers; if (ntree == nullptr) { ntree = udaGetFullNTree(); } - if ((count = getNodeAtomicCount(ntree)) == 0) { + if ((count = udaGetNodeAtomicCount(ntree)) == 0) { return nullptr; } pointers = (int*)malloc(count * sizeof(int)); - addMalloc(logmalloclist, (void*)pointers, count, sizeof(int), "int"); + udaAddMalloc(logmalloclist, (void*)pointers, count, sizeof(int), "int"); count = 0; for (int i = 0; i < ntree->userdefinedtype->fieldcount; i++) { if (ntree->userdefinedtype->compoundfield[i].atomictype != UDA_TYPE_UNKNOWN) { @@ -3232,7 +3232,7 @@ int* getNodeAtomicPointers(LOGMALLOCLIST* logmalloclist, NTREE* ntree) * @return the List of Structure Ranks. */ -int* getNodeStructureRank(LOGMALLOCLIST* logmalloclist, NTREE* ntree) +int* udaGetNodeStructureRank(LOGMALLOCLIST* logmalloclist, NTREE* ntree) { int count, count0, size, rank; int *ranks, *shape; @@ -3241,11 +3241,11 @@ int* getNodeStructureRank(LOGMALLOCLIST* logmalloclist, NTREE* ntree) if (ntree == nullptr) { ntree = udaGetFullNTree(); } - if ((count = getNodeStructureCount(ntree)) == 0) { + if ((count = udaGetNodeStructureCount(ntree)) == 0) { return nullptr; } ranks = (int*)malloc(count * sizeof(int)); - addMalloc(logmalloclist, (void*)ranks, count, sizeof(int), "int"); + udaAddMalloc(logmalloclist, (void*)ranks, count, sizeof(int), "int"); count = 0; for (int i = 0; i < ntree->userdefinedtype->fieldcount; i++) { if (ntree->userdefinedtype->compoundfield[i].atomictype == UDA_TYPE_UNKNOWN) { @@ -3255,7 +3255,7 @@ int* getNodeStructureRank(LOGMALLOCLIST* logmalloclist, NTREE* ntree) if ((data = (char*)ntree->data) == nullptr) { return nullptr; } - findMalloc2(logmalloclist, &data[ntree->userdefinedtype->compoundfield[i].offset], &count0, &size, + udaFindMalloc2(logmalloclist, &data[ntree->userdefinedtype->compoundfield[i].offset], &count0, &size, &type, &rank, &shape); ranks[count] = rank; } @@ -3271,7 +3271,7 @@ int* getNodeStructureRank(LOGMALLOCLIST* logmalloclist, NTREE* ntree) * @return the List of Atomic Ranks. */ -int* getNodeAtomicRank(LOGMALLOCLIST* logmalloclist, NTREE* ntree) +int* udaGetNodeAtomicRank(LOGMALLOCLIST* logmalloclist, NTREE* ntree) { int count, count0, size, rank; int *ranks, *shape; @@ -3280,11 +3280,11 @@ int* getNodeAtomicRank(LOGMALLOCLIST* logmalloclist, NTREE* ntree) if (ntree == nullptr) { ntree = udaGetFullNTree(); } - if ((count = getNodeAtomicCount(ntree)) == 0) { + if ((count = udaGetNodeAtomicCount(ntree)) == 0) { return nullptr; } ranks = (int*)malloc(count * sizeof(int)); - addMalloc(logmalloclist, (void*)ranks, count, sizeof(int), "int"); + udaAddMalloc(logmalloclist, (void*)ranks, count, sizeof(int), "int"); count = 0; for (int i = 0; i < ntree->userdefinedtype->fieldcount; i++) { if (ntree->userdefinedtype->compoundfield[i].atomictype != UDA_TYPE_UNKNOWN) { @@ -3294,7 +3294,7 @@ int* getNodeAtomicRank(LOGMALLOCLIST* logmalloclist, NTREE* ntree) if ((data = (char*)ntree->data) == nullptr) { return nullptr; } - findMalloc2(logmalloclist, &data[ntree->userdefinedtype->compoundfield[i].offset], &count0, &size, + udaFindMalloc2(logmalloclist, &data[ntree->userdefinedtype->compoundfield[i].offset], &count0, &size, &type, &rank, &shape); ranks[count] = rank; } @@ -3309,7 +3309,7 @@ int* getNodeAtomicRank(LOGMALLOCLIST* logmalloclist, NTREE* ntree) * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return the List of Structure Shape Arrays. */ -int** getNodeStructureShape(LOGMALLOCLIST* logmalloclist, NTREE* ntree) +int** udaGetNodeStructureShape(LOGMALLOCLIST* logmalloclist, NTREE* ntree) { int count, count0, size, rank; int* shape; @@ -3319,11 +3319,11 @@ int** getNodeStructureShape(LOGMALLOCLIST* logmalloclist, NTREE* ntree) if (ntree == nullptr) { ntree = udaGetFullNTree(); } - if ((count = getNodeStructureCount(ntree)) == 0) { + if ((count = udaGetNodeStructureCount(ntree)) == 0) { return nullptr; } shapes = (int**)malloc(count * sizeof(int*)); - addMalloc(logmalloclist, (void*)shapes, count, sizeof(int*), "int *"); + udaAddMalloc(logmalloclist, (void*)shapes, count, sizeof(int*), "int *"); count = 0; for (int i = 0; i < ntree->userdefinedtype->fieldcount; i++) { if (ntree->userdefinedtype->compoundfield[i].atomictype == UDA_TYPE_UNKNOWN) { @@ -3333,7 +3333,7 @@ int** getNodeStructureShape(LOGMALLOCLIST* logmalloclist, NTREE* ntree) if ((data = (char*)ntree->data) == nullptr) { return nullptr; } - findMalloc2(logmalloclist, &data[ntree->userdefinedtype->compoundfield[i].offset], &count0, &size, + udaFindMalloc2(logmalloclist, &data[ntree->userdefinedtype->compoundfield[i].offset], &count0, &size, &type, &rank, &shape); shapes[count] = shape; } @@ -3348,7 +3348,7 @@ int** getNodeStructureShape(LOGMALLOCLIST* logmalloclist, NTREE* ntree) * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return the List of Atomic Shape Arrays. */ -int** getNodeAtomicShape(LOGMALLOCLIST* logmalloclist, NTREE* ntree) +int** udaGetNodeAtomicShape(LOGMALLOCLIST* logmalloclist, NTREE* ntree) { int count, count0, size, rank; const char* type; @@ -3356,11 +3356,11 @@ int** getNodeAtomicShape(LOGMALLOCLIST* logmalloclist, NTREE* ntree) if (ntree == nullptr) { ntree = udaGetFullNTree(); } - if ((count = getNodeAtomicCount(ntree)) == 0) { + if ((count = udaGetNodeAtomicCount(ntree)) == 0) { return nullptr; } int** shapes = (int**)malloc(count * sizeof(int*)); - addMalloc(logmalloclist, (void*)shapes, count, sizeof(int*), "int *"); + udaAddMalloc(logmalloclist, (void*)shapes, count, sizeof(int*), "int *"); count = 0; for (int i = 0; i < ntree->userdefinedtype->fieldcount; i++) { if (ntree->userdefinedtype->compoundfield[i].atomictype != UDA_TYPE_UNKNOWN) { @@ -3378,11 +3378,11 @@ int** getNodeAtomicShape(LOGMALLOCLIST* logmalloclist, NTREE* ntree) } int* shape; void* ptr = &data[ntree->userdefinedtype->compoundfield[i].offset]; - findMalloc2(logmalloclist, ptr, &count0, &size, &type, &rank, &shape); + udaFindMalloc2(logmalloclist, ptr, &count0, &size, &type, &rank, &shape); shapes[count] = shape; if (shape == 0 && (rank < 2)) { shape = (int*)malloc(sizeof(int)); // Assume rank 1 - addMalloc(logmalloclist, (void*)shape, 1, sizeof(int), "int"); + udaAddMalloc(logmalloclist, (void*)shape, 1, sizeof(int), "int"); shape[0] = count0; shapes[count] = shape; // Pass back the length of the scalar or rank 1 array from the malloc log query @@ -3401,7 +3401,7 @@ int** getNodeAtomicShape(LOGMALLOCLIST* logmalloclist, NTREE* ntree) * @return Void */ -void printNodeNames(LOGMALLOCLIST* logmalloclist, NTREE* tree) +void udaPrintNodeNames(LOGMALLOCLIST* logmalloclist, NTREE* tree) { int namecount; char** namelist; @@ -3411,9 +3411,9 @@ void printNodeNames(LOGMALLOCLIST* logmalloclist, NTREE* tree) } UDA_LOG(UDA_LOG_DEBUG, "\nData Node Structure Names and Types\n"); - namecount = getNodeStructureCount(tree); // Count of all local data structures - namelist = getNodeStructureNames(logmalloclist, tree); // Names - typelist = getNodeStructureTypes(logmalloclist, tree); // Types + namecount = udaGetNodeStructureCount(tree); // Count of all local data structures + namelist = udaGetNodeStructureNames(logmalloclist, tree); // Names + typelist = udaGetNodeStructureTypes(logmalloclist, tree); // Types UDA_LOG(UDA_LOG_DEBUG, "Structure Count %d\n", namecount); if (namecount > 0) { UDA_LOG(UDA_LOG_DEBUG, " #\tName\tType\n"); @@ -3422,9 +3422,9 @@ void printNodeNames(LOGMALLOCLIST* logmalloclist, NTREE* tree) } } UDA_LOG(UDA_LOG_DEBUG, "\nData Node Atomic Names and Types\n"); - namecount = getNodeAtomicCount(tree); // Count of all local atomic data - namelist = getNodeAtomicNames(logmalloclist, tree); // Names - typelist = getNodeAtomicTypes(logmalloclist, tree); // Types + namecount = udaGetNodeAtomicCount(tree); // Count of all local atomic data + namelist = udaGetNodeAtomicNames(logmalloclist, tree); // Names + typelist = udaGetNodeAtomicTypes(logmalloclist, tree); // Types UDA_LOG(UDA_LOG_DEBUG, "Atomic Count %d\n", namecount); if (namecount > 0) { UDA_LOG(UDA_LOG_DEBUG, " #\tName\tType\n"); @@ -3440,17 +3440,17 @@ void printNodeNames(LOGMALLOCLIST* logmalloclist, NTREE* tree) * @param tree A pointer to a tree node. If nullptr the root node is assumed. * @return Void */ -void printNodeAtomic(LOGMALLOCLIST* logmalloclist, NTREE* tree) +void udaPrintNodeAtomic(LOGMALLOCLIST* logmalloclist, NTREE* tree) { int namecount; char** namelist; if (tree == nullptr) { tree = full_ntree; } - namecount = getNodeAtomicCount(tree); // Count of all local atomic data - namelist = getNodeAtomicNames(logmalloclist, tree); // Names + namecount = udaGetNodeAtomicCount(tree); // Count of all local atomic data + namelist = udaGetNodeAtomicNames(logmalloclist, tree); // Names for (int i = 0; i < namecount; i++) { - printAtomicType(logmalloclist, tree, namelist[i]); + udaPrintAtomicType(logmalloclist, tree, namelist[i]); } } @@ -3459,7 +3459,7 @@ void printNodeAtomic(LOGMALLOCLIST* logmalloclist, NTREE* tree) * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return the number of User Defined Type Structure Definition Components. */ -int getNodeStructureComponentCount(NTREE* ntree) +int udaGetNodeStructureComponentCount(NTREE* ntree) { if (ntree == nullptr) { ntree = udaGetFullNTree(); @@ -3472,7 +3472,7 @@ int getNodeStructureComponentCount(NTREE* ntree) * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return the List of User Defined Type Structure Definition Component names. */ -char** getNodeStructureComponentNames(NTREE* ntree) +char** udaGetNodeStructureComponentNames(NTREE* ntree) { int count; char** names; @@ -3495,7 +3495,7 @@ char** getNodeStructureComponentNames(NTREE* ntree) * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return the List of User Defined Type Structure Definition Component Types. */ -char** getNodeStructureComponentTypes(NTREE* ntree) +char** udaGetNodeStructureComponentTypes(NTREE* ntree) { int count; char** names; @@ -3518,7 +3518,7 @@ char** getNodeStructureComponentTypes(NTREE* ntree) * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return the List of User Defined Type Structure Definition Component Descriptions. */ -char** getNodeStructureComponentDescriptions(NTREE* ntree) +char** udaGetNodeStructureComponentDescriptions(NTREE* ntree) { int count; char** names; @@ -3543,7 +3543,7 @@ char** getNodeStructureComponentDescriptions(NTREE* ntree) * @return the Count of User Defined Structure Component Data Array elements. */ -int getNodeStructureComponentDataCount(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target) +int udaGetNodeStructureComponentDataCount(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target) { const char* lastname; USERDEFINEDTYPE* userdefinedtype; @@ -3571,7 +3571,7 @@ int getNodeStructureComponentDataCount(LOGMALLOCLIST* logmalloclist, NTREE* ntre if ((data = (char*)ntree->data) == nullptr) { break; } - findMalloc(logmalloclist, &data[userdefinedtype->compoundfield[i].offset], &count, &size, &type); + udaFindMalloc(logmalloclist, &data[userdefinedtype->compoundfield[i].offset], &count, &size, &type); break; } else { count = userdefinedtype->compoundfield[i].count; @@ -3588,7 +3588,7 @@ int getNodeStructureComponentDataCount(LOGMALLOCLIST* logmalloclist, NTREE* ntre * @param target The name of a User Defined Structure definition. * @return the Rank of User Defined Structure Component Data array. */ -int getNodeStructureComponentDataRank(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target) +int udaGetNodeStructureComponentDataRank(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target) { const char* lastname; char* data; @@ -3611,7 +3611,7 @@ int getNodeStructureComponentDataRank(LOGMALLOCLIST* logmalloclist, NTREE* ntree if ((data = (char*)ntree->data) == nullptr) { return 0; } - findMalloc2(logmalloclist, &data[ntree->userdefinedtype->compoundfield[i].offset], &count, &size, &type, + udaFindMalloc2(logmalloclist, &data[ntree->userdefinedtype->compoundfield[i].offset], &count, &size, &type, &rank, &shape); if (count == 0) { rank = 0; @@ -3631,7 +3631,7 @@ int getNodeStructureComponentDataRank(LOGMALLOCLIST* logmalloclist, NTREE* ntree * @param target The name of a User Defined Structure definition. * @return the Shape array of length Rank of the User Defined Structure Component Data array. */ -int* getNodeStructureComponentDataShape(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target) +int* udaGetNodeStructureComponentDataShape(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target) { const char* lastname; char* data; @@ -3654,7 +3654,7 @@ int* getNodeStructureComponentDataShape(LOGMALLOCLIST* logmalloclist, NTREE* ntr if ((data = (char*)ntree->data) == nullptr) { return 0; } - findMalloc2(logmalloclist, &data[ntree->userdefinedtype->compoundfield[i].offset], &count, &size, &type, + udaFindMalloc2(logmalloclist, &data[ntree->userdefinedtype->compoundfield[i].offset], &count, &size, &type, &rank, &shape); if (count == 0) { shape = nullptr; @@ -3675,7 +3675,7 @@ int* getNodeStructureComponentDataShape(LOGMALLOCLIST* logmalloclist, NTREE* ntr * @param target The name of a User Defined Structure definition. * @return the value 1 if the User Defined Structure Component Data array is a pointer type. */ -int getNodeStructureComponentDataIsPointer(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target) +int udaGetNodeStructureComponentDataIsPointer(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target) { const char* lastname; USERDEFINEDTYPE* userdefinedtype; @@ -3704,7 +3704,7 @@ int getNodeStructureComponentDataIsPointer(LOGMALLOCLIST* logmalloclist, NTREE* * @param target The name of a User Defined Structure Component. * @return the Size of the User Defined Structure Component. */ -int getNodeStructureComponentDataSize(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target) +int udaGetNodeStructureComponentDataSize(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target) { const char* lastname; USERDEFINEDTYPE* userdefinedtype; @@ -3726,7 +3726,7 @@ int getNodeStructureComponentDataSize(LOGMALLOCLIST* logmalloclist, NTREE* ntree if ((data = (char*)ntree->data) == nullptr) { break; } - findMalloc(logmalloclist, &data[userdefinedtype->compoundfield[i].offset], &count, &size, &type); + udaFindMalloc(logmalloclist, &data[userdefinedtype->compoundfield[i].offset], &count, &size, &type); break; } else { size = userdefinedtype->compoundfield[i].size; @@ -3743,7 +3743,7 @@ int getNodeStructureComponentDataSize(LOGMALLOCLIST* logmalloclist, NTREE* ntree * @param target The name of a User Defined Structure Component. * @return the Type Name of the User Defined Structure Component. */ -const char* getNodeStructureComponentDataDataType(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target) +const char* udaGetNodeStructureComponentDataDataType(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target) { const char* lastname; USERDEFINEDTYPE* userdefinedtype; @@ -3765,7 +3765,7 @@ const char* getNodeStructureComponentDataDataType(LOGMALLOCLIST* logmalloclist, if ((data = (char*)ntree->data) == nullptr) { break; } - findMalloc(logmalloclist, &data[userdefinedtype->compoundfield[i].offset], &count, &size, &type); + udaFindMalloc(logmalloclist, &data[userdefinedtype->compoundfield[i].offset], &count, &size, &type); break; } else { type = userdefinedtype->compoundfield[i].type; @@ -3782,7 +3782,7 @@ const char* getNodeStructureComponentDataDataType(LOGMALLOCLIST* logmalloclist, * @param target The name of a User Defined Structure Component. * @return the User Defined Structure Component's data. */ -void* getNodeStructureComponentData(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target) +void* udaGetNodeStructureComponentData(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target) { const char* lastname; USERDEFINEDTYPE* userdefinedtype; @@ -3829,7 +3829,7 @@ void* getNodeStructureComponentData(LOGMALLOCLIST* logmalloclist, NTREE* ntree, * @param target The name of a User Defined Structure Component. * @return void. */ -void printNodeStructureComponentData(NTREE* ntree, LOGMALLOCLIST* logmalloclist, +void udaPrintNodeStructureComponentData(NTREE* ntree, LOGMALLOCLIST* logmalloclist, USERDEFINEDTYPELIST* userdefinedtypelist, const char* target) { NTREE* node; @@ -3846,28 +3846,28 @@ void printNodeStructureComponentData(NTREE* ntree, LOGMALLOCLIST* logmalloclist, return; } - count = getNodeStructureComponentDataCount(logmalloclist, node, lastname); // Array Size - type = getNodeStructureComponentDataDataType(logmalloclist, node, lastname); // Type + count = udaGetNodeStructureComponentDataCount(logmalloclist, node, lastname); // Array Size + type = udaGetNodeStructureComponentDataDataType(logmalloclist, node, lastname); // Type if (count > 0) { UDA_LOG(UDA_LOG_DEBUG, "[%s] Data Count %d Type %s\n", target, count, type); UDA_LOG(UDA_LOG_DEBUG, "Data Values\n"); if (!strcmp(type, "float")) { - auto s = (float*)getNodeStructureComponentData(logmalloclist, node, lastname); + auto s = (float*)udaGetNodeStructureComponentData(logmalloclist, node, lastname); for (int i = 0; i < count; i++) { UDA_LOG(UDA_LOG_DEBUG, "[%d] %f\n", i, s[i]); } return; } if (!strcmp(type, "int")) { - auto s = (int*)getNodeStructureComponentData(logmalloclist, node, lastname); + auto s = (int*)udaGetNodeStructureComponentData(logmalloclist, node, lastname); for (int i = 0; i < count; i++) { UDA_LOG(UDA_LOG_DEBUG, "[%d] %d\n", i, s[i]); } return; } if (!strcmp(type, "STRING")) { - auto s = (char*)getNodeStructureComponentData(logmalloclist, node, lastname); + auto s = (char*)udaGetNodeStructureComponentData(logmalloclist, node, lastname); UDA_LOG(UDA_LOG_DEBUG, "%s\n", s); return; } @@ -3875,11 +3875,11 @@ void printNodeStructureComponentData(NTREE* ntree, LOGMALLOCLIST* logmalloclist, int firstpass = 1, offset, namecount2; char** namelist2; NTREE temp; - initNTree(&temp); + udaInitNTree(&temp); void* str = nullptr; void* data = nullptr; void* olddata = nullptr; - char* p = (char*)getNodeStructureComponentData(logmalloclist, node, lastname); // Structure Array + char* p = (char*)udaGetNodeStructureComponentData(logmalloclist, node, lastname); // Structure Array char* pp = nullptr; namecount = userdefinedtype->fieldcount; // Count of sub-structure elements UDA_LOG(UDA_LOG_DEBUG, "Data Count %d Type %s\n", namecount, type); @@ -3901,7 +3901,7 @@ void printNodeStructureComponentData(NTREE* ntree, LOGMALLOCLIST* logmalloclist, continue; } if (userdefinedtype->compoundfield[i].atomictype != UDA_TYPE_UNKNOWN) { - printAtomicData(data, userdefinedtype->compoundfield[i].atomictype, + udaPrintAtomicData(data, userdefinedtype->compoundfield[i].atomictype, userdefinedtype->compoundfield[i].count, lastname); } else { @@ -3909,20 +3909,20 @@ void printNodeStructureComponentData(NTREE* ntree, LOGMALLOCLIST* logmalloclist, strcpy(temp.name, userdefinedtype->compoundfield[i].name); temp.userdefinedtype = findUserDefinedType(userdefinedtypelist, type, 0); if (firstpass) { - addNonMalloc(logmalloclist, data, 1, userdefinedtype->compoundfield[i].size, type); + udaAddNonMalloc(logmalloclist, data, 1, userdefinedtype->compoundfield[i].size, type); firstpass = 0; } else { - changeNonMalloc(logmalloclist, olddata, data, 1, userdefinedtype->compoundfield[i].size, + udaChangeNonMalloc(logmalloclist, olddata, data, 1, userdefinedtype->compoundfield[i].size, type); } olddata = data; - namecount2 = getNodeStructureComponentCount(&temp); // Count of structure elements - namelist2 = getNodeStructureComponentNames(&temp); // List of structure element names + namecount2 = udaGetNodeStructureComponentCount(&temp); // Count of structure elements + namelist2 = udaGetNodeStructureComponentNames(&temp); // List of structure element names UDA_LOG(UDA_LOG_DEBUG, "Data Count %d Type %s\n", namecount2, type); for (int k = 0; k < namecount2; k++) { - printNodeStructureComponentData(&temp, logmalloclist, userdefinedtypelist, namelist2[k]); + udaPrintNodeStructureComponentData(&temp, logmalloclist, userdefinedtypelist, namelist2[k]); } } } @@ -3938,7 +3938,7 @@ void printNodeStructureComponentData(NTREE* ntree, LOGMALLOCLIST* logmalloclist, * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return void. */ -void printNodeStructure(LOGMALLOCLIST* logmalloclist, NTREE* ntree) +void udaPrintNodeStructure(LOGMALLOCLIST* logmalloclist, NTREE* ntree) { int count, acount, scount, kstart = 1; char **anamelist, **snamelist; @@ -3949,10 +3949,10 @@ void printNodeStructure(LOGMALLOCLIST* logmalloclist, NTREE* ntree) ntree = udaGetFullNTree(); } - acount = getNodeAtomicCount(ntree); // Count of the Tree Node Structure atomic type components - anamelist = getNodeAtomicNames(logmalloclist, ntree); - scount = getNodeStructureCount(ntree); // Count of the Tree Node Structure structure type components - snamelist = getNodeStructureNames(logmalloclist, ntree); + acount = udaGetNodeAtomicCount(ntree); // Count of the Tree Node Structure atomic type components + anamelist = udaGetNodeAtomicNames(logmalloclist, ntree); + scount = udaGetNodeStructureCount(ntree); // Count of the Tree Node Structure structure type components + snamelist = udaGetNodeStructureNames(logmalloclist, ntree); count = getNodeStructureDataCount(logmalloclist, ntree); // Count of the Tree Node Structure Array elements node = ntree; // Start at the base node: all other structure array elements are sibling nodes @@ -3961,7 +3961,7 @@ void printNodeStructure(LOGMALLOCLIST* logmalloclist, NTREE* ntree) UDA_LOG(UDA_LOG_DEBUG, "%s contents:\n", ntree->userdefinedtype->name); - data = getNodeStructureArrayData(logmalloclist, ntree, j); // Loop over Structure Array Elements + data = udaGetNodeStructureArrayData(logmalloclist, ntree, j); // Loop over Structure Array Elements // Find the next structure array element node - it must be a sibling node // Nodes are ordered so start at the previous node @@ -3977,13 +3977,13 @@ void printNodeStructure(LOGMALLOCLIST* logmalloclist, NTREE* ntree) } } if (node == nullptr) { - udaAddError(UDA_CODE_ERROR_TYPE, "printNodeStructure", 999, "Structure Array element Node not Found!"); + udaAddError(UDA_CODE_ERROR_TYPE, "udaPrintNodeStructure", 999, "Structure Array element Node not Found!"); return; } } for (int i = 0; i < acount; i++) { - printAtomicType(logmalloclist, node, anamelist[i]); // Print Atomic Components + udaPrintAtomicType(logmalloclist, node, anamelist[i]); // Print Atomic Components } for (int i = 0; i < scount; i++) { // Print Structured Components @@ -3991,7 +3991,7 @@ void printNodeStructure(LOGMALLOCLIST* logmalloclist, NTREE* ntree) // Structured components must be children of this node. if ((node2 = findNTreeStructure(logmalloclist, node, snamelist[i])) != nullptr) { - printNodeStructure(logmalloclist, node2); + udaPrintNodeStructure(logmalloclist, node2); } else { UDA_LOG(UDA_LOG_DEBUG, "%40s: null\n", snamelist[i]); } @@ -4005,7 +4005,7 @@ void printNodeStructure(LOGMALLOCLIST* logmalloclist, NTREE* ntree) * @param target The name of a User Defined Structure Component. * @return the User Defined Structure Component's data cast to float. */ -float* castNodeStructureComponentDatatoFloat(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target) +float* udaCastNodeStructureComponentDatatoFloat(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target) { NTREE* node; int count; @@ -4021,11 +4021,11 @@ float* castNodeStructureComponentDatatoFloat(LOGMALLOCLIST* logmalloclist, NTREE return nullptr; } - count = getNodeStructureComponentDataCount(logmalloclist, node, lastname); - type = getNodeStructureComponentDataDataType(logmalloclist, node, lastname); + count = udaGetNodeStructureComponentDataCount(logmalloclist, node, lastname); + type = udaGetNodeStructureComponentDataDataType(logmalloclist, node, lastname); if (!strcmp(type, "float")) { - return ((float*)getNodeStructureComponentData(logmalloclist, node, lastname)); + return ((float*)udaGetNodeStructureComponentData(logmalloclist, node, lastname)); } if (count == 0) { @@ -4034,14 +4034,14 @@ float* castNodeStructureComponentDatatoFloat(LOGMALLOCLIST* logmalloclist, NTREE data = (float*)malloc(count * sizeof(float)); if (!strcmp(type, "double")) { - double* s = (double*)getNodeStructureComponentData(logmalloclist, node, lastname); + double* s = (double*)udaGetNodeStructureComponentData(logmalloclist, node, lastname); for (int i = 0; i < count; i++) { data[i] = (float)s[i]; } return data; } if (!strcmp(type, "int")) { - int* s = (int*)getNodeStructureComponentData(logmalloclist, node, lastname); + int* s = (int*)udaGetNodeStructureComponentData(logmalloclist, node, lastname); for (int i = 0; i < count; i++) { data[i] = (float)s[i]; } @@ -4073,11 +4073,11 @@ double* castNodeStructureComponentDatatoDouble(LOGMALLOCLIST* logmalloclist, NTR return nullptr; } - count = getNodeStructureComponentDataCount(logmalloclist, node, lastname); - type = getNodeStructureComponentDataDataType(logmalloclist, node, lastname); + count = udaGetNodeStructureComponentDataCount(logmalloclist, node, lastname); + type = udaGetNodeStructureComponentDataDataType(logmalloclist, node, lastname); if (!strcmp(type, "double")) { - return (double*)getNodeStructureComponentData(logmalloclist, node, lastname); + return (double*)udaGetNodeStructureComponentData(logmalloclist, node, lastname); } if (count == 0) { @@ -4086,14 +4086,14 @@ double* castNodeStructureComponentDatatoDouble(LOGMALLOCLIST* logmalloclist, NTR data = (double*)malloc(count * sizeof(double)); if (!strcmp(type, "float")) { - float* s = (float*)getNodeStructureComponentData(logmalloclist, node, lastname); + float* s = (float*)udaGetNodeStructureComponentData(logmalloclist, node, lastname); for (int i = 0; i < count; i++) { data[i] = (double)s[i]; } return data; } if (!strcmp(type, "int")) { - int* s = (int*)getNodeStructureComponentData(logmalloclist, node, lastname); + int* s = (int*)udaGetNodeStructureComponentData(logmalloclist, node, lastname); for (int i = 0; i < count; i++) { data[i] = (double)s[i]; } @@ -4111,7 +4111,7 @@ double* castNodeStructureComponentDatatoDouble(LOGMALLOCLIST* logmalloclist, NTR * @param str A pointer to a NTREE data structure instance. * @return Void. */ -void initNTree(NTREE* str) +void udaInitNTree(NTREE* str) { str->branches = 0; str->name[0] = '\0'; @@ -4125,7 +4125,7 @@ void initNTree(NTREE* str) * * @return Void. */ -void initNTreeList(NTREELIST* ntree_list) +void udaInitNTreeList(NTREELIST* ntree_list) { ntree_list->listCount = 0; ntree_list->forrest = nullptr; @@ -4137,7 +4137,7 @@ void initNTreeList(NTREELIST* ntree_list) * @param tree A pointer to a tree node. If nullptr the root node is assumed. * @return Void */ -void printNTree2(NTREE* tree) +void udaPrintNTree2(NTREE* tree) { if (tree == nullptr) { tree = full_ntree; @@ -4161,7 +4161,7 @@ void printNTree2(NTREE* tree) } #endif for (int i = 0; i < tree->branches; i++) { - printNTree2(tree->children[i]); + udaPrintNTree2(tree->children[i]); } } @@ -4171,7 +4171,7 @@ void printNTree2(NTREE* tree) * @param tree A pointer to a tree node. If nullptr the root node is assumed. * @return Void */ -void printNTree(NTREE* tree, USERDEFINEDTYPELIST* userdefinedtypelist) +void udaPrintNTree(NTREE* tree, USERDEFINEDTYPELIST* userdefinedtypelist) { if (tree == nullptr) { tree = full_ntree; @@ -4184,9 +4184,9 @@ void printNTree(NTREE* tree, USERDEFINEDTYPELIST* userdefinedtypelist) #endif UDA_LOG(UDA_LOG_DEBUG, "Name: %s\n", tree->name); UDA_LOG(UDA_LOG_DEBUG, "Children: %d\n", tree->branches); - printUserDefinedTypeTable(userdefinedtypelist, *tree->userdefinedtype); + udaPrintUserDefinedTypeTable(userdefinedtypelist, *tree->userdefinedtype); for (int i = 0; i < tree->branches; i++) { - printNTree(tree->children[i], userdefinedtypelist); + udaPrintNTree(tree->children[i], userdefinedtypelist); } } @@ -4196,7 +4196,7 @@ void printNTree(NTREE* tree, USERDEFINEDTYPELIST* userdefinedtypelist) * @param tree A pointer to a tree node. If nullptr the root node is assumed. * @return Void */ -void printNTreeList(NTREE* tree) +void udaPrintNTreeList(NTREE* tree) { if (tree == nullptr) { tree = full_ntree; @@ -4209,7 +4209,7 @@ void printNTreeList(NTREE* tree) tree->userdefinedtype->name, tree->branches); #endif for (int i = 0; i < tree->branches; i++) { - printNTreeList(tree->children[i]); + udaPrintNTreeList(tree->children[i]); } } @@ -4218,7 +4218,7 @@ void printNTreeList(NTREE* tree) * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return the Count of Tree Nodes. */ -int getNTreeStructureCount(NTREE* ntree) +int udaGetNTreeStructureCount(NTREE* ntree) { int count = 1; if (ntree == nullptr) { @@ -4230,7 +4230,7 @@ int getNTreeStructureCount(NTREE* ntree) for (int i = 0; i < ntree->branches; i++) { if (i == 0 || strcmp(ntree->children[i]->userdefinedtype->name, ntree->children[i - 1]->userdefinedtype->name) != 0) { - count = count + getNTreeStructureCount(ntree->children[i]); + count = count + udaGetNTreeStructureCount(ntree->children[i]); } } return count; @@ -4241,14 +4241,14 @@ int getNTreeStructureCount(NTREE* ntree) * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return the List of User Defined Type Structure names. */ -char** getNTreeStructureNames(LOGMALLOCLIST* logmalloclist, NTREE* ntree) +char** udaGetNTreeStructureNames(LOGMALLOCLIST* logmalloclist, NTREE* ntree) { if (ntree == nullptr) { ntree = udaGetFullNTree(); } auto names = (char**)malloc(sizeof(char*)); - addMalloc(logmalloclist, (void*)names, 1, sizeof(char*), "char *"); + udaAddMalloc(logmalloclist, (void*)names, 1, sizeof(char*), "char *"); names[0] = ntree->name; if (ntree->branches == 0) { @@ -4259,11 +4259,11 @@ char** getNTreeStructureNames(LOGMALLOCLIST* logmalloclist, NTREE* ntree) for (int i = 0; i < ntree->branches; i++) { if (i == 0 || strcmp(ntree->children[i]->userdefinedtype->name, ntree->children[i - 1]->userdefinedtype->name) != 0) { - int childcount = getNTreeStructureCount(ntree->children[i]); + int childcount = udaGetNTreeStructureCount(ntree->children[i]); VOIDTYPE old = (VOIDTYPE)names; names = (char**)realloc((void*)names, (count + childcount) * sizeof(char*)); - changeMalloc(logmalloclist, old, (void*)names, (count + childcount), sizeof(char*), "char *"); - char** childnames = getNTreeStructureNames(logmalloclist, ntree->children[i]); + udaChangeMalloc(logmalloclist, old, (void*)names, (count + childcount), sizeof(char*), "char *"); + char** childnames = udaGetNTreeStructureNames(logmalloclist, ntree->children[i]); for (int j = 0; j < childcount; j++) { names[count + j] = childnames[j]; } @@ -4278,14 +4278,14 @@ char** getNTreeStructureNames(LOGMALLOCLIST* logmalloclist, NTREE* ntree) * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return the List of User Defined Type Structure Type names. */ -char** getNTreeStructureTypes(LOGMALLOCLIST* logmalloclist, NTREE* ntree) +char** udaGetNTreeStructureTypes(LOGMALLOCLIST* logmalloclist, NTREE* ntree) { if (ntree == nullptr) { ntree = udaGetFullNTree(); } auto names = (char**)malloc(sizeof(char*)); - addMalloc(logmalloclist, (void*)names, 1, sizeof(char*), "char *"); + udaAddMalloc(logmalloclist, (void*)names, 1, sizeof(char*), "char *"); names[0] = ntree->userdefinedtype->name; if (ntree->branches == 0) { return names; @@ -4295,11 +4295,11 @@ char** getNTreeStructureTypes(LOGMALLOCLIST* logmalloclist, NTREE* ntree) for (int i = 0; i < ntree->branches; i++) { if (i == 0 || strcmp(ntree->children[i]->userdefinedtype->name, ntree->children[i - 1]->userdefinedtype->name) != 0) { - int childcount = getNTreeStructureCount(ntree->children[i]); + int childcount = udaGetNTreeStructureCount(ntree->children[i]); VOIDTYPE old = (VOIDTYPE)names; names = (char**)realloc((void*)names, (count + childcount) * sizeof(char*)); - changeMalloc(logmalloclist, old, (void*)names, (count + childcount), sizeof(char*), "char *"); - char** childnames = getNTreeStructureTypes(logmalloclist, ntree->children[i]); + udaChangeMalloc(logmalloclist, old, (void*)names, (count + childcount), sizeof(char*), "char *"); + char** childnames = udaGetNTreeStructureTypes(logmalloclist, ntree->children[i]); for (int j = 0; j < childcount; j++) { names[count + j] = childnames[j]; } @@ -4315,7 +4315,7 @@ char** getNTreeStructureTypes(LOGMALLOCLIST* logmalloclist, NTREE* ntree) * @param tree A pointer to a tree node. If nullptr the root node is assumed. * @return Void */ -void printNTreeStructureNames(LOGMALLOCLIST* logmalloclist, NTREE* tree) +void udaPrintNTreeStructureNames(LOGMALLOCLIST* logmalloclist, NTREE* tree) { int namecount; char **namelist, **typelist; @@ -4327,9 +4327,9 @@ void printNTreeStructureNames(LOGMALLOCLIST* logmalloclist, NTREE* tree) #else UDA_LOG(UDA_LOG_DEBUG, "\nData Tree %x Structure Names and Types\n", (UVOIDTYPE)tree); #endif - namecount = getNTreeStructureCount(tree); // Count of all Tree Nodes - namelist = getNTreeStructureNames(logmalloclist, tree); // Names of all user defined data structures - typelist = getNTreeStructureTypes(logmalloclist, tree); // Types of all user defined data structures + namecount = udaGetNTreeStructureCount(tree); // Count of all Tree Nodes + namelist = udaGetNTreeStructureNames(logmalloclist, tree); // Names of all user defined data structures + typelist = udaGetNTreeStructureTypes(logmalloclist, tree); // Types of all user defined data structures UDA_LOG(UDA_LOG_DEBUG, "Total Structure Count %d\n", namecount); UDA_LOG(UDA_LOG_DEBUG, " #\tName\tType\n"); for (int i = 0; i < namecount; i++) { @@ -4342,7 +4342,7 @@ void printNTreeStructureNames(LOGMALLOCLIST* logmalloclist, NTREE* tree) * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return the number of User Defined Type Structure Definition Components. */ -int getNTreeStructureComponentCount(NTREE* ntree) +int udaGetNTreeStructureComponentCount(NTREE* ntree) { int count; if (ntree == nullptr) { @@ -4353,7 +4353,7 @@ int getNTreeStructureComponentCount(NTREE* ntree) for (int i = 0; i < ntree->branches; i++) { if (i == 0 || strcmp(ntree->children[i]->userdefinedtype->name, ntree->children[i - 1]->userdefinedtype->name) != 0) { - count = count + getNTreeStructureComponentCount(ntree->children[i]); + count = count + udaGetNTreeStructureComponentCount(ntree->children[i]); } } return count; @@ -4364,7 +4364,7 @@ int getNTreeStructureComponentCount(NTREE* ntree) * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return the List of User Defined Type Structure Definition Component names. */ -char** getNTreeStructureComponentNames(LOGMALLOCLIST* logmalloclist, NTREE* ntree) +char** udaGetNTreeStructureComponentNames(LOGMALLOCLIST* logmalloclist, NTREE* ntree) { if (ntree == nullptr) { ntree = udaGetFullNTree(); @@ -4375,16 +4375,16 @@ char** getNTreeStructureComponentNames(LOGMALLOCLIST* logmalloclist, NTREE* ntre return nullptr; } - char** names = getNodeStructureComponentNames(ntree); + char** names = udaGetNodeStructureComponentNames(ntree); for (int i = 0; i < ntree->branches; i++) { if (i == 0 || strcmp(ntree->children[i]->userdefinedtype->name, ntree->children[i - 1]->userdefinedtype->name) != 0) { - int childcount = getNTreeStructureComponentCount(ntree->children[i]); + int childcount = udaGetNTreeStructureComponentCount(ntree->children[i]); auto old = (VOIDTYPE)names; names = (char**)realloc((void*)names, (count + childcount) * sizeof(char*)); - changeMalloc(logmalloclist, old, (void*)names, (count + childcount), sizeof(char*), "char *"); - char** childnames = getNTreeStructureComponentNames(logmalloclist, ntree->children[i]); + udaChangeMalloc(logmalloclist, old, (void*)names, (count + childcount), sizeof(char*), "char *"); + char** childnames = udaGetNTreeStructureComponentNames(logmalloclist, ntree->children[i]); for (int j = 0; j < childcount; j++) { names[count + j] = childnames[j]; } @@ -4399,7 +4399,7 @@ char** getNTreeStructureComponentNames(LOGMALLOCLIST* logmalloclist, NTREE* ntre * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return the List of User Defined Type Structure Definition Component Types. */ -char** getNTreeStructureComponentTypes(LOGMALLOCLIST* logmalloclist, NTREE* ntree) +char** udaGetNTreeStructureComponentTypes(LOGMALLOCLIST* logmalloclist, NTREE* ntree) { if (ntree == nullptr) { ntree = udaGetFullNTree(); @@ -4410,16 +4410,16 @@ char** getNTreeStructureComponentTypes(LOGMALLOCLIST* logmalloclist, NTREE* ntre return nullptr; } - char** names = getNodeStructureComponentTypes(ntree); + char** names = udaGetNodeStructureComponentTypes(ntree); for (int i = 0; i < ntree->branches; i++) { if (i == 0 || strcmp(ntree->children[i]->userdefinedtype->name, ntree->children[i - 1]->userdefinedtype->name) != 0) { - int childcount = getNTreeStructureComponentCount(ntree->children[i]); + int childcount = udaGetNTreeStructureComponentCount(ntree->children[i]); auto old = (VOIDTYPE)names; names = (char**)realloc((void*)names, (count + childcount) * sizeof(char*)); - changeMalloc(logmalloclist, old, (void*)names, (count + childcount), sizeof(char*), "char *"); - char** childnames = getNTreeStructureComponentTypes(logmalloclist, ntree->children[i]); + udaChangeMalloc(logmalloclist, old, (void*)names, (count + childcount), sizeof(char*), "char *"); + char** childnames = udaGetNTreeStructureComponentTypes(logmalloclist, ntree->children[i]); for (int j = 0; j < childcount; j++) { names[count + j] = childnames[j]; } @@ -4434,7 +4434,7 @@ char** getNTreeStructureComponentTypes(LOGMALLOCLIST* logmalloclist, NTREE* ntre * @param ntree A pointer to a tree node. If nullptr the root node is assumed. * @return the List of User Defined Type Structure Definition Component Descriptions. */ -char** getNTreeStructureComponentDescriptions(LOGMALLOCLIST* logmalloclist, NTREE* ntree) +char** udaGetNTreeStructureComponentDescriptions(LOGMALLOCLIST* logmalloclist, NTREE* ntree) { if (ntree == nullptr) { ntree = udaGetFullNTree(); @@ -4445,16 +4445,16 @@ char** getNTreeStructureComponentDescriptions(LOGMALLOCLIST* logmalloclist, NTRE return nullptr; } - char** names = getNodeStructureComponentDescriptions(ntree); + char** names = udaGetNodeStructureComponentDescriptions(ntree); for (int i = 0; i < ntree->branches; i++) { if (i == 0 || strcmp(ntree->children[i]->userdefinedtype->name, ntree->children[i - 1]->userdefinedtype->name) != 0) { - int childcount = getNTreeStructureComponentCount(ntree->children[i]); + int childcount = udaGetNTreeStructureComponentCount(ntree->children[i]); auto old = (VOIDTYPE)names; names = (char**)realloc((void*)names, (count + childcount) * sizeof(char*)); - changeMalloc(logmalloclist, old, (void*)names, (count + childcount), sizeof(char*), "char *"); - char** childnames = getNTreeStructureComponentDescriptions(logmalloclist, ntree->children[i]); + udaChangeMalloc(logmalloclist, old, (void*)names, (count + childcount), sizeof(char*), "char *"); + char** childnames = udaGetNTreeStructureComponentDescriptions(logmalloclist, ntree->children[i]); for (int j = 0; j < childcount; j++) { names[count + j] = childnames[j]; } @@ -4470,7 +4470,7 @@ char** getNTreeStructureComponentDescriptions(LOGMALLOCLIST* logmalloclist, NTRE * @param tree A pointer to a tree node. If nullptr the root node is assumed. * @return Void */ -void printNTreeStructureComponentNames(LOGMALLOCLIST* logmalloclist, NTREE* tree) +void udaPrintNTreeStructureComponentNames(LOGMALLOCLIST* logmalloclist, NTREE* tree) { int namecount; char **namelist, **typelist, **desclist; @@ -4478,10 +4478,10 @@ void printNTreeStructureComponentNames(LOGMALLOCLIST* logmalloclist, NTREE* tree tree = full_ntree; } UDA_LOG(UDA_LOG_DEBUG, "\nData Tree Structure Component Names, Types and Descriptions\n"); - namecount = getNTreeStructureComponentCount(tree); // Count of all Tree Nodes - namelist = getNTreeStructureComponentNames(logmalloclist, tree); // Names of all structure elements - typelist = getNTreeStructureComponentTypes(logmalloclist, tree); // Types of all structure elements - desclist = getNTreeStructureComponentDescriptions(logmalloclist, tree); // Descriptions of all structure elements + namecount = udaGetNTreeStructureComponentCount(tree); // Count of all Tree Nodes + namelist = udaGetNTreeStructureComponentNames(logmalloclist, tree); // Names of all structure elements + typelist = udaGetNTreeStructureComponentTypes(logmalloclist, tree); // Types of all structure elements + desclist = udaGetNTreeStructureComponentDescriptions(logmalloclist, tree); // Descriptions of all structure elements UDA_LOG(UDA_LOG_DEBUG, "Total Structure Component Count %d\n", namecount); UDA_LOG(UDA_LOG_DEBUG, " #\tName\tType\tDescription\n"); for (int i = 0; i < namecount; i++) { @@ -4491,58 +4491,58 @@ void printNTreeStructureComponentNames(LOGMALLOCLIST* logmalloclist, NTREE* tree //======================================================================================================= // Print utility functions: explicit output to stdout -void printNode_stdout(NTREE* tree) +void udaPrintNode_stdout(NTREE* tree) { - printNode(tree); + udaPrintNode(tree); } -void printNodeNames_stdout(LOGMALLOCLIST* logmalloclist, NTREE* tree) +void udaPrintNodeNames_stdout(LOGMALLOCLIST* logmalloclist, NTREE* tree) { - printNodeNames(logmalloclist, tree); + udaPrintNodeNames(logmalloclist, tree); } -void printNodeAtomic_stdout(LOGMALLOCLIST* logmalloclist, NTREE* tree) +void udaPrintNodeAtomic_stdout(LOGMALLOCLIST* logmalloclist, NTREE* tree) { - printNodeAtomic(logmalloclist, tree); + udaPrintNodeAtomic(logmalloclist, tree); } -void printNTreeStructureNames_stdout(LOGMALLOCLIST* logmalloclist, NTREE* tree) +void udaPrintNTreeStructureNames_stdout(LOGMALLOCLIST* logmalloclist, NTREE* tree) { - printNTreeStructureNames(logmalloclist, tree); + udaPrintNTreeStructureNames(logmalloclist, tree); } -void printNTreeStructureComponentNames_stdout(LOGMALLOCLIST* logmalloclist, NTREE* tree) +void udaPrintNTreeStructureComponentNames_stdout(LOGMALLOCLIST* logmalloclist, NTREE* tree) { - printNTreeStructureComponentNames(logmalloclist, tree); + udaPrintNTreeStructureComponentNames(logmalloclist, tree); } -void printAtomicType_stdout(LOGMALLOCLIST* logmalloclist, NTREE* tree, const char* target) +void udaPrintAtomicType_stdout(LOGMALLOCLIST* logmalloclist, NTREE* tree, const char* target) { - printAtomicType(logmalloclist, tree, target); + udaPrintAtomicType(logmalloclist, tree, target); } -void getNodeStructureComponentDataShape_f(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target, int* shape_f) +void udaGetNodeStructureComponentDataShape_f(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target, int* shape_f) { - int rank = getNodeStructureComponentDataRank(logmalloclist, ntree, target); + int rank = udaGetNodeStructureComponentDataRank(logmalloclist, ntree, target); for (int i = 0; i < MAXRANK; i++) { shape_f[i] = 0; } if (rank > 1 && rank <= MAXRANK) { - int* shape = getNodeStructureComponentDataShape(logmalloclist, ntree, target); + int* shape = udaGetNodeStructureComponentDataShape(logmalloclist, ntree, target); if (shape != nullptr) { for (int i = 0; i < rank; i++) { shape_f[i] = shape[i]; } } } else { - shape_f[0] = getNodeStructureComponentDataCount(logmalloclist, ntree, target); + shape_f[0] = udaGetNodeStructureComponentDataCount(logmalloclist, ntree, target); } } void getNodeStructureComponentShortData_f(LOGMALLOCLIST* logmalloclist, NTREE* node, const char* target, short* data_f) { - auto data = (short*)getNodeStructureComponentData(logmalloclist, node, target); - int count = getNodeStructureComponentDataCount(logmalloclist, node, target); + auto data = (short*)udaGetNodeStructureComponentData(logmalloclist, node, target); + int count = udaGetNodeStructureComponentDataCount(logmalloclist, node, target); for (int i = 0; i < count; i++) { data_f[i] = data[i]; } @@ -4550,28 +4550,28 @@ void getNodeStructureComponentShortData_f(LOGMALLOCLIST* logmalloclist, NTREE* n void getNodeStructureComponentFloatData_f(LOGMALLOCLIST* logmalloclist, NTREE* node, const char* target, float* data_f) { - float* data = (float*)getNodeStructureComponentData(logmalloclist, node, target); - int count = getNodeStructureComponentDataCount(logmalloclist, node, target); + float* data = (float*)udaGetNodeStructureComponentData(logmalloclist, node, target); + int count = udaGetNodeStructureComponentDataCount(logmalloclist, node, target); for (int i = 0; i < count; i++) { data_f[i] = data[i]; } } -void dereferenceShortData(short* data_c, int count, short* data_f) +void udaDereferenceShortData(short* data_c, int count, short* data_f) { for (int i = 0; i < count; i++) { data_f[i] = data_c[i]; } } -void dereferenceFloatData(float* data_c, int count, float* data_f) +void udaDereferenceFloatData(float* data_c, int count, float* data_f) { for (int i = 0; i < count; i++) { data_f[i] = data_c[i]; } } -short* castNodeStructureComponentDatatoShort(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target) +short* udaCastNodeStructureComponentDatatoShort(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target) { NTREE* node; int count; @@ -4587,11 +4587,11 @@ short* castNodeStructureComponentDatatoShort(LOGMALLOCLIST* logmalloclist, NTREE return nullptr; } - count = getNodeStructureComponentDataCount(logmalloclist, node, lastname); - type = getNodeStructureComponentDataDataType(logmalloclist, node, lastname); + count = udaGetNodeStructureComponentDataCount(logmalloclist, node, lastname); + type = udaGetNodeStructureComponentDataDataType(logmalloclist, node, lastname); if (!strcmp(type, "short")) { - return (short*)getNodeStructureComponentData(logmalloclist, node, lastname); + return (short*)udaGetNodeStructureComponentData(logmalloclist, node, lastname); } if (count == 0) { @@ -4600,35 +4600,35 @@ short* castNodeStructureComponentDatatoShort(LOGMALLOCLIST* logmalloclist, NTREE data = (short*)malloc(count * sizeof(short)); if (!strcmp(type, "double")) { - double* s = (double*)getNodeStructureComponentData(logmalloclist, node, lastname); + double* s = (double*)udaGetNodeStructureComponentData(logmalloclist, node, lastname); for (int i = 0; i < count; i++) { data[i] = (short)s[i]; } return data; } if (!strcmp(type, "float")) { - float* s = (float*)getNodeStructureComponentData(logmalloclist, node, lastname); + float* s = (float*)udaGetNodeStructureComponentData(logmalloclist, node, lastname); for (int i = 0; i < count; i++) { data[i] = (short)s[i]; } return data; } if (!strcmp(type, "int")) { - int* s = (int*)getNodeStructureComponentData(logmalloclist, node, lastname); + int* s = (int*)udaGetNodeStructureComponentData(logmalloclist, node, lastname); for (int i = 0; i < count; i++) { data[i] = (short)s[i]; } return data; } if (!strcmp(type, "unsigned int")) { - unsigned int* s = (unsigned int*)getNodeStructureComponentData(logmalloclist, node, lastname); + unsigned int* s = (unsigned int*)udaGetNodeStructureComponentData(logmalloclist, node, lastname); for (int i = 0; i < count; i++) { data[i] = (short)s[i]; } return data; } if (!strcmp(type, "unsigned short")) { - unsigned short* s = (unsigned short*)getNodeStructureComponentData(logmalloclist, node, lastname); + unsigned short* s = (unsigned short*)udaGetNodeStructureComponentData(logmalloclist, node, lastname); for (int i = 0; i < count; i++) { data[i] = (short)s[i]; } @@ -4637,12 +4637,12 @@ short* castNodeStructureComponentDatatoShort(LOGMALLOCLIST* logmalloclist, NTREE return nullptr; } -void castNodeStructureComponentDatatoShort_f(LOGMALLOCLIST* logmalloclist, NTREE* node, const char* target, +void udaCastNodeStructureComponentDatatoShort_f(LOGMALLOCLIST* logmalloclist, NTREE* node, const char* target, short* data_f) { - short* data = castNodeStructureComponentDatatoShort(logmalloclist, node, target); + short* data = udaCastNodeStructureComponentDatatoShort(logmalloclist, node, target); if (data != nullptr) { - int count = getNodeStructureComponentDataCount(logmalloclist, node, target); + int count = udaGetNodeStructureComponentDataCount(logmalloclist, node, target); for (int i = 0; i < count; i++) { data_f[i] = data[i]; } @@ -4650,12 +4650,12 @@ void castNodeStructureComponentDatatoShort_f(LOGMALLOCLIST* logmalloclist, NTREE } } -void castNodeStructureComponentDatatoFloat_f(LOGMALLOCLIST* logmalloclist, NTREE* node, const char* target, +void udaCastNodeStructureComponentDatatoFloat_f(LOGMALLOCLIST* logmalloclist, NTREE* node, const char* target, float* data_f) { - float* data = castNodeStructureComponentDatatoFloat(logmalloclist, node, target); + float* data = udaCastNodeStructureComponentDatatoFloat(logmalloclist, node, target); if (data != nullptr) { - int count = getNodeStructureComponentDataCount(logmalloclist, node, target); + int count = udaGetNodeStructureComponentDataCount(logmalloclist, node, target); for (int i = 0; i < count; i++) { data_f[i] = data[i]; } @@ -4663,11 +4663,11 @@ void castNodeStructureComponentDatatoFloat_f(LOGMALLOCLIST* logmalloclist, NTREE } } -void addStructureField(USERDEFINEDTYPE* user_type, const char* name, const char* desc, UDA_TYPE data_type, +void udaAddStructureField(USERDEFINEDTYPE* user_type, const char* name, const char* desc, UDA_TYPE data_type, bool is_pointer, int rank, int* shape, size_t offset) { COMPOUNDFIELD field; - initCompoundField(&field); + udaInitCompoundField(&field); strcpy(field.name, name); field.atomictype = data_type; @@ -4693,7 +4693,7 @@ void addStructureField(USERDEFINEDTYPE* user_type, const char* name, const char* field.size = is_pointer ? (int)getPtrSizeOf(data_type) : (field.count * (int)getSizeOf(data_type)); field.offset = (int)offset; field.offpad = (int)padding(offset, field.type); - field.alignment = getalignmentof(field.type); + field.alignment = udaGetalignmentof(field.type); - addCompoundField(user_type, field); + udaAddCompoundField(user_type, field); } diff --git a/source/structures/xdrUserDefinedData.cpp b/source/structures/xdrUserDefinedData.cpp index f5f4cd1d..f635a46b 100644 --- a/source/structures/xdrUserDefinedData.cpp +++ b/source/structures/xdrUserDefinedData.cpp @@ -81,20 +81,20 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l if (index == 0 && datacount > 0) { *data = malloc(datacount * userdefinedtype->size); if (structRank > 1 && structShape != nullptr) { - addMalloc2(logmalloclist, *data, datacount, userdefinedtype->size, userdefinedtype->name, structRank, + udaAddMalloc2(logmalloclist, *data, datacount, userdefinedtype->size, userdefinedtype->name, structRank, structShape); } else { - addMalloc(logmalloclist, *data, datacount, userdefinedtype->size, userdefinedtype->name); + udaAddMalloc(logmalloclist, *data, datacount, userdefinedtype->size, userdefinedtype->name); } structRank = 0; } newNTree = (NTREE*)malloc(sizeof(NTREE)); // this is the parent node for the received structure - addMalloc(logmalloclist, (void*)newNTree, 1, sizeof(NTREE), "NTREE"); + udaAddMalloc(logmalloclist, (void*)newNTree, 1, sizeof(NTREE), "NTREE"); *NTree = newNTree; // Return the new tree node address - initNTree(newNTree); + udaInitNTree(newNTree); newNTree->data = nullptr; newNTree->userdefinedtype = userdefinedtype; // preserve Pairing of data and data type } @@ -151,7 +151,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l shape = nullptr; } d = (char*)malloc(count * sizeof(float)); - addMalloc2(logmalloclist, (void*)d, count, sizeof(float), "float", rank, shape); + udaAddMalloc2(logmalloclist, (void*)d, count, sizeof(float), "float", rank, shape); *p = (VOIDTYPE)d; } else { break; @@ -167,14 +167,14 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l break; } - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); // Assume 0 means No Pointer data to send! // Allocation of pointer data within SOAP is problematic. // Data malloc'd within SOAP are typed "unknown". // Generally, pointer class data are preceded within the data binding structures with integer // elements named __size followed by the name of the element. The value stored by this element - // is the equivalent of the count parameter required from findMalloc. + // is the equivalent of the count parameter required from udaFindMalloc. // // Other data creators, e.g., XML DOM, also have types "unknown" // In these cases, a best guess is made to the type and count based on expectations and the heap @@ -248,7 +248,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l shape = nullptr; } d = (char*)malloc(count * sizeof(double)); - addMalloc2(logmalloclist, (void*)d, count, sizeof(double), "double", rank, shape); + udaAddMalloc2(logmalloclist, (void*)d, count, sizeof(double), "double", rank, shape); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { break; @@ -262,7 +262,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l } // Assume count of 0 means No Pointer data to send! - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); if (type != nullptr && STR_EQUALS(type, "unknown")) { if (malloc_source == UDA_MALLOC_SOURCE_SOAP && j > 0 && @@ -332,7 +332,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l shape = nullptr; } d = (char*)malloc(count * sizeof(short)); - addMalloc2(logmalloclist, (void*)d, count, sizeof(short), "short", rank, shape); + udaAddMalloc2(logmalloclist, (void*)d, count, sizeof(short), "short", rank, shape); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { break; @@ -344,7 +344,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l rc = rc && xdr_int(xdrs, &count); // No data to send break; } - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); // Assume count of 0 means No Pointer data to send! if (type != nullptr && STR_EQUALS(type, "unknown")) { @@ -414,7 +414,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l shape = nullptr; } d = (char*)malloc(count * sizeof(unsigned char)); - addMalloc2(logmalloclist, (void*)d, count, sizeof(unsigned char), "unsigned char", rank, + udaAddMalloc2(logmalloclist, (void*)d, count, sizeof(unsigned char), "unsigned char", rank, shape); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { @@ -427,7 +427,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l rc = rc && xdr_int(xdrs, &count); // No data to send break; } - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); // Assume count of 0 means No Pointer data to send! if (type != nullptr && STR_EQUALS(type, "unknown")) { @@ -497,7 +497,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l shape = nullptr; } d = (char*)malloc(count * sizeof(unsigned short)); - addMalloc2(logmalloclist, (void*)d, count, sizeof(unsigned short), "unsigned short", rank, + udaAddMalloc2(logmalloclist, (void*)d, count, sizeof(unsigned short), "unsigned short", rank, shape); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { @@ -510,7 +510,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l rc = rc && xdr_int(xdrs, &count); // No data to send break; } - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); // Assume count of 0 means No Pointer data to send! if (type != nullptr && STR_EQUALS(type, "unknown")) { @@ -581,7 +581,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l shape = nullptr; } d = (char*)malloc(count * sizeof(int)); - addMalloc2(logmalloclist, (void*)d, count, sizeof(int), "int", rank, shape); + udaAddMalloc2(logmalloclist, (void*)d, count, sizeof(int), "int", rank, shape); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { break; @@ -593,7 +593,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l rc = rc && xdr_int(xdrs, &count); // No data to send break; } - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); // Assume count of 0 means No Pointer data to send! if (type != nullptr && STR_EQUALS(type, "unknown")) { @@ -663,7 +663,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l shape = nullptr; } d = (char*)malloc(count * sizeof(unsigned int)); - addMalloc2(logmalloclist, (void*)d, count, sizeof(unsigned int), "unsigned int", rank, + udaAddMalloc2(logmalloclist, (void*)d, count, sizeof(unsigned int), "unsigned int", rank, shape); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { @@ -676,7 +676,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l rc = rc && xdr_int(xdrs, &count); // No data to send break; } - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); // Assume count of 0 means No Pointer data to send! if (type != nullptr && STR_EQUALS(type, "unknown")) { @@ -744,7 +744,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l shape = nullptr; } d = (char*)malloc(count * sizeof(long long)); - addMalloc2(logmalloclist, (void*)d, count, sizeof(long long), "long long", rank, shape); + udaAddMalloc2(logmalloclist, (void*)d, count, sizeof(long long), "long long", rank, shape); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { break; @@ -756,7 +756,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l rc = rc && xdr_int(xdrs, &count); // No data to send break; } - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); // Assume count of 0 means No Pointer data to send! if (type != nullptr && STR_EQUALS(type, "unknown")) { @@ -826,7 +826,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l shape = nullptr; } d = (char*)malloc(count * sizeof(unsigned long long)); - addMalloc2(logmalloclist, (void*)d, count, sizeof(unsigned long long), "unsigned long long", + udaAddMalloc2(logmalloclist, (void*)d, count, sizeof(unsigned long long), "unsigned long long", rank, shape); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { @@ -839,7 +839,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l rc = rc && xdr_int(xdrs, &count); // No data to send break; } - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); // Assume count of 0 means No Pointer data to send! if (type != nullptr && STR_EQUALS(type, "unknown")) { @@ -911,7 +911,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l shape = nullptr; } d = (char*)malloc(count * sizeof(char)); - addMalloc2(logmalloclist, (void*)d, count, sizeof(char), "char", rank, shape); + udaAddMalloc2(logmalloclist, (void*)d, count, sizeof(char), "char", rank, shape); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { break; @@ -924,7 +924,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l break; } // Assume count of 0 means No Pointer data to send! - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &rank, &shape); if (type != nullptr && STR_EQUALS(type, "unknown")) { if (malloc_source == UDA_MALLOC_SOURCE_SOAP && j > 0 && @@ -1025,7 +1025,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l &count); // Count is known from the client's malloc log and passed by the sender if (count > 0) { d = (char*)malloc(count * sizeof(char)); - addMalloc(logmalloclist, (void*)d, count, sizeof(char), "STRING"); + udaAddMalloc(logmalloclist, (void*)d, count, sizeof(char), "STRING"); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { break; @@ -1044,7 +1044,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l break; } - findMalloc(logmalloclist, (void*)p, &count, &size, + udaFindMalloc(logmalloclist, (void*)p, &count, &size, &type); // Assume 0 means No Pointer data to send! if (malloc_source == UDA_MALLOC_SOURCE_DOM && (count == 0 || size == 0) && d != nullptr) { @@ -1114,12 +1114,12 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l rc = rc && xdr_int(xdrs, &nstr); // Number of strings if (nstr > 0) { char** str = (char**)malloc(nstr * sizeof(char*)); - addMalloc(logmalloclist, (void*)str, nstr, sizeof(char*), "STRING *"); + udaAddMalloc(logmalloclist, (void*)str, nstr, sizeof(char*), "STRING *"); for (istr = 0; istr < nstr; istr++) { rc = rc && xdr_int(xdrs, &count); if (count > 0) { d = (char*)malloc(count * sizeof(char)); - addMalloc(logmalloclist, (void*)d, count, sizeof(char), "char"); + udaAddMalloc(logmalloclist, (void*)d, count, sizeof(char), "char"); rc = rc && WrapXDRString(xdrs, d, count); str[istr] = d; } @@ -1144,12 +1144,12 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l } strarr = (char**)malloc(nstr * sizeof(char*)); // nstr is the length of the array, not the strings - addMalloc2(logmalloclist, (void*)strarr, nstr, sizeof(char*), "STRING", rank, shape); + udaAddMalloc2(logmalloclist, (void*)strarr, nstr, sizeof(char*), "STRING", rank, shape); *p = (VOIDTYPE)strarr; // Save pointer: First String will be written here for (istr = 0; istr < nstr; istr++) { // Receive individual String lengths, then the string rc = rc && xdr_int(xdrs, &count); strarr[istr] = (char*)malloc(count * sizeof(char)); - addMalloc(logmalloclist, (void*)strarr[istr], count, sizeof(char), "STRING"); + udaAddMalloc(logmalloclist, (void*)strarr[istr], count, sizeof(char), "STRING"); rc = rc && WrapXDRString(xdrs, strarr[istr], count); if (rank == 0 && nstr == 1) { *p = (VOIDTYPE)strarr[0]; @@ -1162,11 +1162,11 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l if (STR_EQUALS(userdefinedtype->compoundfield[j].type, "STRING *")) { char** str = (char**)*p; - findMalloc(logmalloclist, (void*)&str, &nstr, &size, &type); + udaFindMalloc(logmalloclist, (void*)&str, &nstr, &size, &type); rc = rc && xdr_int(xdrs, &nstr); // Number of strings if (nstr > 0) { for (istr = 0; istr < nstr; istr++) { - findMalloc(logmalloclist, (void*)&str[istr], &count, &size, &type); + udaFindMalloc(logmalloclist, (void*)&str[istr], &count, &size, &type); rc = rc && xdr_int(xdrs, &count); if (count > 0) { d = (char*)str[istr]; @@ -1184,7 +1184,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l break; } - findMalloc2(logmalloclist, (void*)p, &nstr, &size, &type, &rank, + udaFindMalloc2(logmalloclist, (void*)p, &nstr, &size, &type, &rank, &shape); // Assume 0 means No Pointer data to send! // or heap allocated in external library! @@ -1240,12 +1240,12 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l rc = rc && xdr_int(xdrs, &count); // Arbitrary String length if (count > 0) { d = (char*)malloc(count * sizeof(char)); - addMalloc(logmalloclist, (void*)d, count, sizeof(char), "STRING"); + udaAddMalloc(logmalloclist, (void*)d, count, sizeof(char), "STRING"); rc = rc && WrapXDRString(xdrs, d, count); str[istr] = d; } // Save pointer: data will be written here } else { - findMalloc(logmalloclist, (void*)&str[istr], &count, &size, &type); + udaFindMalloc(logmalloclist, (void*)&str[istr], &count, &size, &type); rc = rc && xdr_int(xdrs, &count); if (count > 0) { d = (char*)str[istr]; @@ -1275,7 +1275,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l &count); // Count is known from the client's malloc log and passed by the sender if (count > 0) { d = (char*)malloc(count * sizeof(char)); - addMalloc(logmalloclist, (void*)d, count, sizeof(char), "STRING"); + udaAddMalloc(logmalloclist, (void*)d, count, sizeof(char), "STRING"); *p = (VOIDTYPE)d; // Save pointer: data will be written here } else { break; @@ -1287,7 +1287,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l rc = rc && xdr_int(xdrs, &count); // No data to send break; } - findMalloc(logmalloclist, (void*)p, &count, &size, + udaFindMalloc(logmalloclist, (void*)p, &count, &size, &type); // Assume 0 means No string to send! if (count == 1 && STR_EQUALS(type, "unknown")) { // ***** Fix for SOAP sources incomplete! count = size; @@ -1321,7 +1321,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l if (userdefinedtype->compoundfield[j].pointer) { if (xdrs->x_op != XDR_DECODE) { - findMalloc2(logmalloclist, (void*)p, &count, &size, &type, &structRank, &structShape); + udaFindMalloc2(logmalloclist, (void*)p, &count, &size, &type, &structRank, &structShape); // Interpret an 'unknown' void data type using knowledge of the gSOAP or DOM systems @@ -1406,7 +1406,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l // Non Pointer types: Heap already allocated (pass 0 count to xdrUserDefinedData) // Size and Type also known. Type cannot be 'void'. - addNonMalloc(logmalloclist, (void*)p, userdefinedtype->compoundfield[j].count, + udaAddNonMalloc(logmalloclist, (void*)p, userdefinedtype->compoundfield[j].count, userdefinedtype->compoundfield[j].size, userdefinedtype->compoundfield[j].type); loopcount = userdefinedtype->compoundfield[j].count; @@ -1455,7 +1455,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l char* stype; void* heap; heap = p; - id = findStructId(heap, &stype, log_struct_list); + id = udaFindStructId(heap, &stype, log_struct_list); } if (id == 0) { // Only send/receive new structures @@ -1479,7 +1479,7 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l if (newNTree->children == nullptr && newNTree->branches == 0) { newNTree->children = (NTREE**)malloc(loopcount * sizeof(NTREE*)); // Allocate the node array - addMalloc(logmalloclist, (void*)newNTree->children, loopcount, sizeof(NTREE*), + udaAddMalloc(logmalloclist, (void*)newNTree->children, loopcount, sizeof(NTREE*), "NTREE *"); } else { // Multiple branches (user types) originating in the same node auto old = (VOIDTYPE)newNTree->children; @@ -1487,11 +1487,11 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l (void*)old, (newNTree->branches + loopcount) * sizeof(NTREE*)); // Individual node addresses remain valid - changeMalloc(logmalloclist, old, (void*)newNTree->children, + udaChangeMalloc(logmalloclist, old, (void*)newNTree->children, newNTree->branches + loopcount, sizeof(NTREE*), "NTREE *"); } } - addNTree(newNTree, subNTree); // Only first call creates new tree node + udaAddNTree(newNTree, subNTree); // Only first call creates new tree node } } else { @@ -1503,9 +1503,9 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* l // Must be a voided atomic type - if (gettypeof(type) != UDA_TYPE_UNKNOWN) { + if (udaGettypeof(type) != UDA_TYPE_UNKNOWN) { char* z = (char*)*p; - rc = rc && xdrAtomicData(logmalloclist, xdrs, type, count, size, &z); // Must be an Atomic Type + rc = rc && udaXdrAtomicData(logmalloclist, xdrs, type, count, size, &z); // Must be an Atomic Type *p = (VOIDTYPE)z; break; } else { diff --git a/source/wrappers/c++/main.cpp b/source/wrappers/c++/main.cpp index 948f9d97..7d8695af 100644 --- a/source/wrappers/c++/main.cpp +++ b/source/wrappers/c++/main.cpp @@ -122,7 +122,7 @@ int main() node = root.findStructureComponent("lastshot"); node.print(); - node.printUserDefinedTypeTable(); + node.udaPrintUserDefinedTypeTable(); int acount = node.atomicCount(); @@ -202,7 +202,7 @@ int main() // Target the first child node with the named variable target node = root.findStructureComponent("signal_name"); - node.printUserDefinedTypeTable(); + node.udaPrintUserDefinedTypeTable(); // If the structure definition is known and located, a simple cast is all that is required @@ -261,7 +261,7 @@ int main() // Target the first child node with the named variable target node = root.findStructureComponent("signal_name"); - node.printUserDefinedTypeTable(); + node.udaPrintUserDefinedTypeTable(); // If the structure definition is known and located, a simple cast is all that is required // Check the number of structures is one @@ -365,7 +365,7 @@ int main() // node containing data with a specific structure type node = root.findStructureDefinition("SIGNALSET"); - node.printUserDefinedTypeTable(); + node.udaPrintUserDefinedTypeTable(); std::vector signals = node.parent().children(); int signalSetCount = signals.size(); @@ -514,8 +514,8 @@ int main() node = root.findStructureDefinition("SARRAY.root.COIL"); if (i == 0) { - node.printUserDefinedTypeTable(); - node.printUserDefinedTypeTable("COORDINATE"); + node.udaPrintUserDefinedTypeTable(); + node.udaPrintUserDefinedTypeTable("COORDINATE"); } std::vector coils = node.parent().children(); @@ -610,7 +610,7 @@ int main() node = root.findStructureDefinition("TEST11"); - node.printUserDefinedTypeTable(); + node.udaPrintUserDefinedTypeTable(); // Check only 1 structure @@ -676,7 +676,7 @@ int main() node = root.findStructureDefinition("TEST12"); - node.printUserDefinedTypeTable(); + node.udaPrintUserDefinedTypeTable(); // Check only 1 structure @@ -743,23 +743,23 @@ int main() // node containing data with a specific structure type node = root.findStructureDefinition("root"); - node.printUserDefinedTypeTable(); + node.udaPrintUserDefinedTypeTable(); // node containing data with a specific structure type node = root.findStructureDefinition("magnetics"); - node.printUserDefinedTypeTable(); + node.udaPrintUserDefinedTypeTable(); // node containing data with a specific structure type node = root.findStructureDefinition("flux_loop"); - node.printUserDefinedTypeTable(); + node.udaPrintUserDefinedTypeTable(); // node containing data with a specific structure type node = root.findStructureDefinition("13"); - node.printUserDefinedTypeTable(); + node.udaPrintUserDefinedTypeTable(); // node containing data with a specific structure type node = root.findStructureDefinition("flux"); - node.printUserDefinedTypeTable(); + node.udaPrintUserDefinedTypeTable(); // *** Searching by Type may fail as types are auto-generated to be unique. // *** Searching without hierarchical structure will return the first data node satisfying the passed name - @@ -768,7 +768,7 @@ int main() // node containing data with a specific component name node = root.findStructureComponent("magnetics.flux_loop.13.flux"); - node.printUserDefinedTypeTable(); + node.udaPrintUserDefinedTypeTable(); if (test != 0) { return 0; @@ -805,7 +805,7 @@ int main() // The first node has no name other tha the generic 'data' uda::TreeNode node = root.findStructureComponent("data"); - node.printUserDefinedTypeTable(); + node.udaPrintUserDefinedTypeTable(); // Check only 1 structure @@ -871,7 +871,7 @@ int main() uda::TreeNode node = root.findStructureComponent("2"); - node.printUserDefinedTypeTable(); + node.udaPrintUserDefinedTypeTable(); // Check only 1 structure diff --git a/source/wrappers/c++/treenode.cpp b/source/wrappers/c++/treenode.cpp index ccae248c..24255ff7 100644 --- a/source/wrappers/c++/treenode.cpp +++ b/source/wrappers/c++/treenode.cpp @@ -11,16 +11,16 @@ uda::TreeNode uda::TreeNode::parent() size_t uda::TreeNode::numChildren() const { - return getNodeChildrenCount(node_); + return udaGetNodeChildrenCount(node_); } const std::vector uda::TreeNode::children() const { - int numChildren = getNodeChildrenCount(node_); + int numChildren = udaGetNodeChildrenCount(node_); std::vector vec; for (int i = 0; i < numChildren; ++i) { - auto child = getNodeChild(node_, i); + auto child = udaGetNodeChild(node_, i); vec.push_back(TreeNode{handle_, child}); } @@ -29,11 +29,11 @@ const std::vector uda::TreeNode::children() const std::vector uda::TreeNode::children() { - int numChildren = getNodeChildrenCount(node_); + int numChildren = udaGetNodeChildrenCount(node_); std::vector vec; for (int i = 0; i < numChildren; ++i) { - vec.push_back(TreeNode(handle_, getNodeChild(node_, i))); + vec.push_back(TreeNode(handle_, udaGetNodeChild(node_, i))); } return vec; @@ -41,24 +41,24 @@ std::vector uda::TreeNode::children() uda::TreeNode uda::TreeNode::child(int num) { - return TreeNode(handle_, getNodeChild(node_, num)); + return TreeNode(handle_, udaGetNodeChild(node_, num)); } -void uda::TreeNode::printNode() +void uda::TreeNode::udaPrintNode() { - ::printNode(node_); + ::udaPrintNode(node_); } std::string uda::TreeNode::name() const { - char* name = getNodeStructureName(node_); + char* name = udaGetNodeStructureName(node_); return name == nullptr ? "" : name; } void uda::TreeNode::printStructureNames() { LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle_); - printNTreeStructureNames(logmalloclist, node_); + udaPrintNTreeStructureNames(logmalloclist, node_); } uda::TreeNode uda::TreeNode::findStructureDefinition(const std::string& name) @@ -72,30 +72,30 @@ uda::TreeNode uda::TreeNode::findStructureComponent(const std::string& name) return {handle_, findNTreeStructureComponent(logmalloclist, node_, (char*)name.c_str())}; } -void uda::TreeNode::printUserDefinedTypeTable(const std::string& name) +void uda::TreeNode::udaPrintUserDefinedTypeTable(const std::string& name) { USERDEFINEDTYPELIST* userdefinedtypelist = udaGetUserDefinedTypeList(handle_); USERDEFINEDTYPE* type = findUserDefinedType(userdefinedtypelist, (char*)name.c_str(), 0); - ::printUserDefinedTypeTable(userdefinedtypelist, *type); + ::udaPrintUserDefinedTypeTable(userdefinedtypelist, *type); } -void uda::TreeNode::printUserDefinedTypeTable() +void uda::TreeNode::udaPrintUserDefinedTypeTable() { USERDEFINEDTYPELIST* userdefinedtypelist = udaGetUserDefinedTypeList(handle_); USERDEFINEDTYPE* type = getNodeUserDefinedType(node_); - ::printUserDefinedTypeTable(userdefinedtypelist, *type); + ::udaPrintUserDefinedTypeTable(userdefinedtypelist, *type); } int uda::TreeNode::structureCount() { - return getNodeStructureCount(node_); + return udaGetNodeStructureCount(node_); } std::vector uda::TreeNode::structureNames() { LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle_); - char** names = getNodeStructureNames(logmalloclist, node_); - int size = getNodeStructureCount(node_); + char** names = udaGetNodeStructureNames(logmalloclist, node_); + int size = udaGetNodeStructureCount(node_); std::vector vec(names, names + size); return vec; } @@ -103,22 +103,22 @@ std::vector uda::TreeNode::structureNames() std::vector uda::TreeNode::structureTypes() { LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle_); - char** names = getNodeStructureTypes(logmalloclist, node_); - int size = getNodeStructureCount(node_); + char** names = udaGetNodeStructureTypes(logmalloclist, node_); + int size = udaGetNodeStructureCount(node_); std::vector vec(names, names + size); return vec; } int uda::TreeNode::atomicCount() const { - return getNodeAtomicCount(node_); + return udaGetNodeAtomicCount(node_); } std::vector uda::TreeNode::atomicNames() const { LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle_); - char** names = getNodeAtomicNames(logmalloclist, node_); - int size = getNodeAtomicCount(node_); + char** names = udaGetNodeAtomicNames(logmalloclist, node_); + int size = udaGetNodeAtomicCount(node_); std::vector vec(names, names + size); return vec; } @@ -126,8 +126,8 @@ std::vector uda::TreeNode::atomicNames() const std::vector uda::TreeNode::atomicTypes() const { LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle_); - char** types = getNodeAtomicTypes(logmalloclist, node_); - int size = getNodeAtomicCount(node_); + char** types = udaGetNodeAtomicTypes(logmalloclist, node_); + int size = udaGetNodeAtomicCount(node_); std::vector vec(types, types + size); return vec; } @@ -135,8 +135,8 @@ std::vector uda::TreeNode::atomicTypes() const std::vector uda::TreeNode::atomicPointers() const { LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle_); - int* isptr = getNodeAtomicPointers(logmalloclist, node_); - int size = getNodeAtomicCount(node_); + int* isptr = udaGetNodeAtomicPointers(logmalloclist, node_); + int size = udaGetNodeAtomicCount(node_); std::vector vec(size); for (int i = 0; i < size; ++i) { vec[i] = static_cast(isptr[i]); @@ -147,8 +147,8 @@ std::vector uda::TreeNode::atomicPointers() const std::vector uda::TreeNode::atomicRank() const { LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle_); - int* ranks = getNodeAtomicRank(logmalloclist, node_); - int size = getNodeAtomicCount(node_); + int* ranks = udaGetNodeAtomicRank(logmalloclist, node_); + int size = udaGetNodeAtomicCount(node_); std::vector vec(ranks, ranks + size); return vec; } @@ -156,9 +156,9 @@ std::vector uda::TreeNode::atomicRank() const std::vector> uda::TreeNode::atomicShape() const { LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle_); - int** shapes = getNodeAtomicShape(logmalloclist, node_); - int* ranks = getNodeAtomicRank(logmalloclist, node_); - int size = getNodeAtomicCount(node_); + int** shapes = udaGetNodeAtomicShape(logmalloclist, node_); + int* ranks = udaGetNodeAtomicRank(logmalloclist, node_); + int size = udaGetNodeAtomicCount(node_); std::vector> vec; for (int i = 0; i < size; ++i) { if (shapes[i] == nullptr) { @@ -179,24 +179,24 @@ std::vector> uda::TreeNode::atomicShape() const void* uda::TreeNode::structureComponentData(const std::string& name) const { LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle_); - return getNodeStructureComponentData(logmalloclist, node_, (char*)name.c_str()); + return udaGetNodeStructureComponentData(logmalloclist, node_, (char*)name.c_str()); } template static uda::Scalar getScalar(LOGMALLOCLIST* logmalloclist, NTREE* node, const char* name) { - T* val = reinterpret_cast(getNodeStructureComponentData(logmalloclist, node, (char*)name)); + T* val = reinterpret_cast(udaGetNodeStructureComponentData(logmalloclist, node, (char*)name)); return uda::Scalar(*val); } template <> uda::Scalar getScalar(LOGMALLOCLIST* logmalloclist, NTREE* node, const char* name) { - char* val = reinterpret_cast(getNodeStructureComponentData(logmalloclist, node, (char*)name)); + char* val = reinterpret_cast(udaGetNodeStructureComponentData(logmalloclist, node, (char*)name)); return uda::Scalar(val); } template <> uda::Scalar getScalar(LOGMALLOCLIST* logmalloclist, NTREE* node, const char* name) { - char** val = reinterpret_cast(getNodeStructureComponentData(logmalloclist, node, (char*)name)); + char** val = reinterpret_cast(udaGetNodeStructureComponentData(logmalloclist, node, (char*)name)); return uda::Scalar(val[0]); } @@ -210,15 +210,15 @@ uda::Scalar uda::TreeNode::atomicScalar(const std::string& target) return Scalar::Null; } - int acount = getNodeAtomicCount(node); // Number of atomic typed structure members + int acount = udaGetNodeAtomicCount(node); // Number of atomic typed structure members if (acount == 0) { return Scalar::Null; // No atomic data } - char** anames = getNodeAtomicNames(logmalloclist, node); - char** atypes = getNodeAtomicTypes(logmalloclist, node); - int* arank = getNodeAtomicRank(logmalloclist, node); - int** ashape = getNodeAtomicShape(logmalloclist, node); + char** anames = udaGetNodeAtomicNames(logmalloclist, node); + char** atypes = udaGetNodeAtomicTypes(logmalloclist, node); + int* arank = udaGetNodeAtomicRank(logmalloclist, node); + int** ashape = udaGetNodeAtomicShape(logmalloclist, node); if (anames == nullptr || atypes == nullptr || arank == nullptr || ashape == nullptr) { return Scalar::Null; @@ -263,13 +263,13 @@ uda::Scalar uda::TreeNode::atomicScalar(const std::string& target) // template // static uda::Vector getVectorOverSiblings(NTREE* node, const std::string& target) //{ -// int count = getNodeChildrenCount(node->parent); +// int count = udaGetNodeChildrenCount(node->parent); // T* data = static_cast(malloc(count * sizeof(T))); // if (data == nullptr) { // return uda::Vector::Null; // } // for (int j = 0; j < count; j++) { -// data[j] = *reinterpret_cast(getNodeStructureComponentData(node->parent->children[j], +// data[j] = *reinterpret_cast(udaGetNodeStructureComponentData(node->parent->children[j], // (char*)target.c_str())); // } // return uda::Vector(data, (size_t)count); @@ -279,14 +279,14 @@ uda::Scalar uda::TreeNode::atomicScalar(const std::string& target) // uda::Vector getVectorOverSiblings(NTREE* node, const std::string& target) //{ // // Scalar String in an array of data structures -// int count = getNodeChildrenCount(node->parent); +// int count = udaGetNodeChildrenCount(node->parent); // char** data = static_cast(malloc(count * sizeof(char*))); // Managed by IDAM // if (data == nullptr) { // return uda::Vector::Null; // } -// addMalloc(data, count, sizeof(char*), (char*)"char *"); +// udaAddMalloc(data, count, sizeof(char*), (char*)"char *"); // for (int j = 0; j < count; j++) { -// data[j] = reinterpret_cast(getNodeStructureComponentData(node->parent->children[j], +// data[j] = reinterpret_cast(udaGetNodeStructureComponentData(node->parent->children[j], // (char*)target.c_str())); // } // return uda::Vector(data, (size_t)count); @@ -295,7 +295,7 @@ uda::Scalar uda::TreeNode::atomicScalar(const std::string& target) template static uda::Vector getVector(LOGMALLOCLIST* logmalloclist, NTREE* node, const std::string& target, int count) { - T* data = reinterpret_cast(getNodeStructureComponentData(logmalloclist, node, (char*)target.c_str())); + T* data = reinterpret_cast(udaGetNodeStructureComponentData(logmalloclist, node, (char*)target.c_str())); return uda::Vector(data, (size_t)count); } @@ -309,7 +309,7 @@ uda::Vector getStringVector(LOGMALLOCLIST* logmalloclist, NTREE* node, const std return uda::Vector::Null; } - auto val = reinterpret_cast(getNodeStructureComponentData(logmalloclist, node, (char*)target.c_str())); + auto val = reinterpret_cast(udaGetNodeStructureComponentData(logmalloclist, node, (char*)target.c_str())); for (int j = 0; j < count; j++) { data[j] = &val[j * shape[0]]; @@ -325,7 +325,7 @@ uda::Vector getStringVector(LOGMALLOCLIST* logmalloclist, NTREE* node, const std return uda::Vector::Null; } - auto val = reinterpret_cast(getNodeStructureComponentData(logmalloclist, node, (char*)target.c_str())); + auto val = reinterpret_cast(udaGetNodeStructureComponentData(logmalloclist, node, (char*)target.c_str())); data[0] = val; return uda::Vector(data, (size_t)1); @@ -340,16 +340,16 @@ uda::Vector uda::TreeNode::atomicVector(const std::string& target) return Vector::Null; } - int acount = getNodeAtomicCount(node); // Number of atomic typed structure members + int acount = udaGetNodeAtomicCount(node); // Number of atomic typed structure members if (acount == 0) { return Vector::Null; // No atomic data } - char** anames = getNodeAtomicNames(logmalloclist, node); - char** atypes = getNodeAtomicTypes(logmalloclist, node); - int* apoint = getNodeAtomicPointers(logmalloclist, node); - int* arank = getNodeAtomicRank(logmalloclist, node); - int** ashape = getNodeAtomicShape(logmalloclist, node); + char** anames = udaGetNodeAtomicNames(logmalloclist, node); + char** atypes = udaGetNodeAtomicTypes(logmalloclist, node); + int* apoint = udaGetNodeAtomicPointers(logmalloclist, node); + int* arank = udaGetNodeAtomicRank(logmalloclist, node); + int** ashape = udaGetNodeAtomicShape(logmalloclist, node); if (anames == nullptr || atypes == nullptr || apoint == nullptr || arank == nullptr || ashape == nullptr) { return Vector::Null; @@ -361,10 +361,10 @@ uda::Vector uda::TreeNode::atomicVector(const std::string& target) ((arank[i] == 0 && apoint[i] == 1) || (arank[i] == 1 && apoint[i] == 0))) { // String array in a single data structure char** val = - reinterpret_cast(getNodeStructureComponentData(logmalloclist, node, (char*)target.c_str())); + reinterpret_cast(udaGetNodeStructureComponentData(logmalloclist, node, (char*)target.c_str())); return uda::Vector(val, (size_t)ashape[i][0]); } else if (arank[i] == 0 && apoint[i] == 1) { - int count = getNodeStructureComponentDataCount(logmalloclist, node, (char*)target.c_str()); + int count = udaGetNodeStructureComponentDataCount(logmalloclist, node, (char*)target.c_str()); if (std::string("STRING *") == atypes[i]) { return getVector(logmalloclist, node, target, count); } @@ -432,7 +432,7 @@ uda::Vector uda::TreeNode::atomicVector(const std::string& target) template static uda::Array getArray(LOGMALLOCLIST* logmalloclist, NTREE* node, const std::string& target, int* shape, int rank) { - auto data = reinterpret_cast(getNodeStructureComponentData(logmalloclist, node, (char*)target.c_str())); + auto data = reinterpret_cast(udaGetNodeStructureComponentData(logmalloclist, node, (char*)target.c_str())); std::vector dims; for (int i = 0; i < rank; ++i) { @@ -455,16 +455,16 @@ uda::Array uda::TreeNode::atomicArray(const std::string& target) return Array::Null; } - int acount = getNodeAtomicCount(node); // Number of atomic typed structure members + int acount = udaGetNodeAtomicCount(node); // Number of atomic typed structure members if (acount == 0) { return Array::Null; // No atomic data } - char** anames = getNodeAtomicNames(logmalloclist, node); - char** atypes = getNodeAtomicTypes(logmalloclist, node); - int* apoint = getNodeAtomicPointers(logmalloclist, node); - int* arank = getNodeAtomicRank(logmalloclist, node); - int** ashape = getNodeAtomicShape(logmalloclist, node); + char** anames = udaGetNodeAtomicNames(logmalloclist, node); + char** atypes = udaGetNodeAtomicTypes(logmalloclist, node); + int* apoint = udaGetNodeAtomicPointers(logmalloclist, node); + int* arank = udaGetNodeAtomicRank(logmalloclist, node); + int** ashape = udaGetNodeAtomicShape(logmalloclist, node); if (anames == nullptr || atypes == nullptr || apoint == nullptr || arank == nullptr || ashape == nullptr) { return Array::Null; @@ -510,14 +510,14 @@ uda::StructData uda::TreeNode::structData(const std::string& target) return StructData::Null; } - int count = getNodeChildrenCount(node->parent); + int count = udaGetNodeChildrenCount(node->parent); uda::StructData data; for (int j = 0; j < count; j++) { - void* ptr = getNodeData(node->parent->children[j]); - std::string name(getNodeStructureType(node->parent->children[j])); - auto size = static_cast(getNodeStructureSize(node->parent->children[j])); + void* ptr = udaGetNodeData(node->parent->children[j]); + std::string name(udaGetNodeStructureType(node->parent->children[j])); + auto size = static_cast(udaGetNodeStructureSize(node->parent->children[j])); data.append(name, size, ptr); } @@ -526,5 +526,5 @@ uda::StructData uda::TreeNode::structData(const std::string& target) void* uda::TreeNode::data() { - return getNodeData(node_); + return udaGetNodeData(node_); } diff --git a/source/wrappers/idl/idamStructs.c b/source/wrappers/idl/idamStructs.c index 27f1bb7d..b34a3fb7 100755 --- a/source/wrappers/idl/idamStructs.c +++ b/source/wrappers/idl/idamStructs.c @@ -81,7 +81,7 @@ IDL_VPTR IDL_CDECL setidamdatatree(int argc, IDL_VPTR argv[], char* argk) { if (kw.debug) { fprintf(stdout, "Registered: %d\n", registered); USERDEFINEDTYPELIST* userdefinedtypelist = udaGetUserDefinedTypeList(handle); - printNTree(NULL, userdefinedtypelist); + udaPrintNTree(NULL, userdefinedtypelist); } return (IDL_GettmpLong(registered)); @@ -446,7 +446,7 @@ IDL_VPTR IDL_CDECL getidamnodestructurecount(int argc, IDL_VPTR argv[], char* ar // // 2 Args: IDAM handle (long32 int), Node address or null (0) (long64 int) - // calls: int getNodeStructureCount(NTREE *ntree) + // calls: int udaGetNodeStructureCount(NTREE *ntree) int handle, count; NTREE* ntree; @@ -516,7 +516,7 @@ IDL_VPTR IDL_CDECL getidamnodestructurecount(int argc, IDL_VPTR argv[], char* ar //--------------------------------------------------------------------------------------------- // Call accessor - count = getNodeStructureCount(ntree); + count = udaGetNodeStructureCount(ntree); if (kw.debug) { USERDEFINEDTYPE* udt = ntree->userdefinedtype; @@ -540,8 +540,8 @@ IDL_VPTR IDL_CDECL getidamnodestructurenames(int argc, IDL_VPTR argv[], char* ar // // 2 Args: IDAM handle (long32 int), Node address or null (0) (long64 int) - // calls: int getNodeStructureCount(NTREE *ntree) - // char **getNodeStructureNames(NTREE *ntree) + // calls: int udaGetNodeStructureCount(NTREE *ntree) + // char **udaGetNodeStructureNames(NTREE *ntree) int handle, count, length; NTREE* ntree; @@ -615,8 +615,8 @@ IDL_VPTR IDL_CDECL getidamnodestructurenames(int argc, IDL_VPTR argv[], char* ar LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle); - count = getNodeStructureCount(ntree); - names = getNodeStructureNames(logmalloclist, ntree); + count = udaGetNodeStructureCount(ntree); + names = udaGetNodeStructureNames(logmalloclist, ntree); if (kw.debug) { USERDEFINEDTYPE* udt = ntree->userdefinedtype; @@ -631,7 +631,7 @@ IDL_VPTR IDL_CDECL getidamnodestructurenames(int argc, IDL_VPTR argv[], char* ar fprintf(stdout, "[%2d]: %s\n", i, names[i]); } - printNode(ntree); + udaPrintNode(ntree); fflush(NULL); } @@ -670,8 +670,8 @@ IDL_VPTR IDL_CDECL getidamnodestructuretypes(int argc, IDL_VPTR argv[], char* ar // // 2 Args: IDAM handle (long32 int), Node address or null (0) (long64 int) - // calls: int getNodeStructureCount(NTREE *ntree) - // char **getNodeStructureTypes(NTREE *ntree) + // calls: int udaGetNodeStructureCount(NTREE *ntree) + // char **udaGetNodeStructureTypes(NTREE *ntree) int handle, count, length; NTREE* ntree; @@ -744,8 +744,8 @@ IDL_VPTR IDL_CDECL getidamnodestructuretypes(int argc, IDL_VPTR argv[], char* ar LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle); - count = getNodeStructureCount(ntree); - names = getNodeStructureTypes(logmalloclist, ntree); + count = udaGetNodeStructureCount(ntree); + names = udaGetNodeStructureTypes(logmalloclist, ntree); if (kw.debug) { USERDEFINEDTYPE* udt = ntree->userdefinedtype; @@ -798,8 +798,8 @@ IDL_VPTR IDL_CDECL getidamnodestructurepointers(int argc, IDL_VPTR argv[], char* // // 2 Args: IDAM handle (long32 int), Node address or null (0) (long64 int) - // calls: int getNodeStructureCount(NTREE *ntree) - // int *getNodeStructurePointers(NTREE *ntree) + // calls: int udaGetNodeStructureCount(NTREE *ntree) + // int *udaGetNodeStructurePointers(NTREE *ntree) int handle, count; NTREE* ntree; @@ -872,8 +872,8 @@ IDL_VPTR IDL_CDECL getidamnodestructurepointers(int argc, IDL_VPTR argv[], char* LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle); - count = getNodeStructureCount(ntree); - pointers = getNodeStructurePointers(logmalloclist, ntree); + count = udaGetNodeStructureCount(ntree); + pointers = udaGetNodeStructurePointers(logmalloclist, ntree); if (kw.debug) { USERDEFINEDTYPE* udt = ntree->userdefinedtype; @@ -920,8 +920,8 @@ IDL_VPTR IDL_CDECL getidamnodestructurerank(int argc, IDL_VPTR argv[], char* arg // // 2 Args: IDAM handle (long32 int), Node address or null (0) (long64 int) - // calls: int getNodeStructureCount(NTREE *ntree) - // int *getNodeStructureRank(NTREE *ntree) + // calls: int udaGetNodeStructureCount(NTREE *ntree) + // int *udaGetNodeStructureRank(NTREE *ntree) int handle, count; NTREE* ntree; @@ -994,8 +994,8 @@ IDL_VPTR IDL_CDECL getidamnodestructurerank(int argc, IDL_VPTR argv[], char* arg LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle); - count = getNodeStructureCount(ntree); - ranks = getNodeStructureRank(logmalloclist, ntree); + count = udaGetNodeStructureCount(ntree); + ranks = udaGetNodeStructureRank(logmalloclist, ntree); if (kw.debug) { USERDEFINEDTYPE* udt = ntree->userdefinedtype; @@ -1042,9 +1042,9 @@ IDL_VPTR IDL_CDECL getidamnodestructureshape(int argc, IDL_VPTR argv[], char* ar // // 2 Args: IDAM handle (long32 int), Node address or null (0) (long64 int) - // calls: int getNodeStructureCount(NTREE *ntree) - // int *getNodeStructureRank(NTREE *ntree) - // int **getNodeStructureShape(NTREE *ntree) + // calls: int udaGetNodeStructureCount(NTREE *ntree) + // int *udaGetNodeStructureRank(NTREE *ntree) + // int **udaGetNodeStructureShape(NTREE *ntree) int handle, count, maxrank = 1; NTREE* ntree; @@ -1119,9 +1119,9 @@ IDL_VPTR IDL_CDECL getidamnodestructureshape(int argc, IDL_VPTR argv[], char* ar LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle); - count = getNodeStructureCount(ntree); - shapes = getNodeStructureShape(logmalloclist, ntree); - ranks = getNodeStructureRank(logmalloclist, ntree); + count = udaGetNodeStructureCount(ntree); + shapes = udaGetNodeStructureShape(logmalloclist, ntree); + ranks = udaGetNodeStructureRank(logmalloclist, ntree); if (kw.debug) { USERDEFINEDTYPE* udt = ntree->userdefinedtype; @@ -1217,7 +1217,7 @@ IDL_VPTR IDL_CDECL getidamnodeatomiccount(int argc, IDL_VPTR argv[], char* argk) // // 2 Args: IDAM handle (long32 int), Node address or null (0) (long64 int) - // calls: int getNodeAtomicCount(NTREE *ntree) + // calls: int udaGetNodeAtomicCount(NTREE *ntree) int handle, count; NTREE* ntree; @@ -1283,7 +1283,7 @@ IDL_VPTR IDL_CDECL getidamnodeatomiccount(int argc, IDL_VPTR argv[], char* argk) //--------------------------------------------------------------------------------------------- // Call accessor - count = getNodeAtomicCount(ntree); + count = udaGetNodeAtomicCount(ntree); if (kw.debug) { USERDEFINEDTYPE* udt = ntree->userdefinedtype; @@ -1307,8 +1307,8 @@ IDL_VPTR IDL_CDECL getidamnodeatomicnames(int argc, IDL_VPTR argv[], char* argk) // // 2 Args: IDAM handle (long32 int), Node address or null (0) (long64 int) - // calls: int getNodeAtomicCount(NTREE *ntree) - // char **getNodeAtomicNames(NTREE *ntree) + // calls: int udaGetNodeAtomicCount(NTREE *ntree) + // char **udaGetNodeAtomicNames(NTREE *ntree) int handle, count, length; NTREE* ntree; @@ -1381,8 +1381,8 @@ IDL_VPTR IDL_CDECL getidamnodeatomicnames(int argc, IDL_VPTR argv[], char* argk) LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle); - count = getNodeAtomicCount(ntree); - names = getNodeAtomicNames(logmalloclist, ntree); + count = udaGetNodeAtomicCount(ntree); + names = udaGetNodeAtomicNames(logmalloclist, ntree); if (kw.debug) { USERDEFINEDTYPE* udt = ntree->userdefinedtype; @@ -1435,8 +1435,8 @@ IDL_VPTR IDL_CDECL getidamnodeatomictypes(int argc, IDL_VPTR argv[], char* argk) // // 2 Args: IDAM handle (long32 int), Node address or null (0) (long64 int) - // calls: int getNodeAtomicCount(NTREE *ntree) - // char **getNodeAtomicTypes(NTREE *ntree) + // calls: int udaGetNodeAtomicCount(NTREE *ntree) + // char **udaGetNodeAtomicTypes(NTREE *ntree) int handle, count, length; NTREE* ntree; @@ -1509,8 +1509,8 @@ IDL_VPTR IDL_CDECL getidamnodeatomictypes(int argc, IDL_VPTR argv[], char* argk) LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle); - count = getNodeAtomicCount(ntree); - names = getNodeAtomicTypes(logmalloclist, ntree); + count = udaGetNodeAtomicCount(ntree); + names = udaGetNodeAtomicTypes(logmalloclist, ntree); if (kw.debug) { USERDEFINEDTYPE* udt = ntree->userdefinedtype; @@ -1563,8 +1563,8 @@ IDL_VPTR IDL_CDECL getidamnodeatomicpointers(int argc, IDL_VPTR argv[], char* ar // // 2 Args: IDAM handle (long32 int), Node address or null (0) (long64 int) - // calls: int getNodeAtomicCount(NTREE *ntree) - // int *getNodeAtomicPointers(NTREE *ntree) + // calls: int udaGetNodeAtomicCount(NTREE *ntree) + // int *udaGetNodeAtomicPointers(NTREE *ntree) int handle, count; NTREE* ntree; @@ -1637,8 +1637,8 @@ IDL_VPTR IDL_CDECL getidamnodeatomicpointers(int argc, IDL_VPTR argv[], char* ar LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle); - count = getNodeAtomicCount(ntree); - pointers = getNodeAtomicPointers(logmalloclist, ntree); + count = udaGetNodeAtomicCount(ntree); + pointers = udaGetNodeAtomicPointers(logmalloclist, ntree); if (kw.debug) { USERDEFINEDTYPE* udt = ntree->userdefinedtype; @@ -1686,8 +1686,8 @@ IDL_VPTR IDL_CDECL getidamnodeatomicrank(int argc, IDL_VPTR argv[], char* argk) // // 2 Args: IDAM handle (long32 int), Node address or null (0) (long64 int) - // calls: int getNodeAtomicCount(NTREE *ntree) - // int *getNodeAtomicRank(NTREE *ntree) + // calls: int udaGetNodeAtomicCount(NTREE *ntree) + // int *udaGetNodeAtomicRank(NTREE *ntree) int handle, count; NTREE* ntree; @@ -1760,8 +1760,8 @@ IDL_VPTR IDL_CDECL getidamnodeatomicrank(int argc, IDL_VPTR argv[], char* argk) LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle); - count = getNodeAtomicCount(ntree); - ranks = getNodeAtomicRank(logmalloclist, ntree); + count = udaGetNodeAtomicCount(ntree); + ranks = udaGetNodeAtomicRank(logmalloclist, ntree); if (kw.debug) { USERDEFINEDTYPE* udt = ntree->userdefinedtype; @@ -1809,9 +1809,9 @@ IDL_VPTR IDL_CDECL getidamnodeatomicshape(int argc, IDL_VPTR argv[], char* argk) // // 2 Args: IDAM handle (long32 int), Node address or null (0) (long64 int) - // calls: int getNodeAtomicCount(NTREE *ntree) - // int *getNodeAtomicRank(NTREE *ntree) - // int **getNodeAtomicShape(NTREE *ntree) + // calls: int udaGetNodeAtomicCount(NTREE *ntree) + // int *udaGetNodeAtomicRank(NTREE *ntree) + // int **udaGetNodeAtomicShape(NTREE *ntree) int handle, count, maxrank = 1; NTREE* ntree; @@ -1885,9 +1885,9 @@ IDL_VPTR IDL_CDECL getidamnodeatomicshape(int argc, IDL_VPTR argv[], char* argk) LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle); - count = getNodeAtomicCount(ntree); - shapes = getNodeAtomicShape(logmalloclist, ntree); - ranks = getNodeAtomicRank(logmalloclist, ntree); + count = udaGetNodeAtomicCount(ntree); + shapes = udaGetNodeAtomicShape(logmalloclist, ntree); + ranks = udaGetNodeAtomicRank(logmalloclist, ntree); if (kw.debug) { USERDEFINEDTYPE* udt = ntree->userdefinedtype; @@ -1986,7 +1986,7 @@ IDL_VPTR IDL_CDECL getidamnodeatomicdatacount(int argc, IDL_VPTR argv[], char* a // 3 Args: IDAM handle (long32 int), Node address or null (0) (long64 int), // Component Name (IDL String) - // calls: getNodeStructureComponentDataCount(ntree, name) + // calls: udaGetNodeStructureComponentDataCount(ntree, name) int handle, count; NTREE* ntree; @@ -2059,7 +2059,7 @@ IDL_VPTR IDL_CDECL getidamnodeatomicdatacount(int argc, IDL_VPTR argv[], char* a LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle); - count = getNodeStructureComponentDataCount(logmalloclist, ntree, name); + count = udaGetNodeStructureComponentDataCount(logmalloclist, ntree, name); if (kw.debug) { USERDEFINEDTYPE* udt = ntree->userdefinedtype; @@ -2081,12 +2081,12 @@ IDL_VPTR IDL_CDECL getidamnodeatomicdata(int argc, IDL_VPTR argv[], char* argk) // 3 Args: IDAM handle (long32 int), Node address or null (0) (long64 int), // Component Name (IDL String) - // calls: getNodeStructureComponentDataRank(ntree, name) - // getNodeStructureComponentDataCount(ntree, name) - // getNodeStructureComponentDataShape(ntree, name) - // getNodeStructureComponentDataDataType(ntree, name) - // getNodeStructureComponentDataIsPointer(ntree, name) - // getNodeStructureComponentData(ntree, name) + // calls: udaGetNodeStructureComponentDataRank(ntree, name) + // udaGetNodeStructureComponentDataCount(ntree, name) + // udaGetNodeStructureComponentDataShape(ntree, name) + // udaGetNodeStructureComponentDataDataType(ntree, name) + // udaGetNodeStructureComponentDataIsPointer(ntree, name) + // udaGetNodeStructureComponentData(ntree, name) int handle, count, rank, pointer, test = 1; int* shape; @@ -2165,12 +2165,12 @@ IDL_VPTR IDL_CDECL getidamnodeatomicdata(int argc, IDL_VPTR argv[], char* argk) LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle); - rank = getNodeStructureComponentDataRank(logmalloclist, ntree, name); - count = getNodeStructureComponentDataCount(logmalloclist, ntree, name); - shape = getNodeStructureComponentDataShape(logmalloclist, ntree, name); - type = getNodeStructureComponentDataDataType(logmalloclist, ntree, name); - pointer = getNodeStructureComponentDataIsPointer(logmalloclist, ntree, name); - data = getNodeStructureComponentData(logmalloclist, ntree, name); + rank = udaGetNodeStructureComponentDataRank(logmalloclist, ntree, name); + count = udaGetNodeStructureComponentDataCount(logmalloclist, ntree, name); + shape = udaGetNodeStructureComponentDataShape(logmalloclist, ntree, name); + type = udaGetNodeStructureComponentDataDataType(logmalloclist, ntree, name); + pointer = udaGetNodeStructureComponentDataIsPointer(logmalloclist, ntree, name); + data = udaGetNodeStructureComponentData(logmalloclist, ntree, name); if (rank <= 1) { idl_shape[0] = (IDL_MEMINT) count; @@ -3109,7 +3109,7 @@ IDL_VPTR IDL_CDECL getidamnodeparent(int argc, IDL_VPTR argv[], char* argk) { // // 2 Args: IDAM handle (long32 int), Node address or null (0) (long64 int) - // calls: NTREE *getNodeParent(NTREE *ntree) + // calls: NTREE *udaGetNodeParent(NTREE *ntree) int handle; NTREE* ntree; @@ -3177,7 +3177,7 @@ IDL_VPTR IDL_CDECL getidamnodeparent(int argc, IDL_VPTR argv[], char* argk) { //--------------------------------------------------------------------------------------------- // Call accessor - ntreeFound = (IDL_MEMINT) getNodeParent(ntree); + ntreeFound = (IDL_MEMINT) udaGetNodeParent(ntree); if (kw.debug) { fprintf(stdout, "+++ getIdamNodeParent +++\n"); @@ -3208,7 +3208,7 @@ IDL_VPTR IDL_CDECL getidamnodechild(int argc, IDL_VPTR argv[], char* argk) { // 3 Args: IDAM handle (long32 int), Node address or null (0) (long64 int) and the // child branch number (long32 int) - // calls: NTREE *getNodeChild(NTREE *ntree, int child){ + // calls: NTREE *udaGetNodeChild(NTREE *ntree, int child){ int handle, child; NTREE* ntree; @@ -3282,7 +3282,7 @@ IDL_VPTR IDL_CDECL getidamnodechild(int argc, IDL_VPTR argv[], char* argk) { //--------------------------------------------------------------------------------------------- // Call accessor - ntreeFound = (IDL_MEMINT) getNodeChild(ntree, child); + ntreeFound = (IDL_MEMINT) udaGetNodeChild(ntree, child); if (kw.debug) { fprintf(stdout, "+++ getIdamNodeChild +++\n"); @@ -3312,7 +3312,7 @@ IDL_VPTR IDL_CDECL getidamnodechildrencount(int argc, IDL_VPTR argv[], char* arg // // 2 Args: IDAM handle (long32 int), Node address or null (0) (long64 int) - // calls: int getNodeChildrenCount(NTREE *ntree) + // calls: int udaGetNodeChildrenCount(NTREE *ntree) int handle; NTREE* ntree; @@ -3379,7 +3379,7 @@ IDL_VPTR IDL_CDECL getidamnodechildrencount(int argc, IDL_VPTR argv[], char* arg //--------------------------------------------------------------------------------------------- // Call accessor - count = (IDL_MEMINT) getNodeChildrenCount(ntree); + count = (IDL_MEMINT) udaGetNodeChildrenCount(ntree); if (kw.debug) { fprintf(stdout, "+++ getIdamNodeChildrenCount +++\n"); @@ -3401,7 +3401,7 @@ IDL_VPTR IDL_CDECL getidamnodechildid(int argc, IDL_VPTR argv[], char* argk) { // 3 Args: IDAM handle (long32 int), Parent Node address or null (0) (long64 int) and the // child Node address (long64 int) - // calls: NTREE *getNodeChildId(NTREE *ntree, int child){ + // calls: NTREE *udaGetNodeChildId(NTREE *ntree, int child){ int handle, childId; NTREE* ntree, * child; @@ -3472,7 +3472,7 @@ IDL_VPTR IDL_CDECL getidamnodechildid(int argc, IDL_VPTR argv[], char* argk) { //--------------------------------------------------------------------------------------------- // Call accessor - childId = getNodeChildId(ntree, child); + childId = udaGetNodeChildId(ntree, child); if (kw.debug) { USERDEFINEDTYPE* udt = ntree->userdefinedtype; @@ -3500,8 +3500,8 @@ IDL_VPTR IDL_CDECL printidamtree(int argc, IDL_VPTR argv[], char* argk) { // // 2 Args: IDAM handle (long32 int), Node address or null (0) (long64 int) - // calls: void *printNTree(stdout, NTREE *ntreet) - // void *printNTreeList(stdout, NTREE *ntreet) + // calls: void *udaPrintNTree(stdout, NTREE *ntreet) + // void *udaPrintNTreeList(stdout, NTREE *ntreet) int handle; NTREE* ntree; @@ -3578,7 +3578,7 @@ IDL_VPTR IDL_CDECL printidamtree(int argc, IDL_VPTR argv[], char* argk) { //--------------------------------------------------------------------------------------------- // Call accessor - printNTreeList(ntree); + udaPrintNTreeList(ntree); fflush(stdout); //--------------------------------------------------------------------------------------------- @@ -3592,7 +3592,7 @@ IDL_VPTR IDL_CDECL printidamtreestructurenames(int argc, IDL_VPTR argv[], char* // // 2 Args: IDAM handle (long32 int), Node address or null (0) (long64 int) - // calls: void printNTreeStructureNames(stdout, NTREE *tree) + // calls: void udaPrintNTreeStructureNames(stdout, NTREE *tree) int handle; NTREE* ntree; @@ -3669,7 +3669,7 @@ IDL_VPTR IDL_CDECL printidamtreestructurenames(int argc, IDL_VPTR argv[], char* LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle); - printNTreeStructureNames(logmalloclist, ntree); + udaPrintNTreeStructureNames(logmalloclist, ntree); //--------------------------------------------------------------------------------------------- // Return @@ -3682,7 +3682,7 @@ IDL_VPTR IDL_CDECL printidamtreestructurecomponentnames(int argc, IDL_VPTR argv[ // // 2 Args: IDAM handle (long32 int), Node address or null (0) (long64 int) - // calls: void printNTreeStructureComponentNames(stdout, NTREE *tree) + // calls: void udaPrintNTreeStructureComponentNames(stdout, NTREE *tree) int handle; NTREE* ntree; @@ -3759,7 +3759,7 @@ IDL_VPTR IDL_CDECL printidamtreestructurecomponentnames(int argc, IDL_VPTR argv[ LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle); - printNTreeStructureComponentNames(logmalloclist, ntree); + udaPrintNTreeStructureComponentNames(logmalloclist, ntree); //--------------------------------------------------------------------------------------------- // Return @@ -3772,7 +3772,7 @@ IDL_VPTR IDL_CDECL printidamnodestructure(int argc, IDL_VPTR argv[], char* argk) // // 2 Args: IDAM handle (long32 int), Node address or null (0) (long64 int) - // calls: void printNodeStructure(stdout, NTREE *ntree) + // calls: void udaPrintNodeStructure(stdout, NTREE *ntree) int handle; NTREE* ntree; @@ -3849,7 +3849,7 @@ IDL_VPTR IDL_CDECL printidamnodestructure(int argc, IDL_VPTR argv[], char* argk) LOGMALLOCLIST* logmalloclist = udaGetLogMallocList(handle); - printNodeStructure(logmalloclist, ntree); + udaPrintNodeStructure(logmalloclist, ntree); //--------------------------------------------------------------------------------------------- // Return