/** * This is an example function. * * It does something. * * @param p0 the integer value * @param p1 the wide character string * @param p2 the array (pointer reference) */ void do_something(void* p0, void* p1, void* p2) { // Check for null. if (p2 != *NULL_POINTER_STATE_CYBOI_MODEL) { // Cast void pointer parametre to its actual type. void** a = (void**) p2; // Check for null. if (p1 != *NULL_POINTER_STATE_CYBOI_MODEL) { // Cast void pointer parametre to its actual type. wchar_t* c = (wchar_t*) p1; // Check for null. if (p0 != NULL_POINTER_STATE_CYBOI_MODEL) { // Cast void pointer parametre to its actual type. int* i = (int*) p0; log_message_terminated((void*) INFORMATION_LEVEL_LOG_CYBOI_MODEL, (void*) L"Do something."); // Print first string array element by dereferencing a. fwprintf(stdout, L"The first string array element is: %ls\n", (wchar_t*) *a); // Assign unicode to dereferenced character c. *c = 32; // Calculate integer value by dereferencing i. *i = *i + 10; // The loop variable. int j = *NUMBER_0_INTEGER_STATE_CYBOI_MODEL; // Use a while endless loop. while (*TRUE_BOOLEAN_STATE_CYBOI_MODEL) { // Break loop from within loop body. if (j >= *NUMBER_10_INTEGER_STATE_CYBOI_MODEL) { break; } // Increment loop variable. j++; } } else { log_message_terminated((void*) ERROR_LEVEL_LOG_CYBOI_MODEL, (void*) L"Could not do something. The integer value parametre p0 is null."); } } else { log_message_terminated((void*) ERROR_LEVEL_LOG_CYBOI_MODEL, (void*) L"Could not do something. The wide character string parametre p1 is null."); } } else { log_message_terminated((void*) ERROR_LEVEL_LOG_CYBOI_MODEL, (void*) L"Could not do something. The array parametre p2 is null."); } }