diff --git a/.github/workflows/close-resolved-issues.yml b/.github/workflows/close-resolved-issues.yml new file mode 100644 index 000000000..8128bbca3 --- /dev/null +++ b/.github/workflows/close-resolved-issues.yml @@ -0,0 +1,22 @@ +name: Close resolved issues + +on: + schedule: + - cron: "0 * * * *" + +jobs: + stale: + + runs-on: ubuntu-latest + + steps: + - uses: blackchoey/stale@releases/v1.2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue has been resolved and it will be closed if no further activity occurs within 3 days. Thank you for your contributions.' + stale-issue-label: 'pending close' + days-before-stale: 7 + only-labels: 'resolved' + last-updated-user-type: 'collaborator' + days-before-close: 3 + operations-per-run: 150 diff --git a/.github/workflows/need-attention-issues.yml b/.github/workflows/need-attention-issues.yml new file mode 100644 index 000000000..7bc0e4fdf --- /dev/null +++ b/.github/workflows/need-attention-issues.yml @@ -0,0 +1,21 @@ +name: Pickup issues that needs attention + +on: + schedule: + - cron: "0 * * * *" + +jobs: + stale: + + runs-on: ubuntu-latest + + steps: + - uses: blackchoey/stale@releases/v1.2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue has no recent activities, please take a look and provide updates for it.' + stale-issue-label: 'need attention' + days-before-stale: 3 + last-updated-user-type: 'non-collaborator' + days-before-close: 999 + operations-per-run: 150 diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml new file mode 100644 index 000000000..1787d9e24 --- /dev/null +++ b/.github/workflows/stale-issues.yml @@ -0,0 +1,22 @@ +name: Mark stale issues and close them + +on: + schedule: + - cron: "0 * * * *" + +jobs: + stale: + + runs-on: ubuntu-latest + + steps: + - uses: blackchoey/stale@releases/v1.2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue has been automatically marked as stale because it has no recent activities. It will be closed if no further activity occurs within 3 days. Thank you for your contributions.' + stale-issue-label: 'stale' + days-before-stale: 7 + only-labels: 'need more info' + last-updated-user-type: 'collaborator' + days-before-close: 3 + operations-per-run: 150 diff --git a/AZ3166/jenkins/deployment/DevKitDeploy-forPnP.ps1 b/AZ3166/jenkins/deployment/DevKitDeploy-forPnP.ps1 new file mode 100644 index 000000000..4f714ac73 --- /dev/null +++ b/AZ3166/jenkins/deployment/DevKitDeploy-forPnP.ps1 @@ -0,0 +1,130 @@ +param( + [string] + $Environment = "staging", + $ArduinoConfigFileName = "package_pnp_mxchip_board_preview_index.json" +) + +$ErrorActionPreference = "Stop" +$CurrentDir = (Get-Location).Path + +Import-Module "C:\Program Files (x86)\WindowsPowerShell\Modules\AzureRM.Profile\4.6.0\AzureRM.Profile.psd1" +Import-Module "C:\Program Files (x86)\WindowsPowerShell\Modules\Azure.Storage\4.2.1\Azure.Storage.psd1" +Import-Module "C:\Program Files (x86)\WindowsPowerShell\Modules\Azure\5.1.2\Azure.psd1" + + +$StorageHashTable = @{"azureboard2" = $env:Azureboard2StorageKey; + "azureboard" = $env:AzureboardStorageKey}; + +foreach($StorageAccountName in $StorageHashTable.Keys) +{ + Write-Host("[$Environment][$StorageAccountName]: Start $Environment Deployment."); + + ################################################################################ + # Step 1: upload AZ3166 package to Azure blob storage # + ################################################################################ + + Write-Host("Step 1: upload AZ3166 package to Azure blob storage"); + $ArduinoPackageContainer = "arduinopackage" + $PackageInfoContainer = "packageinfo" + + # We can move this credential to Azure Key Vault once we have deploy with production subscription + $Key = $StorageHashTable[$StorageAccountName]; + $StorageContext = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $Key + + # Get current package version + $CurrentVersion = Get-Content '.\system_version.txt' | Out-String + $CurrentVersion = $CurrentVersion.ToString().Trim() + "-preview" + + # Upload Arduino package + $ArduinoPackageFilePath = Join-Path -Path (Get-Location).Path -ChildPath "\TestResult\AZ3166-$CurrentVersion.zip" + $ArduinoPackageBlobName = "AZ3166-" + $CurrentVersion + ".zip" + Set-AzureStorageBlobContent -Context $StorageContext -Container $Environment -File $ArduinoPackageFilePath -Blob "$ArduinoPackageContainer\$ArduinoPackageBlobName" -Force + + # Upload Firmware bin file + $FirmwareFileName = "devkit-firmware-" + $CurrentVersion + "." + $env:BUILD_NUMBER + "bin" + $FirmwareFilePath = Join-Path -Path (Get-Location).Path -ChildPath "TestResult\$FirmwareFileName" + Set-AzureStorageBlobContent -Context $StorageContext -Container $Environment -File $FirmwareFilePath -Blob $FirmwareFileName -Force + + #Upload Getstarted bin file + #$GetstartedFileName = "devkit-getstarted-" + $CurrentVersion + "." + $env:BUILD_NUMBER + "bin" + #$GetstartedFilePath = Join-Path -Path (Get-Location).Path -ChildPath "TestResult\$GetstartedFileName" + #Set-AzureStorageBlobContent -Context $StorageContext -Container $Environment -File $GetstartedFilePath -Blob $GetstartedFileName -Force + + #Upload iotc bin file iotc-devkit-1.9.10.bin + $IoTCFileName = "iotc-devkit-" + $CurrentVersion + "." + $env:BUILD_NUMBER + "bin" + $IoTCFilePath = Join-Path -Path (Get-Location).Path -ChildPath "TestResult\$IoTCFileName" + Set-AzureStorageBlobContent -Context $StorageContext -Container $Environment -File $IoTCFilePath -Blob $IoTCFileName -Force + + # Upload Firmware bin file for OTA + $OTAFirmwareFileName = "devkit-firmware-latest.ota-preview.bin" + $OTAFirmwareFilePath = Join-Path -Path (Get-Location).Path -ChildPath "TestResult\$OTAFirmwareFileName" + Set-AzureStorageBlobContent -Context $StorageContext -Container $Environment -File $OTAFirmwareFilePath -Blob $OTAFirmwareFileName -Force + + ################################################################################ + # Step 2: Calculate package MD5 checksum and Update to configuration JSON file# + ################################################################################ + + Write-Host("Step 2: Calculate package MD5 checksum and Update to configuration JSON file") + + $MD5 = New-Object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider + $ArduinoPackageHash = [System.BitConverter]::ToString($MD5.ComputeHash([System.IO.File]::ReadAllBytes($ArduinoPackageFilePath))) + $ArduinoPackageHash = $ArduinoPackageHash.ToLower() -replace '-', '' + Write-Host($ArduinoPackageHash); + + Get-AzureStorageBlobContent -Context $StorageContext -Container $Environment -Blob "$PackageInfoContainer\$ArduinoConfigFileName" -Destination $ArduinoConfigFileName -Force + $ArduinoConfigJson = Get-Content $ArduinoConfigFileName | Out-String | ConvertFrom-Json + + $totalVersions = $ArduinoConfigJson.packages[0].platforms.Count + $LastPlatform = ([PSCustomObject]($ArduinoConfigJson.packages[0].platforms[$totalVersions - 1])) + + if ($LastPlatform.version -eq $CurrentVersion) + { + echo LastPlatformversion ----> $LastPlatform.version + echo CurrentVersion -----> $CurrentVersion + + + # Update the latest version + $LastPlatform.url = "https://azureboard2.azureedge.net/$Environment/$ArduinoPackageContainer/$ArduinoPackageBlobName" + $LastPlatform.archiveFileName = $ArduinoPackageBlobName + $LastPlatform.checksum = "MD5:" + $ArduinoPackageHash + $LastPlatform.size = (Get-Item $ArduinoPackageFilePath).Length.ToString() + } + else + { + # Add new version + $NewPlatform = New-Object PSCustomObject + + $LastPlatform.psobject.properties | % { + $newPlatform | Add-Member -MemberType $_.MemberType -Name $_.Name -Value $_.Value + } + + $NewPlatform.version = $CurrentVersion + $NewPlatform.url = "https://azureboard2.azureedge.net/$Environment/$ArduinoPackageContainer/$ArduinoPackageBlobName" + $NewPlatform.archiveFileName = $ArduinoPackageBlobName + $NewPlatform.checksum = "MD5:" + $ArduinoPackageHash + $NewPlatform.size = (Get-Item $ArduinoPackageFilePath).Length.ToString() + + $ArduinoConfigJson.packages[0].platforms += $newPlatform + $totalVersions += 1 + } + + Write-Host("Total packages versions: $totalVersions") + + # We only maintain the latest 5 versions + if ($totalVersions -gt 5) + { + # Remove the oldest one + $ArduinoConfigJson.packages[0].platforms = $ArduinoConfigJson.packages[0].platforms[1..($totalVersions - 1)] + } + + $ArduinoConfigJson | ConvertTo-Json -Depth 10 | Out-File $ArduinoConfigFileName -Encoding ascii + + # Upload Arduino configuration file to Azure blob storage + $ArduinoConfigJsonBlobName = "$PackageInfoContainer/$ArduinoConfigFileName" + Set-AzureStorageBlobContent -Context $StorageContext -Container $Environment -File $ArduinoConfigFileName -Blob $ArduinoConfigJsonBlobName -Force + + $ArduinoConfigJsonBlobURL = "https://azureboard2.azureedge.net/$Environment/$ArduinoConfigJsonBlobName" + Write-Host("Arduino board manager JSON file URI: $ArduinoConfigJsonBlobURL") + + Write-Host("[$Environment][$StorageAccountName]: Deployment completed."); +} \ No newline at end of file diff --git a/AZ3166/jenkins/deployment/DevKitDeploy.ps1 b/AZ3166/jenkins/deployment/DevKitDeploy.ps1 index 9ec72071b..8af0cd2cb 100644 --- a/AZ3166/jenkins/deployment/DevKitDeploy.ps1 +++ b/AZ3166/jenkins/deployment/DevKitDeploy.ps1 @@ -7,9 +7,9 @@ param( $ErrorActionPreference = "Stop" $CurrentDir = (Get-Location).Path -Import-Module "C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureRM.Profile\AzureRM.Profile.psd1" -Import-Module "C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\Storage\Azure.Storage\Azure.Storage.psd1" -Import-Module "C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Azure.psd1" +Import-Module "C:\Program Files (x86)\WindowsPowerShell\Modules\AzureRM.Profile\4.6.0\AzureRM.Profile.psd1" +Import-Module "C:\Program Files (x86)\WindowsPowerShell\Modules\Azure.Storage\4.2.1\Azure.Storage.psd1" +Import-Module "C:\Program Files (x86)\WindowsPowerShell\Modules\Azure\5.1.2\Azure.psd1" $StorageHashTable = @{"azureboard2" = $env:Azureboard2StorageKey; "azureboard" = $env:AzureboardStorageKey}; @@ -40,7 +40,7 @@ foreach($StorageAccountName in $StorageHashTable.Keys) Set-AzureStorageBlobContent -Context $StorageContext -Container $Environment -File $ArduinoPackageFilePath -Blob "$ArduinoPackageContainer\$ArduinoPackageBlobName" -Force # Upload Firmware bin file - $FirmwareFileName = "devkit-firmware-" + $CurrentVersion + "." + $env:BUILD_NUMBER + ".bin" + $FirmwareFileName = "devkit-firmware-" + $CurrentVersion + "." + $env:BUILD_NUMBER + "bin" $FirmwareFilePath = Join-Path -Path (Get-Location).Path -ChildPath "TestResult\$FirmwareFileName" Set-AzureStorageBlobContent -Context $StorageContext -Container $Environment -File $FirmwareFilePath -Blob $FirmwareFileName -Force @@ -48,7 +48,12 @@ foreach($StorageAccountName in $StorageHashTable.Keys) $OTAFirmwareFileName = "devkit-firmware-latest.ota.bin" $OTAFirmwareFilePath = Join-Path -Path (Get-Location).Path -ChildPath "TestResult\$OTAFirmwareFileName" Set-AzureStorageBlobContent -Context $StorageContext -Container $Environment -File $OTAFirmwareFilePath -Blob $OTAFirmwareFileName -Force - + + #Upload Getstarted bin file + $GetstartedFileName = "devkit-getstarted-" + $CurrentVersion + "." + $env:BUILD_NUMBER + "bin" + $GetstartedFilePath = Join-Path -Path (Get-Location).Path -ChildPath "TestResult\$GetstartedFileName" + Set-AzureStorageBlobContent -Context $StorageContext -Container $Environment -File $GetstartedFilePath -Blob $GetstartedFileName -Force + ################################################################################ # Step 2: Calculate package MD5 checksum and Update to configuration JSON file# ################################################################################ @@ -112,4 +117,4 @@ foreach($StorageAccountName in $StorageHashTable.Keys) Write-Host("Arduino board manager JSON file URI: $ArduinoConfigJsonBlobURL") Write-Host("[$Environment][$StorageAccountName]: Deployment completed."); -} \ No newline at end of file +} diff --git a/AZ3166/src/cores/arduino/UARTClass.h b/AZ3166/src/cores/arduino/UARTClass.h index 34e83570a..ee69dcbcb 100644 --- a/AZ3166/src/cores/arduino/UARTClass.h +++ b/AZ3166/src/cores/arduino/UARTClass.h @@ -23,7 +23,7 @@ #include "HardwareSerial.h" #include "BufferedSerial.h" -#define UART_RCV_SIZE 128 +#define UART_RCV_SIZE 256 class UARTClass : public HardwareSerial { diff --git a/AZ3166/src/cores/arduino/cli/console_cli.cpp b/AZ3166/src/cores/arduino/cli/console_cli.cpp index 83b06caab..b6a9c9289 100644 --- a/AZ3166/src/cores/arduino/cli/console_cli.cpp +++ b/AZ3166/src/cores/arduino/cli/console_cli.cpp @@ -45,18 +45,20 @@ static void wifi_ssid_command(int argc, char **argv); static void wifi_pwd_Command(int argc, char **argv); static void az_iothub_command(int argc, char **argv); static void dps_uds_command(int argc, char **argv); +static void az_iotdps_command(int argc, char **argv); static void enable_secure_command(int argc, char **argv); static const struct console_command cmds[] = { - {"help", "Help document", false, help_command}, - {"version", "System version", false, get_version_command}, - {"exit", "Exit and reboot", false, reboot_and_exit_command}, - {"scan", "Scan Wi-Fi AP", false, wifi_scan}, - {"set_wifissid", "Set Wi-Fi SSID", false, wifi_ssid_command}, - {"set_wifipwd", "Set Wi-Fi password", true, wifi_pwd_Command}, - {"set_az_iothub", "Set the connection string of Microsoft Azure IoT Hub", false, az_iothub_command}, - {"set_dps_uds", "Set DPS Unique Device Secret (DPS)", true, dps_uds_command}, - {"enable_secure", "Enable secure channel between AZ3166 and secure chip", false, enable_secure_command}, + {"help", "Help document", false, help_command}, + {"version", "System version", false, get_version_command}, + {"exit", "Exit and reboot", false, reboot_and_exit_command}, + {"scan", "Scan Wi-Fi AP", false, wifi_scan}, + {"set_wifissid", "Set Wi-Fi SSID", false, wifi_ssid_command}, + {"set_wifipwd", "Set Wi-Fi password", true, wifi_pwd_Command}, + {"set_az_iothub", "Set IoT Hub device connection string", false, az_iothub_command}, + {"set_dps_uds", "Set DPS Unique Device Secret (UDS) for X.509 certificates.", true, dps_uds_command}, + {"set_az_iotdps", "Set DPS Symmetric Key. Format: \"DPSEndpoint=global.azure-devices-provisioning.net;IdScope=XXX;DeviceId=XXX;SymmetricKey=XXX\"", false, az_iotdps_command}, + {"enable_secure", "Enable secure channel between AZ3166 and secure chip", false, enable_secure_command}, }; static const int cmd_count = sizeof(cmds) / sizeof(struct console_command); @@ -245,6 +247,27 @@ static void dps_uds_command(int argc, char **argv) } } +static void az_iotdps_command(int argc, char **argv) +{ + if (argc == 1 || argv[1] == NULL) + { + Serial.printf("Usage: set_az_iotdps . Please provide the connection string of DPS.\r\n"); + return; + } + int len = strlen(argv[1]) + 1; + if (len == 0 || len > AZ_IOT_HUB_MAX_LEN) + { + Serial.printf("Invalid DPS connection string.\r\n"); + return; + } + + int result = write_eeprom(argv[1], AZ_IOT_HUB_ZONE_IDX); + if (result == 0) + { + Serial.printf("INFO: Set DPS connection string successfully.\r\n"); + } +} + static void enable_secure_command(int argc, char **argv) { int ret = -2; diff --git a/AZ3166/src/cores/arduino/system/SystemVersion.h b/AZ3166/src/cores/arduino/system/SystemVersion.h index d0b256d13..a5ab12ac1 100644 --- a/AZ3166/src/cores/arduino/system/SystemVersion.h +++ b/AZ3166/src/cores/arduino/system/SystemVersion.h @@ -7,7 +7,7 @@ #define DEVKIT_MAJOR_VERSION 1 #define DEVKIT_MINOR_VERSION 6 -#define DEVKIT_PATCH_VERSION 3 +#define DEVKIT_PATCH_VERSION 5 #define DEVKIT_SDK_VERSION (DEVKIT_MAJOR_VERSION * 10000 + DEVKIT_MINOR_VERSION * 100 + DEVKIT_PATCH_VERSION) #ifdef __cplusplus diff --git a/AZ3166/src/libraries/MQTT/examples/MQTTClient/MQTTClient.ino b/AZ3166/src/libraries/MQTT/examples/MQTTClient/MQTTClient.ino index 7b2b71213..8012555b8 100644 --- a/AZ3166/src/libraries/MQTT/examples/MQTTClient/MQTTClient.ino +++ b/AZ3166/src/libraries/MQTT/examples/MQTTClient/MQTTClient.ino @@ -7,7 +7,7 @@ int status = WL_IDLE_STATUS; int arrivedcount = 0; bool hasWifi = false; -const char* mqttServer = "iot.eclipse.org"; //"m2m.eclipse.org"; +const char* mqttServer = "mqtt.eclipse.org"; int port = 1883; void initWifi() diff --git a/AZ3166/src/libraries/WiFi/src/AZ3166WiFiServer.cpp b/AZ3166/src/libraries/WiFi/src/AZ3166WiFiServer.cpp index 45f1f0a04..49a2e8e76 100644 --- a/AZ3166/src/libraries/WiFi/src/AZ3166WiFiServer.cpp +++ b/AZ3166/src/libraries/WiFi/src/AZ3166WiFiServer.cpp @@ -56,6 +56,16 @@ void WiFiServer::begin() } } +void WiFiServer::setTimeout(int timeout = -1) +{ + if (_pTcpServer == NULL) + { + return; + } + + _pTcpServer->set_timeout(timeout); +} + WiFiClient WiFiServer::available() { if (_pTcpServer == NULL ) diff --git a/AZ3166/src/libraries/WiFi/src/AZ3166WiFiServer.h b/AZ3166/src/libraries/WiFi/src/AZ3166WiFiServer.h index 06943aa37..d2255dc33 100644 --- a/AZ3166/src/libraries/WiFi/src/AZ3166WiFiServer.h +++ b/AZ3166/src/libraries/WiFi/src/AZ3166WiFiServer.h @@ -28,6 +28,14 @@ class WiFiServer : public Print WiFiClient available(); void begin(); + + /** Set timeout on blocking socket operations + * + * setTimeout(0) is equivalent to set blocking = false + * setTimeout(-1) is equivalent to set blocking = true + * @param timeout Timeout in milliseconds + */ + void setTimeout(int timeout /*= -1*/); void close(); void send(int code, char *content_type, const String &content); virtual size_t write(unsigned char); diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/azure_base32.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/azure_base32.h index bc47cbca0..f5c01887f 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/azure_base32.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/azure_base32.h @@ -1,21 +1,24 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -#ifndef BASE32_H -#define BASE32_H - -#include "azure_c_shared_utility/strings.h" -#include "azure_c_shared_utility/buffer_.h" +#ifndef AZURE_BASE32_H +#define AZURE_BASE32_H #ifdef __cplusplus #include -extern "C" { #else #include #endif +#include "azure_c_shared_utility/strings.h" +#include "azure_c_shared_utility/buffer_.h" + #include "umock_c/umock_c_prod.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Encodes the BUFFER_HANDLE to a base 32 STRING_HANDLE * @@ -57,4 +60,4 @@ MOCKABLE_FUNCTION(, BUFFER_HANDLE, Azure_Base32_Decode_String, const char*, sour } #endif -#endif /* BASE64_H */ +#endif /* AZURE_BASE32_H */ diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/azure_base64.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/azure_base64.h index 4082aa516..98ff175bc 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/azure_base64.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/azure_base64.h @@ -6,21 +6,23 @@ * a @c buffer using standard base64 encoding. */ -#ifndef BASE64_H -#define BASE64_H - -#include "azure_c_shared_utility/strings.h" -#include "azure_c_shared_utility/buffer_.h" +#ifndef AZURE_BASE64_H +#define AZURE_BASE64_H #ifdef __cplusplus #include -extern "C" { #else #include #endif +#include "azure_c_shared_utility/strings.h" +#include "azure_c_shared_utility/buffer_.h" + #include "umock_c/umock_c_prod.h" +#ifdef __cplusplus +extern "C" { +#endif /** * @brief Base64 encodes a buffer and returns the resulting string. @@ -80,4 +82,4 @@ MOCKABLE_FUNCTION(, BUFFER_HANDLE, Azure_Base64_Decode, const char*, source); } #endif -#endif /* BASE64_H */ +#endif /* AZURE_BASE64_H */ diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/buffer_.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/buffer_.h index 9a5f6629e..4bf2a7df5 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/buffer_.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/buffer_.h @@ -1,13 +1,11 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -#ifndef BUFFER_H -#define BUFFER_H +#ifndef BUFFER__H +#define BUFFER__H #ifdef __cplusplus #include -extern "C" -{ #else #include #include @@ -15,6 +13,11 @@ extern "C" #include "umock_c/umock_c_prod.h" +#ifdef __cplusplus +extern "C" +{ +#endif + typedef struct BUFFER_TAG* BUFFER_HANDLE; MOCKABLE_FUNCTION(, BUFFER_HANDLE, BUFFER_new); @@ -40,5 +43,4 @@ MOCKABLE_FUNCTION(, BUFFER_HANDLE, BUFFER_clone, BUFFER_HANDLE, handle); } #endif - -#endif /* BUFFER_H */ +#endif /* BUFFER__H */ diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/connection_string_parser.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/connection_string_parser.h index 9c2e66577..b613deeb4 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/connection_string_parser.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/connection_string_parser.h @@ -4,10 +4,11 @@ #ifndef CONNECTION_STRING_PARSER_H #define CONNECTION_STRING_PARSER_H -#include "umock_c/umock_c_prod.h" #include "azure_c_shared_utility/map.h" #include "azure_c_shared_utility/strings.h" +#include "umock_c/umock_c_prod.h" + #ifdef __cplusplus extern "C" { diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/consolelogger.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/consolelogger.h index 89eee2871..bc2a09be7 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/consolelogger.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/consolelogger.h @@ -10,10 +10,10 @@ extern "C" { #endif /* __cplusplus */ - extern void consolelogger_log(LOG_CATEGORY log_category, const char* file, const char* func, int line, unsigned int options, const char* format, ...); + void consolelogger_log(LOG_CATEGORY log_category, const char* file, const char* func, int line, unsigned int options, const char* format, ...); #if (defined(_MSC_VER)) - extern void consolelogger_log_with_GetLastError(const char* file, const char* func, int line, const char* format, ...); + void consolelogger_log_with_GetLastError(const char* file, const char* func, int line, const char* format, ...); #endif #ifdef __cplusplus diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/constbuffer.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/constbuffer.h index 7d48ce029..72d1a468b 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/constbuffer.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/constbuffer.h @@ -4,19 +4,22 @@ #ifndef CONSTBUFFER_H #define CONSTBUFFER_H -#include "azure_c_shared_utility/buffer_.h" - #ifdef __cplusplus #include -extern "C" -{ #else #include #include #endif +#include "azure_c_shared_utility/buffer_.h" + #include "umock_c/umock_c_prod.h" +#ifdef __cplusplus +extern "C" +{ +#endif + /*this is the handle*/ typedef struct CONSTBUFFER_HANDLE_DATA_TAG* CONSTBUFFER_HANDLE; @@ -29,25 +32,27 @@ typedef struct CONSTBUFFER_TAG typedef void(*CONSTBUFFER_CUSTOM_FREE_FUNC)(void* context); -/*this creates a new constbuffer from a memory area*/ -MOCKABLE_FUNCTION(, CONSTBUFFER_HANDLE, CONSTBUFFER_Create, const unsigned char*, source, size_t, size); +MOCKABLE_INTERFACE(constbuffer, + /*this creates a new constbuffer from a memory area*/ + FUNCTION(, CONSTBUFFER_HANDLE, CONSTBUFFER_Create, const unsigned char*, source, size_t, size), -/*this creates a new constbuffer from an existing BUFFER_HANDLE*/ -MOCKABLE_FUNCTION(, CONSTBUFFER_HANDLE, CONSTBUFFER_CreateFromBuffer, BUFFER_HANDLE, buffer); + /*this creates a new constbuffer from an existing BUFFER_HANDLE*/ + FUNCTION(, CONSTBUFFER_HANDLE, CONSTBUFFER_CreateFromBuffer, BUFFER_HANDLE, buffer), -MOCKABLE_FUNCTION(, CONSTBUFFER_HANDLE, CONSTBUFFER_CreateWithMoveMemory, unsigned char*, source, size_t, size); + FUNCTION(, CONSTBUFFER_HANDLE, CONSTBUFFER_CreateWithMoveMemory, unsigned char*, source, size_t, size), -MOCKABLE_FUNCTION(, CONSTBUFFER_HANDLE, CONSTBUFFER_CreateWithCustomFree, const unsigned char*, source, size_t, size, CONSTBUFFER_CUSTOM_FREE_FUNC, customFreeFunc, void*, customFreeFuncContext); + FUNCTION(, CONSTBUFFER_HANDLE, CONSTBUFFER_CreateWithCustomFree, const unsigned char*, source, size_t, size, CONSTBUFFER_CUSTOM_FREE_FUNC, customFreeFunc, void*, customFreeFuncContext), -MOCKABLE_FUNCTION(, CONSTBUFFER_HANDLE, CONSTBUFFER_CreateFromOffsetAndSize, CONSTBUFFER_HANDLE, handle, size_t, offset, size_t, size) + FUNCTION(, CONSTBUFFER_HANDLE, CONSTBUFFER_CreateFromOffsetAndSize, CONSTBUFFER_HANDLE, handle, size_t, offset, size_t, size), -MOCKABLE_FUNCTION(, void, CONSTBUFFER_IncRef, CONSTBUFFER_HANDLE, constbufferHandle); + FUNCTION(, void, CONSTBUFFER_IncRef, CONSTBUFFER_HANDLE, constbufferHandle), -MOCKABLE_FUNCTION(, void, CONSTBUFFER_DecRef, CONSTBUFFER_HANDLE, constbufferHandle); + FUNCTION(, void, CONSTBUFFER_DecRef, CONSTBUFFER_HANDLE, constbufferHandle), -MOCKABLE_FUNCTION(, const CONSTBUFFER*, CONSTBUFFER_GetContent, CONSTBUFFER_HANDLE, constbufferHandle); + FUNCTION(, const CONSTBUFFER*, CONSTBUFFER_GetContent, CONSTBUFFER_HANDLE, constbufferHandle), -MOCKABLE_FUNCTION(, bool, CONSTBUFFER_HANDLE_contain_same, CONSTBUFFER_HANDLE, left, CONSTBUFFER_HANDLE, right); + FUNCTION(, bool, CONSTBUFFER_HANDLE_contain_same, CONSTBUFFER_HANDLE, left, CONSTBUFFER_HANDLE, right) +) #ifdef __cplusplus } diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/constmap.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/constmap.h index bf2a99a5c..0ce682c82 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/constmap.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/constmap.h @@ -9,20 +9,22 @@ #ifndef CONSTMAP_H #define CONSTMAP_H +#ifdef __cplusplus +#include +#else +#include +#endif + #include "azure_macro_utils/macro_utils.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/map.h" #include "umock_c/umock_c_prod.h" #ifdef __cplusplus -#include extern "C" { -#else -#include #endif - #define CONSTMAP_RESULT_VALUES \ CONSTMAP_OK, \ CONSTMAP_ERROR, \ diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/crt_abstractions.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/crt_abstractions.h index 3376cfcc6..8d312e9ad 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/crt_abstractions.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/crt_abstractions.h @@ -4,20 +4,19 @@ #ifndef CRT_ABSTRACTIONS_H #define CRT_ABSTRACTIONS_H -#include "umock_c/umock_c_prod.h" - #ifdef __cplusplus #include #include #include #include -extern "C" { #else // __cplusplus #include #include #include #endif // __cplusplus +#include "umock_c/umock_c_prod.h" + #ifdef _MSC_VER #ifdef QUARKGALILEO @@ -40,14 +39,18 @@ typedef bool _Bool; #else // _MSC_VER #if defined __STDC_VERSION__ -#if ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201000L) || (__STDC_VERSION__ == 201112L)) -/*C99 compiler or C11*/ +#if ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201000L) || (__STDC_VERSION__ == 201112L) || (__STDC_VERSION__ == 201710L)) +/*C99, C11 (including GNU 4.6) or C18 compiler */ #define HAS_STDBOOL #include -#endif // ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201000L) || (__STDC_VERSION__ == 201112L)) +#endif // ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201000L) || (__STDC_VERSION__ == 201112L) || (__STDC_VERSION__ == 201710L)) #endif // __STDC_VERSION__ #endif // _MSC_VER +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + #ifndef HAS_STDBOOL #ifdef __cplusplus #define _Bool bool @@ -75,15 +78,15 @@ typedef unsigned char bool; #define STRUNCATE 80 #endif /* !defined (STRUNCATE) */ -extern int strcpy_s(char* dst, size_t dstSizeInBytes, const char* src); -extern int strcat_s(char* dst, size_t dstSizeInBytes, const char* src); -extern int strncpy_s(char* dst, size_t dstSizeInBytes, const char* src, size_t maxCount); -extern int sprintf_s(char* dst, size_t dstSizeInBytes, const char* format, ...); +int strcpy_s(char* dst, size_t dstSizeInBytes, const char* src); +int strcat_s(char* dst, size_t dstSizeInBytes, const char* src); +int strncpy_s(char* dst, size_t dstSizeInBytes, const char* src, size_t maxCount); +int sprintf_s(char* dst, size_t dstSizeInBytes, const char* format, ...); #endif // _MSC_VER || MINGW_HAS_SECURE_API -extern unsigned long long strtoull_s(const char* nptr, char** endPtr, int base); -extern float strtof_s(const char* nptr, char** endPtr); -extern long double strtold_s(const char* nptr, char** endPtr); +unsigned long long strtoull_s(const char* nptr, char** endPtr, int base); +float strtof_s(const char* nptr, char** endPtr); +long double strtold_s(const char* nptr, char** endPtr); #ifdef _MSC_VER #define stricmp _stricmp @@ -106,12 +109,12 @@ MOCKABLE_FUNCTION(, int, size_tToString, char*, destination, size_t, destination #define ISNAN _isnan #else // _MSC_VER #if defined __STDC_VERSION__ -#if ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201000L) || (__STDC_VERSION__ == 201112L)) -/*C99 compiler or C11*/ +#if ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201000L) || (__STDC_VERSION__ == 201112L) || (__STDC_VERSION__ == 201710L)) +/*C99, C11 (including GNU 4.6) or C18 compiler */ #define ISNAN isnan -#else // ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201000L) || (__STDC_VERSION__ == 201112L)) +#else // ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201000L) || (__STDC_VERSION__ == 201112L) || (__STDC_VERSION__ == 201710L)) #error update this file to contain the latest C standard. -#endif // ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201000L) || (__STDC_VERSION__ == 201112L)) +#endif // ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201000L) || (__STDC_VERSION__ == 201112L) || (__STDC_VERSION__ == 201710L)) #else // __STDC_VERSION__ #ifdef __cplusplus /*C++ defines isnan... in C11*/ diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/doublylinkedlist.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/doublylinkedlist.h index cfaae526d..3151fb1bb 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/doublylinkedlist.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/doublylinkedlist.h @@ -6,8 +6,6 @@ #ifdef __cplusplus #include -extern "C" -{ #else #include #endif @@ -15,6 +13,11 @@ extern "C" #include #include "umock_c/umock_c_prod.h" +#ifdef __cplusplus +extern "C" +{ +#endif + typedef struct DLIST_ENTRY_TAG { struct DLIST_ENTRY_TAG *Flink; diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/envvariable.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/envvariable.h index 99c3e421f..74ab51f28 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/envvariable.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/envvariable.h @@ -4,17 +4,12 @@ #ifndef ENV_VARIABLE_H #define ENV_VARIABLE_H -#include "azure_macro_utils/macro_utils.h" +#include "umock_c/umock_c_prod.h" #ifdef __cplusplus -#include extern "C" { -#else -#include #endif -#include "umock_c/umock_c_prod.h" - MOCKABLE_FUNCTION(, const char*, environment_get_variable, const char*, variable_name); diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/gb_stdio.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/gb_stdio.h index b72a02207..bcd23efe9 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/gb_stdio.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/gb_stdio.h @@ -17,7 +17,11 @@ */ #ifndef GB_STDIO_INTERCEPT +#ifdef __cplusplus +#include +#else #include +#endif #else /*source level intercepting of function calls*/ @@ -27,15 +31,18 @@ #define ftell ftell_never_called_never_implemented_always_forgotten #define fprintf fprintf_never_called_never_implemented_always_forgotten +#ifdef __cplusplus +#include +#else +#include +#endif + #include "umock_c/umock_c_prod.h" #ifdef __cplusplus -#include extern "C" { -#else -#include #endif #undef fopen diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/gb_time.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/gb_time.h index a549ca3d7..4412c6ce6 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/gb_time.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/gb_time.h @@ -17,7 +17,11 @@ */ #ifndef GB_TIME_INTERCEPT +#ifdef __cplusplus +#include +#else #include +#endif #else /*source level intercepting of function calls*/ @@ -26,15 +30,18 @@ #define strftime strftime_never_called_never_implemented_always_forgotten #ifdef __cplusplus -#include -extern "C" -{ +#include #else #include #endif #include "umock_c/umock_c_prod.h" +#ifdef __cplusplus +extern "C" +{ +#endif + #undef time #define time gb_time MOCKABLE_FUNCTION(, time_t, time, time_t *, timer); diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/gballoc.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/gballoc.h index eecfd7e28..4934c61cd 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/gballoc.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/gballoc.h @@ -4,16 +4,17 @@ #ifndef GBALLOC_H #define GBALLOC_H +#ifdef __cplusplus +#include +#else +#include +#endif + #include "umock_c/umock_c_prod.h" #ifdef __cplusplus -#include -#include extern "C" { -#else -#include -#include #endif // GB_USE_CUSTOM_HEAP disables the implementations in gballoc.c and diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/hmac.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/hmac.h index 0a5a73fd4..a67d93b64 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/hmac.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/hmac.h @@ -4,6 +4,12 @@ #ifndef HMAC_H #define HMAC_H +#ifdef __cplusplus +#include +#else +#include +#endif + #include "azure_c_shared_utility/sha.h" #include "umock_c/umock_c_prod.h" diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/hmacsha256.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/hmacsha256.h index 556874902..6ac4baa0e 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/hmacsha256.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/hmacsha256.h @@ -4,6 +4,12 @@ #ifndef HMACSHA256_H #define HMACSHA256_H +#ifdef __cplusplus +#include +#else +#include +#endif + #include "azure_macro_utils/macro_utils.h" #include "azure_c_shared_utility/buffer_.h" #include "umock_c/umock_c_prod.h" diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/httpapi.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/httpapi.h index 140943064..bb5a3e0d6 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/httpapi.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/httpapi.h @@ -13,16 +13,19 @@ #ifndef HTTPAPI_H #define HTTPAPI_H -#include "azure_c_shared_utility/httpheaders.h" +#ifdef __cplusplus +#include +#else +#include +#endif + #include "azure_macro_utils/macro_utils.h" +#include "azure_c_shared_utility/httpheaders.h" #include "azure_c_shared_utility/buffer_.h" #include "umock_c/umock_c_prod.h" #ifdef __cplusplus -#include extern "C" { -#else -#include #endif typedef struct HTTP_HANDLE_DATA_TAG* HTTP_HANDLE; diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/httpapiex.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/httpapiex.h index 574d9f77c..a64e6c395 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/httpapiex.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/httpapiex.h @@ -16,15 +16,18 @@ #ifndef HTTPAPIEX_H #define HTTPAPIEX_H +#ifdef __cplusplus +#include +#else +#include +#endif + #include "azure_macro_utils/macro_utils.h" #include "azure_c_shared_utility/httpapi.h" #include "umock_c/umock_c_prod.h" #ifdef __cplusplus -#include extern "C" { -#else -#include #endif typedef struct HTTPAPIEX_HANDLE_DATA_TAG* HTTPAPIEX_HANDLE; @@ -40,6 +43,25 @@ typedef struct HTTPAPIEX_HANDLE_DATA_TAG* HTTPAPIEX_HANDLE; */ MU_DEFINE_ENUM(HTTPAPIEX_RESULT, HTTPAPIEX_RESULT_VALUES); +/** + * @brief Initialize the HTTPAPIEX. + * + * This API shall be called only once before call any other HTTPAPIEX API. + * **This API is NOT thread safe**. + * + * @return An @c HTTPAPIEX_RESULT indicating the status of the call. + */ +MOCKABLE_FUNCTION(, HTTPAPIEX_RESULT, HTTPAPIEX_Init); + +/** + * @brief Deinitialize the HTTPAPIEX. + * + * This API shall be called only once to release all HTTP resources. No other HTTPAPIEX + * API shall be called after call this API. + * **This API is NOT thread safe**. + */ +MOCKABLE_FUNCTION(, void, HTTPAPIEX_Deinit); + /** * @brief Creates an @c HTTPAPIEX_HANDLE that can be used in further calls. * diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/httpapiexsas.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/httpapiexsas.h index b2cd2b1bb..43724397f 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/httpapiexsas.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/httpapiexsas.h @@ -13,8 +13,7 @@ #ifdef __cplusplus extern "C" { #endif - - + typedef struct HTTPAPIEX_SAS_STATE_TAG* HTTPAPIEX_SAS_HANDLE; MOCKABLE_FUNCTION(, HTTPAPIEX_SAS_HANDLE, HTTPAPIEX_SAS_Create, STRING_HANDLE, key, STRING_HANDLE, uriResource, STRING_HANDLE, keyName); diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/httpheaders.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/httpheaders.h index 574fbe074..cb4e54d0f 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/httpheaders.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/httpheaders.h @@ -20,14 +20,17 @@ #ifndef HTTPHEADERS_H #define HTTPHEADERS_H +#ifdef __cplusplus +#include +#else +#include +#endif + #include "azure_macro_utils/macro_utils.h" #include "umock_c/umock_c_prod.h" #ifdef __cplusplus -#include extern "C" { -#else -#include #endif /*Codes_SRS_HTTP_HEADERS_99_001:[ HttpHeaders shall have the following interface]*/ diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/map.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/map.h index 92417ca4d..e88080b62 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/map.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/map.h @@ -9,17 +9,20 @@ #ifndef MAP_H #define MAP_H +#ifdef __cplusplus +#include +#else +#include +#endif + #include "azure_macro_utils/macro_utils.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "umock_c/umock_c_prod.h" #ifdef __cplusplus -#include extern "C" { -#else -#include #endif #define MAP_RESULT_VALUES \ diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/optionhandler.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/optionhandler.h index 0b58e7e86..eb4f026ee 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/optionhandler.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/optionhandler.h @@ -5,19 +5,18 @@ #define OPTIONHANDLER_H #include "azure_macro_utils/macro_utils.h" - -#define OPTIONHANDLER_RESULT_VALUES \ -OPTIONHANDLER_OK, \ -OPTIONHANDLER_ERROR, \ -OPTIONHANDLER_INVALIDARG - -MU_DEFINE_ENUM(OPTIONHANDLER_RESULT, OPTIONHANDLER_RESULT_VALUES) +#include "umock_c/umock_c_prod.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -#include "umock_c/umock_c_prod.h" +#define OPTIONHANDLER_RESULT_VALUES \ + OPTIONHANDLER_OK, \ + OPTIONHANDLER_ERROR, \ + OPTIONHANDLER_INVALIDARG + +MU_DEFINE_ENUM(OPTIONHANDLER_RESULT, OPTIONHANDLER_RESULT_VALUES) typedef struct OPTIONHANDLER_HANDLE_DATA_TAG* OPTIONHANDLER_HANDLE; diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/refcount.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/refcount.h index 7313a69b9..dc8bf00d1 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/refcount.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/refcount.h @@ -14,22 +14,25 @@ will interact with deallocated memory / resources resulting in an undefined beha #ifndef REFCOUNT_H #define REFCOUNT_H -#include "azure_c_shared_utility/gballoc.h" -#include "azure_macro_utils/macro_utils.h" - #ifdef __cplusplus #include #include -extern "C" -{ #else #include #include #endif +#include "azure_c_shared_utility/gballoc.h" +#include "azure_macro_utils/macro_utils.h" + // Include the platform-specific file that defines atomic functionality #include "refcount_os.h" +#ifdef __cplusplus +extern "C" +{ +#endif + #define REFCOUNT_TYPE(type) \ struct MU_C2(MU_C2(REFCOUNT_, type), _TAG) diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/sastoken.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/sastoken.h index b41b6b6e9..39668a958 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/sastoken.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/sastoken.h @@ -4,8 +4,12 @@ #ifndef SASTOKEN_H #define SASTOKEN_H -#include "azure_c_shared_utility/strings.h" +#ifdef __cplusplus +#else #include +#endif + +#include "azure_c_shared_utility/strings.h" #include "umock_c/umock_c_prod.h" #ifdef __cplusplus diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/sha.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/sha.h index 0d1dc1a27..2f2ece643 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/sha.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/sha.h @@ -6,11 +6,6 @@ #ifndef _SHA_H_ #define _SHA_H_ -#ifdef __cplusplus -extern "C" -{ -#endif - /* * Description: * This file implements the Secure Hash Signature Standard @@ -32,7 +27,12 @@ extern "C" * SHA-512 64 byte / 512 bit */ +#ifdef __cplusplus +#include +#else #include +#endif + /* * If you do not have the ISO standard stdint.h header file, then you * must typedef the following: @@ -44,6 +44,11 @@ extern "C" * */ +#ifdef __cplusplus +extern "C" +{ +#endif + #ifndef _SHA_enum_ #define _SHA_enum_ /* @@ -185,50 +190,50 @@ typedef struct HMACContext { */ /* SHA-1 */ -extern int SHA1Reset(SHA1Context *); -extern int SHA1Input(SHA1Context *, const uint8_t *bytes, unsigned int bytecount); -extern int SHA1FinalBits(SHA1Context *, const uint8_t bits, unsigned int bitcount); -extern int SHA1Result(SHA1Context *, uint8_t Message_Digest[SHA1HashSize]); +int SHA1Reset(SHA1Context *); +int SHA1Input(SHA1Context *, const uint8_t *bytes, unsigned int bytecount); +int SHA1FinalBits(SHA1Context *, const uint8_t bits, unsigned int bitcount); +int SHA1Result(SHA1Context *, uint8_t Message_Digest[SHA1HashSize]); /* SHA-224 */ -extern int SHA224Reset(SHA224Context *); -extern int SHA224Input(SHA224Context *, const uint8_t *bytes, unsigned int bytecount); -extern int SHA224FinalBits(SHA224Context *, const uint8_t bits, unsigned int bitcount); -extern int SHA224Result(SHA224Context *, uint8_t Message_Digest[SHA224HashSize]); +int SHA224Reset(SHA224Context *); +int SHA224Input(SHA224Context *, const uint8_t *bytes, unsigned int bytecount); +int SHA224FinalBits(SHA224Context *, const uint8_t bits, unsigned int bitcount); +int SHA224Result(SHA224Context *, uint8_t Message_Digest[SHA224HashSize]); /* SHA-256 */ -extern int SHA256Reset(SHA256Context *); -extern int SHA256Input(SHA256Context *, const uint8_t *bytes, unsigned int bytecount); -extern int SHA256FinalBits(SHA256Context *, const uint8_t bits, unsigned int bitcount); -extern int SHA256Result(SHA256Context *, uint8_t Message_Digest[SHA256HashSize]); +int SHA256Reset(SHA256Context *); +int SHA256Input(SHA256Context *, const uint8_t *bytes, unsigned int bytecount); +int SHA256FinalBits(SHA256Context *, const uint8_t bits, unsigned int bitcount); +int SHA256Result(SHA256Context *, uint8_t Message_Digest[SHA256HashSize]); /* SHA-384 */ -extern int SHA384Reset(SHA384Context *); -extern int SHA384Input(SHA384Context *, const uint8_t *bytes, unsigned int bytecount); -extern int SHA384FinalBits(SHA384Context *, const uint8_t bits, unsigned int bitcount); -extern int SHA384Result(SHA384Context *, uint8_t Message_Digest[SHA384HashSize]); +int SHA384Reset(SHA384Context *); +int SHA384Input(SHA384Context *, const uint8_t *bytes, unsigned int bytecount); +int SHA384FinalBits(SHA384Context *, const uint8_t bits, unsigned int bitcount); +int SHA384Result(SHA384Context *, uint8_t Message_Digest[SHA384HashSize]); /* SHA-512 */ -extern int SHA512Reset(SHA512Context *); -extern int SHA512Input(SHA512Context *, const uint8_t *bytes, unsigned int bytecount); -extern int SHA512FinalBits(SHA512Context *, const uint8_t bits, unsigned int bitcount); -extern int SHA512Result(SHA512Context *, uint8_t Message_Digest[SHA512HashSize]); +int SHA512Reset(SHA512Context *); +int SHA512Input(SHA512Context *, const uint8_t *bytes, unsigned int bytecount); +int SHA512FinalBits(SHA512Context *, const uint8_t bits, unsigned int bitcount); +int SHA512Result(SHA512Context *, uint8_t Message_Digest[SHA512HashSize]); /* Unified SHA functions, chosen by whichSha */ -extern int USHAReset(USHAContext *, SHAversion whichSha); -extern int USHAInput(USHAContext *, const uint8_t *bytes, unsigned int bytecount); -extern int USHAFinalBits(USHAContext *, const uint8_t bits, unsigned int bitcount); -extern int USHAResult(USHAContext *, uint8_t Message_Digest[USHAMaxHashSize]); -extern int USHABlockSize(enum SHAversion whichSha); -extern int USHAHashSize(enum SHAversion whichSha); -extern int USHAHashSizeBits(enum SHAversion whichSha); +int USHAReset(USHAContext *, SHAversion whichSha); +int USHAInput(USHAContext *, const uint8_t *bytes, unsigned int bytecount); +int USHAFinalBits(USHAContext *, const uint8_t bits, unsigned int bitcount); +int USHAResult(USHAContext *, uint8_t Message_Digest[USHAMaxHashSize]); +int USHABlockSize(enum SHAversion whichSha); +int USHAHashSize(enum SHAversion whichSha); +int USHAHashSizeBits(enum SHAversion whichSha); /* * HMAC Keyed-Hashing for Message Authentication, RFC2104, * for all SHAs. * This interface allows a fixed-length text input to be used. */ -extern int hmac(SHAversion whichSha, /* which SHA algorithm to use */ +int hmac(SHAversion whichSha, /* which SHA algorithm to use */ const unsigned char *text, /* pointer to data stream */ int text_len, /* length of data stream */ const unsigned char *key, /* pointer to authentication key */ @@ -240,11 +245,11 @@ extern int hmac(SHAversion whichSha, /* which SHA algorithm to use */ * for all SHAs. * This interface allows any length of text input to be used. */ -extern int hmacReset(HMACContext *ctx, enum SHAversion whichSha, const unsigned char *key, int key_len); -extern int hmacInput(HMACContext *ctx, const unsigned char *text, int text_len); +int hmacReset(HMACContext *ctx, enum SHAversion whichSha, const unsigned char *key, int key_len); +int hmacInput(HMACContext *ctx, const unsigned char *text, int text_len); -extern int hmacFinalBits(HMACContext *ctx, const uint8_t bits, unsigned int bitcount); -extern int hmacResult(HMACContext *ctx, uint8_t digest[USHAMaxHashSize]); +int hmacFinalBits(HMACContext *ctx, const uint8_t bits, unsigned int bitcount); +int hmacResult(HMACContext *ctx, uint8_t digest[USHAMaxHashSize]); #ifdef __cplusplus diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/shared_util_options.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/shared_util_options.h index 8075e9338..f0a9e5c43 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/shared_util_options.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/shared_util_options.h @@ -42,7 +42,9 @@ extern "C" static STATIC_VAR_UNUSED const char* const OPTION_NET_INT_MAC_ADDRESS = "net_interface_mac_address"; - // DEPRECATED: The underlying security library for your platform will use a secure TLS version + static STATIC_VAR_UNUSED const char* const OPTION_SET_TLS_RENEGOTIATION = "tls_renegotiation"; + + // DEPRECATED: The underlying security library for your platform will use a secure TLS version // that in general should not be overridden with OPTION_TLS_VERSION. static STATIC_VAR_UNUSED const char* const OPTION_TLS_VERSION = "tls_version"; diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/singlylinkedlist.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/singlylinkedlist.h index cdcfbe560..a5c7ae034 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/singlylinkedlist.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/singlylinkedlist.h @@ -5,13 +5,16 @@ #define SINGLYLINKEDLIST_H #ifdef __cplusplus -extern "C" { #else #include "stdbool.h" #endif /* __cplusplus */ #include "umock_c/umock_c_prod.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + typedef struct SINGLYLINKEDLIST_INSTANCE_TAG* SINGLYLINKEDLIST_HANDLE; typedef struct LIST_ITEM_INSTANCE_TAG* LIST_ITEM_HANDLE; diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/socketio.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/socketio.h index 2246ba468..65d85c32f 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/socketio.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/socketio.h @@ -4,15 +4,18 @@ #ifndef SOCKETIO_H #define SOCKETIO_H +#ifdef __cplusplus +#include +#else +#include +#endif /* __cplusplus */ + #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/xlogging.h" #include "umock_c/umock_c_prod.h" #ifdef __cplusplus extern "C" { -#include -#else -#include #endif /* __cplusplus */ typedef struct SOCKETIO_CONFIG_TAG diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/string_token.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/string_token.h index 3a2704a81..d146a782d 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/string_token.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/string_token.h @@ -6,8 +6,6 @@ #ifdef __cplusplus #include -extern "C" -{ #else #include #include @@ -15,6 +13,11 @@ extern "C" #include "umock_c/umock_c_prod.h" +#ifdef __cplusplus +extern "C" +{ +#endif + typedef struct STRING_TOKEN_TAG* STRING_TOKEN_HANDLE; /* diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/string_tokenizer_types.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/string_tokenizer_types.h index 61be9d1f3..1d374d78b 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/string_tokenizer_types.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/string_tokenizer_types.h @@ -4,6 +4,15 @@ #ifndef STRING_TOKENIZER_TYPES_H #define STRING_TOKENIZER_TYPES_H -typedef struct STRING_TOKEN_TAG* STRING_TOKENIZER_HANDLE; +#ifdef __cplusplus +extern "C" +{ +#endif + + typedef struct STRING_TOKEN_TAG* STRING_TOKENIZER_HANDLE; + +#ifdef __cplusplus +} +#endif #endif /*STRING_TOKENIZER_TYPES_H*/ diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/strings.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/strings.h index 814c8a9a0..43a1f8e33 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/strings.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/strings.h @@ -4,15 +4,18 @@ #ifndef STRINGS_H #define STRINGS_H +#ifdef __cplusplus +#include +#else +#include +#endif + #include "umock_c/umock_c_prod.h" #include "azure_c_shared_utility/strings_types.h" #ifdef __cplusplus -#include extern "C" { -#else -#include #endif MOCKABLE_FUNCTION(, STRING_HANDLE, STRING_new); diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/strings_types.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/strings_types.h index 5f0b4f19c..67c4318de 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/strings_types.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/strings_types.h @@ -4,6 +4,15 @@ #ifndef STRINGS_TYPES_H #define STRINGS_TYPES_H -typedef struct STRING_TAG* STRING_HANDLE; +#ifdef __cplusplus +extern "C" +{ +#endif + + typedef struct STRING_TAG* STRING_HANDLE; + +#ifdef __cplusplus +} +#endif #endif /*STRINGS_TYPES_H*/ diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/tickcounter.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/tickcounter.h index ea58438e9..699a339c3 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/tickcounter.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/tickcounter.h @@ -5,14 +5,18 @@ #define TICKCOUNTER_H #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - +#include +#else #include +#endif #include "umock_c/umock_c_prod.h" +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + #if defined(_WIN32) || defined(__MBED__) typedef uint_fast64_t tickcounter_ms_t; // Use 64-bit because of 32-bit is going to roll over back to zero after roughly 49.7 days that is not good for IoT devices which need keep running for months #else diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/uniqueid.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/uniqueid.h index 19dbc6d12..e681322ae 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/uniqueid.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/uniqueid.h @@ -4,17 +4,19 @@ #ifndef UNIQUEID_H #define UNIQUEID_H -#include "azure_macro_utils/macro_utils.h" - #ifdef __cplusplus #include -extern "C" { #else #include #endif +#include "azure_macro_utils/macro_utils.h" #include "umock_c/umock_c_prod.h" +#ifdef __cplusplus +extern "C" { +#endif + #define UNIQUEID_RESULT_VALUES \ UNIQUEID_OK, \ UNIQUEID_INVALID_ARG, \ diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/urlencode.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/urlencode.h index 507316dd7..100d72a80 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/urlencode.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/urlencode.h @@ -5,7 +5,6 @@ #define URLENCODE_H #include "azure_c_shared_utility/strings.h" - #include "umock_c/umock_c_prod.h" #ifdef __cplusplus diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/uuid.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/uuid.h index 656f3f0b2..04bab1760 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/uuid.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/uuid.h @@ -7,7 +7,6 @@ #ifdef __cplusplus #include #include -extern "C" { #else #include #include @@ -16,6 +15,10 @@ extern "C" { #include "umock_c/umock_c_prod.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + typedef unsigned char UUID_T[16]; /* These 2 strings can be conveniently used directly in printf statements diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/vector.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/vector.h index f5dabf474..3ba1fa016 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/vector.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/vector.h @@ -4,40 +4,44 @@ #ifndef VECTOR_H #define VECTOR_H +#ifdef __cplusplus +#include +#else +#include +#include +#endif + #include "azure_c_shared_utility/crt_abstractions.h" #include "umock_c/umock_c_prod.h" #include "azure_c_shared_utility/vector_types.h" #ifdef __cplusplus -#include extern "C" { -#else -#include -#include #endif -/* creation */ -MOCKABLE_FUNCTION(, VECTOR_HANDLE, VECTOR_create, size_t, elementSize); -MOCKABLE_FUNCTION(, VECTOR_HANDLE, VECTOR_move, VECTOR_HANDLE, handle); -MOCKABLE_FUNCTION(, void, VECTOR_destroy, VECTOR_HANDLE, handle); - -/* insertion */ -MOCKABLE_FUNCTION(, int, VECTOR_push_back, VECTOR_HANDLE, handle, const void*, elements, size_t, numElements); +MOCKABLE_INTERFACE(vector, + /* creation */ + FUNCTION(, VECTOR_HANDLE, VECTOR_create, size_t, elementSize), + FUNCTION(, VECTOR_HANDLE, VECTOR_move, VECTOR_HANDLE, handle), + FUNCTION(, void, VECTOR_destroy, VECTOR_HANDLE, handle), -/* removal */ -MOCKABLE_FUNCTION(, void, VECTOR_erase, VECTOR_HANDLE, handle, void*, elements, size_t, numElements); -MOCKABLE_FUNCTION(, void, VECTOR_clear, VECTOR_HANDLE, handle); + /* insertion */ + FUNCTION(, int, VECTOR_push_back, VECTOR_HANDLE, handle, const void*, elements, size_t, numElements), -/* access */ -MOCKABLE_FUNCTION(, void*, VECTOR_element, VECTOR_HANDLE, handle, size_t, index); -MOCKABLE_FUNCTION(, void*, VECTOR_front, VECTOR_HANDLE, handle); -MOCKABLE_FUNCTION(, void*, VECTOR_back, VECTOR_HANDLE, handle); -MOCKABLE_FUNCTION(, void*, VECTOR_find_if, VECTOR_HANDLE, handle, PREDICATE_FUNCTION, pred, const void*, value); + /* removal */ + FUNCTION(, void, VECTOR_erase, VECTOR_HANDLE, handle, void*, elements, size_t, numElements), + FUNCTION(, void, VECTOR_clear, VECTOR_HANDLE, handle), -/* capacity */ -MOCKABLE_FUNCTION(, size_t, VECTOR_size, VECTOR_HANDLE, handle); + /* access */ + FUNCTION(, void*, VECTOR_element, VECTOR_HANDLE, handle, size_t, index), + FUNCTION(, void*, VECTOR_front, VECTOR_HANDLE, handle), + FUNCTION(, void*, VECTOR_back, VECTOR_HANDLE, handle), + FUNCTION(, void*, VECTOR_find_if, VECTOR_HANDLE, handle, PREDICATE_FUNCTION, pred, const void*, value), + /* capacity */ + FUNCTION(, size_t, VECTOR_size, VECTOR_HANDLE, handle) +) #ifdef __cplusplus } #endif diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/vector_types.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/vector_types.h index b3f0759da..6f83750d7 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/vector_types.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/vector_types.h @@ -5,12 +5,15 @@ #define VECTOR_TYPES_H #ifdef __cplusplus -extern "C" -{ #else #include #endif +#ifdef __cplusplus +extern "C" +{ +#endif + typedef struct VECTOR_TAG* VECTOR_HANDLE; typedef bool(*PREDICATE_FUNCTION)(const void* element, const void* value); diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/vector_types_internal.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/vector_types_internal.h index 8b46786ab..9901e4e0d 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/vector_types_internal.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/vector_types_internal.h @@ -10,11 +10,20 @@ #include #endif -typedef struct VECTOR_TAG +#ifdef __cplusplus +extern "C" { - void* storage; - size_t count; - size_t elementSize; -} VECTOR; +#endif + + typedef struct VECTOR_TAG + { + void* storage; + size_t count; + size_t elementSize; + } VECTOR; + +#ifdef __cplusplus +} +#endif #endif /* VECTOR_TYPES_INTERNAL_H */ diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/wsio.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/wsio.h index 3db0e5905..521e49f11 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/wsio.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/wsio.h @@ -4,16 +4,19 @@ #ifndef WSIO_H #define WSIO_H +#ifdef __cplusplus +#include +#else +#include +#include +#endif /* __cplusplus */ + #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/xlogging.h" #include "umock_c/umock_c_prod.h" #ifdef __cplusplus extern "C" { -#include -#else -#include -#include #endif /* __cplusplus */ typedef struct WSIO_CONFIG_TAG diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/xio.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/xio.h index 8483aefcd..1cf53aaca 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/xio.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/xio.h @@ -4,16 +4,19 @@ #ifndef XIO_H #define XIO_H +#ifdef __cplusplus +#include +#else +#include +#endif /* __cplusplus */ + #include "azure_c_shared_utility/optionhandler.h" #include "umock_c/umock_c_prod.h" #include "azure_macro_utils/macro_utils.h" #ifdef __cplusplus -#include extern "C" { -#else -#include #endif /* __cplusplus */ typedef struct XIO_INSTANCE_TAG* XIO_HANDLE; diff --git a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/xlogging.h b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/xlogging.h index 25c08bb04..2b1cf7dd0 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/xlogging.h +++ b/AZ3166/src/system/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/xlogging.h @@ -10,6 +10,8 @@ #include #endif +#include "azure_macro_utils/macro_utils.h" + #include "azure_c_shared_utility/agenttime.h" #include "azure_c_shared_utility/optimize_size.h" @@ -32,11 +34,14 @@ #else #include #endif -extern "C" { #else #include #endif /* __cplusplus */ +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + #ifdef TIZENRT #undef LOG_INFO #endif @@ -69,6 +74,7 @@ typedef void(*LOGGER_LOG_GETLASTERROR)(const char* file, const char* func, int l #define LogInfo(...) #define LogBinary(...) #define LogError(...) +#define LogLastError(...) #define xlogging_get_log_function() NULL #define xlogging_set_log_function(...) #define LogErrorWinHTTPWithGetLastErrorAsString(...) @@ -100,18 +106,13 @@ typedef void(*LOGGER_LOG_GETLASTERROR)(const char* file, const char* func, int l #else /* NOT ESP8266_RTOS */ // In order to make sure that the compiler evaluates the arguments and issues an error if they do not conform to printf -// specifications, we call printf with the format and __VA_ARGS__ but the call is behind an if (0) so that it does -// not actually get executed at runtime +// specifications, we call printf with the format and __VA_ARGS__. Since C && operator is shortcircuiting no actual runtime call to printf is performed. #if defined _MSC_VER #ifndef LOGERROR_CAPTURES_STACK_TRACES // ignore warning C4127 #define LOG(log_category, log_options, format, ...) \ { \ - __pragma(warning(suppress: 4127)) \ - if (0) \ - { \ - (void)printf(format, __VA_ARGS__); \ - } \ + (void)(0 && printf(format, __VA_ARGS__)); \ { \ LOGGER_LOG l = xlogging_get_log_function(); \ if (l != NULL) \ @@ -122,52 +123,59 @@ typedef void(*LOGGER_LOG_GETLASTERROR)(const char* file, const char* func, int l } #else /*LOGERROR_CAPTURES_STACK_TRACES is defined*/ #define STACK_PRINT_FORMAT "\nStack:\n%s" -#define LOG(log_category, log_options, format, ...) \ -{ \ - __pragma(warning(suppress: 4127)) \ - if (0) \ - { \ - (void)printf(format, __VA_ARGS__); \ - } \ - { \ - LOGGER_LOG l = xlogging_get_log_function(); \ - if (l != NULL) \ - { \ - if(log_category == AZ_LOG_ERROR) \ - { \ - char* stackAsString = getStackAsString(); \ - if (stackAsString == NULL) \ - { \ - l(log_category, __FILE__, FUNC_NAME, __LINE__, log_options, format, __VA_ARGS__); \ - } \ - else \ - { \ - size_t formatSize = strlen(format); \ - char* formatWithStack = (char*)logging_malloc(formatSize + sizeof("STACK_PRINT_FORMAT")); \ - if (formatWithStack == NULL) \ - { \ - l(log_category, __FILE__, FUNC_NAME, __LINE__, log_options, format, __VA_ARGS__); \ - } \ - else \ - { \ - (void)memcpy(formatWithStack, format, formatSize); \ - (void)memcpy(formatWithStack + formatSize, STACK_PRINT_FORMAT, sizeof(STACK_PRINT_FORMAT)); \ - l(log_category, __FILE__, FUNC_NAME, __LINE__, log_options, formatWithStack, __VA_ARGS__, stackAsString); \ - logging_free(formatWithStack); \ - } \ - logging_free(stackAsString); \ - } \ - } \ - else \ - { \ - l(log_category, __FILE__, FUNC_NAME, __LINE__, log_options, format, __VA_ARGS__); \ - } \ - } \ - } \ + +#define LOG(log_category, log_options, format, ...) MU_C3(LOG,_,log_category)(log_category, log_options, format, __VA_ARGS__) + +#define LOG_AZ_LOG_ERROR(log_category, log_options, format, ...) \ +{ \ + (void)(0 && printf(format, __VA_ARGS__)); \ + { \ + LOGGER_LOG l = xlogging_get_log_function(); \ + if (l != NULL) \ + { \ + char* stackAsString = getStackAsString(); \ + if (stackAsString == NULL) \ + { \ + l(log_category, __FILE__, FUNC_NAME, __LINE__, log_options, format, __VA_ARGS__); \ + } \ + else \ + { \ + size_t formatSize = strlen(format); \ + char* formatWithStack = (char*)logging_malloc(formatSize + sizeof("STACK_PRINT_FORMAT")); \ + if (formatWithStack == NULL) \ + { \ + l(log_category, __FILE__, FUNC_NAME, __LINE__, log_options, format, __VA_ARGS__); \ + } \ + else \ + { \ + (void)memcpy(formatWithStack, format, formatSize); \ + (void)memcpy(formatWithStack + formatSize, STACK_PRINT_FORMAT, sizeof(STACK_PRINT_FORMAT)); \ + l(log_category, __FILE__, FUNC_NAME, __LINE__, log_options, formatWithStack, __VA_ARGS__, stackAsString); \ + logging_free(formatWithStack); \ + } \ + logging_free(stackAsString); \ + } \ + } \ + } \ } + +#define LOG_AZ_LOG_TRACE LOG_AZ_LOG_INFO + +#define LOG_AZ_LOG_INFO(log_category, log_options, format, ...) \ +{ \ + (void)(0 && printf(format, __VA_ARGS__)); \ + { \ + LOGGER_LOG l = xlogging_get_log_function(); \ + if (l != NULL) \ + { \ + l(log_category, __FILE__, FUNC_NAME, __LINE__, log_options, format, __VA_ARGS__); \ + } \ + } \ +} + #endif /*LOGERROR_CAPTURES_STACK_TRACES*/ #else -#define LOG(log_category, log_options, format, ...) { if (0) { (void)printf(format, ##__VA_ARGS__); } { LOGGER_LOG l = xlogging_get_log_function(); if (l != NULL) l(log_category, __FILE__, FUNC_NAME, __LINE__, log_options, format, ##__VA_ARGS__); } } +#define LOG(log_category, log_options, format, ...) { (void)(0 && printf(format, ##__VA_ARGS__)); { LOGGER_LOG l = xlogging_get_log_function(); if (l != NULL) l(log_category, __FILE__, FUNC_NAME, __LINE__, log_options, format, ##__VA_ARGS__); } } #endif #if defined _MSC_VER diff --git a/AZ3166/src/system/azure-iot-sdk-c/deps/azure-macro-utils-c/inc/azure_macro_utils/macro_utils.h b/AZ3166/src/system/azure-iot-sdk-c/deps/azure-macro-utils-c/inc/azure_macro_utils/macro_utils.h index f020761bf..af1275cca 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/deps/azure-macro-utils-c/inc/azure_macro_utils/macro_utils.h +++ b/AZ3166/src/system/azure-iot-sdk-c/deps/azure-macro-utils-c/inc/azure_macro_utils/macro_utils.h @@ -4,10 +4,6 @@ /*THIS FILE IS GENERATED*/ /*DO NOT EDIT BY HAND!!!*/ /*instead edit macro_utils.tt here: http://www.github.com/azure/azure-macro-utils-c.git */ -/*and then propagate the generated file to all the repos*/ -/* !!! CAUTION!!! This file is copied to multiple places */ -/* in https://github.com/Azure/azure-c-shared-utility.git, */ -/* and all of these copies must be located and replaced. */ @@ -5640,6 +5636,633 @@ X(keep, P1) #define MU_FOR_EACH_1_KEEP_1(MACRO_TO_INVOKE, ...) MU_C2(MU_FOR_EACH_1_KEEP_1_, MU_C2(MU_DEC,MU_C1(MU_COUNT_ARG(__VA_ARGS__)))) ( MACRO_TO_INVOKE, __VA_ARGS__) #endif +#define MU_FOR_EACH_1_KEEP_2_124(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_123(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) + + +#define MU_FOR_EACH_1_KEEP_2_123(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_122(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) + + +#define MU_FOR_EACH_1_KEEP_2_122(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_121(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) + + +#define MU_FOR_EACH_1_KEEP_2_121(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_120(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) + + +#define MU_FOR_EACH_1_KEEP_2_120(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_119(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) + + +#define MU_FOR_EACH_1_KEEP_2_119(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_118(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) + + +#define MU_FOR_EACH_1_KEEP_2_118(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_117(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) + + +#define MU_FOR_EACH_1_KEEP_2_117(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_116(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) + + +#define MU_FOR_EACH_1_KEEP_2_116(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_115(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) + + +#define MU_FOR_EACH_1_KEEP_2_115(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_114(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) + + +#define MU_FOR_EACH_1_KEEP_2_114(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_113(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) + + +#define MU_FOR_EACH_1_KEEP_2_113(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_112(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) + + +#define MU_FOR_EACH_1_KEEP_2_112(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_111(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) + + +#define MU_FOR_EACH_1_KEEP_2_111(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_110(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) + + +#define MU_FOR_EACH_1_KEEP_2_110(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_109(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) + + +#define MU_FOR_EACH_1_KEEP_2_109(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_108(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) + + +#define MU_FOR_EACH_1_KEEP_2_108(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_107(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) + + +#define MU_FOR_EACH_1_KEEP_2_107(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_106(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) + + +#define MU_FOR_EACH_1_KEEP_2_106(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_105(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) + + +#define MU_FOR_EACH_1_KEEP_2_105(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_104(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) + + +#define MU_FOR_EACH_1_KEEP_2_104(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_103(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) + + +#define MU_FOR_EACH_1_KEEP_2_103(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_102(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) + + +#define MU_FOR_EACH_1_KEEP_2_102(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_101(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) + + +#define MU_FOR_EACH_1_KEEP_2_101(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_100(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) + + +#define MU_FOR_EACH_1_KEEP_2_100(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_99(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) + + +#define MU_FOR_EACH_1_KEEP_2_99(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_98(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) + + +#define MU_FOR_EACH_1_KEEP_2_98(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_97(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) + + +#define MU_FOR_EACH_1_KEEP_2_97(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_96(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) + + +#define MU_FOR_EACH_1_KEEP_2_96(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_95(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) + + +#define MU_FOR_EACH_1_KEEP_2_95(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_94(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) + + +#define MU_FOR_EACH_1_KEEP_2_94(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_93(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) + + +#define MU_FOR_EACH_1_KEEP_2_93(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_92(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) + + +#define MU_FOR_EACH_1_KEEP_2_92(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_91(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) + + +#define MU_FOR_EACH_1_KEEP_2_91(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_90(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) + + +#define MU_FOR_EACH_1_KEEP_2_90(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_89(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) + + +#define MU_FOR_EACH_1_KEEP_2_89(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_88(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) + + +#define MU_FOR_EACH_1_KEEP_2_88(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_87(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) + + +#define MU_FOR_EACH_1_KEEP_2_87(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_86(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) + + +#define MU_FOR_EACH_1_KEEP_2_86(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_85(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) + + +#define MU_FOR_EACH_1_KEEP_2_85(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_84(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) + + +#define MU_FOR_EACH_1_KEEP_2_84(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_83(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) + + +#define MU_FOR_EACH_1_KEEP_2_83(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_82(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) + + +#define MU_FOR_EACH_1_KEEP_2_82(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_81(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) + + +#define MU_FOR_EACH_1_KEEP_2_81(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_80(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) + + +#define MU_FOR_EACH_1_KEEP_2_80(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_79(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) + + +#define MU_FOR_EACH_1_KEEP_2_79(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_78(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) + + +#define MU_FOR_EACH_1_KEEP_2_78(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_77(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) + + +#define MU_FOR_EACH_1_KEEP_2_77(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_76(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) + + +#define MU_FOR_EACH_1_KEEP_2_76(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_75(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) + + +#define MU_FOR_EACH_1_KEEP_2_75(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_74(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) + + +#define MU_FOR_EACH_1_KEEP_2_74(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_73(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) + + +#define MU_FOR_EACH_1_KEEP_2_73(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_72(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) + + +#define MU_FOR_EACH_1_KEEP_2_72(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_71(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) + + +#define MU_FOR_EACH_1_KEEP_2_71(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_70(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) + + +#define MU_FOR_EACH_1_KEEP_2_70(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_69(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) + + +#define MU_FOR_EACH_1_KEEP_2_69(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_68(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) + + +#define MU_FOR_EACH_1_KEEP_2_68(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_67(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) + + +#define MU_FOR_EACH_1_KEEP_2_67(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_66(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) + + +#define MU_FOR_EACH_1_KEEP_2_66(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_65(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) + + +#define MU_FOR_EACH_1_KEEP_2_65(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_64(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) + + +#define MU_FOR_EACH_1_KEEP_2_64(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_63(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) + + +#define MU_FOR_EACH_1_KEEP_2_63(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_62(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) + + +#define MU_FOR_EACH_1_KEEP_2_62(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_61(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) + + +#define MU_FOR_EACH_1_KEEP_2_61(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_60(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) + + +#define MU_FOR_EACH_1_KEEP_2_60(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_59(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) + + +#define MU_FOR_EACH_1_KEEP_2_59(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_58(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) + + +#define MU_FOR_EACH_1_KEEP_2_58(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_57(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) + + +#define MU_FOR_EACH_1_KEEP_2_57(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_56(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) + + +#define MU_FOR_EACH_1_KEEP_2_56(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_55(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) + + +#define MU_FOR_EACH_1_KEEP_2_55(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_54(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) + + +#define MU_FOR_EACH_1_KEEP_2_54(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_53(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) + + +#define MU_FOR_EACH_1_KEEP_2_53(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_52(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) + + +#define MU_FOR_EACH_1_KEEP_2_52(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_51(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) + + +#define MU_FOR_EACH_1_KEEP_2_51(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_50(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) + + +#define MU_FOR_EACH_1_KEEP_2_50(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_49(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) + + +#define MU_FOR_EACH_1_KEEP_2_49(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_48(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) + + +#define MU_FOR_EACH_1_KEEP_2_48(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_47(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) + + +#define MU_FOR_EACH_1_KEEP_2_47(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_46(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) + + +#define MU_FOR_EACH_1_KEEP_2_46(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_45(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) + + +#define MU_FOR_EACH_1_KEEP_2_45(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_44(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) + + +#define MU_FOR_EACH_1_KEEP_2_44(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_43(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) + + +#define MU_FOR_EACH_1_KEEP_2_43(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_42(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) + + +#define MU_FOR_EACH_1_KEEP_2_42(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_41(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) + + +#define MU_FOR_EACH_1_KEEP_2_41(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_40(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) + + +#define MU_FOR_EACH_1_KEEP_2_40(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_39(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) + + +#define MU_FOR_EACH_1_KEEP_2_39(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_38(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) + + +#define MU_FOR_EACH_1_KEEP_2_38(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_37(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) + + +#define MU_FOR_EACH_1_KEEP_2_37(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_36(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) + + +#define MU_FOR_EACH_1_KEEP_2_36(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_35(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) + + +#define MU_FOR_EACH_1_KEEP_2_35(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_34(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) + + +#define MU_FOR_EACH_1_KEEP_2_34(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_33(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) + + +#define MU_FOR_EACH_1_KEEP_2_33(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_32(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) + + +#define MU_FOR_EACH_1_KEEP_2_32(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_31(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) + + +#define MU_FOR_EACH_1_KEEP_2_31(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_30(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) + + +#define MU_FOR_EACH_1_KEEP_2_30(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_29(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) + + +#define MU_FOR_EACH_1_KEEP_2_29(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_28(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) + + +#define MU_FOR_EACH_1_KEEP_2_28(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_27(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) + + +#define MU_FOR_EACH_1_KEEP_2_27(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_26(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) + + +#define MU_FOR_EACH_1_KEEP_2_26(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_25(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) + + +#define MU_FOR_EACH_1_KEEP_2_25(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_24(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) + + +#define MU_FOR_EACH_1_KEEP_2_24(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_23(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) + + +#define MU_FOR_EACH_1_KEEP_2_23(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_22(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) + + +#define MU_FOR_EACH_1_KEEP_2_22(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_21(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) + + +#define MU_FOR_EACH_1_KEEP_2_21(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_20(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) + + +#define MU_FOR_EACH_1_KEEP_2_20(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_19(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) + + +#define MU_FOR_EACH_1_KEEP_2_19(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_18(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) + + +#define MU_FOR_EACH_1_KEEP_2_18(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_17(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) + + +#define MU_FOR_EACH_1_KEEP_2_17(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_16(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) + + +#define MU_FOR_EACH_1_KEEP_2_16(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_15(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) + + +#define MU_FOR_EACH_1_KEEP_2_15(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_14(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) + + +#define MU_FOR_EACH_1_KEEP_2_14(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_13(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) + + +#define MU_FOR_EACH_1_KEEP_2_13(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_12(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) + + +#define MU_FOR_EACH_1_KEEP_2_12(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_11(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) + + +#define MU_FOR_EACH_1_KEEP_2_11(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_10(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) + + +#define MU_FOR_EACH_1_KEEP_2_10(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_9(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9, P10) + + +#define MU_FOR_EACH_1_KEEP_2_9(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_8(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8, P9) + + +#define MU_FOR_EACH_1_KEEP_2_8(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_7(X, keep1, keep2, P2, P3, P4, P5, P6, P7, P8) + + +#define MU_FOR_EACH_1_KEEP_2_7(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_6(X, keep1, keep2, P2, P3, P4, P5, P6, P7) + + +#define MU_FOR_EACH_1_KEEP_2_6(X, keep1, keep2, P1, P2, P3, P4, P5, P6) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_5(X, keep1, keep2, P2, P3, P4, P5, P6) + + +#define MU_FOR_EACH_1_KEEP_2_5(X, keep1, keep2, P1, P2, P3, P4, P5) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_4(X, keep1, keep2, P2, P3, P4, P5) + + +#define MU_FOR_EACH_1_KEEP_2_4(X, keep1, keep2, P1, P2, P3, P4) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_3(X, keep1, keep2, P2, P3, P4) + + +#define MU_FOR_EACH_1_KEEP_2_3(X, keep1, keep2, P1, P2, P3) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_2(X, keep1, keep2, P2, P3) + + +#define MU_FOR_EACH_1_KEEP_2_2(X, keep1, keep2, P1, P2) \ +X(keep1, keep2, P1) \ +MU_FOR_EACH_1_KEEP_2_1(X, keep1, keep2, P2) + + + +#define MU_FOR_EACH_1_KEEP_2_1(X, keep1, keep2, P1) \ +X(keep1, keep2, P1) + +#define MU_FOR_EACH_1_KEEP_2_0(...) + +#ifdef _MSC_VER +#define MU_FOR_EACH_1_KEEP_2(MACRO_TO_INVOKE, ...) MU_C2(MU_FOR_EACH_1_KEEP_2_, MU_C2(MU_DEC,MU_C2(MU_DEC,MU_C1(MU_COUNT_ARG(__VA_ARGS__))))) MU_LPAREN MACRO_TO_INVOKE, __VA_ARGS__) +#else +#define MU_FOR_EACH_1_KEEP_2(MACRO_TO_INVOKE, ...) MU_C2(MU_FOR_EACH_1_KEEP_2_, MU_C2(MU_DEC,MU_C2(MU_DEC,MU_C1(MU_COUNT_ARG(__VA_ARGS__))))) ( MACRO_TO_INVOKE, __VA_ARGS__) +#endif + #define MU_FOR_EACH_2_KEEP_1_124(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(keep, P1, P2) \ MU_FOR_EACH_2_KEEP_1_122(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) @@ -12682,7 +13305,6 @@ MACRO(1024, __VA_ARGS__) \ MU_DO_1023(MACRO, __VA_ARGS__) - #define MU_DO(TIMES, MACRO, ...) MU_C2(MU_DO_, TIMES)(MACRO, __VA_ARGS__) @@ -12711,19 +13333,22 @@ MU_IF(X, "true", "false") => "true" #define MU_EAT_EMPTY_ARGS(...) MU_FOR_EACH_1_COUNTED(MU_EAT_EMPTY_ARG, __VA_ARGS__) #define MU_DEFINE_ENUMERATION_CONSTANT(x) x, -/*MU_DEFINE_ENUM goes to header*/ -#define MU_DEFINE_ENUM(enumName, ...) typedef enum MU_C2(enumName, _TAG) { MU_FOR_EACH_1(MU_DEFINE_ENUMERATION_CONSTANT, __VA_ARGS__)} enumName; \ +/*MU_DEFINE_ENUM_WITHOUT_INVALID goes to header*/ +#define MU_DEFINE_ENUM_WITHOUT_INVALID(enumName, ...) typedef enum MU_C2(enumName, _TAG) { MU_FOR_EACH_1(MU_DEFINE_ENUMERATION_CONSTANT, __VA_ARGS__)} enumName; \ extern const char* MU_C2(enumName,Strings)(enumName value); \ extern int MU_C2(enumName, _FromString)(const char* enumAsString, enumName* destination); +// this macro is a wrapper on top of MU_DEFINE_ENUM_WITHOUT_INVALID, adding an _INVALID value as the first enum value in the enum +#define MU_DEFINE_ENUM(enumName, ...) \ + MU_DEFINE_ENUM_WITHOUT_INVALID(enumName, MU_C2(enumName, _INVALID), __VA_ARGS__) #define MU_DEFINE_ENUMERATION_CONSTANT_AS_WIDESTRING(x) MU_C2(L, MU_TOSTRING(x)) , #define MU_DEFINE_ENUMERATION_CONSTANT_AS_STRING(x) MU_TOSTRING(x) , -/*MU_DEFINE_ENUM_STRINGS goes to .c*/ -#define MU_DEFINE_ENUM_STRINGS(enumName, ...) const char* MU_C2(enumName, StringStorage)[MU_COUNT_ARG(__VA_ARGS__)] = {MU_FOR_EACH_1(MU_DEFINE_ENUMERATION_CONSTANT_AS_STRING, __VA_ARGS__)}; \ -const char* MU_C2(enumName,Strings)(enumName value) \ +/*MU_DEFINE_ENUM_STRINGS_WITHOUT_INVALID goes to .c*/ +#define MU_DEFINE_ENUM_STRINGS_WITHOUT_INVALID(enumName, ...) const char* MU_C2(enumName, StringStorage)[MU_COUNT_ARG(__VA_ARGS__)] = {MU_FOR_EACH_1(MU_DEFINE_ENUMERATION_CONSTANT_AS_STRING, __VA_ARGS__)}; \ +const char* MU_C2(enumName,Strings)(enumName value) \ { \ - if((int)value>=MU_COUNT_ARG(__VA_ARGS__)) \ + if((int)value<0 || (int)value>=MU_COUNT_ARG(__VA_ARGS__)) \ { \ /*this is an error case*/ \ return "NULL"; \ @@ -12756,9 +13381,13 @@ int MU_C2(enumName, _FromString)(const char* enumAsString, enumName* destination } \ } \ -#define MU_DEFINE_LOCAL_ENUM(enumName, ...) typedef enum MU_C2(enumName, _TAG) { MU_FOR_EACH_1(MU_DEFINE_ENUMERATION_CONSTANT, __VA_ARGS__)} enumName; \ +// this macro is a wrapper on top of MU_DEFINE_ENUM_STRINGS_WITHOUT_INVALID, adding an _INVALID value as the first enum value in the enum +#define MU_DEFINE_ENUM_STRINGS(enumName, ...) \ + MU_DEFINE_ENUM_STRINGS_WITHOUT_INVALID(enumName, MU_C2(enumName, _INVALID), __VA_ARGS__) + +#define MU_DEFINE_LOCAL_ENUM_WITHOUT_INVALID(enumName, ...) typedef enum MU_C2(enumName, _TAG) { MU_FOR_EACH_1(MU_DEFINE_ENUMERATION_CONSTANT, __VA_ARGS__)} enumName; \ static const char* MU_C2(enumName, StringStorage)[MU_COUNT_ARG(__VA_ARGS__)] = {MU_FOR_EACH_1(MU_DEFINE_ENUMERATION_CONSTANT_AS_STRING, __VA_ARGS__)}; \ -static const char* MU_C2(enumName,Strings)(enumName value) \ +static const char* MU_C2(enumName,Strings)(enumName value) \ { \ if((int)value<0 || (int)value>=MU_COUNT_ARG(__VA_ARGS__)) \ { \ @@ -12771,6 +13400,15 @@ static const char* MU_C2(enumName,Strings)(enumName value) \ } \ } +// this macro is a wrapper on top of MU_DEFINE_LOCAL_ENUM_WITHOUT_INVALID, adding an _INVALID value as the first enum value in the enum +#define MU_DEFINE_LOCAL_ENUM(enumName, ...) \ + MU_DEFINE_LOCAL_ENUM_WITHOUT_INVALID(enumName, MU_C2(enumName, _INVALID), __VA_ARGS__) + +// this macro returns the number of enum values (taking into account that an invalid value is generated) +#define MU_ENUM_VALUE_COUNT(...) (MU_COUNT_ARG(__VA_ARGS__) + 1) + +// this macro returns the number of enum 2 values (taking into account that an invalid value is generated) +#define MU_ENUM_2_VALUE_COUNT(...) ((MU_COUNT_ARG(__VA_ARGS__) / 2) + 1) #define MU_ENUM_TO_STRING(enumName, enumValue) MU_C2(enumName, Strings)(enumValue) #define MU_STRING_TO_ENUM(stringValue, enumName, addressOfEnumVariable) MU_C2(enumName, _FromString)(stringValue, addressOfEnumVariable) @@ -12780,11 +13418,15 @@ static const char* MU_C2(enumName,Strings)(enumName value) \ #define MU_DEFINE_ENUMERATION_CONSTANT_2(enumerationConstant, constantExpression) enumerationConstant = constantExpression, -#define MU_DECLARE_ENUM_STRINGS_2(enumIdentifier, ...) extern const char* MU_C2(enumIdentifier,_ToString)(enumIdentifier enumerationConstant); +#define MU_DECLARE_ENUM_STRINGS_2(enumIdentifier, ...) extern const char* MU_C3(MU_, enumIdentifier,_ToString)(enumIdentifier enumerationConstant); -#define MU_DEFINE_ENUM_2(enumIdentifier, ... ) typedef enum MU_C2(enumIdentifier, _TAG) {MU_FOR_EACH_2(MU_DEFINE_ENUMERATION_CONSTANT_2, __VA_ARGS__)} enumIdentifier; \ +#define MU_DEFINE_ENUM_2_WITHOUT_INVALID(enumIdentifier, ... ) typedef enum MU_C2(enumIdentifier, _TAG) {MU_FOR_EACH_2(MU_DEFINE_ENUMERATION_CONSTANT_2, __VA_ARGS__)} enumIdentifier; \ MU_DECLARE_ENUM_STRINGS_2(enumIdentifier, __VA_ARGS__) +// this macro is a wrapper on top of MU_DEFINE_ENUM, adding an _INVALID value as the first enum value in the enum +#define MU_DEFINE_ENUM_2(enumName, ...) \ + MU_DEFINE_ENUM_2_WITHOUT_INVALID(enumName, MU_C2(enumName, _INVALID), (int)0xDDDDDDDD, __VA_ARGS__) + typedef struct ENUM_VALUE_AND_STRING_TAG { int value; @@ -12793,7 +13435,7 @@ typedef struct ENUM_VALUE_AND_STRING_TAG #define MU_DEFINE_ENUM_VALUE_AND_STRING(enumerationConstant, constantExpression) {enumerationConstant, MU_TOSTRING(enumerationConstant)}, #define MU_DEFINE_ENUM_STRINGS_2(enumIdentifier, ... ) static const ENUM_VALUE_AND_STRING MU_C2(enumIdentifier, _ValuesAndStrings)[MU_DIV2(MU_COUNT_ARG(__VA_ARGS__))] ={MU_FOR_EACH_2(MU_DEFINE_ENUM_VALUE_AND_STRING, __VA_ARGS__)}; \ -const char* MU_C2(enumIdentifier,_ToString)(enumIdentifier value) \ +const char* MU_C3(MU_, enumIdentifier,_ToString)(enumIdentifier value) \ { \ for(size_t i=0;i -extern "C" { #else #include #endif +#include "azure_macro_utils/macro_utils.h" +#include "umock_c/umockcallrecorder.h" + /* Define UMOCK_STATIC to static to make mocks private to compilation unit */ #ifndef UMOCK_STATIC #define UMOCK_STATIC @@ -92,14 +91,22 @@ typedef void(*ON_UMOCK_C_ERROR)(UMOCK_C_ERROR_CODE error_code); (void)value; \ } \ -extern void umock_c_indicate_error(UMOCK_C_ERROR_CODE error_code); -extern int umock_c_init(ON_UMOCK_C_ERROR on_umock_c_error); -extern void umock_c_deinit(void); -extern void umock_c_reset_all_calls(void); -extern const char* umock_c_get_actual_calls(void); -extern const char* umock_c_get_expected_calls(void); -extern UMOCKCALLRECORDER_HANDLE umock_c_get_call_recorder(void); -extern int umock_c_set_call_recorder(UMOCKCALLRECORDER_HANDLE umockc_call_recorder); +#ifdef __cplusplus +extern "C" { +#endif + +void umock_c_indicate_error(UMOCK_C_ERROR_CODE error_code); +int umock_c_init(ON_UMOCK_C_ERROR on_umock_c_error); +void umock_c_deinit(void); +void umock_c_reset_all_calls(void); +const char* umock_c_get_actual_calls(void); +const char* umock_c_get_expected_calls(void); +UMOCKCALLRECORDER_HANDLE umock_c_get_call_recorder(void); +int umock_c_set_call_recorder(UMOCKCALLRECORDER_HANDLE umockc_call_recorder); + +#ifdef __cplusplus +} +#endif /* Codes_SRS_UMOCK_C_LIB_01_065: [REGISTER_UMOCK_VALUE_TYPE shall register the type identified by value_type to be usable by umock_c for argument and return types and instruct umock_c which functions to use for getting the stringify, are_equal, copy and free.]*/ /* Codes_SRS_UMOCK_C_LIB_01_197: [ If REGISTER_UMOCK_VALUE_TYPE fails, the on_error callback shall be called with UMOCK_C_REGISTER_TYPE_FAILED. ]*/ @@ -141,8 +148,4 @@ extern int umock_c_set_call_recorder(UMOCKCALLRECORDER_HANDLE umockc_call_record #include "umock_c/umock_c_internal.h" #include "umock_c/umock_c_prod.h" -#ifdef __cplusplus -} -#endif - #endif /* UMOCK_C_H */ diff --git a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umock_c_internal.h b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umock_c_internal.h index b8d784fb8..d3ee8c2e0 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umock_c_internal.h +++ b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umock_c_internal.h @@ -4,6 +4,14 @@ #ifndef UMOCK_C_INTERNAL_H #define UMOCK_C_INTERNAL_H +#ifdef __cplusplus +#include +#include +#else +#include +#include +#endif + #include "azure_macro_utils/macro_utils.h" #include "umock_c/umocktypes.h" #include "umock_c/umockcall.h" @@ -15,19 +23,24 @@ #include "umock_c/umockstring.h" #include "umock_c/umockautoignoreargs.h" -#ifdef __cplusplus -#include -extern "C" { +#ifdef _MSC_VER +#define UMOCK_C_WEAK +#elif __GNUC__ +// GCC needs weak for the reals +#define UMOCK_C_WEAK __attribute__ ((weak)) #else -#include +// at the mercy of that compiler +#define UMOCK_C_WEAK #endif -#include +#ifdef __cplusplus +extern "C" { +#endif -extern void umock_c_indicate_error(UMOCK_C_ERROR_CODE error_code); -extern UMOCKCALL_HANDLE umock_c_get_last_expected_call(void); -extern int umock_c_add_expected_call(UMOCKCALL_HANDLE mock_call); -extern int umock_c_add_actual_call(UMOCKCALL_HANDLE mock_call, UMOCKCALL_HANDLE* matched_call); +void umock_c_indicate_error(UMOCK_C_ERROR_CODE error_code); +UMOCKCALL_HANDLE umock_c_get_last_expected_call(void); +int umock_c_add_expected_call(UMOCKCALL_HANDLE mock_call); +int umock_c_add_actual_call(UMOCKCALL_HANDLE mock_call, UMOCKCALL_HANDLE* matched_call); typedef struct ARG_BUFFER_TAG { @@ -899,7 +912,7 @@ typedef int(*TRACK_DESTROY_FUNC_TYPE)(PAIRED_HANDLES* paired_handles, const void typedef struct MU_C2(_mock_call_modifier_, name) (*MU_C2(validate_one_argument_func_type_, name))(void); #define COPY_RETURN_VALUE(return_type, name) \ - result = MU_C2(get_mock_call_return_values_, name)()->success_value; + result_C8417226_7442_49B4_BBB9_9CA816A21EB7 = MU_C2(get_mock_call_return_values_, name)()->success_value; typedef struct MOCK_CALL_ARG_METADATA_TAG { @@ -972,6 +985,7 @@ typedef struct MOCK_CALL_METADATA_TAG /* Codes_SRS_UMOCK_C_LIB_01_188: [ The create call shall have a non-void return type. ]*/ #define MOCKABLE_FUNCTION_UMOCK_INTERNAL_WITH_MOCK_NO_CODE(do_returns, return_type, name, ...) \ typedef return_type (*MU_C2(mock_hook_func_type_, name))(MU_IF(MU_COUNT_ARG(__VA_ARGS__),,void) MU_FOR_EACH_2_COUNTED(ARG_IN_SIGNATURE, __VA_ARGS__)); \ + return_type MU_C2(real_, name)(MU_IF(MU_COUNT_ARG(__VA_ARGS__),,void) MU_FOR_EACH_2_COUNTED(ARG_IN_SIGNATURE, __VA_ARGS__)) UMOCK_C_WEAK; \ static MU_C2(mock_hook_func_type_,name) MU_C2(mock_hook_,name) = NULL; \ static TRACK_CREATE_FUNC_TYPE MU_C2(track_create_destroy_pair_malloc_,name) = NULL; \ static TRACK_DESTROY_FUNC_TYPE MU_C2(track_create_destroy_pair_free_,name) = NULL; \ @@ -1000,7 +1014,7 @@ typedef struct MOCK_CALL_METADATA_TAG } \ ) \ ,) \ -typedef struct MU_C2(_mock_call_modifier_,name) (*MU_C2(set_return_func_type_,name))(return_type return_value); \ + typedef struct MU_C2(_mock_call_modifier_,name) (*MU_C2(set_return_func_type_,name))(return_type return_value); \ typedef struct MU_C2(_mock_call_modifier_,name) (*MU_C2(set_fail_return_func_type_,name))(return_type return_value); \ typedef struct MU_C2(_mock_call_modifier_,name) (*MU_C2(call_cannot_fail_func_type_,name))(void); \ typedef struct MU_C2(_mock_call_modifier_,name) (*MU_C2(capture_return_func_type_,name))(return_type* captured_return_value);,) \ @@ -1251,13 +1265,16 @@ typedef struct MU_C2(_mock_call_modifier_,name) (*MU_C2(set_return_func_type_,na UMOCKCALL_HANDLE mock_call; \ UMOCKCALL_HANDLE matched_call; \ MU_IF(IS_NOT_VOID(return_type), \ - unsigned int result_value_set = 0; \ - unsigned int fail_result_value_set = 0; \ - void* captured_return_value = NULL;,) \ - MU_IF(IS_NOT_VOID(return_type),TRACK_CREATE_FUNC_TYPE track_create_destroy_pair_malloc_local = MU_C2(track_create_destroy_pair_malloc_,name); \ - PAIRED_HANDLES* used_paired_handles_local = MU_C2(used_paired_handles_,name); \ - const char* return_type_string =MU_TOSTRING(return_type);,) \ - MU_IF(IS_NOT_VOID(return_type),return_type result = MU_C2(get_mock_call_return_values_,name)()->success_value;,) \ + unsigned int result_value_set_C8417226_7442_49B4_BBB9_9CA816A21EB7 = 0; \ + unsigned int fail_result_value_set_C8417226_7442_49B4_BBB9_9CA816A21EB7 = 0; \ + void* captured_return_value_C8417226_7442_49B4_BBB9_9CA816A21EB7 = NULL;,) \ + MU_IF(IS_NOT_VOID(return_type),TRACK_CREATE_FUNC_TYPE track_create_destroy_pair_malloc_local_C8417226_7442_49B4_BBB9_9CA816A21EB7 = MU_C2(track_create_destroy_pair_malloc_,name); \ + PAIRED_HANDLES* used_paired_handles_local_C8417226_7442_49B4_BBB9_9CA816A21EB7 = MU_C2(used_paired_handles_,name); \ + const char* return_type_string_C8417226_7442_49B4_BBB9_9CA816A21EB7 = MU_TOSTRING(return_type); \ + (void)return_type_string_C8417226_7442_49B4_BBB9_9CA816A21EB7; \ + (void)track_create_destroy_pair_malloc_local_C8417226_7442_49B4_BBB9_9CA816A21EB7; \ + (void)used_paired_handles_local_C8417226_7442_49B4_BBB9_9CA816A21EB7;,) \ + MU_IF(IS_NOT_VOID(return_type),return_type result_C8417226_7442_49B4_BBB9_9CA816A21EB7 = MU_C2(get_mock_call_return_values_,name)()->success_value;,) \ MU_C2(mock_call_,name)* matched_call_data; \ MU_C2(mock_call_,name)* mock_call_data = (MU_C2(mock_call_,name)*)umockalloc_malloc(sizeof(MU_C2(mock_call_,name))); \ MU_FOR_EACH_2(COPY_ARG_TO_MOCK_STRUCT, __VA_ARGS__) \ @@ -1294,31 +1311,31 @@ typedef struct MU_C2(_mock_call_modifier_,name) (*MU_C2(set_return_func_type_,na } \ MU_IF(IS_NOT_VOID(return_type),if (matched_call_data != NULL) \ { \ - captured_return_value = (void*)matched_call_data->captured_return_value; \ + captured_return_value_C8417226_7442_49B4_BBB9_9CA816A21EB7 = (void*)matched_call_data->captured_return_value; \ if (umockcall_get_fail_call(matched_call)) \ { \ if (matched_call_data->fail_return_value_set == FAIL_RETURN_VALUE_SET) \ { \ - result = matched_call_data->fail_return_value; \ + result_C8417226_7442_49B4_BBB9_9CA816A21EB7 = matched_call_data->fail_return_value; \ } \ else \ { \ - result = MU_C2(get_mock_call_return_values_, name)()->failure_value; \ + result_C8417226_7442_49B4_BBB9_9CA816A21EB7 = MU_C2(get_mock_call_return_values_, name)()->failure_value; \ } \ - result_value_set = 1; \ - fail_result_value_set = 1; \ + result_value_set_C8417226_7442_49B4_BBB9_9CA816A21EB7 = 1; \ + fail_result_value_set_C8417226_7442_49B4_BBB9_9CA816A21EB7 = 1; \ } \ else if (matched_call_data->return_value_set == RETURN_VALUE_SET) \ { \ - result = matched_call_data->return_value; \ - result_value_set = 1; \ + result_C8417226_7442_49B4_BBB9_9CA816A21EB7 = matched_call_data->return_value; \ + result_value_set_C8417226_7442_49B4_BBB9_9CA816A21EB7 = 1; \ } \ else \ { \ if (MU_C2(mock_hook_, name) != NULL) \ { \ - MU_IF(IS_NOT_VOID(return_type),result =,) MU_C2(mock_hook_, name)(MU_FOR_EACH_2_COUNTED(ARG_NAME_ONLY_IN_CALL, __VA_ARGS__)); \ - MU_IF(IS_NOT_VOID(return_type),result_value_set = 1;,) \ + MU_IF(IS_NOT_VOID(return_type),result_C8417226_7442_49B4_BBB9_9CA816A21EB7 =,) MU_C2(mock_hook_, name)(MU_FOR_EACH_2_COUNTED(ARG_NAME_ONLY_IN_CALL, __VA_ARGS__)); \ + MU_IF(IS_NOT_VOID(return_type),result_value_set_C8417226_7442_49B4_BBB9_9CA816A21EB7 = 1;,) \ } \ } \ }, \ @@ -1333,8 +1350,8 @@ typedef struct MU_C2(_mock_call_modifier_,name) (*MU_C2(set_return_func_type_,na { \ if (MU_C2(mock_hook_, name) != NULL) \ { \ - MU_IF(IS_NOT_VOID(return_type),result =,) MU_C2(mock_hook_, name)(MU_FOR_EACH_2_COUNTED(ARG_NAME_ONLY_IN_CALL, __VA_ARGS__)); \ - MU_IF(IS_NOT_VOID(return_type),result_value_set = 1;,) \ + MU_IF(IS_NOT_VOID(return_type),result_C8417226_7442_49B4_BBB9_9CA816A21EB7 =,) MU_C2(mock_hook_, name)(MU_FOR_EACH_2_COUNTED(ARG_NAME_ONLY_IN_CALL, __VA_ARGS__)); \ + MU_IF(IS_NOT_VOID(return_type),result_value_set_C8417226_7442_49B4_BBB9_9CA816A21EB7 = 1;,) \ } \ } \ } \ @@ -1346,7 +1363,7 @@ typedef struct MU_C2(_mock_call_modifier_,name) (*MU_C2(set_return_func_type_,na umock_c_indicate_error(UMOCK_C_ERROR); \ } \ },) \ - { + { \ #define UMOCK_GENERATE_DEFAULT_RETURNS(success_return_value, failure_return_value) \ = { success_return_value, failure_return_value }; \ @@ -1366,23 +1383,23 @@ typedef struct MU_C2(_mock_call_modifier_,name) (*MU_C2(set_return_func_type_,na MOCKABLE_FUNCTION_UMOCK_INTERNAL_WITH_MOCK_NO_CODE(do_returns, return_type, name, __VA_ARGS__) \ MOCKABLE_FUNCTION_BODY_WITHOUT_RETURN(modifiers, return_type, name, __VA_ARGS__) \ MU_IF(IS_NOT_VOID(return_type), \ - if (result_value_set == 0) \ + if (result_value_set_C8417226_7442_49B4_BBB9_9CA816A21EB7 == 0) \ { \ COPY_RETURN_VALUE(return_type, name) \ }; \ - if (captured_return_value != NULL) \ + if (captured_return_value_C8417226_7442_49B4_BBB9_9CA816A21EB7 != NULL) \ { \ - (void)memcpy(captured_return_value, (void*)&result, sizeof(result)); \ + (void)memcpy(captured_return_value_C8417226_7442_49B4_BBB9_9CA816A21EB7, (void*)&result_C8417226_7442_49B4_BBB9_9CA816A21EB7, sizeof(result_C8417226_7442_49B4_BBB9_9CA816A21EB7)); \ } \ - if ((track_create_destroy_pair_malloc_local != NULL) && (fail_result_value_set == 0)) \ + if ((track_create_destroy_pair_malloc_local_C8417226_7442_49B4_BBB9_9CA816A21EB7 != NULL) && (fail_result_value_set_C8417226_7442_49B4_BBB9_9CA816A21EB7 == 0)) \ { \ - if (track_create_destroy_pair_malloc_local(used_paired_handles_local, (const void*)&result, return_type_string, sizeof(result)) != 0) \ + if (track_create_destroy_pair_malloc_local_C8417226_7442_49B4_BBB9_9CA816A21EB7(used_paired_handles_local_C8417226_7442_49B4_BBB9_9CA816A21EB7, (const void*)&result_C8417226_7442_49B4_BBB9_9CA816A21EB7, return_type_string_C8417226_7442_49B4_BBB9_9CA816A21EB7, sizeof(result_C8417226_7442_49B4_BBB9_9CA816A21EB7)) != 0) \ { \ UMOCK_LOG("Could not track the create call for %s.", MU_TOSTRING(name)); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ } \ - return result;,) \ + return result_C8417226_7442_49B4_BBB9_9CA816A21EB7;,) \ } \ } \ MU_IF(IS_NOT_VOID(return_type), \ @@ -1399,31 +1416,41 @@ typedef struct MU_C2(_mock_call_modifier_,name) (*MU_C2(set_return_func_type_,na MOCKABLE_FUNCTION_UMOCK_INTERNAL_WITH_MOCK_NO_CODE(0, return_type, name, __VA_ARGS__) \ MOCKABLE_FUNCTION_BODY_WITHOUT_RETURN(modifiers, return_type, name, __VA_ARGS__) \ +#define MOCKABLE_FUNCTION_INTERNAL_WITH_CODE(modifiers, return_type, name, ...) \ + MOCKABLE_FUNCTION_UMOCK_INTERNAL_WITH_MOCK_NO_CODE(0, return_type, name, __VA_ARGS__) \ + MOCKABLE_FUNCTION_BODY_WITHOUT_RETURN(modifiers, return_type, name, __VA_ARGS__) \ + MU_IF(IS_NOT_VOID(return_type), if (result_value_set_C8417226_7442_49B4_BBB9_9CA816A21EB7 == 0),) \ + { \ + /* Codes_SRS_UMOCK_C_LIB_01_188: [ The create call shall have a non-void return type. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_191: [ At each create_call a memory block shall be allocated so that it can be reported as a leak by any memory checker. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_192: [ If any error occurs during the create_call related then umock_c shall raise an error with the code UMOCK_C_ERROR. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_204: [ Tracking of paired calls shall not be done if the actual call to the create_call is using the SetFailReturn call modifier. ]*/ #define MOCK_FUNCTION_END(...) \ - MU_IF(MU_COUNT_ARG(__VA_ARGS__), if (result_value_set == 0) \ + MU_IF(MU_COUNT_ARG(__VA_ARGS__), if (result_value_set_C8417226_7442_49B4_BBB9_9CA816A21EB7 == 0) \ { \ - result = __VA_ARGS__; \ + result_C8417226_7442_49B4_BBB9_9CA816A21EB7 = __VA_ARGS__; \ }; \ - if (captured_return_value != NULL) \ + if (captured_return_value_C8417226_7442_49B4_BBB9_9CA816A21EB7 != NULL) \ { \ - (void)memcpy(captured_return_value, (void*)&result, sizeof(result)); \ + (void)memcpy(captured_return_value_C8417226_7442_49B4_BBB9_9CA816A21EB7, (void*)&result_C8417226_7442_49B4_BBB9_9CA816A21EB7, sizeof(result_C8417226_7442_49B4_BBB9_9CA816A21EB7)); \ } \ - if ((track_create_destroy_pair_malloc_local != NULL) && (fail_result_value_set == 0)) \ + if ((track_create_destroy_pair_malloc_local_C8417226_7442_49B4_BBB9_9CA816A21EB7 != NULL) && (fail_result_value_set_C8417226_7442_49B4_BBB9_9CA816A21EB7 == 0)) \ { \ - if (track_create_destroy_pair_malloc_local(used_paired_handles_local, (const void*)&result, return_type_string, sizeof(result)) != 0) \ + if (track_create_destroy_pair_malloc_local_C8417226_7442_49B4_BBB9_9CA816A21EB7(used_paired_handles_local_C8417226_7442_49B4_BBB9_9CA816A21EB7, (const void*)&result_C8417226_7442_49B4_BBB9_9CA816A21EB7, return_type_string_C8417226_7442_49B4_BBB9_9CA816A21EB7, sizeof(result_C8417226_7442_49B4_BBB9_9CA816A21EB7)) != 0) \ { \ UMOCK_LOG("Could not track the create call for %s.", MU_TOSTRING(name)); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ } \ - return result;,) \ + return result_C8417226_7442_49B4_BBB9_9CA816A21EB7;,) \ } \ } +#define MOCKABLE_FUNCTION_END(...) \ + } \ + MOCK_FUNCTION_END(__VA_ARGS__) + /* Codes_SRS_UMOCK_C_LIB_01_187: [ REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS shall register with umock two calls that are expected to be paired. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_190: [ If create_call or destroy_call do not obey these rules, at the time of calling REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS umock_c shall raise an error with the code UMOCK_C_INVALID_PAIRED_CALLS. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_189: [ The destroy call shall take as argument at least one argument. The type of the first argument shall be of the same type as the return type for the create_call. ]*/ @@ -1442,6 +1469,14 @@ typedef struct MU_C2(_mock_call_modifier_,name) (*MU_C2(set_return_func_type_,na MU_C2(used_paired_handles_, destroy_call) = &MU_C2(paired_handles_, create_call); \ } +/* Codes_SRS_UMOCK_C_LIB_01_219: [ REGISTER_GLOBAL_INTERFACE_HOOKS shall register as mock hooks the real functions for all the functions in a mockable interface. ]*/ +#define REGISTER_GLOBAL_INTERFACE_HOOKS(interface_name) \ + MU_C2(register_reals_, interface_name)() + +/* Codes_SRS_UMOCK_C_LIB_01_220: [ UMOCK_REAL shall produce the name of the real function generated by umock. ]*/ +#define UMOCK_REAL(function_name) \ + MU_C2(real_, function_name) + #ifdef __cplusplus } #endif diff --git a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umock_c_negative_tests.h b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umock_c_negative_tests.h index 36503eaa8..9ddc06634 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umock_c_negative_tests.h +++ b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umock_c_negative_tests.h @@ -6,18 +6,21 @@ #ifdef __cplusplus #include -extern "C" { #else #include #endif - extern int umock_c_negative_tests_init(void); - extern void umock_c_negative_tests_deinit(void); - extern void umock_c_negative_tests_snapshot(void); - extern void umock_c_negative_tests_reset(void); - extern void umock_c_negative_tests_fail_call(size_t index); - extern size_t umock_c_negative_tests_call_count(void); - extern int umock_c_negative_tests_can_call_fail(size_t index); +#ifdef __cplusplus +extern "C" { +#endif + + int umock_c_negative_tests_init(void); + void umock_c_negative_tests_deinit(void); + void umock_c_negative_tests_snapshot(void); + void umock_c_negative_tests_reset(void); + void umock_c_negative_tests_fail_call(size_t index); + size_t umock_c_negative_tests_call_count(void); + int umock_c_negative_tests_can_call_fail(size_t index); #ifdef __cplusplus } diff --git a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umock_c_prod.h b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umock_c_prod.h index d52ca9051..9288f4a97 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umock_c_prod.h +++ b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umock_c_prod.h @@ -1,8 +1,14 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#include "azure_macro_utils/macro_utils.h" + #undef MOCKABLE_FUNCTION #undef MOCKABLE_FUNCTION_WITH_RETURNS +#undef MOCKABLE_FUNCTION_WITH_CODE +#undef MOCKABLE_FUNCTION_WITH_CODE_END +#undef IMPLEMENT_MOCKABLE_FUNCTION +#undef MOCKABLE_INTERFACE /* This header is meant to be included by production code headers, so that the MOCKABLE_FUNCTION gets enabled. */ /* @@ -26,10 +32,11 @@ #define ENABLE_MOCK_FILTERING_SWITCH 0 #endif -#include "azure_macro_utils/macro_utils.h" - #define UMOCK_C_PROD_ARG_IN_SIGNATURE(count, arg_type, arg_name) arg_type arg_name MU_IFCOMMA(count) +#define MOCKABLE_FUNCTION_SIGNATURE(modifiers, result, function, ...) \ + result modifiers function(MU_IF(MU_COUNT_ARG(__VA_ARGS__),,void) MU_FOR_EACH_2_COUNTED(UMOCK_C_PROD_ARG_IN_SIGNATURE, __VA_ARGS__)) + #define MOCKABLE_FUNCTION_DISABLED(do_returns, modifiers, result, function, ...) \ result modifiers function(MU_IF(MU_COUNT_ARG(__VA_ARGS__), , void) MU_FOR_EACH_2_COUNTED(UMOCK_C_PROD_ARG_IN_SIGNATURE, __VA_ARGS__)); \ MU_IF(do_returns, MU_IF(UMOCK_C_PROD_IS_NOT_VOID(result), DO_NOTHING_WITH_RETURN_VALUES,), ) @@ -38,28 +45,79 @@ #define MOCKABLE_FUNCTION(modifiers, result, function, ...) \ MU_IF(ENABLE_MOCK_FILTERING_SWITCH,MU_IF(MU_C2(please_mock_, function),MOCKABLE_FUNCTION_DISABLED,MOCKABLE_FUNCTION_UMOCK_INTERNAL_WITH_MOCK), MOCKABLE_FUNCTION_UMOCK_INTERNAL_WITH_MOCK) (0, modifiers, result, function, __VA_ARGS__) -/* Codes_SRS_UMOCK_C_LIB_01_212: [ `MOCKABLE_FUNCTION_WITH_RETURNS` shall be used to wrap function definitions, allowing the user to declare a function that can be mocked and aditionally declares the values that are to be returned in case of success and failure. ]*/ +/* Codes_SRS_UMOCK_C_LIB_01_212: [ MOCKABLE_FUNCTION_WITH_RETURNS shall be used to wrap function definitions, allowing the user to declare a function that can be mocked and aditionally declares the values that are to be returned in case of success and failure. ]*/ #define MOCKABLE_FUNCTION_WITH_RETURNS(modifiers, result, function, ...) \ MU_IF(ENABLE_MOCK_FILTERING_SWITCH,MU_IF(MU_C2(please_mock_, function),MOCKABLE_FUNCTION_DISABLED,MOCKABLE_FUNCTION_UMOCK_INTERNAL_WITH_MOCK), MOCKABLE_FUNCTION_UMOCK_INTERNAL_WITH_MOCK) (1, modifiers, result, function, __VA_ARGS__) +// The below MOCKABLE_FUNCTION_WITH_CODE macros are a temporary solution and should not be used for long term +// They will be removed once the real support is in umock_c +#define MOCKABLE_FUNCTION_WITH_CODE(modifiers, result, function, ...) \ + MOCKABLE_FUNCTION_INTERNAL_WITH_CODE(modifiers, result, function, __VA_ARGS__) + +#define MOCKABLE_FUNCTION_WITH_CODE_END(...) \ + MOCKABLE_FUNCTION_END(__VA_ARGS__) + +/* Codes_SRS_UMOCK_C_LIB_01_217: [ In the presence of the ENABLE_MOCKS define, IMPLEMENT_MOCKABLE_FUNCTION shall expand to the signature of the function, but the name shall be changed to be prefix with real_. ]*/ +#define IMPLEMENT_MOCKABLE_FUNCTION(modifiers, result, function, ...) \ + MOCKABLE_FUNCTION_SIGNATURE(modifiers, result, MU_C2(real_, function), __VA_ARGS__) + +#define EXPAND_ENTRY(A) \ + MOCKABLE_##A + +#define REGISTER_GLOBAL_MOCK_REAL_FUNCTION(modifiers, result, function, ...) \ + REGISTER_GLOBAL_MOCK_HOOK(function, MU_C2(real_, function)); + +#define REGISTER_GLOBAL_MOCK_REAL(A) \ + REGISTER_GLOBAL_MOCK_REAL_##A + +/* Codes_SRS_UMOCK_C_LIB_01_215: [ Each item in ... shall be an entry for one mockable function. ]*/ +/* Codes_SRS_UMOCK_C_LIB_01_216: [ Each item in ... shall be defined using a macro called FUNCTION, which shall be an alias for MOCKABLE_FUNCTION. ]*/ +#define MOCKABLE_INTERFACE(interface_name, ...) \ + MU_FOR_EACH_1(EXPAND_ENTRY, __VA_ARGS__) \ + static void MU_C2(register_reals_, interface_name)(void) \ + { \ + MU_FOR_EACH_1(REGISTER_GLOBAL_MOCK_REAL, __VA_ARGS__); \ + } \ + #include "umock_c/umock_c.h" #else -#include "azure_macro_utils/macro_utils.h" - #define UMOCK_C_PROD_ARG_IN_SIGNATURE(count, arg_type, arg_name) arg_type arg_name MU_IFCOMMA(count) +#define MOCKABLE_FUNCTION_SIGNATURE(modifiers, result, function, ...) \ + result modifiers function(MU_IF(MU_COUNT_ARG(__VA_ARGS__),,void) MU_FOR_EACH_2_COUNTED(UMOCK_C_PROD_ARG_IN_SIGNATURE, __VA_ARGS__)) + /* Codes_SRS_UMOCK_C_LIB_01_002: [The macro shall generate a function signature in case ENABLE_MOCKS is not defined.] */ /* Codes_SRS_UMOCK_C_LIB_01_005: [If ENABLE_MOCKS is not defined, MOCKABLE_FUNCTION shall only generate a declaration for the function.] */ /* Codes_SRS_UMOCK_C_LIB_01_001: [MOCKABLE_FUNCTION shall be used to wrap function definition allowing the user to declare a function that can be mocked.]*/ #define MOCKABLE_FUNCTION(modifiers, result, function, ...) \ - result modifiers function(MU_IF(MU_COUNT_ARG(__VA_ARGS__),,void) MU_FOR_EACH_2_COUNTED(UMOCK_C_PROD_ARG_IN_SIGNATURE, __VA_ARGS__)); + MOCKABLE_FUNCTION_SIGNATURE(modifiers, result, function, __VA_ARGS__); -/* Codes_SRS_UMOCK_C_LIB_01_213: [ The macro shall generate a function signature in case `ENABLE_MOCKS` is not defined. ]*/ -/* Codes_SRS_UMOCK_C_LIB_01_212: [ `MOCKABLE_FUNCTION_WITH_RETURNS` shall be used to wrap function definitions, allowing the user to declare a function that can be mocked and aditionally declares the values that are to be returned in case of success and failure. ]*/ +/* Codes_SRS_UMOCK_C_LIB_01_213: [ The macro shall generate a function signature in case ENABLE_MOCKS is not defined. ]*/ +/* Codes_SRS_UMOCK_C_LIB_01_212: [ MOCKABLE_FUNCTION_WITH_RETURNS shall be used to wrap function definitions, allowing the user to declare a function that can be mocked and aditionally declares the values that are to be returned in case of success and failure. ]*/ #define MOCKABLE_FUNCTION_WITH_RETURNS(modifiers, result, function, ...) \ result modifiers function(MU_IF(MU_COUNT_ARG(__VA_ARGS__),,void) MU_FOR_EACH_2_COUNTED(UMOCK_C_PROD_ARG_IN_SIGNATURE, __VA_ARGS__)); \ MU_IF(UMOCK_C_PROD_IS_NOT_VOID(result), DO_NOTHING_WITH_RETURN_VALUES,) +#define UMOCK_C_PROD_ARG_IN_SIGNATURE_2(count, arg_type, arg_name) + +// The below MOCKABLE_FUNCTION_WITH_CODE macros are a temporary solution and should not be used for long term +// They will be removed once the real support is in umock_c +#define MOCKABLE_FUNCTION_WITH_CODE(modifiers, result, function, ...) \ + MOCKABLE_FUNCTION_SIGNATURE(modifiers, result, function, __VA_ARGS__) + +/* Codes_SRS_UMOCK_C_LIB_01_218: [ If ENABLE_MOCKS is not defined, IMPLEMENT_MOCKABLE_FUNCTION shall expand to the signature of the function. ]*/ +#define IMPLEMENT_MOCKABLE_FUNCTION(modifiers, result, function, ...) \ + MOCKABLE_FUNCTION_SIGNATURE(modifiers, result, function, __VA_ARGS__) + +#define EXPAND_PROD_ENTRY(A) MOCKABLE_##A + +/* Codes_SRS_UMOCK_C_LIB_01_215: [ Each item in ... shall be an entry for one mockable function. ]*/ +/* Codes_SRS_UMOCK_C_LIB_01_216: [ Each item in ... shall be defined using a macro called FUNCTION, which shall be an alias for MOCKABLE_FUNCTION. ]*/ +#define MOCKABLE_INTERFACE(interface_name, ...) \ + MU_FOR_EACH_1(EXPAND_PROD_ENTRY, __VA_ARGS__) + +#define MOCKABLE_FUNCTION_WITH_CODE_END(...) \ + #endif diff --git a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umock_log.h b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umock_log.h index 7763553f8..ea5b5ef8d 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umock_log.h +++ b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umock_log.h @@ -14,11 +14,8 @@ extern "C" { #endif ; - #ifdef __cplusplus } #endif - - #endif /* UMOCK_LOG_H */ diff --git a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockalloc.h b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockalloc.h index 9dc11387c..e117a3558 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockalloc.h +++ b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockalloc.h @@ -5,17 +5,20 @@ #define UMOCKALLOC_H #ifdef __cplusplus -extern "C" { #include #else #include #endif -extern void* umockalloc_malloc(size_t size); -extern void* umockalloc_realloc(void* ptr, size_t size); -extern void umockalloc_free(void* ptr); +#ifdef __cplusplus +extern "C" { +#endif + +void* umockalloc_malloc(size_t size); +void* umockalloc_realloc(void* ptr, size_t size); +void umockalloc_free(void* ptr); -extern char* umockc_stringify_buffer(const void* bytes, size_t length); +char* umockc_stringify_buffer(const void* bytes, size_t length); #ifdef __cplusplus } diff --git a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockautoignoreargs.h b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockautoignoreargs.h index 4ab1c64ec..4803deee1 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockautoignoreargs.h +++ b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockautoignoreargs.h @@ -11,7 +11,7 @@ extern "C" { #include #endif -extern int umockautoignoreargs_is_call_argument_ignored(const char* call, size_t argument_index, int* is_argument_ignored); +int umockautoignoreargs_is_call_argument_ignored(const char* call, size_t argument_index, int* is_argument_ignored); #ifdef __cplusplus } diff --git a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockcall.h b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockcall.h index fef28103b..30d1a16a2 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockcall.h +++ b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockcall.h @@ -6,9 +6,12 @@ #ifdef __cplusplus #include -extern "C" { #else #include +#endif + +#ifdef __cplusplus +extern "C" { #endif typedef struct UMOCKCALL_TAG* UMOCKCALL_HANDLE; @@ -17,18 +20,18 @@ extern "C" { typedef char*(*UMOCKCALL_DATA_STRINGIFY_FUNC)(void* umockcall_data); typedef int(*UMOCKCALL_DATA_ARE_EQUAL_FUNC)(void* left, void* right); - extern UMOCKCALL_HANDLE umockcall_create(const char* function_name, void* umockcall_data, UMOCKCALL_DATA_COPY_FUNC umockcall_data_copy, UMOCKCALL_DATA_FREE_FUNC umockcall_data_free, UMOCKCALL_DATA_STRINGIFY_FUNC umockcall_data_stringify, UMOCKCALL_DATA_ARE_EQUAL_FUNC umockcall_data_are_equal); - extern void umockcall_destroy(UMOCKCALL_HANDLE umockcall); - extern int umockcall_are_equal(UMOCKCALL_HANDLE left, UMOCKCALL_HANDLE right); - extern char* umockcall_stringify(UMOCKCALL_HANDLE umockcall); - extern void* umockcall_get_call_data(UMOCKCALL_HANDLE umockcall); - extern UMOCKCALL_HANDLE umockcall_clone(UMOCKCALL_HANDLE umockcall); - extern int umockcall_set_fail_call(UMOCKCALL_HANDLE umockcall, int fail_call); - extern int umockcall_get_fail_call(UMOCKCALL_HANDLE umockcall); - extern int umockcall_set_ignore_all_calls(UMOCKCALL_HANDLE umockcall, int ignore_all_calls); - extern int umockcall_get_ignore_all_calls(UMOCKCALL_HANDLE umockcall); - extern int umockcall_set_call_can_fail(UMOCKCALL_HANDLE umockcall, int call_can_fail); - extern int umockcall_get_call_can_fail(UMOCKCALL_HANDLE umockcall); + UMOCKCALL_HANDLE umockcall_create(const char* function_name, void* umockcall_data, UMOCKCALL_DATA_COPY_FUNC umockcall_data_copy, UMOCKCALL_DATA_FREE_FUNC umockcall_data_free, UMOCKCALL_DATA_STRINGIFY_FUNC umockcall_data_stringify, UMOCKCALL_DATA_ARE_EQUAL_FUNC umockcall_data_are_equal); + void umockcall_destroy(UMOCKCALL_HANDLE umockcall); + int umockcall_are_equal(UMOCKCALL_HANDLE left, UMOCKCALL_HANDLE right); + char* umockcall_stringify(UMOCKCALL_HANDLE umockcall); + void* umockcall_get_call_data(UMOCKCALL_HANDLE umockcall); + UMOCKCALL_HANDLE umockcall_clone(UMOCKCALL_HANDLE umockcall); + int umockcall_set_fail_call(UMOCKCALL_HANDLE umockcall, int fail_call); + int umockcall_get_fail_call(UMOCKCALL_HANDLE umockcall); + int umockcall_set_ignore_all_calls(UMOCKCALL_HANDLE umockcall, int ignore_all_calls); + int umockcall_get_ignore_all_calls(UMOCKCALL_HANDLE umockcall); + int umockcall_set_call_can_fail(UMOCKCALL_HANDLE umockcall, int call_can_fail); + int umockcall_get_call_can_fail(UMOCKCALL_HANDLE umockcall); #ifdef __cplusplus } diff --git a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockcallpairs.h b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockcallpairs.h index a703b743e..f327999fe 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockcallpairs.h +++ b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockcallpairs.h @@ -6,11 +6,14 @@ #ifdef __cplusplus #include -extern "C" { #else #include #endif +#ifdef __cplusplus +extern "C" { +#endif + typedef struct PAIRED_HANDLE_TAG { void* handle_value; @@ -23,8 +26,8 @@ typedef struct PAIRED_HANDLES_TAG size_t paired_handle_count; } PAIRED_HANDLES; -extern int umockcallpairs_track_create_paired_call(PAIRED_HANDLES* paired_handles, const void* handle, const char* handle_type, size_t handle_type_size); -extern int umockcallpairs_track_destroy_paired_call(PAIRED_HANDLES* paired_handles, const void* handle); +int umockcallpairs_track_create_paired_call(PAIRED_HANDLES* paired_handles, const void* handle, const char* handle_type, size_t handle_type_size); +int umockcallpairs_track_destroy_paired_call(PAIRED_HANDLES* paired_handles, const void* handle); #ifdef __cplusplus } diff --git a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockcallrecorder.h b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockcallrecorder.h index 3faaba83c..c62f457f5 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockcallrecorder.h +++ b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockcallrecorder.h @@ -4,6 +4,12 @@ #ifndef UMOCKCALLRECORDER_H #define UMOCKCALLRECORDER_H +#ifdef __cplusplus +#include +#else +#include +#endif + #include "umockcall.h" #ifdef __cplusplus @@ -12,18 +18,18 @@ extern "C" { typedef struct UMOCKCALLRECORDER_TAG* UMOCKCALLRECORDER_HANDLE; - extern UMOCKCALLRECORDER_HANDLE umockcallrecorder_create(void); - extern void umockcallrecorder_destroy(UMOCKCALLRECORDER_HANDLE umock_call_recorder); - extern int umockcallrecorder_reset_all_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder); - extern int umockcallrecorder_add_expected_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, UMOCKCALL_HANDLE mock_call); - extern int umockcallrecorder_add_actual_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, UMOCKCALL_HANDLE mock_call, UMOCKCALL_HANDLE* matched_call); - extern const char* umockcallrecorder_get_actual_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder); - extern const char* umockcallrecorder_get_expected_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder); - extern UMOCKCALL_HANDLE umockcallrecorder_get_last_expected_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder); - extern UMOCKCALLRECORDER_HANDLE umockcallrecorder_clone(UMOCKCALLRECORDER_HANDLE umock_call_recorder); - extern int umockcallrecorder_get_expected_call_count(UMOCKCALLRECORDER_HANDLE umock_call_recorder, size_t* expected_call_count); - extern int umockcallrecorder_fail_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, size_t index); - extern int umockcallrecorder_can_call_fail(UMOCKCALLRECORDER_HANDLE umock_call_recorder, size_t index, int* can_call_fail); + UMOCKCALLRECORDER_HANDLE umockcallrecorder_create(void); + void umockcallrecorder_destroy(UMOCKCALLRECORDER_HANDLE umock_call_recorder); + int umockcallrecorder_reset_all_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder); + int umockcallrecorder_add_expected_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, UMOCKCALL_HANDLE mock_call); + int umockcallrecorder_add_actual_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, UMOCKCALL_HANDLE mock_call, UMOCKCALL_HANDLE* matched_call); + const char* umockcallrecorder_get_actual_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder); + const char* umockcallrecorder_get_expected_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder); + UMOCKCALL_HANDLE umockcallrecorder_get_last_expected_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder); + UMOCKCALLRECORDER_HANDLE umockcallrecorder_clone(UMOCKCALLRECORDER_HANDLE umock_call_recorder); + int umockcallrecorder_get_expected_call_count(UMOCKCALLRECORDER_HANDLE umock_call_recorder, size_t* expected_call_count); + int umockcallrecorder_fail_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, size_t index); + int umockcallrecorder_can_call_fail(UMOCKCALLRECORDER_HANDLE umock_call_recorder, size_t index, int* can_call_fail); #ifdef __cplusplus } diff --git a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockstring.h b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockstring.h index 48e4f3447..929b57d7d 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockstring.h +++ b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umockstring.h @@ -8,7 +8,7 @@ extern "C" { #endif -extern char* umockstring_clone(const char* source); +char* umockstring_clone(const char* source); #ifdef __cplusplus } diff --git a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypename.h b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypename.h index fb9ae8dab..b2365e732 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypename.h +++ b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypename.h @@ -8,7 +8,7 @@ extern "C" { #endif -extern char* umocktypename_normalize(const char* type_name); +char* umocktypename_normalize(const char* type_name); #ifdef __cplusplus } diff --git a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes.h b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes.h index 3678aeb67..d32f7be43 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes.h +++ b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes.h @@ -4,13 +4,19 @@ #ifndef UMOCKTYPES_H #define UMOCKTYPES_H -#include "umockalloc.h" - #ifdef __cplusplus #include -extern "C" { #else #include +#endif + +#include "azure_macro_utils/macro_utils.h" + +#include "umock_c/umock_c.h" +#include "umock_c/umockalloc.h" + +#ifdef __cplusplus +extern "C" { #endif typedef char*(*UMOCKTYPE_STRINGIFY_FUNC)(const void* value); @@ -18,15 +24,15 @@ extern "C" { typedef void(*UMOCKTYPE_FREE_FUNC)(void* value); typedef int(*UMOCKTYPE_ARE_EQUAL_FUNC)(const void* left, const void* right); - extern int umocktypes_init(void); - extern void umocktypes_deinit(void); - extern int umocktypes_register_type(const char* type, UMOCKTYPE_STRINGIFY_FUNC stringify_func, UMOCKTYPE_ARE_EQUAL_FUNC are_equal_func, UMOCKTYPE_COPY_FUNC copy_func, UMOCKTYPE_FREE_FUNC free_func); - extern int umocktypes_register_alias_type(const char* type, const char* alias_type); + int umocktypes_init(void); + void umocktypes_deinit(void); + int umocktypes_register_type(const char* type, UMOCKTYPE_STRINGIFY_FUNC stringify_func, UMOCKTYPE_ARE_EQUAL_FUNC are_equal_func, UMOCKTYPE_COPY_FUNC copy_func, UMOCKTYPE_FREE_FUNC free_func); + int umocktypes_register_alias_type(const char* type, const char* alias_type); - extern char* umocktypes_stringify(const char* type, const void* value); - extern int umocktypes_are_equal(const char* type, const void* left, const void* right); - extern int umocktypes_copy(const char* type, void* destination, const void* source); - extern void umocktypes_free(const char* type, void* value); + char* umocktypes_stringify(const char* type, const void* value); + int umocktypes_are_equal(const char* type, const void* left, const void* right); + int umocktypes_copy(const char* type, void* destination, const void* source); + void umocktypes_free(const char* type, void* value); /* This is a convenience macro that allows registering a type by simply specifying the name and a function_postfix*/ #define REGISTER_TYPE(type, function_postfix) \ @@ -36,23 +42,35 @@ extern "C" { (UMOCKTYPE_FREE_FUNC)MU_C2(umocktypes_free_,function_postfix)) /* Codes_SRS_UMOCK_C_LIB_01_181: [ If a value that is not part of the enum is used, it shall be treated as an int value. ]*/ -#define IMPLEMENT_UMOCK_C_ENUM_STRINGIFY(type, ...) \ - UMOCK_STATIC char* MU_C2(umocktypes_stringify_,type)(const type* value) \ +#define IMPLEMENT_UMOCK_C_ENUM_STRINGIFY(enum_name, ...) \ + UMOCK_STATIC char* MU_C2(umocktypes_stringify_,enum_name)(const enum_name* value) \ { \ char* result; \ - static const char *MU_C2(enum_name,_strings)[]= \ + static const char *MU_C2(enum_name,_strings)[] = \ { \ MU_FOR_EACH_1(MU_DEFINE_ENUMERATION_CONSTANT_AS_STRING, __VA_ARGS__) \ }; \ + static const enum_name MU_C2(enum_name,_values)[] = \ + { \ + __VA_ARGS__ \ + }; \ if (value == NULL) \ { \ result = NULL; \ } \ else \ { \ - if ((int)*value < (int)(sizeof(MU_C2(enum_name,_strings)) / sizeof(MU_C2(enum_name,_strings)[0]))) \ + size_t i; \ + for (i = 0; i < sizeof(MU_C2(enum_name,_strings)) / sizeof(MU_C2(enum_name,_strings)[0]); i++) \ + { \ + if (MU_C2(enum_name,_values)[i] == *value) \ + { \ + break; \ + } \ + } \ + if (i < sizeof(MU_C2(enum_name,_strings)) / sizeof(MU_C2(enum_name,_strings)[0])) \ { \ - size_t length = strlen(MU_C2(enum_name_, strings)[*value]); \ + size_t length = strlen(MU_C2(enum_name, _strings)[i]); \ if (length == 0) \ { \ result = NULL; \ @@ -62,7 +80,7 @@ extern "C" { result = (char*)umockalloc_malloc(length + 1); \ if (result != NULL) \ { \ - (void)memcpy(result, MU_C2(enum_name_, strings)[*value], length + 1); \ + (void)memcpy(result, MU_C2(enum_name, _strings)[i], length + 1); \ } \ } \ } \ @@ -78,6 +96,27 @@ extern "C" { return result; \ } +#define IMPLEMENT_UMOCK_C_ENUM_2_STRINGIFY(enum_name, ...) \ + UMOCK_STATIC char* MU_C2(umocktypes_stringify_,enum_name)(const enum_name* value) \ + { \ + char* result; \ + const char* enum_string = MU_ENUM_TO_STRING_2(enum_name, (*value)); \ + size_t length = strlen(enum_string); \ + if (length == 0) \ + { \ + result = NULL; \ + } \ + else \ + { \ + result = (char*)umockalloc_malloc(length + 1); \ + if (result != NULL) \ + { \ + (void)memcpy(result, enum_string, length + 1); \ + } \ + } \ + return result; \ + } + #define IMPLEMENT_UMOCK_C_ENUM_ARE_EQUAL(type) \ UMOCK_STATIC int MU_C2(umocktypes_are_equal_,type)(const type* left, const type* right) \ { \ @@ -124,6 +163,12 @@ extern "C" { IMPLEMENT_UMOCK_C_ENUM_COPY(type) \ IMPLEMENT_UMOCK_C_ENUM_FREE(type) +#define IMPLEMENT_UMOCK_C_ENUM_2_TYPE(type, ...) \ + IMPLEMENT_UMOCK_C_ENUM_2_STRINGIFY(type, __VA_ARGS__) \ + IMPLEMENT_UMOCK_C_ENUM_ARE_EQUAL(type) \ + IMPLEMENT_UMOCK_C_ENUM_COPY(type) \ + IMPLEMENT_UMOCK_C_ENUM_FREE(type) + #ifdef __cplusplus } #endif diff --git a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes_bool.h b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes_bool.h index d89ae40f6..a3220dc90 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes_bool.h +++ b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes_bool.h @@ -4,20 +4,23 @@ #ifndef UMOCKTYPES_BOOL_H #define UMOCKTYPES_BOOL_H +#ifdef __cplusplus +#else +#include +#endif + #include "azure_macro_utils/macro_utils.h" #ifdef __cplusplus extern "C" { -#else -#include #endif - extern int umocktypes_bool_register_types(void); + int umocktypes_bool_register_types(void); - extern char* umocktypes_stringify_bool(const bool* value); \ - extern int umocktypes_are_equal_bool(const bool* left, const bool* right); \ - extern int umocktypes_copy_bool(bool* destination, const bool* source); \ - extern void umocktypes_free_bool(bool* value); + char* umocktypes_stringify_bool(const bool* value); \ + int umocktypes_are_equal_bool(const bool* left, const bool* right); \ + int umocktypes_copy_bool(bool* destination, const bool* source); \ + void umocktypes_free_bool(bool* value); #ifdef __cplusplus } diff --git a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes_c.h b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes_c.h index a7d3270cb..fb8f97f6e 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes_c.h +++ b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes_c.h @@ -10,13 +10,13 @@ extern "C" { #endif - extern int umocktypes_c_register_types(void); + int umocktypes_c_register_types(void); #define UMOCKTYPES_HANDLERS(type, function_postfix) \ - extern char* MU_C2(umocktypes_stringify_,function_postfix)(type* value); \ - extern int MU_C2(umocktypes_are_equal_, function_postfix)(type* left, type* right); \ - extern int MU_C2(umocktypes_copy_, function_postfix)(type* destination, type* source); \ - extern void MU_C2(umocktypes_free_, function_postfix)(type* value); + char* MU_C2(umocktypes_stringify_,function_postfix)(type* value); \ + int MU_C2(umocktypes_are_equal_, function_postfix)(type* left, type* right); \ + int MU_C2(umocktypes_copy_, function_postfix)(type* destination, type* source); \ + void MU_C2(umocktypes_free_, function_postfix)(type* value); UMOCKTYPES_HANDLERS(char, char) UMOCKTYPES_HANDLERS(unsigned char, unsignedchar) diff --git a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes_charptr.h b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes_charptr.h index 6294ed8bc..b63a0bef7 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes_charptr.h +++ b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes_charptr.h @@ -10,17 +10,17 @@ extern "C" { /* Codes_SRS_UMOCK_C_LIB_01_067: [char\* and const char\* shall be supported out of the box through a separate header, umockvalue_charptr.h.]*/ /* Codes_SRS_UMOCK_C_LIB_01_069: [The signature shall be: ...*/ - extern int umocktypes_charptr_register_types(void); + int umocktypes_charptr_register_types(void); - extern char* umocktypes_stringify_charptr(const char** value); - extern int umocktypes_are_equal_charptr(const char** left, const char** right); - extern int umocktypes_copy_charptr(char** destination, const char** source); - extern void umocktypes_free_charptr(char** value); + char* umocktypes_stringify_charptr(const char** value); + int umocktypes_are_equal_charptr(const char** left, const char** right); + int umocktypes_copy_charptr(char** destination, const char** source); + void umocktypes_free_charptr(char** value); - extern char* umocktypes_stringify_const_charptr(const char** value); - extern int umocktypes_are_equal_const_charptr(const char** left, const char** right); - extern int umocktypes_copy_const_charptr(const char** destination, const char** source); - extern void umocktypes_free_const_charptr(const char** value); + char* umocktypes_stringify_const_charptr(const char** value); + int umocktypes_are_equal_const_charptr(const char** left, const char** right); + int umocktypes_copy_const_charptr(const char** destination, const char** source); + void umocktypes_free_const_charptr(const char** value); #ifdef __cplusplus } diff --git a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes_stdint.h b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes_stdint.h index 531c273e3..3430a67ca 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes_stdint.h +++ b/AZ3166/src/system/azure-iot-sdk-c/deps/umock-c/inc/umock_c/umocktypes_stdint.h @@ -4,21 +4,25 @@ #ifndef UMOCKTYPES_STDINT_H #define UMOCKTYPES_STDINT_H -#include "azure_macro_utils/macro_utils.h" #ifdef __cplusplus #include -extern "C" { #else #include #endif - extern int umocktypes_stdint_register_types(void); +#include "azure_macro_utils/macro_utils.h" + +#ifdef __cplusplus +extern "C" { +#endif + + int umocktypes_stdint_register_types(void); #define UMOCKTYPES_STDINT_HANDLERS(type, function_postfix) \ - extern char* MU_C2(umocktypes_stringify_,function_postfix)(type* value); \ - extern int MU_C2(umocktypes_are_equal_, function_postfix)(type* left, type* right); \ - extern int MU_C2(umocktypes_copy_, function_postfix)(type* destination, type* source); \ - extern void MU_C2(umocktypes_free_, function_postfix)(type* value); + char* MU_C2(umocktypes_stringify_,function_postfix)(type* value); \ + int MU_C2(umocktypes_are_equal_, function_postfix)(type* left, type* right); \ + int MU_C2(umocktypes_copy_, function_postfix)(type* destination, type* source); \ + void MU_C2(umocktypes_free_, function_postfix)(type* value); UMOCKTYPES_STDINT_HANDLERS(uint8_t, uint8_t) UMOCKTYPES_STDINT_HANDLERS(int8_t, int8_t) diff --git a/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/internal/iothub_client_authorization.h b/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/internal/iothub_client_authorization.h index e7f1d6d57..9de87494e 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/internal/iothub_client_authorization.h +++ b/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/internal/iothub_client_authorization.h @@ -27,14 +27,14 @@ typedef struct IOTHUB_AUTHORIZATION_DATA_TAG* IOTHUB_AUTHORIZATION_HANDLE; IOTHUB_CREDENTIAL_TYPE_DEVICE_AUTH -MU_DEFINE_ENUM(IOTHUB_CREDENTIAL_TYPE, IOTHUB_CREDENTIAL_TYPE_VALUES); +MU_DEFINE_ENUM_WITHOUT_INVALID(IOTHUB_CREDENTIAL_TYPE, IOTHUB_CREDENTIAL_TYPE_VALUES); #define SAS_TOKEN_STATUS_VALUES \ SAS_TOKEN_STATUS_FAILED, \ SAS_TOKEN_STATUS_VALID, \ SAS_TOKEN_STATUS_INVALID -MU_DEFINE_ENUM(SAS_TOKEN_STATUS, SAS_TOKEN_STATUS_VALUES); +MU_DEFINE_ENUM_WITHOUT_INVALID(SAS_TOKEN_STATUS, SAS_TOKEN_STATUS_VALUES); MOCKABLE_FUNCTION(, IOTHUB_AUTHORIZATION_HANDLE, IoTHubClient_Auth_Create, const char*, device_key, const char*, device_id, const char*, device_sas_token, const char *, module_id); MOCKABLE_FUNCTION(, IOTHUB_AUTHORIZATION_HANDLE, IoTHubClient_Auth_CreateFromDeviceAuth, const char*, device_id, const char*, module_id); diff --git a/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/internal/iothub_internal_consts.h b/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/internal/iothub_internal_consts.h new file mode 100644 index 000000000..c00e4ebe1 --- /dev/null +++ b/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/internal/iothub_internal_consts.h @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +#ifndef IOTHUB_INTERNAL_CONSTS_H +#define IOTHUB_INTERNAL_CONSTS_H + +#ifdef __cplusplus +extern "C" +{ +#endif + + static const char* IOTHUB_API_VERSION = "2017-11-08-preview"; + + static const char* SECURITY_INTERFACE_INTERNAL_ID = "iothub-interface-internal-id"; + static const char* SECURITY_INTERFACE_INTERNAL_ID_VALUE = "security*azureiot*com^SecurityAgent^1*0*0"; + static const char* SECURITY_INTERFACE_ID = "iothub-interface-id"; + static const char* SECURITY_INTERFACE_ID_MQTT = "ifid"; + static const char* SECURITY_INTERFACE_ID_VALUE = "urn:azureiot:Security:SecurityAgent:1"; + static const char* SECURITY_MESSAGE_SCHEMA = "iothub-message-schema"; + static const char* SECURITY_MESSAGE_SCHEMA_VALUE = "sevent"; + +#ifdef __cplusplus +} +#endif + +#endif /* IOTHUB_INTERNAL_CONSTS_H */ diff --git a/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_client_core_common.h b/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_client_core_common.h index 4369e8df9..8b0a83ec5 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_client_core_common.h +++ b/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_client_core_common.h @@ -21,7 +21,7 @@ extern "C" FILE_UPLOAD_OK, \ FILE_UPLOAD_ERROR - MU_DEFINE_ENUM(IOTHUB_CLIENT_FILE_UPLOAD_RESULT, IOTHUB_CLIENT_FILE_UPLOAD_RESULT_VALUES) + MU_DEFINE_ENUM_WITHOUT_INVALID(IOTHUB_CLIENT_FILE_UPLOAD_RESULT, IOTHUB_CLIENT_FILE_UPLOAD_RESULT_VALUES) typedef void(*IOTHUB_CLIENT_FILE_UPLOAD_CALLBACK)(IOTHUB_CLIENT_FILE_UPLOAD_RESULT result, void* userContextCallback); #define IOTHUB_CLIENT_RESULT_VALUES \ @@ -34,7 +34,7 @@ extern "C" /** @brief Enumeration specifying the status of calls to various APIs in this module. */ - MU_DEFINE_ENUM(IOTHUB_CLIENT_RESULT, IOTHUB_CLIENT_RESULT_VALUES); + MU_DEFINE_ENUM_WITHOUT_INVALID(IOTHUB_CLIENT_RESULT, IOTHUB_CLIENT_RESULT_VALUES); typedef void(*IOTHUB_METHOD_INVOKE_CALLBACK)(IOTHUB_CLIENT_RESULT result, int responseStatus, unsigned char* responsePayload, size_t responsePayloadSize, void* context); @@ -51,7 +51,7 @@ extern "C" * callback is invoked to indicate status of the event processing in * the hub. */ - MU_DEFINE_ENUM(IOTHUB_CLIENT_RETRY_POLICY, IOTHUB_CLIENT_RETRY_POLICY_VALUES); + MU_DEFINE_ENUM_WITHOUT_INVALID(IOTHUB_CLIENT_RETRY_POLICY, IOTHUB_CLIENT_RETRY_POLICY_VALUES); struct IOTHUBTRANSPORT_CONFIG_TAG; typedef struct IOTHUBTRANSPORT_CONFIG_TAG IOTHUBTRANSPORT_CONFIG; @@ -63,21 +63,21 @@ extern "C" /** @brief Enumeration returned by the ::IoTHubClient_LL_GetSendStatus * API to indicate the current sending status of the IoT Hub client. */ - MU_DEFINE_ENUM(IOTHUB_CLIENT_STATUS, IOTHUB_CLIENT_STATUS_VALUES); + MU_DEFINE_ENUM_WITHOUT_INVALID(IOTHUB_CLIENT_STATUS, IOTHUB_CLIENT_STATUS_VALUES); #define IOTHUB_IDENTITY_TYPE_VALUE \ IOTHUB_TYPE_TELEMETRY, \ IOTHUB_TYPE_DEVICE_TWIN, \ IOTHUB_TYPE_DEVICE_METHODS, \ IOTHUB_TYPE_EVENT_QUEUE - MU_DEFINE_ENUM(IOTHUB_IDENTITY_TYPE, IOTHUB_IDENTITY_TYPE_VALUE); + MU_DEFINE_ENUM_WITHOUT_INVALID(IOTHUB_IDENTITY_TYPE, IOTHUB_IDENTITY_TYPE_VALUE); #define IOTHUB_PROCESS_ITEM_RESULT_VALUE \ IOTHUB_PROCESS_OK, \ IOTHUB_PROCESS_ERROR, \ IOTHUB_PROCESS_NOT_CONNECTED, \ IOTHUB_PROCESS_CONTINUE - MU_DEFINE_ENUM(IOTHUB_PROCESS_ITEM_RESULT, IOTHUB_PROCESS_ITEM_RESULT_VALUE); + MU_DEFINE_ENUM_WITHOUT_INVALID(IOTHUB_PROCESS_ITEM_RESULT, IOTHUB_PROCESS_ITEM_RESULT_VALUE); #define IOTHUBMESSAGE_DISPOSITION_RESULT_VALUES \ IOTHUBMESSAGE_ACCEPTED, \ @@ -87,7 +87,7 @@ extern "C" /** @brief Enumeration returned by the callback which is invoked whenever the * IoT Hub sends a message to the device. */ - MU_DEFINE_ENUM(IOTHUBMESSAGE_DISPOSITION_RESULT, IOTHUBMESSAGE_DISPOSITION_RESULT_VALUES); + MU_DEFINE_ENUM_WITHOUT_INVALID(IOTHUBMESSAGE_DISPOSITION_RESULT, IOTHUBMESSAGE_DISPOSITION_RESULT_VALUES); #define IOTHUB_CLIENT_IOTHUB_METHOD_STATUS_VALUES \ IOTHUB_CLIENT_IOTHUB_METHOD_STATUS_SUCCESS, \ @@ -95,7 +95,7 @@ extern "C" /** @brief Enumeration returned by remotely executed functions */ - MU_DEFINE_ENUM(IOTHUB_CLIENT_IOTHUB_METHOD_STATUS, IOTHUB_CLIENT_IOTHUB_METHOD_STATUS_VALUES); + MU_DEFINE_ENUM_WITHOUT_INVALID(IOTHUB_CLIENT_IOTHUB_METHOD_STATUS, IOTHUB_CLIENT_IOTHUB_METHOD_STATUS_VALUES); #define IOTHUB_CLIENT_CONFIRMATION_RESULT_VALUES \ @@ -108,7 +108,7 @@ extern "C" * callback is invoked to indicate status of the event processing in * the hub. */ - MU_DEFINE_ENUM(IOTHUB_CLIENT_CONFIRMATION_RESULT, IOTHUB_CLIENT_CONFIRMATION_RESULT_VALUES); + MU_DEFINE_ENUM_WITHOUT_INVALID(IOTHUB_CLIENT_CONFIRMATION_RESULT, IOTHUB_CLIENT_CONFIRMATION_RESULT_VALUES); #define IOTHUB_CLIENT_CONNECTION_STATUS_VALUES \ IOTHUB_CLIENT_CONNECTION_AUTHENTICATED, \ @@ -119,7 +119,7 @@ extern "C" * callback is invoked to indicate status of the connection in * the hub. */ - MU_DEFINE_ENUM(IOTHUB_CLIENT_CONNECTION_STATUS, IOTHUB_CLIENT_CONNECTION_STATUS_VALUES); + MU_DEFINE_ENUM_WITHOUT_INVALID(IOTHUB_CLIENT_CONNECTION_STATUS, IOTHUB_CLIENT_CONNECTION_STATUS_VALUES); #define IOTHUB_CLIENT_CONNECTION_STATUS_REASON_VALUES \ IOTHUB_CLIENT_CONNECTION_EXPIRED_SAS_TOKEN, \ @@ -128,25 +128,26 @@ extern "C" IOTHUB_CLIENT_CONNECTION_RETRY_EXPIRED, \ IOTHUB_CLIENT_CONNECTION_NO_NETWORK, \ IOTHUB_CLIENT_CONNECTION_COMMUNICATION_ERROR, \ + IOTHUB_CLIENT_CONNECTION_NO_PING_RESPONSE, \ IOTHUB_CLIENT_CONNECTION_OK \ /** @brief Enumeration passed in by the IoT Hub when the connection status * callback is invoked to indicate status of the connection in * the hub. */ - MU_DEFINE_ENUM(IOTHUB_CLIENT_CONNECTION_STATUS_REASON, IOTHUB_CLIENT_CONNECTION_STATUS_REASON_VALUES); + MU_DEFINE_ENUM_WITHOUT_INVALID(IOTHUB_CLIENT_CONNECTION_STATUS_REASON, IOTHUB_CLIENT_CONNECTION_STATUS_REASON_VALUES); #define TRANSPORT_TYPE_VALUES \ TRANSPORT_LL, /*LL comes from "LowLevel" */ \ TRANSPORT_THREADED - MU_DEFINE_ENUM(TRANSPORT_TYPE, TRANSPORT_TYPE_VALUES); + MU_DEFINE_ENUM_WITHOUT_INVALID(TRANSPORT_TYPE, TRANSPORT_TYPE_VALUES); #define DEVICE_TWIN_UPDATE_STATE_VALUES \ DEVICE_TWIN_UPDATE_COMPLETE, \ DEVICE_TWIN_UPDATE_PARTIAL - MU_DEFINE_ENUM(DEVICE_TWIN_UPDATE_STATE, DEVICE_TWIN_UPDATE_STATE_VALUES); + MU_DEFINE_ENUM_WITHOUT_INVALID(DEVICE_TWIN_UPDATE_STATE, DEVICE_TWIN_UPDATE_STATE_VALUES); typedef void(*IOTHUB_CLIENT_EVENT_CONFIRMATION_CALLBACK)(IOTHUB_CLIENT_CONFIRMATION_RESULT result, void* userContextCallback); typedef void(*IOTHUB_CLIENT_CONNECTION_STATUS_CALLBACK)(IOTHUB_CLIENT_CONNECTION_STATUS result, IOTHUB_CLIENT_CONNECTION_STATUS_REASON reason, void* userContextCallback); @@ -162,7 +163,7 @@ extern "C" IOTHUB_CLIENT_FILE_UPLOAD_GET_DATA_OK, \ IOTHUB_CLIENT_FILE_UPLOAD_GET_DATA_ABORT - MU_DEFINE_ENUM(IOTHUB_CLIENT_FILE_UPLOAD_GET_DATA_RESULT, IOTHUB_CLIENT_FILE_UPLOAD_GET_DATA_RESULT_VALUES); + MU_DEFINE_ENUM_WITHOUT_INVALID(IOTHUB_CLIENT_FILE_UPLOAD_GET_DATA_RESULT, IOTHUB_CLIENT_FILE_UPLOAD_GET_DATA_RESULT_VALUES); /** * @brief Callback invoked by IoTHubClient_UploadMultipleBlocksToBlobAsync requesting the chunks of data to be uploaded. diff --git a/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_client_options.h b/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_client_options.h index 18fbde8af..617154d9e 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_client_options.h +++ b/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_client_options.h @@ -18,6 +18,8 @@ extern "C" const char* password; } IOTHUB_PROXY_OPTIONS; + static STATIC_VAR_UNUSED const char* OPTION_RETRY_INTERVAL_SEC = "retry_interval_sec"; + static STATIC_VAR_UNUSED const char* OPTION_LOG_TRACE = "logtrace"; static STATIC_VAR_UNUSED const char* OPTION_X509_CERT = "x509certificate"; static STATIC_VAR_UNUSED const char* OPTION_X509_PRIVATE_KEY = "x509privatekey"; diff --git a/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_client_version.h b/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_client_version.h index 982608753..2e5eb524d 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_client_version.h +++ b/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_client_version.h @@ -8,7 +8,7 @@ #ifndef IOTHUB_CLIENT_VERSION_H #define IOTHUB_CLIENT_VERSION_H -#define IOTHUB_SDK_VERSION "1.3.4" +#define IOTHUB_SDK_VERSION "1.3.6" #include "umock_c/umock_c_prod.h" diff --git a/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_device_client_ll.h b/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_device_client_ll.h index 840dfad4f..f346f345b 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_device_client_ll.h +++ b/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_device_client_ll.h @@ -272,12 +272,13 @@ typedef struct IOTHUB_CLIENT_CORE_LL_HANDLE_DATA_TAG* IOTHUB_DEVICE_CLIENT_LL_HA * - @b CURLOPT_VERBOSE - only available for HTTP protocol and only * when CURL is used. It has the same meaning as CURL's option with the same * name. @p value is pointer to a long. - * - @b keepalive - available for MQTT protocol. Integer value that sets the - * interval in seconds when pings are sent to the server. - * - @b logtrace - available for MQTT protocol. Boolean value that turns on and - * off the diagnostic logging. - * - @b sas_token_lifetime - available for MQTT & AMQP protocol. size_t value that that determines the - * sas token timeout length. + * - @b keepalive - available for MQTT protocol. Integer value that sets the + * interval in seconds when pings are sent to the server. + * - @b logtrace - available for MQTT protocol. Boolean value that turns on and + * off the diagnostic logging. + * - @b sas_token_lifetime - available for MQTT & AMQP protocol. size_t value that that determines the + * sas token timeout length. + * - @b OPTION_TRUSTED_CERT - Azure Server certificate used to validate TLS connection to iothub. * * @return IOTHUB_CLIENT_OK upon success or an error code upon failure. */ diff --git a/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_message.h b/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_message.h index 0aae35fa5..07b62beeb 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_message.h +++ b/AZ3166/src/system/azure-iot-sdk-c/iothub_client/inc/iothub_message.h @@ -30,7 +30,7 @@ extern "C" /** @brief Enumeration specifying the status of calls to various * APIs in this module. */ -MU_DEFINE_ENUM(IOTHUB_MESSAGE_RESULT, IOTHUB_MESSAGE_RESULT_VALUES); +MU_DEFINE_ENUM_WITHOUT_INVALID(IOTHUB_MESSAGE_RESULT, IOTHUB_MESSAGE_RESULT_VALUES); #define IOTHUBMESSAGE_CONTENT_TYPE_VALUES \ IOTHUBMESSAGE_BYTEARRAY, \ @@ -40,7 +40,7 @@ IOTHUBMESSAGE_UNKNOWN \ /** @brief Enumeration specifying the content type of the a given * message. */ -MU_DEFINE_ENUM(IOTHUBMESSAGE_CONTENT_TYPE, IOTHUBMESSAGE_CONTENT_TYPE_VALUES); +MU_DEFINE_ENUM_WITHOUT_INVALID(IOTHUBMESSAGE_CONTENT_TYPE, IOTHUBMESSAGE_CONTENT_TYPE_VALUES); typedef struct IOTHUB_MESSAGE_HANDLE_DATA_TAG* IOTHUB_MESSAGE_HANDLE; @@ -108,7 +108,9 @@ MOCKABLE_FUNCTION(, IOTHUB_MESSAGE_RESULT, IoTHubMessage_GetByteArray, IOTHUB_ME /** * @brief Returns the null terminated string stored in the message. * If the content type of the message is not @c IOTHUBMESSAGE_STRING -* then the function returns @c NULL. +* then the function returns @c NULL. No new memory is allocated, +* the caller is not responsible for freeing the memory. The memory +* is valid until IoTHubMessage_Destroy is called on the message. * * @param iotHubMessageHandle Handle to the message. * @@ -141,7 +143,9 @@ MOCKABLE_FUNCTION(, IOTHUBMESSAGE_CONTENT_TYPE, IoTHubMessage_GetContentType, IO MOCKABLE_FUNCTION(, IOTHUB_MESSAGE_RESULT, IoTHubMessage_SetContentTypeSystemProperty, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle, const char*, contentType); /** -* @brief Returns the content-type of the message payload, if defined. +* @brief Returns the content-type of the message payload, if defined. No new memory is allocated, +* the caller is not responsible for freeing the memory. The memory +* is valid until IoTHubMessage_Destroy is called on the message. * * @param iotHubMessageHandle Handle to the message. * @@ -161,7 +165,9 @@ MOCKABLE_FUNCTION(, const char*, IoTHubMessage_GetContentTypeSystemProperty, IOT MOCKABLE_FUNCTION(, IOTHUB_MESSAGE_RESULT, IoTHubMessage_SetContentEncodingSystemProperty, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle, const char*, contentEncoding); /** -* @brief Returns the content-encoding of the message payload, if defined. +* @brief Returns the content-encoding of the message payload, if defined. No new memory is allocated, +* the caller is not responsible for freeing the memory. The memory +* is valid until IoTHubMessage_Destroy is called on the message. * * @param iotHubMessageHandle Handle to the message. * @@ -194,7 +200,9 @@ MOCKABLE_FUNCTION(, MAP_HANDLE, IoTHubMessage_Properties, IOTHUB_MESSAGE_HANDLE, MOCKABLE_FUNCTION(, IOTHUB_MESSAGE_RESULT, IoTHubMessage_SetProperty, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle, const char*, key, const char*, value); /** -* @brief Gets a IotHub Message's properties item. +* @brief Gets a IotHub Message's properties item. No new memory is allocated, +* the caller is not responsible for freeing the memory. The memory +* is valid until IoTHubMessage_Destroy is called on the message. * * @param iotHubMessageHandle Handle to the message. * @@ -205,7 +213,9 @@ MOCKABLE_FUNCTION(, IOTHUB_MESSAGE_RESULT, IoTHubMessage_SetProperty, IOTHUB_MES MOCKABLE_FUNCTION(, const char*, IoTHubMessage_GetProperty, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle, const char*, key); /** -* @brief Gets the MessageId from the IOTHUB_MESSAGE_HANDLE. +* @brief Gets the MessageId from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, +* the caller is not responsible for freeing the memory. The memory +* is valid until IoTHubMessage_Destroy is called on the message. * * @param iotHubMessageHandle Handle to the message. * @@ -225,7 +235,9 @@ MOCKABLE_FUNCTION(, const char*, IoTHubMessage_GetMessageId, IOTHUB_MESSAGE_HAND MOCKABLE_FUNCTION(, IOTHUB_MESSAGE_RESULT, IoTHubMessage_SetMessageId, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle, const char*, messageId); /** -* @brief Gets the CorrelationId from the IOTHUB_MESSAGE_HANDLE. +* @brief Gets the CorrelationId from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, +* the caller is not responsible for freeing the memory. The memory +* is valid until IoTHubMessage_Destroy is called on the message. * * @param iotHubMessageHandle Handle to the message. * @@ -265,7 +277,9 @@ MOCKABLE_FUNCTION(, const IOTHUB_MESSAGE_DIAGNOSTIC_PROPERTY_DATA*, IoTHubMessag MOCKABLE_FUNCTION(, IOTHUB_MESSAGE_RESULT, IoTHubMessage_SetDiagnosticPropertyData, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle, const IOTHUB_MESSAGE_DIAGNOSTIC_PROPERTY_DATA*, diagnosticData); /** -* @brief Gets the output name from the IOTHUB_MESSAGE_HANDLE. +* @brief Gets the output name from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, +* the caller is not responsible for freeing the memory. The memory +* is valid until IoTHubMessage_Destroy is called on the message. * * @param iotHubMessageHandle Handle to the message. * @@ -287,7 +301,9 @@ MOCKABLE_FUNCTION(, IOTHUB_MESSAGE_RESULT, IoTHubMessage_SetOutputName, IOTHUB_M /** -* @brief Gets the input name from the IOTHUB_MESSAGE_HANDLE. +* @brief Gets the input name from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, +* the caller is not responsible for freeing the memory. The memory +* is valid until IoTHubMessage_Destroy is called on the message. * * @param iotHubMessageHandle Handle to the message. * @@ -307,7 +323,9 @@ MOCKABLE_FUNCTION(, const char*, IoTHubMessage_GetInputName, IOTHUB_MESSAGE_HAND MOCKABLE_FUNCTION(, IOTHUB_MESSAGE_RESULT, IoTHubMessage_SetInputName, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle, const char*, inputName); /** -* @brief Gets the module name from the IOTHUB_MESSAGE_HANDLE. +* @brief Gets the module name from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, +* the caller is not responsible for freeing the memory. The memory +* is valid until IoTHubMessage_Destroy is called on the message. * * @param iotHubMessageHandle Handle to the message. * @@ -328,7 +346,9 @@ MOCKABLE_FUNCTION(, IOTHUB_MESSAGE_RESULT, IoTHubMessage_SetConnectionModuleId, /** -* @brief Gets the connection device ID from the IOTHUB_MESSAGE_HANDLE. +* @brief Gets the connection device ID from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, +* the caller is not responsible for freeing the memory. The memory +* is valid until IoTHubMessage_Destroy is called on the message. * * @param iotHubMessageHandle Handle to the message. * @@ -348,6 +368,25 @@ MOCKABLE_FUNCTION(, const char*, IoTHubMessage_GetConnectionDeviceId, IOTHUB_MES MOCKABLE_FUNCTION(, IOTHUB_MESSAGE_RESULT, IoTHubMessage_SetConnectionDeviceId, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle, const char*, connectionDeviceId); +/** +* @brief Marks a IoTHub message as a security message. CAUTION: Security messages are special messages not easily accessable by the user. +* +* @param iotHubMessageHandle Handle to the message. +* +* @return Returns IOTHUB_MESSAGE_OK if the Security Message was set successfully +* or an error code otherwise. +*/ +MOCKABLE_FUNCTION(, IOTHUB_MESSAGE_RESULT, IoTHubMessage_SetAsSecurityMessage, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle); + +/** +* @brief returns if this message is a IoTHub security message or not +* +* @param iotHubMessageHandle Handle to the message. +* +* @return Returns true if the Message is a security message false otherwise. +*/ +MOCKABLE_FUNCTION(, bool, IoTHubMessage_IsSecurityMessage, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle); + /** * @brief Frees all resources associated with the given message handle. * diff --git a/AZ3166/src/system/azure-iot-sdk-c/umqtt/inc/azure_umqtt_c/mqttconst.h b/AZ3166/src/system/azure-iot-sdk-c/umqtt/inc/azure_umqtt_c/mqttconst.h index 3313bcef2..58958d421 100644 --- a/AZ3166/src/system/azure-iot-sdk-c/umqtt/inc/azure_umqtt_c/mqttconst.h +++ b/AZ3166/src/system/azure-iot-sdk-c/umqtt/inc/azure_umqtt_c/mqttconst.h @@ -17,32 +17,32 @@ extern "C" { #endif /* __cplusplus */ #define CONTROL_PACKET_TYPE_VALUES \ - CONNECT_TYPE = 0x10, \ - CONNACK_TYPE = 0x20, \ - PUBLISH_TYPE = 0x30, \ - PUBACK_TYPE = 0x40, \ - PUBREC_TYPE = 0x50, \ - PUBREL_TYPE = 0x60, \ - PUBCOMP_TYPE = 0x70, \ - SUBSCRIBE_TYPE = 0x80, \ - SUBACK_TYPE = 0x90, \ - UNSUBSCRIBE_TYPE = 0xA0, \ - UNSUBACK_TYPE = 0xB0, \ - PINGREQ_TYPE = 0xC0, \ - PINGRESP_TYPE = 0xD0, \ - DISCONNECT_TYPE = 0xE0, \ - PACKET_TYPE_ERROR, \ - UNKNOWN_TYPE - -MU_DEFINE_ENUM(CONTROL_PACKET_TYPE, CONTROL_PACKET_TYPE_VALUES) + CONNECT_TYPE, 0x10, \ + CONNACK_TYPE, 0x20, \ + PUBLISH_TYPE, 0x30, \ + PUBACK_TYPE, 0x40, \ + PUBREC_TYPE, 0x50, \ + PUBREL_TYPE, 0x60, \ + PUBCOMP_TYPE, 0x70, \ + SUBSCRIBE_TYPE, 0x80, \ + SUBACK_TYPE, 0x90, \ + UNSUBSCRIBE_TYPE, 0xA0, \ + UNSUBACK_TYPE, 0xB0, \ + PINGREQ_TYPE, 0xC0, \ + PINGRESP_TYPE, 0xD0, \ + DISCONNECT_TYPE, 0xE0, \ + PACKET_TYPE_ERROR, 0xE1, /* 0xE1 was assigned because ENUM_2 needs it */ \ + UNKNOWN_TYPE, 0xE2 /* 0xE2 was assigned because ENUM_2 needs it */ + +MU_DEFINE_ENUM_2(CONTROL_PACKET_TYPE, CONTROL_PACKET_TYPE_VALUES) #define QOS_VALUE_VALUES \ - DELIVER_AT_MOST_ONCE = 0x00, \ - DELIVER_AT_LEAST_ONCE = 0x01, \ - DELIVER_EXACTLY_ONCE = 0x02, \ - DELIVER_FAILURE = 0x80 + DELIVER_AT_MOST_ONCE, 0x00, \ + DELIVER_AT_LEAST_ONCE, 0x01, \ + DELIVER_EXACTLY_ONCE, 0x02, \ + DELIVER_FAILURE, 0x80 -MU_DEFINE_ENUM(QOS_VALUE, QOS_VALUE_VALUES) +MU_DEFINE_ENUM_2(QOS_VALUE, QOS_VALUE_VALUES) typedef struct APP_PAYLOAD_TAG { diff --git a/AZ3166/src/system/libdevkit-sdk-core-lib.a b/AZ3166/src/system/libdevkit-sdk-core-lib.a index fe3e4d51b..fff8f305e 100644 Binary files a/AZ3166/src/system/libdevkit-sdk-core-lib.a and b/AZ3166/src/system/libdevkit-sdk-core-lib.a differ