code
stringlengths
3
10M
language
stringclasses
31 values
/////////////////////////////////////////////////////////////////////// // Info EXIT /////////////////////////////////////////////////////////////////////// instance DMH_1302_Malgar_EXIT (C_INFO) { npc = DMH_1302_Malgar; nr = 999; condition = DMH_1302_Malgar_EXIT_Condition; information = DMH_1302_Malgar_EXIT_Info; important = FALSE; permanent = TRUE; description = DIALOG_ENDE; }; func int DMH_1302_Malgar_EXIT_Condition() { return TRUE; }; func void DMH_1302_Malgar_EXIT_Info() { AI_StopProcessInfos ( self ); }; //##################################################################### //## //## //## ARENA-KAMPF //## //## //##################################################################### /////////////////////////////////////////////////////////////////////// // Info MYWEAPON /////////////////////////////////////////////////////////////////////// instance DMH_1302_Malgar_MYWEAPON (C_INFO) { npc = DMH_1302_Malgar; nr = 1; condition = DMH_1302_Malgar_MYWEAPON_Condition; information = DMH_1302_Malgar_MYWEAPON_Info; important = TRUE; permanent = TRUE; }; func int DMH_1302_Malgar_MYWEAPON_Condition () { if Npc_HasItems(hero, ItMw_Malgar_Broadsword) { if Arena_FightRunning && Arena_PlayerFight && Malgar_Challenged && !Arena_PlayerStoleWeapon { return TRUE; } else { //self.aivar [AIV_PLAYERHASMYWEAPON] = TRUE; return FALSE; }; }; }; func int DMH_1302_Malgar_MYWEAPON_Info () { AI_SetWalkmode (self, NPC_RUN); AI_GotoNpc (self, hero); AI_Output (self, hero, "DMH_1302_MYWEAPON_Info_11_01"); //(eiskalt) Gib mir meine Waffe! JETZT! Info_ClearChoices (DMH_1302_Malgar_MYWEAPON); Info_AddChoice (DMH_1302_Malgar_MYWEAPON, "Nein, ich behalte sie!", DMH_1302_Malgar_MYWEAPON_TAKEN ); Info_AddChoice (DMH_1302_Malgar_MYWEAPON, "Hier hast du sie zurück!", DMH_1302_Malgar_MYWEAPON_GIVEBACK ); }; func void DMH_1302_Malgar_MYWEAPON_GIVEBACK () { Info_ClearChoices (DMH_1302_Malgar_MYWEAPON); AI_Output (hero, self, "DMH_1302_MYWEAPON_GIVEBACK_15_01"); //Hier hast du sie zurück! B_GiveInvItems (hero, self, ItMw_Malgar_Broadsword, 1); AI_Output (self, hero, "DMH_1302_MYWEAPON_GIVEBACK_11_02"); //(souverän) Gut! AI_StopProcessInfos (self); }; func void DMH_1302_Malgar_MYWEAPON_TAKEN () { Info_ClearChoices (DMH_1302_Malgar_MYWEAPON); AI_Output (hero, self, "DMH_1302_MYWEAPON_TAKEN_15_01"); //Nein, ich behalte sie! AI_Output (self, hero, "DMH_1302_MYWEAPON_TAKEN_11_02"); //(verständnislos) Ts ts ts, Regel Nummer 3... AI_StopProcessInfos (self); B_Arena_AbortFight (AF_PLAYERSTOLEWEAPON); }; /////////////////////////////////////////////////////////////////////// // Info CHALLENGED /////////////////////////////////////////////////////////////////////// instance DMH_1302_Malgar_CHALLENGED (C_INFO) { npc = DMH_1302_Malgar; nr = 2; condition = DMH_1302_Malgar_CHALLENGED_Condition; information = DMH_1302_Malgar_CHALLENGED_Info; important = TRUE; permanent = TRUE; }; func int DMH_1302_Malgar_CHALLENGED_Condition() { if Malgar_Challenged && Arena_PlayerFight && C_NpcIsInvincible(self) { return TRUE; }; }; func void DMH_1302_Malgar_CHALLENGED_Info() { if Wld_IsTime(0,0, ARENABEGIN_H, ARENABEGIN_M) { if (Npc_GetDistToWP (self, ARENA_WP_LEFT_CHAMBER) > ARENA_DIST_PRECHAMBER) { AI_Output (self, hero,"DMH_1302_CHALLENGED_11_01"); //(grüssend) Heute abend, Gladiator... } else { AI_Output (self, hero,"DMH_1302_CHALLENGED_11_02"); //Geh rüber! }; AI_StopProcessInfos (self); return; }; if Npc_IsInRoutine(self, ZS_ArenaFight) { AI_Output (self, hero,"DMH_1302_CHALLENGED_11_03"); //Kämpfe Gladiator! AI_StopProcessInfos (self); return; } else { AI_Output (self, hero,"DMH_1302_CHALLENGED_11_04"); //(grüssend) Morgen abend, Gladiator... AI_StopProcessInfos (self); return; }; }; /////////////////////////////////////////////////////////////////////// // Info PRENPC /////////////////////////////////////////////////////////////////////// instance DMH_1302_Malgar_PRENPC (C_INFO) { npc = DMH_1302_Malgar; condition = DMH_1302_Malgar_PRENPC_Condition; information = DMH_1302_Malgar_PRENPC_Info; important = TRUE; permanent = TRUE; }; func int DMH_1302_Malgar_PRENPC_Condition() { if Arena_NpcFight && ((Arena_NpcCombo == AC_BRUTUS_MALGAR) || (Arena_NpcCombo == AC_MALGAR_THORA)) && Wld_IsTime(ARENAPRE_H, ARENAPRE_M, ARENABEGIN_H, ARENABEGIN_M) && C_NpcIsInvincible(self) { return TRUE; }; }; func void DMH_1302_Malgar_PRENPC_Info() { AI_Output (self, hero,"DMH_1302_PRENPC_11_01"); //Raus hier! AI_StopProcessInfos (self); }; /////////////////////////////////////////////////////////////////////// // Info GLADIATOR /////////////////////////////////////////////////////////////////////// instance DMH_1302_Malgar_GLADIATOR (C_INFO) { npc = DMH_1302_Malgar; nr = 1; condition = DMH_1302_Malgar_GLADIATOR_Condition; information = DMH_1302_Malgar_GLADIATOR_Info; important = FALSE; permanent = FALSE; description = "Du bist Gladiator, oder?"; }; func int DMH_1302_Malgar_GLADIATOR_Condition () { return TRUE; }; func int DMH_1302_Malgar_GLADIATOR_Info () { AI_Output (hero, self, "DMH_1302_GLADIATOR_15_01"); //Du bist Gladiator, oder? AI_Output (self, hero, "DMH_1302_GLADIATOR_11_02"); //Ja. }; /////////////////////////////////////////////////////////////////////// // Info WEAPON /////////////////////////////////////////////////////////////////////// instance DMH_1302_Malgar_WEAPON (C_INFO) { npc = DMH_1302_Malgar; condition = DMH_1302_Malgar_WEAPON_Condition; information = DMH_1302_Malgar_WEAPON_Info; important = FALSE; permanent = FALSE; description = "Kämpfst wohl mit dem Schwert."; }; func int DMH_1302_Malgar_WEAPON_Condition() { if Npc_KnowsInfo(hero, DMH_1302_Malgar_GLADIATOR) { return TRUE; }; }; func void DMH_1302_Malgar_WEAPON_Info() { AI_Output (hero, self,"DMH_1302_WEAPON_15_01"); //Kämpfst wohl mit dem Schwert. AI_Output (self, hero,"DMH_1302_WEAPON_11_02"); //Ja! }; /////////////////////////////////////////////////////////////////////// // Info VICTORIES /////////////////////////////////////////////////////////////////////// instance DMH_1302_Malgar_VICTORIES (C_INFO) { npc = DMH_1302_Malgar; condition = DMH_1302_Malgar_VICTORIES_Condition; information = DMH_1302_Malgar_VICTORIES_Info; important = FALSE; permanent = FALSE; description = "Wieviele Arenakämpfe hast du schon gewonnen?"; }; func int DMH_1302_Malgar_VICTORIES_Condition() { if Npc_KnowsInfo(hero, DMH_1302_Malgar_GLADIATOR) { return TRUE; }; }; func void DMH_1302_Malgar_VICTORIES_Info() { AI_Output (hero, self, "DMH_1302_VICTORIES_15_01"); //Wieviele Arenakämpfe hast du schon gewonnen? AI_Output (self, hero, "DMH_1302_VICTORIES_11_02"); //Genug! }; /////////////////////////////////////////////////////////////////////// // Info QUIET /////////////////////////////////////////////////////////////////////// instance DMH_1302_Malgar_QUIET (C_INFO) { npc = DMH_1302_Malgar; nr = 1; condition = DMH_1302_Malgar_QUIET_Condition; information = DMH_1302_Malgar_QUIET_Info; description = "Du sprichst wohl nicht sehr viel, was?"; }; func int DMH_1302_Malgar_QUIET_Condition () { if Npc_KnowsInfo(hero, DMH_1302_Malgar_WEAPON) && Npc_KnowsInfo(hero, DMH_1302_Malgar_VICTORIES) { return TRUE; }; }; func int DMH_1302_Malgar_QUIET_Info () { AI_Output (hero, self, "DMH_1302_QUIET_15_01"); //Du sprichst wohl nicht sehr viel, was? AI_Output (self, hero, "DMH_1302_QUIET_11_02"); //hmmmm AI_Output (hero, self, "DMH_1302_QUIET_15_03"); //Na dann... }; /////////////////////////////////////////////////////////////////////// // Info CHALLENGE /////////////////////////////////////////////////////////////////////// instance DMH_1302_Malgar_CHALLENGE (C_INFO) { npc = DMH_1302_Malgar; condition = DMH_1302_Malgar_CHALLENGE_Condition; information = DMH_1302_Malgar_CHALLENGE_Info; important = FALSE; permanent = TRUE; description = "Kämpfe gegen mich in der Arena!"; }; func int DMH_1302_Malgar_CHALLENGE_Condition() { if Npc_KnowsInfo(hero, DMH_1302_Malgar_QUIET) && !Grim_Challenged && !Goliath_Challenged && !Brutus_Challenged && !Malgar_Challenged && !Thora_Challenged && Arenamaster_Accepted && Wld_IsTime(0,0, ARENAPRE_H,ARENAPRE_M) { return TRUE; }; }; func void DMH_1302_Malgar_CHALLENGE_Info() { AI_Output (hero, self, "DMH_1302_CHALLENGE_15_01"); //Kämpfe gegen mich in der Arena! AI_Output (hero, self, "DMH_1302_CHALLENGE_15_02"); //Das geht auch ganz ohne sprechen! if !Npc_HasItems(self, ItMw_Malgar_Broadsword) { AI_Output (self, hero,"DMH_1302_CHALLENGE_11_03"); //Geht nicht. Mein Schwert ist weg. if Npc_HasItems(hero, ItMw_Malgar_Broadsword) { Info_ClearChoices (DMH_1302_Malgar_CHALLENGE); Info_AddChoice (DMH_1302_Malgar_CHALLENGE, "Ich habe deine Waffe... ähem... gefunden! Hier!",DMH_1302_Malgar_CHALLENGE_FOUND); }; return; }; if Arena_PlayerBanned { AI_Output (self, hero, "DMH_1302_CHALLENGE_11_04"); //Nein, du bist verbannt! } else { if !Brutus_PlayerWonBefore { AI_Output (self, hero, "DMH_1302_CHALLENGE_11_05"); //Wenn du Brutus besiegst, kämpfe ich gegen dich! AI_Output (hero, self, "DMH_1302_CHALLENGE_15_06"); //Das waren ja mehr als drei Silben in einem Satz! AI_Output (self, hero, "DMH_1302_CHALLENGE_11_07"); //(Brummel) return; }; if (B_Arena_GetGladiatorVictoryRanking(PC_Hero) == B_Arena_GetGladiatorVictoryRanking(AMZ_900_Thora)) { AI_Output (self, hero, "DMH_1302_CHALLENGE_11_08"); //Dir fehlt nur ein Sieg zum Titel! AI_Output (self, hero, "DMH_1302_CHALLENGE_11_09"); //Du musst gegen den Champion kämpfen. AI_Output (self, hero, "DMH_1302_CHALLENGE_11_10"); //Wenn du Thora besiegst, bist DU der neue Champion! return; }; if (B_Arena_GetGladiatorRanking(PC_Hero) == 1) && (B_Arena_GetGladiatorRanking(DMH_1302_Malgar) >= 3) { AI_Output (self, hero, "DMH_1302_CHALLENGE_11_11"); //Du bist der Champion, ich bin nicht mal zweiter. AI_Output (self, hero, "DMH_1302_CHALLENGE_11_12"); //Kämpfe gegen den zweiten! return; }; //else AI_Output (self, hero, "DMH_1302_CHALLENGE_11_13"); //Gut! AI_Output (self, hero, "DMH_1302_CHALLENGE_11_14"); //Geh zum Arenameister! Malgar_Challenged = TRUE; }; }; func void DMH_1302_Malgar_CHALLENGE_FOUND () { Info_ClearChoices (DMH_1302_Malgar_CHALLENGE); AI_Output (hero, self,"DMH_1302_CHALLENGE_FOUND_15_01"); //Ich habe deine Waffe... ähem... gefunden! Hier! B_GiveInvItems (hero, self, ItMw_Malgar_Broadsword, 1); AI_Output (self, hero,"DMH_1302_CHALLENGE_FOUND_11_02"); //Kann nur für dich hoffen, dass du sie wirklich GEFUNDEN hast. AI_StopProcessInfos (self); }; /////////////////////////////////////////////////////////////////////// // Info HOWDY /////////////////////////////////////////////////////////////////////// instance DMH_1302_Malgar_HOWDY (C_INFO) { npc = DMH_1302_Malgar; condition = DMH_1302_Malgar_HOWDY_Condition; information = DMH_1302_Malgar_HOWDY_Info; important = FALSE; permanent = TRUE; description = "Möchtest du dich unterhalten?"; }; func int DMH_1302_Malgar_HOWDY_Condition () { if Npc_KnowsInfo(hero,DMH_1302_Malgar_QUIET) && !DMH_1302_Malgar_CHALLENGE_Condition() { return TRUE; }; }; func void DMH_1302_Malgar_HOWDY_Info () { AI_Output (hero, self, "DMH_1302_HOWDY_15_01"); //(leicht spöttisch) Möchtest du dich unterhalten? AI_Output (self, hero, "DMH_1302_HOWDY_11_02"); //Nein! AI_Output (hero, self, "DMH_1302_HOWDY_15_03"); //Das... dachte ich mir! AI_StopProcessInfos (self); };
D
/******************************************************************************* @file Random.d Copyright (c) 2004 Kris Bell This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for damages of any kind arising from the use of this software. Permission is hereby granted to anyone to use this software for any purpose, including commercial applications, and to alter it and/or redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment within documentation of said product would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any distribution of the source. 4. Derivative works are permitted, but they must carry this notice in full and credit the original source. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @version Initial version, April 2004 @author various *******************************************************************************/ module mango.utils.Random; /****************************************************************************** KISS (via George Marsaglia & Paul Hsieh) the idea is to use simple, fast, individually promising generators to get a composite that will be fast, easy to code have a very long period and pass all the tests put to it. The three components of KISS are x(n)=a*x(n-1)+1 mod 2^32 y(n)=y(n-1)(I+L^13)(I+R^17)(I+L^5), z(n)=2*z(n-1)+z(n-2) +carry mod 2^32 The y's are a shift register sequence on 32bit binary vectors period 2^32-1; The z's are a simple multiply-with-carry sequence with period 2^63+2^32-1. The period of KISS is thus 2^32*(2^32-1)*(2^63+2^32-1) > 2^127 ******************************************************************************/ version (Win32) { extern(Windows) int QueryPerformanceCounter (ulong *); } version (Posix) { version (linux) private import std.c.linux.linux; version (darwin) private import std.c.darwin.darwin; } class Random { private static uint kiss_x = 1; private static uint kiss_y = 2; private static uint kiss_z = 4; private static uint kiss_w = 8; private static uint kiss_carry = 0; private static uint kiss_k; private static uint kiss_m; /********************************************************************** **********************************************************************/ static this () { ulong s; version (Posix) { timeval tv; gettimeofday (&tv, null); s = tv.tv_usec; } version (Win32) QueryPerformanceCounter (&s); seed (cast(uint) s); } /********************************************************************** **********************************************************************/ static final void seed (uint seed) { kiss_x = seed | 1; kiss_y = seed | 2; kiss_z = seed | 4; kiss_w = seed | 8; kiss_carry = 0; } /********************************************************************** **********************************************************************/ static final uint get (uint limit) { return get() % limit; } /********************************************************************** **********************************************************************/ static final uint get () { kiss_x = kiss_x * 69069 + 1; kiss_y ^= kiss_y << 13; kiss_y ^= kiss_y >> 17; kiss_y ^= kiss_y << 5; kiss_k = (kiss_z >> 2) + (kiss_w >> 3) + (kiss_carry >> 2); kiss_m = kiss_w + kiss_w + kiss_z + kiss_carry; kiss_z = kiss_w; kiss_w = kiss_m; kiss_carry = kiss_k >> 30; return kiss_x + kiss_y + kiss_w; } }
D
import core.stdc.string; import erupted; import erupted.vulkan_lib_loader; import matrix4x4; import std.conv; import std.exception; import std.stdio; version(linux) { import X11.Xlib_xcb; public import xcb.xcb; import erupted.platform_extensions; mixin Platform_Extensions!USE_PLATFORM_XCB_KHR; } version(Windows) { public import core.sys.windows.windows; import erupted.platform_extensions; mixin Platform_Extensions!USE_PLATFORM_WIN32_KHR; } //DispatchDevice dd; const(char*) getObjectType( VkObjectType type ) nothrow @nogc { switch( type ) { case VK_OBJECT_TYPE_QUERY_POOL: return "VK_OBJECT_TYPE_QUERY_POOL"; case VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION: return "VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION"; case VK_OBJECT_TYPE_SEMAPHORE: return "VK_OBJECT_TYPE_SEMAPHORE"; case VK_OBJECT_TYPE_SHADER_MODULE: return "VK_OBJECT_TYPE_SHADER_MODULE"; case VK_OBJECT_TYPE_SWAPCHAIN_KHR: return "VK_OBJECT_TYPE_SWAPCHAIN_KHR"; case VK_OBJECT_TYPE_SAMPLER: return "VK_OBJECT_TYPE_SAMPLER"; case VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT: return "VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT"; case VK_OBJECT_TYPE_IMAGE: return "VK_OBJECT_TYPE_IMAGE"; case VK_OBJECT_TYPE_UNKNOWN: return "VK_OBJECT_TYPE_UNKNOWN"; case VK_OBJECT_TYPE_DESCRIPTOR_POOL: return "VK_OBJECT_TYPE_DESCRIPTOR_POOL"; case VK_OBJECT_TYPE_COMMAND_BUFFER: return "VK_OBJECT_TYPE_COMMAND_BUFFER"; case VK_OBJECT_TYPE_BUFFER: return "VK_OBJECT_TYPE_BUFFER"; case VK_OBJECT_TYPE_SURFACE_KHR: return "VK_OBJECT_TYPE_SURFACE_KHR"; case VK_OBJECT_TYPE_INSTANCE: return "VK_OBJECT_TYPE_INSTANCE"; case VK_OBJECT_TYPE_VALIDATION_CACHE_EXT: return "VK_OBJECT_TYPE_VALIDATION_CACHE_EXT"; case VK_OBJECT_TYPE_IMAGE_VIEW: return "VK_OBJECT_TYPE_IMAGE_VIEW"; case VK_OBJECT_TYPE_DESCRIPTOR_SET: return "VK_OBJECT_TYPE_DESCRIPTOR_SET"; case VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT: return "VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT"; case VK_OBJECT_TYPE_COMMAND_POOL: return "VK_OBJECT_TYPE_COMMAND_POOL"; case VK_OBJECT_TYPE_PHYSICAL_DEVICE: return "VK_OBJECT_TYPE_PHYSICAL_DEVICE"; case VK_OBJECT_TYPE_DISPLAY_KHR: return "VK_OBJECT_TYPE_DISPLAY_KHR"; case VK_OBJECT_TYPE_BUFFER_VIEW: return "VK_OBJECT_TYPE_BUFFER_VIEW"; case VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT: return "VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT"; case VK_OBJECT_TYPE_FRAMEBUFFER: return "VK_OBJECT_TYPE_FRAMEBUFFER"; case VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE: return "VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE"; case VK_OBJECT_TYPE_PIPELINE_CACHE: return "VK_OBJECT_TYPE_PIPELINE_CACHE"; case VK_OBJECT_TYPE_PIPELINE_LAYOUT: return "VK_OBJECT_TYPE_PIPELINE_LAYOUT"; case VK_OBJECT_TYPE_DEVICE_MEMORY: return "VK_OBJECT_TYPE_DEVICE_MEMORY"; case VK_OBJECT_TYPE_FENCE: return "VK_OBJECT_TYPE_FENCE"; case VK_OBJECT_TYPE_QUEUE: return "VK_OBJECT_TYPE_QUEUE"; case VK_OBJECT_TYPE_DEVICE: return "VK_OBJECT_TYPE_DEVICE"; case VK_OBJECT_TYPE_RENDER_PASS: return "VK_OBJECT_TYPE_RENDER_PASS"; case VK_OBJECT_TYPE_DISPLAY_MODE_KHR: return "VK_OBJECT_TYPE_DISPLAY_MODE_KHR"; case VK_OBJECT_TYPE_EVENT:return "VK_OBJECT_TYPE_EVENT"; case VK_OBJECT_TYPE_PIPELINE: return "VK_OBJECT_TYPE_PIPELINE"; default: return "unhandled type"; } } extern(System) VkBool32 myDebugReportCallback( VkDebugUtilsMessageSeverityFlagBitsEXT msgSeverity, VkDebugUtilsMessageTypeFlagsEXT msgType, const VkDebugUtilsMessengerCallbackDataEXT* callbackData, void* /*userData*/ ) nothrow @nogc { if (msgSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT) { printf( "ERROR: %s\n", callbackData.pMessage ); } else if (msgSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT) { printf( "WARNING: %s\n", callbackData.pMessage ); } else if (msgSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT) { printf( "INFO: %s\n", callbackData.pMessage ); } else if (msgSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT) { printf( "VERBOSE: %s\n", callbackData.pMessage ); } if (msgType & VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT) { printf( "GENERAL: %s\n", callbackData.pMessage ); } else if (msgType & VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT) { printf( "PERF: %s\n", callbackData.pMessage ); } if (callbackData.objectCount > 0) { printf( "Objects: %u\n", callbackData.objectCount ); for (int i = 0; i < callbackData.objectCount; ++i) { const char* name = callbackData.pObjects[ i ].pObjectName ? callbackData.pObjects[ i ].pObjectName : "unnamed"; printf( "Object %u: name: %s, type: %s\n", i, name, getObjectType( callbackData.pObjects[ i ].objectType ) ); //printf( "Object %u: name: %s, type: TODO\n", i, name ); } } printf( "Vulkan validation error!" ); return VK_FALSE; } void enforceVk( VkResult res ) { enforce( res is VkResult.VK_SUCCESS, res.to!string ); } enum BlendMode { Off, } enum DepthFunc { NoneWriteOff, } enum CullMode { Off, } struct UniformBuffer { Matrix4x4 modelToClip; float[ 4 ] tintColor; int textureIndex; } struct InstanceData { float[ 3 ] pos; float[ 2 ] uv; float[ 4 ] color; } class GfxDeviceVulkan { private bool isDebug = true; this( int width, int height, void* windowHandleOrWindow, void* display, uint window ) { loadGlobalLevelFunctions(); VkApplicationInfo appinfo; appinfo.pApplicationName = "VulkanBase"; appinfo.apiVersion = VK_MAKE_API_VERSION( 0, 1, 0, 2 ); version(Windows) { const(char*)[3] extensionNames = [ "VK_KHR_surface", "VK_KHR_win32_surface", "VK_EXT_debug_utils", ]; } version(linux) { const(char*)[3] extensionNames = [ "VK_KHR_surface", "VK_KHR_xcb_surface", //"VK_KHR_wayland_surface", "VK_EXT_debug_utils", ]; } uint extensionCount = 0; vkEnumerateInstanceExtensionProperties( null, &extensionCount, null ); auto extensionProps = new VkExtensionProperties[]( extensionCount ); vkEnumerateInstanceExtensionProperties( null, &extensionCount, extensionProps.ptr ); uint layerCount = 0; vkEnumerateInstanceLayerProperties( &layerCount, null ); auto layerProps = new VkLayerProperties[]( layerCount ); vkEnumerateInstanceLayerProperties( &layerCount, layerProps.ptr ); const(char*)[1] validationLayers = ["VK_LAYER_KHRONOS_validation"]; VkInstanceCreateInfo createinfo; createinfo.sType = VkStructureType.VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; createinfo.pApplicationInfo = &appinfo; createinfo.enabledExtensionCount = isDebug ? cast(uint)extensionNames.length : 2; createinfo.ppEnabledExtensionNames = extensionNames.ptr; createinfo.enabledLayerCount = isDebug ? validationLayers.length : 0; createinfo.ppEnabledLayerNames = isDebug ? validationLayers.ptr : null; enforceVk( vkCreateInstance( &createinfo, null, &instance ) ); loadInstanceLevelFunctions( instance ); if (isDebug) { VkDebugUtilsMessengerCreateInfoEXT dbg_messenger_create_info; dbg_messenger_create_info.sType = VkStructureType.VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT; dbg_messenger_create_info.messageSeverity = VkDebugUtilsMessageSeverityFlagBitsEXT.VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT | VkDebugUtilsMessageSeverityFlagBitsEXT.VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT; dbg_messenger_create_info.messageType = VkDebugUtilsMessageTypeFlagBitsEXT.VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT | VkDebugUtilsMessageTypeFlagBitsEXT.VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT | VkDebugUtilsMessageTypeFlagBitsEXT.VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT; dbg_messenger_create_info.pfnUserCallback = &myDebugReportCallback; VkDebugUtilsMessengerEXT dbgMessenger; enforceVk( vkCreateDebugUtilsMessengerEXT( instance, &dbg_messenger_create_info, null, &dbgMessenger ) ); } version(Windows) { VkWin32SurfaceCreateInfoKHR surfaceCreateInfo; surfaceCreateInfo.sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR; surfaceCreateInfo.hinstance = windowHandleOrWindow; surfaceCreateInfo.hwnd = windowHandleOrWindow; enforceVk( vkCreateWin32SurfaceKHR( instance, &surfaceCreateInfo, null, &surface ) ); } version(linux) { auto xcbInfo = VkXcbSurfaceCreateInfoKHR( VkStructureType.VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR, null, 0, XGetXCBConnection( cast(xcb_connection_t*)display ), window ); enforceVk( vkCreateXcbSurfaceKHR( instance, &xcbInfo, null, &surface ) ); /*auto waylandInfo = VkWaylandSurfaceCreateInfoKHR( VkStructureType.VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR, null, 0, cast(wl_display*)display, cast(wl_surface*)windowHandleOrWindow ); enforceVk( vkCreateWaylandSurfaceKHR( instance, &waylandInfo, null, &surface ) );*/ } createDevice( width, height ); createDepthStencil( width, height ); createSemaphores(); createRenderPass(); flushSetupCommandBuffer(); createDescriptorSetLayout(); createDescriptorPool(); createUniformBuffer( quad1Ubo ); createIndirectCommands(); createInstanceData(); drawCmdBuffers = new VkCommandBuffer[ swapChainBuffers.length ]; frameBuffers = new VkFramebuffer[ swapChainBuffers.length ]; VkCommandBufferAllocateInfo commandBufferAllocateInfo; commandBufferAllocateInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; commandBufferAllocateInfo.commandPool = cmdPool; commandBufferAllocateInfo.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; commandBufferAllocateInfo.commandBufferCount = cast(uint)drawCmdBuffers.length; enforceVk( vkAllocateCommandBuffers( device, &commandBufferAllocateInfo, drawCmdBuffers.ptr ) ); commandBufferAllocateInfo.commandBufferCount = 1; enforceVk( vkAllocateCommandBuffers( device, &commandBufferAllocateInfo, &postPresentCmdBuffer ) ); enforceVk( vkAllocateCommandBuffers( device, &commandBufferAllocateInfo, &prePresentCmdBuffer ) ); VkImageView[ 2 ] attachments; attachments[ 1 ] = depthStencil.view; VkFramebufferCreateInfo frameBufferCreateInfo; frameBufferCreateInfo.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO; frameBufferCreateInfo.pNext = null; frameBufferCreateInfo.renderPass = renderPass; frameBufferCreateInfo.attachmentCount = 2; frameBufferCreateInfo.pAttachments = attachments.ptr; frameBufferCreateInfo.width = cast(uint32_t) width; frameBufferCreateInfo.height = cast(uint32_t) height; frameBufferCreateInfo.layers = 1; for (uint32_t bufferIndex = 0; bufferIndex < swapChainBuffers.length; ++bufferIndex) { attachments[ 0 ] = swapChainBuffers[ bufferIndex ].view; enforceVk( vkCreateFramebuffer( device, &frameBufferCreateInfo, null, &frameBuffers[ bufferIndex ] ) ); } VkCommandBufferAllocateInfo cmdBufInfo; cmdBufInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; cmdBufInfo.commandPool = cmdPool; cmdBufInfo.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; cmdBufInfo.commandBufferCount = 1; enforceVk( vkAllocateCommandBuffers( device, &cmdBufInfo, &texCmdBuffer ) ); const float s = 100; quadVertices = new VertexPTC[ 4 ]; quadVertices[ 0 ] = VertexPTC( 0, 0, 0, 0, 0 ); quadVertices[ 1 ] = VertexPTC( s, 0, 0, 1, 0 ); quadVertices[ 2 ] = VertexPTC( s, s, 0, 1, 1 ); quadVertices[ 3 ] = VertexPTC( 0, s, 0, 0, 1 ); quadIndices = new Face[ 2 ]; quadIndices[ 0 ] = Face( 0, 1, 2 ); quadIndices[ 1 ] = Face( 2, 3, 0 ); vertexBuffer.generate( quadVertices, quadIndices, this ); shader.load( "assets/shader_vert_hlsl.spv", "assets/shader_frag_hlsl.spv", device ); } private void createDescriptorSetLayout() { // Binding 0 : Uniform buffer VkDescriptorSetLayoutBinding layoutBindingUBO; layoutBindingUBO.binding = 0; layoutBindingUBO.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; layoutBindingUBO.descriptorCount = 1; layoutBindingUBO.stageFlags = VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT | VK_SHADER_STAGE_COMPUTE_BIT; layoutBindingUBO.pImmutableSamplers = null; // Binding 1 : Image (Fragment shader) VkDescriptorSetLayoutBinding layoutBindingImage; layoutBindingImage.binding = 1; layoutBindingImage.descriptorType = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE; layoutBindingImage.descriptorCount = 3; layoutBindingImage.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; layoutBindingImage.pImmutableSamplers = null; // Binding 2 : Sampler (Fragment shader) VkDescriptorSetLayoutBinding layoutBindingSampler; layoutBindingSampler.binding = 2; layoutBindingSampler.descriptorType = VK_DESCRIPTOR_TYPE_SAMPLER; layoutBindingSampler.descriptorCount = 1; layoutBindingSampler.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; layoutBindingSampler.pImmutableSamplers = null; VkDescriptorSetLayoutBinding[ 3 ] bindings = [ layoutBindingUBO, layoutBindingImage, layoutBindingSampler ]; VkDescriptorSetLayoutCreateInfo descriptorLayout; descriptorLayout.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; descriptorLayout.pNext = null; descriptorLayout.bindingCount = bindings.length; descriptorLayout.pBindings = bindings.ptr; enforceVk( vkCreateDescriptorSetLayout( device, &descriptorLayout, null, &descriptorSetLayout ) ); VkPipelineLayoutCreateInfo pipelineLayoutCreateInfo; pipelineLayoutCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; pipelineLayoutCreateInfo.pNext = null; pipelineLayoutCreateInfo.setLayoutCount = 1; pipelineLayoutCreateInfo.pSetLayouts = &descriptorSetLayout; enforceVk( vkCreatePipelineLayout( device, &pipelineLayoutCreateInfo, null, &pipelineLayout ) ); } void createDescriptorPool() { const int count = 2; VkDescriptorPoolSize[ 3 ] typeCounts; typeCounts[ 0 ].type = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; typeCounts[ 0 ].descriptorCount = count; typeCounts[ 1 ].type = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE; typeCounts[ 1 ].descriptorCount = 3 * 3; typeCounts[ 2 ].type = VK_DESCRIPTOR_TYPE_SAMPLER; typeCounts[ 2 ].descriptorCount = count; VkDescriptorPoolCreateInfo descriptorPoolInfo; descriptorPoolInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; descriptorPoolInfo.pNext = null; descriptorPoolInfo.poolSizeCount = typeCounts.length; descriptorPoolInfo.pPoolSizes = typeCounts.ptr; descriptorPoolInfo.maxSets = count; descriptorPoolInfo.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT; enforceVk( vkCreateDescriptorPool( device, &descriptorPoolInfo, null, &descriptorPool ) ); descriptorSets = new VkDescriptorSet[ count ]; for (int i = 0; i < descriptorSets.length; ++i) { VkDescriptorSetAllocateInfo allocInfo; allocInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; allocInfo.descriptorPool = descriptorPool; allocInfo.descriptorSetCount = 1; allocInfo.pSetLayouts = &descriptorSetLayout; enforceVk( vkAllocateDescriptorSets( device, &allocInfo, &descriptorSets[ i ] ) ); } } void createRenderPass() { VkAttachmentDescription[ 2 ] attachments; attachments[ 0 ].format = colorFormat; attachments[ 0 ].samples = VK_SAMPLE_COUNT_1_BIT; attachments[ 0 ].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR; attachments[ 0 ].storeOp = VK_ATTACHMENT_STORE_OP_STORE; attachments[ 0 ].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; attachments[ 0 ].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; attachments[ 0 ].initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; attachments[ 0 ].finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; attachments[ 0 ].flags = 0; attachments[ 1 ].format = depthFormat; attachments[ 1 ].samples = VK_SAMPLE_COUNT_1_BIT; attachments[ 1 ].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR; attachments[ 1 ].storeOp = VK_ATTACHMENT_STORE_OP_STORE; attachments[ 1 ].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; attachments[ 1 ].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; attachments[ 1 ].initialLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; attachments[ 1 ].finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; attachments[ 1 ].flags = 0; VkAttachmentReference colorReference; colorReference.attachment = 0; colorReference.layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; VkAttachmentReference depthReference; depthReference.attachment = 1; depthReference.layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; VkSubpassDescription subpass; subpass.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS; subpass.flags = 0; subpass.inputAttachmentCount = 0; subpass.pInputAttachments = null; subpass.colorAttachmentCount = 1; subpass.pColorAttachments = &colorReference; subpass.pResolveAttachments = null; subpass.pDepthStencilAttachment = &depthReference; subpass.preserveAttachmentCount = 0; subpass.pPreserveAttachments = null; VkRenderPassCreateInfo renderPassInfo; renderPassInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO; renderPassInfo.pNext = null; renderPassInfo.attachmentCount = 2; renderPassInfo.pAttachments = attachments.ptr; renderPassInfo.subpassCount = 1; renderPassInfo.pSubpasses = &subpass; renderPassInfo.dependencyCount = 0; renderPassInfo.pDependencies = null; enforceVk( vkCreateRenderPass( device, &renderPassInfo, null, &renderPass ) ); } void submitPostPresentBarrier() { VkCommandBufferBeginInfo cmdBufInfo; cmdBufInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; enforceVk( vkBeginCommandBuffer( postPresentCmdBuffer, &cmdBufInfo ) ); VkImageMemoryBarrier postPresentBarrier; postPresentBarrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; postPresentBarrier.pNext = null; postPresentBarrier.srcAccessMask = VK_ACCESS_MEMORY_READ_BIT; postPresentBarrier.dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT; postPresentBarrier.oldLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR; postPresentBarrier.newLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; postPresentBarrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; postPresentBarrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; postPresentBarrier.subresourceRange = VkImageSubresourceRange( VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1 ); postPresentBarrier.image = swapChainBuffers[ currentBuffer ].image; vkCmdPipelineBarrier( postPresentCmdBuffer, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, 0, 0, null, 0, null, 1, &postPresentBarrier ); enforceVk( vkEndCommandBuffer( postPresentCmdBuffer ) ); VkSubmitInfo submitPostInfo; submitPostInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; submitPostInfo.commandBufferCount = 1; submitPostInfo.pCommandBuffers = &postPresentCmdBuffer; enforceVk( vkQueueSubmit( graphicsQueue, 1, &submitPostInfo, VK_NULL_HANDLE ) ); } void submitPrePresentBarrier() { VkCommandBufferBeginInfo cmdBufInfo; cmdBufInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; enforceVk( vkBeginCommandBuffer( prePresentCmdBuffer, &cmdBufInfo ) ); VkImageMemoryBarrier prePresentBarrier; prePresentBarrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; prePresentBarrier.pNext = null; prePresentBarrier.srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT; prePresentBarrier.dstAccessMask = VK_ACCESS_MEMORY_READ_BIT; prePresentBarrier.oldLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; prePresentBarrier.newLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR; prePresentBarrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; prePresentBarrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; prePresentBarrier.subresourceRange = VkImageSubresourceRange( VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1 ); prePresentBarrier.image = swapChainBuffers[ currentBuffer ].image; vkCmdPipelineBarrier( prePresentCmdBuffer, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, 0, 0, null, 0, null, 1, &prePresentBarrier ); enforceVk( vkEndCommandBuffer( prePresentCmdBuffer ) ); VkSubmitInfo submitInfo; submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; submitInfo.commandBufferCount = 1; submitInfo.pCommandBuffers = &prePresentCmdBuffer; enforceVk( vkQueueSubmit( graphicsQueue, 1, &submitInfo, VK_NULL_HANDLE ) ); } private void createUniformBuffer( ref Ubo ubo ) { const VkDeviceSize uboSize = 256; VkBufferCreateInfo bufferInfo; bufferInfo.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; bufferInfo.size = uboSize; bufferInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT; enforceVk( vkCreateBuffer( device, &bufferInfo, null, &ubo.ubo ) ); VkMemoryRequirements memReqs; vkGetBufferMemoryRequirements( device, ubo.ubo, &memReqs ); VkMemoryAllocateInfo allocInfo; allocInfo.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; allocInfo.pNext = null; allocInfo.allocationSize = memReqs.size; allocInfo.memoryTypeIndex = getMemoryType( memReqs.memoryTypeBits, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT ); enforceVk( vkAllocateMemory( device, &allocInfo, null, &ubo.memory ) ); enforceVk( vkBindBufferMemory( device, ubo.ubo, ubo.memory, 0 ) ); ubo.desc.buffer = ubo.ubo; ubo.desc.offset = 0; ubo.desc.range = uboSize; enforceVk( vkMapMemory( device, ubo.memory, 0, uboSize, 0, cast(void **)&ubo.data ) ); } private void flushSetupCommandBuffer() { if (setupCmdBuffer == VK_NULL_HANDLE) { return; } enforceVk( vkEndCommandBuffer( setupCmdBuffer ) ); VkSubmitInfo submitInfo; submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; submitInfo.commandBufferCount = 1; submitInfo.pCommandBuffers = &setupCmdBuffer; enforceVk( vkQueueSubmit( graphicsQueue, 1, &submitInfo, VK_NULL_HANDLE ) ); enforceVk( vkQueueWaitIdle( graphicsQueue ) ); vkFreeCommandBuffers( device, cmdPool, 1, &setupCmdBuffer ); setupCmdBuffer = VK_NULL_HANDLE; } void beginFrame( int width, int height ) { enforceVk( vkAcquireNextImageKHR( device, swapChain, ulong.max, presentCompleteSemaphore, null, &currentBuffer ) ); submitPostPresentBarrier(); beginRenderPass( width, height ); } void endFrame() { endRenderPass(); VkPipelineStageFlags pipelineStages = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT; VkSubmitInfo submitInfo; submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; submitInfo.pWaitDstStageMask = &pipelineStages; submitInfo.waitSemaphoreCount = 1; submitInfo.pWaitSemaphores = &presentCompleteSemaphore; submitInfo.commandBufferCount = 1; submitInfo.pCommandBuffers = &drawCmdBuffers[ currentBuffer ]; submitInfo.signalSemaphoreCount = 1; submitInfo.pSignalSemaphores = &renderCompleteSemaphore; enforceVk( vkQueueSubmit( graphicsQueue, 1, &submitInfo, VK_NULL_HANDLE ) ); submitPrePresentBarrier(); VkPresentInfoKHR presentInfo; presentInfo.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR; presentInfo.pNext = null; presentInfo.swapchainCount = 1; presentInfo.pSwapchains = &swapChain; presentInfo.pImageIndices = &currentBuffer; presentInfo.pWaitSemaphores = &renderCompleteSemaphore; presentInfo.waitSemaphoreCount = 1; enforceVk( vkQueuePresentKHR( graphicsQueue, &presentInfo ) ); ++currentFrame; } private void beginRenderPass( int windowWidth, int windowHeight ) { VkCommandBufferBeginInfo cmdBufInfo; cmdBufInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; cmdBufInfo.pNext = null; VkClearColorValue clearColor; clearColor.int32 = [ 1, 0, 0, 1 ]; VkClearValue[ 2 ] clearValues; clearValues[ 0 ].color = clearColor; clearValues[ 1 ].depthStencil = VkClearDepthStencilValue( 1.0f, 0 ); VkRenderPassBeginInfo renderPassBeginInfo; renderPassBeginInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO; renderPassBeginInfo.pNext = null; renderPassBeginInfo.renderPass = renderPass; renderPassBeginInfo.renderArea.offset.x = 0; renderPassBeginInfo.renderArea.offset.y = 0; renderPassBeginInfo.renderArea.extent.width = windowWidth; renderPassBeginInfo.renderArea.extent.height = windowHeight; renderPassBeginInfo.clearValueCount = 2; renderPassBeginInfo.pClearValues = &clearValues[ 0 ]; renderPassBeginInfo.framebuffer = frameBuffers[ currentBuffer ]; enforceVk( vkBeginCommandBuffer( drawCmdBuffers[ currentBuffer ], &cmdBufInfo ) ); vkCmdBeginRenderPass( drawCmdBuffers[ currentBuffer ], &renderPassBeginInfo, VK_SUBPASS_CONTENTS_INLINE ); VkViewport viewport; viewport.x = 0.0f; viewport.y = 0.0f; viewport.height = cast(float)windowHeight; viewport.width = cast(float)windowWidth; viewport.minDepth = 0.0f; viewport.maxDepth = 1.0f; vkCmdSetViewport( drawCmdBuffers[ currentBuffer ], 0, 1, &viewport ); VkRect2D scissor; scissor.extent.width = windowWidth; scissor.extent.height = windowHeight; scissor.offset.x = 0; scissor.offset.y = 0; vkCmdSetScissor( drawCmdBuffers[ currentBuffer ], 0, 1, &scissor ); } private void endRenderPass() { vkCmdEndRenderPass( drawCmdBuffers[ currentBuffer ] ); enforceVk( vkEndCommandBuffer( drawCmdBuffers[ currentBuffer ] ) ); enforceVk( vkDeviceWaitIdle( device ) ); } private void createDevice( int width, int height ) { uint32_t gpuCount; enforceVk( vkEnumeratePhysicalDevices( instance, &gpuCount, null ) ); if (gpuCount < 1) { assert( false, "Your system doesn't have Vulkan capable GPU." ); } enforceVk( vkEnumeratePhysicalDevices( instance, &gpuCount, &physicalDevice ) ); uint32_t queueCount; vkGetPhysicalDeviceQueueFamilyProperties( physicalDevice, &queueCount, null ); VkQueueFamilyProperties[] queueProps = new VkQueueFamilyProperties[ queueCount ]; vkGetPhysicalDeviceQueueFamilyProperties( physicalDevice, &queueCount, queueProps.ptr ); uint32_t graphicsQueueIndex = 0; for (graphicsQueueIndex = 0; graphicsQueueIndex < queueCount; ++graphicsQueueIndex) { if (queueProps[ graphicsQueueIndex ].queueFlags & VK_QUEUE_GRAPHICS_BIT) { break; } } assert( graphicsQueueIndex < queueCount, "Could not find graphics queue" ); queueNodeIndex = graphicsQueueIndex; VkBool32[] supportsPresent = new VkBool32[ queueCount ]; for (uint32_t i = 0; i < queueCount; ++i) { vkGetPhysicalDeviceSurfaceSupportKHR( physicalDevice, i, surface, &supportsPresent[ i ] ); } float queuePriorities = 0; VkDeviceQueueCreateInfo queueCreateInfo; queueCreateInfo.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; queueCreateInfo.queueFamilyIndex = graphicsQueueIndex; queueCreateInfo.queueCount = 1; queueCreateInfo.pQueuePriorities = &queuePriorities; const(char*)[] deviceExtensions = [ "VK_KHR_swapchain" ]; uint32_t deviceExtensionCount; vkEnumerateDeviceExtensionProperties( physicalDevice, null, &deviceExtensionCount, null ); VkExtensionProperties[] availableDeviceExtensions = new VkExtensionProperties[ deviceExtensionCount ]; vkEnumerateDeviceExtensionProperties( physicalDevice, null, &deviceExtensionCount, availableDeviceExtensions.ptr ); VkPhysicalDeviceFeatures enabledFeatures; enabledFeatures.shaderTessellationAndGeometryPointSize = VK_TRUE; enabledFeatures.shaderClipDistance = VK_TRUE; enabledFeatures.shaderCullDistance = VK_TRUE; enabledFeatures.multiDrawIndirect = VK_TRUE; VkDeviceCreateInfo deviceCreateInfo; deviceCreateInfo.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO; deviceCreateInfo.pNext = null; deviceCreateInfo.queueCreateInfoCount = 1; deviceCreateInfo.pQueueCreateInfos = &queueCreateInfo; deviceCreateInfo.pEnabledFeatures = &enabledFeatures; deviceCreateInfo.enabledExtensionCount = cast(uint)deviceExtensions.length; deviceCreateInfo.ppEnabledExtensionNames = deviceExtensions.ptr; enforceVk( vkCreateDevice( physicalDevice, &deviceCreateInfo, null, &device ) ); //dd.loadDeviceLevelFunctions( device ); vkGetPhysicalDeviceMemoryProperties( physicalDevice, &deviceMemoryProperties ); loadDeviceLevelFunctions( device ); vkGetDeviceQueue( device, graphicsQueueIndex, 0, &graphicsQueue ); const VkFormat[] depthFormats = [ VK_FORMAT_D24_UNORM_S8_UINT, VK_FORMAT_D16_UNORM_S8_UINT, VK_FORMAT_D16_UNORM ]; bool depthFormatFound = false; foreach (format; depthFormats) { VkFormatProperties formatProps; vkGetPhysicalDeviceFormatProperties( physicalDevice, format, &formatProps ); if (formatProps.optimalTilingFeatures & VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT) { depthFormat = format; depthFormatFound = true; break; } } assert( depthFormatFound, "No suitable depth format found" ); uint32_t formatCount; enforceVk( vkGetPhysicalDeviceSurfaceFormatsKHR( physicalDevice, surface, &formatCount, null ) ); assert( formatCount > 0, "no surface formats" ); VkSurfaceFormatKHR[] surfFormats = new VkSurfaceFormatKHR[ formatCount ]; enforceVk( vkGetPhysicalDeviceSurfaceFormatsKHR( physicalDevice, surface, &formatCount, surfFormats.ptr ) ); if (formatCount == 1 && surfFormats[ 0 ].format == VK_FORMAT_UNDEFINED) { colorFormat = VK_FORMAT_B8G8R8A8_UNORM; } else { colorFormat = surfFormats[ 0 ].format; } VkColorSpaceKHR colorSpace = surfFormats[ 0 ].colorSpace; // Create swap chain VkSurfaceCapabilitiesKHR surfCaps; enforceVk( vkGetPhysicalDeviceSurfaceCapabilitiesKHR( physicalDevice, surface, &surfCaps ) ); uint32_t presentModeCount = 0; enforceVk( vkGetPhysicalDeviceSurfacePresentModesKHR( physicalDevice, surface, &presentModeCount, null ) ); assert( presentModeCount > 0, "no present modes" ); VkPresentModeKHR[] presentModes = new VkPresentModeKHR[ presentModeCount ]; enforceVk( vkGetPhysicalDeviceSurfacePresentModesKHR( physicalDevice, surface, &presentModeCount, presentModes.ptr ) ); VkExtent2D swapchainExtent; if (surfCaps.currentExtent.width == cast(uint)-1) { swapchainExtent.width = width; swapchainExtent.height = height; } else { swapchainExtent = surfCaps.currentExtent; } uint32_t desiredNumberOfSwapchainImages = surfCaps.minImageCount + 1; VkSurfaceTransformFlagsKHR preTransform; if (surfCaps.supportedTransforms & VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR) { preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR; } else { preTransform = surfCaps.currentTransform; } VkSwapchainCreateInfoKHR swapchainInfo; swapchainInfo.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR; swapchainInfo.pNext = null; swapchainInfo.surface = surface; swapchainInfo.minImageCount = desiredNumberOfSwapchainImages; swapchainInfo.imageFormat = colorFormat; swapchainInfo.imageColorSpace = colorSpace; swapchainInfo.imageExtent.width = swapchainExtent.width; swapchainInfo.imageExtent.height = swapchainExtent.height; swapchainInfo.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; swapchainInfo.preTransform = cast(VkSurfaceTransformFlagBitsKHR)preTransform; swapchainInfo.imageArrayLayers = 1; swapchainInfo.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE; swapchainInfo.queueFamilyIndexCount = 0; swapchainInfo.pQueueFamilyIndices = null; swapchainInfo.presentMode = VK_PRESENT_MODE_FIFO_KHR; swapchainInfo.clipped = VK_TRUE; swapchainInfo.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR; enforceVk( vkCreateSwapchainKHR( device, &swapchainInfo, null, &swapChain ) ); uint32_t imageCount; enforceVk( vkGetSwapchainImagesKHR( device, swapChain, &imageCount, null ) ); assert( imageCount > 0, "imageCount" ); swapChainImages = new VkImage[ imageCount ]; swapChainBuffers = new SwapChainBuffer[ imageCount ]; enforceVk( vkGetSwapchainImagesKHR( device, swapChain, &imageCount, swapChainImages.ptr ) ); allocateSetupCommandBuffer(); for (uint32_t i = 0; i < imageCount; ++i) { VkImageViewCreateInfo colorAttachmentView; colorAttachmentView.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; colorAttachmentView.pNext = null; colorAttachmentView.format = colorFormat; colorAttachmentView.components = VkComponentMapping( VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_A ); colorAttachmentView.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; colorAttachmentView.subresourceRange.baseMipLevel = 0; colorAttachmentView.subresourceRange.levelCount = 1; colorAttachmentView.subresourceRange.baseArrayLayer = 0; colorAttachmentView.subresourceRange.layerCount = 1; colorAttachmentView.viewType = VK_IMAGE_VIEW_TYPE_2D; colorAttachmentView.flags = 0; swapChainBuffers[ i ].image = swapChainImages[ i ]; setImageLayout( setupCmdBuffer, swapChainBuffers[ i ].image, VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, 1, 0, 1 ); colorAttachmentView.image = swapChainBuffers[ i ].image; enforceVk( vkCreateImageView( device, &colorAttachmentView, null, &swapChainBuffers[ i ].view ) ); } VkSamplerCreateInfo samplerInfo; samplerInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; samplerInfo.pNext = null; samplerInfo.magFilter = VK_FILTER_NEAREST; samplerInfo.minFilter = samplerInfo.magFilter; samplerInfo.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST; samplerInfo.addressModeU = VK_SAMPLER_ADDRESS_MODE_REPEAT; samplerInfo.addressModeV = samplerInfo.addressModeU; samplerInfo.addressModeW = samplerInfo.addressModeU; samplerInfo.mipLodBias = 0; samplerInfo.compareOp = VK_COMPARE_OP_NEVER; samplerInfo.minLod = 0; samplerInfo.maxLod = VK_LOD_CLAMP_NONE; samplerInfo.maxAnisotropy = 1; samplerInfo.anisotropyEnable = VK_FALSE; samplerInfo.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; enforceVk( vkCreateSampler( device, &samplerInfo, null, &samplerNearestRepeat ) ); } void setImageLayout( VkCommandBuffer cmdbuffer, VkImage image, VkImageAspectFlags aspectMask, VkImageLayout oldImageLayout, VkImageLayout newImageLayout, uint layerCount, uint mipLevel, uint mipLevelCount ) { VkImageMemoryBarrier imageMemoryBarrier; imageMemoryBarrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; imageMemoryBarrier.pNext = null; imageMemoryBarrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; imageMemoryBarrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; imageMemoryBarrier.oldLayout = oldImageLayout; imageMemoryBarrier.newLayout = newImageLayout; imageMemoryBarrier.image = image; imageMemoryBarrier.subresourceRange.aspectMask = aspectMask; imageMemoryBarrier.subresourceRange.baseMipLevel = mipLevel; imageMemoryBarrier.subresourceRange.levelCount = mipLevelCount; imageMemoryBarrier.subresourceRange.layerCount = layerCount; if (oldImageLayout == VK_IMAGE_LAYOUT_PREINITIALIZED) { imageMemoryBarrier.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT | VK_ACCESS_TRANSFER_WRITE_BIT; } if (oldImageLayout == VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL) { imageMemoryBarrier.srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT; } if (oldImageLayout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL) { imageMemoryBarrier.srcAccessMask = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT; } if (oldImageLayout == VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL) { imageMemoryBarrier.srcAccessMask = VK_ACCESS_TRANSFER_READ_BIT; } if (oldImageLayout == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) { imageMemoryBarrier.srcAccessMask = VK_ACCESS_SHADER_READ_BIT; } if (newImageLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) { imageMemoryBarrier.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; } if (newImageLayout == VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL) { imageMemoryBarrier.srcAccessMask = imageMemoryBarrier.srcAccessMask | VK_ACCESS_TRANSFER_READ_BIT; imageMemoryBarrier.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT; } if (newImageLayout == VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL) { imageMemoryBarrier.dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT; imageMemoryBarrier.srcAccessMask = VK_ACCESS_TRANSFER_READ_BIT; } if (newImageLayout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL) { imageMemoryBarrier.dstAccessMask = imageMemoryBarrier.dstAccessMask | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT; } if (newImageLayout == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) { imageMemoryBarrier.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT | VK_ACCESS_TRANSFER_WRITE_BIT; imageMemoryBarrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT; } if (oldImageLayout == VK_IMAGE_LAYOUT_UNDEFINED) { imageMemoryBarrier.srcAccessMask = 0; } if (newImageLayout == VK_IMAGE_LAYOUT_PRESENT_SRC_KHR) { imageMemoryBarrier.dstAccessMask = VK_ACCESS_MEMORY_READ_BIT; } VkPipelineStageFlags srcStageFlags = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT; VkPipelineStageFlags destStageFlags = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT; if (imageMemoryBarrier.dstAccessMask == VK_ACCESS_TRANSFER_WRITE_BIT) { destStageFlags = VK_PIPELINE_STAGE_TRANSFER_BIT; } if (imageMemoryBarrier.dstAccessMask == VK_ACCESS_SHADER_READ_BIT) { destStageFlags = VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT; } if (imageMemoryBarrier.dstAccessMask == VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT) { destStageFlags = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT; } if (imageMemoryBarrier.dstAccessMask == VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT) { destStageFlags = VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT; } if (imageMemoryBarrier.dstAccessMask == VK_ACCESS_TRANSFER_READ_BIT) { destStageFlags = VK_PIPELINE_STAGE_TRANSFER_BIT; } vkCmdPipelineBarrier( cmdbuffer, srcStageFlags, destStageFlags, 0, 0, null, 0, null, 1, &imageMemoryBarrier ); } void allocateSetupCommandBuffer() { if (setupCmdBuffer != VK_NULL_HANDLE) { vkFreeCommandBuffers( device, cmdPool, 1, &setupCmdBuffer ); setupCmdBuffer = VK_NULL_HANDLE; } VkCommandPoolCreateInfo cmdPoolInfo; cmdPoolInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO; cmdPoolInfo.queueFamilyIndex = queueNodeIndex; cmdPoolInfo.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT; enforceVk( vkCreateCommandPool( device, &cmdPoolInfo, null, &cmdPool ) ); VkCommandBufferAllocateInfo info; info.commandBufferCount = 1; info.commandPool = cmdPool; info.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; info.pNext = null; info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; enforceVk( vkAllocateCommandBuffers( device, &info, &setupCmdBuffer ) ); VkCommandBufferBeginInfo cmdBufInfo; cmdBufInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; enforceVk( vkBeginCommandBuffer( setupCmdBuffer, &cmdBufInfo ) ); } void createDepthStencil( int width, int height ) { VkImageCreateInfo image; image.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; image.pNext = null; image.imageType = VK_IMAGE_TYPE_2D; image.format = depthFormat; image.extent = VkExtent3D( width, height, 1 ); image.mipLevels = 1; image.arrayLayers = 1; image.samples = VK_SAMPLE_COUNT_1_BIT; image.tiling = VK_IMAGE_TILING_OPTIMAL; image.usage = VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT; image.flags = 0; VkMemoryAllocateInfo mem_alloc; mem_alloc.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; mem_alloc.pNext = null; mem_alloc.allocationSize = 0; mem_alloc.memoryTypeIndex = 0; VkImageViewCreateInfo depthStencilView; depthStencilView.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; depthStencilView.pNext = null; depthStencilView.viewType = VK_IMAGE_VIEW_TYPE_2D; depthStencilView.format = depthFormat; depthStencilView.flags = 0; depthStencilView.subresourceRange.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT; depthStencilView.subresourceRange.baseMipLevel = 0; depthStencilView.subresourceRange.levelCount = 1; depthStencilView.subresourceRange.baseArrayLayer = 0; depthStencilView.subresourceRange.layerCount = 1; enforceVk( vkCreateImage( device, &image, null, &depthStencil.image ) ); VkMemoryRequirements memReqs; vkGetImageMemoryRequirements( device, depthStencil.image, &memReqs ); mem_alloc.allocationSize = memReqs.size; mem_alloc.memoryTypeIndex = getMemoryType( memReqs.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT ); enforceVk( vkAllocateMemory( device, &mem_alloc, null, &depthStencil.mem ) ); enforceVk( vkBindImageMemory( device, depthStencil.image, depthStencil.mem, 0 ) ); setImageLayout( setupCmdBuffer, depthStencil.image, VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, 1, 0, 1 ); depthStencilView.image = depthStencil.image; enforceVk( vkCreateImageView( device, &depthStencilView, null, &depthStencil.view ) ); } uint32_t getMemoryType( uint32_t typeBits, VkFlags properties ) { for (uint32_t i = 0; i < 32; ++i) { if ((typeBits & 1) == 1) { if ((deviceMemoryProperties.memoryTypes[ i ].propertyFlags & properties) == properties) { return i; } } typeBits >>= 1; } assert( false, "could not get memory type" ); } void createSemaphores() { VkSemaphoreCreateInfo presentCompleteSemaphoreCreateInfo; presentCompleteSemaphoreCreateInfo.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO; presentCompleteSemaphoreCreateInfo.pNext = null; enforceVk( vkCreateSemaphore( device, &presentCompleteSemaphoreCreateInfo, null, &presentCompleteSemaphore ) ); VkSemaphoreCreateInfo renderCompleteSemaphoreCreateInfo; renderCompleteSemaphoreCreateInfo.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO; renderCompleteSemaphoreCreateInfo.pNext = null; enforceVk( vkCreateSemaphore( device, &renderCompleteSemaphoreCreateInfo, null, &renderCompleteSemaphore ) ); } void copyBuffer( VkBuffer source, ref VkBuffer destination, int bufferSize ) { VkCommandBufferAllocateInfo cmdBufInfo; cmdBufInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; cmdBufInfo.commandPool = cmdPool; cmdBufInfo.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; cmdBufInfo.commandBufferCount = 1; VkCommandBuffer copyCommandBuffer; enforceVk( vkAllocateCommandBuffers( device, &cmdBufInfo, &copyCommandBuffer ) ); VkCommandBufferBeginInfo cmdBufferBeginInfo; cmdBufferBeginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; cmdBufferBeginInfo.pNext = null; VkBufferCopy copyRegion; copyRegion.size = bufferSize; enforceVk( vkBeginCommandBuffer( copyCommandBuffer, &cmdBufferBeginInfo ) ); vkCmdCopyBuffer( copyCommandBuffer, source, destination, 1, &copyRegion ); enforceVk( vkEndCommandBuffer( copyCommandBuffer ) ); VkSubmitInfo copySubmitInfo; copySubmitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; copySubmitInfo.commandBufferCount = 1; copySubmitInfo.pCommandBuffers = &copyCommandBuffer; enforceVk( vkQueueSubmit( graphicsQueue, 1, &copySubmitInfo, VK_NULL_HANDLE ) ); enforceVk( vkQueueWaitIdle( graphicsQueue ) ); vkFreeCommandBuffers( device, cmdBufInfo.commandPool, 1, &copyCommandBuffer ); } void createBuffer( ref VkBuffer buffer, int bufferSize, ref VkDeviceMemory memory, VkBufferUsageFlags usageFlags, VkMemoryPropertyFlags memoryFlags, string debugName ) { VkBufferCreateInfo bufferInfo; bufferInfo.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; bufferInfo.size = bufferSize; bufferInfo.usage = usageFlags; enforceVk( vkCreateBuffer( device, &bufferInfo, null, &buffer ) ); VkMemoryRequirements memReqs; VkMemoryAllocateInfo memAlloc; memAlloc.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; vkGetBufferMemoryRequirements( device, buffer, &memReqs ); memAlloc.allocationSize = memReqs.size; memAlloc.memoryTypeIndex = getMemoryType( memReqs.memoryTypeBits, memoryFlags ); enforceVk( vkAllocateMemory( device, &memAlloc, null, &memory ) ); enforceVk( vkBindBufferMemory( device, buffer, memory, 0 ) ); assert( buffer != VK_NULL_HANDLE, "buffer is null" ); } private uint64_t getPsoHash( VertexBuffer vb, Shader aShader, BlendMode blendMode, DepthFunc depthFunc, CullMode cullMode ) { uint64_t result = cast(uint64_t)&vb; result += cast(uint64_t)&aShader; result += cast(uint64_t)blendMode; result += cast(uint64_t)depthFunc; result += cast(uint64_t)cullMode; return result; } public void updateDescriptorSet( VkSampler sampler, VkImageView view1, VkImageView view2, VkImageView view3 ) { descriptorSetIndex = currentFrame % 2; // Binding 0 : Uniform buffer VkWriteDescriptorSet uboSet; uboSet.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; uboSet.dstSet = descriptorSets[ descriptorSetIndex ]; uboSet.descriptorCount = 1; uboSet.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; uboSet.pBufferInfo = &quad1Ubo.desc; uboSet.dstBinding = 0; // Binding 1 : Image VkDescriptorImageInfo samplerDesc; samplerDesc.sampler = sampler; samplerDesc.imageView = view1; samplerDesc.imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; VkDescriptorImageInfo[ 3 ] samplerDescs = [ samplerDesc, samplerDesc, samplerDesc ]; samplerDescs[ 1 ].imageView = view2; samplerDescs[ 2 ].imageView = view3; VkWriteDescriptorSet imageSet; imageSet.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; imageSet.dstSet = descriptorSets[ descriptorSetIndex ]; imageSet.descriptorCount = samplerDescs.length; imageSet.descriptorType = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE; imageSet.pImageInfo = samplerDescs.ptr; imageSet.dstBinding = 1; // Binding 2: Sampler VkWriteDescriptorSet samplerSet; samplerSet.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; samplerSet.dstSet = descriptorSets[ descriptorSetIndex ]; samplerSet.descriptorCount = 1; samplerSet.descriptorType = VK_DESCRIPTOR_TYPE_SAMPLER; samplerSet.pImageInfo = &samplerDesc; samplerSet.dstBinding = 2; VkWriteDescriptorSet[ 3 ] sets = [ uboSet, imageSet, samplerSet ]; vkUpdateDescriptorSets( device, sets.length, sets.ptr, 0, null ); } public void draw( VertexBuffer vb, Shader aShader, BlendMode blendMode, DepthFunc depthFunc, CullMode cullMode, UniformBuffer unif ) { memcpy( quad1Ubo.data, &unif, unif.sizeof ); uint64_t psoHash = getPsoHash( vb, aShader, blendMode, depthFunc, cullMode ); if (psoHash !in psoCache) { createPso( vertexBuffer, shader, blendMode, depthFunc, cullMode, psoHash ); } vkCmdBindDescriptorSets( drawCmdBuffers[ currentBuffer ], VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout, 0, 1, &descriptorSets[ descriptorSetIndex ], 0, null ); vkCmdBindPipeline( drawCmdBuffers[ currentBuffer ], VK_PIPELINE_BIND_POINT_GRAPHICS, psoCache[ psoHash ] ); VkDeviceSize[ 3 ] offsets = [ 0, 0, 0 ]; VkBuffer[ 3 ] buffers = [ vb.positionBuffer, vb.uvBuffer, vb.colorBuffer ]; // Vertex buffer vkCmdBindVertexBuffers( drawCmdBuffers[ currentBuffer ], 0, buffers.length, buffers.ptr, offsets.ptr ); // Instance data buffer VkDeviceSize[ 1 ] instanceOffsets = [ 0 ]; vkCmdBindVertexBuffers( drawCmdBuffers[ currentBuffer ], 3, 1, &instanceBuffer, instanceOffsets.ptr ); vkCmdBindIndexBuffer( drawCmdBuffers[ currentBuffer ], vb.indexBuffer, 0, VK_INDEX_TYPE_UINT16 ); int indirectDrawCount = 1; vkCmdDrawIndexedIndirect( drawCmdBuffers[ currentBuffer ], indirectBuffer, 0, indirectDrawCount, VkDrawIndexedIndirectCommand.sizeof ); } private void createIndirectCommands() { indirectCommands = new VkDrawIndexedIndirectCommand[ 1 ]; int instanceCount = 2; int indexCount = 6; indirectCommands[ 0 ].instanceCount = instanceCount; indirectCommands[ 0 ].firstInstance = 0 * instanceCount; indirectCommands[ 0 ].firstIndex = 0; indirectCommands[ 0 ].indexCount = indexCount; VkBuffer stagingBuffer; VkBufferCreateInfo bufferInfo; bufferInfo.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; bufferInfo.size = indirectCommands.length * VkDrawIndexedIndirectCommand.sizeof; bufferInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT; enforceVk( vkCreateBuffer( device, &bufferInfo, null, &stagingBuffer ) ); VkDeviceMemory stagingMemory; VkMemoryRequirements memReqs; VkMemoryAllocateInfo memAlloc; memAlloc.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; vkGetBufferMemoryRequirements( device, stagingBuffer, &memReqs ); memAlloc.allocationSize = memReqs.size; memAlloc.memoryTypeIndex = getMemoryType( memReqs.memoryTypeBits, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT ); enforceVk( vkAllocateMemory( device, &memAlloc, null, &stagingMemory ) ); enforceVk( vkBindBufferMemory( device, stagingBuffer, stagingMemory, 0 ) ); bufferInfo.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; bufferInfo.size = indirectCommands.length * VkDrawIndexedIndirectCommand.sizeof; bufferInfo.usage = VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT; enforceVk( vkCreateBuffer( device, &bufferInfo, null, &indirectBuffer ) ); vkGetBufferMemoryRequirements( device, indirectBuffer, &memReqs ); memAlloc.allocationSize = memReqs.size; memAlloc.memoryTypeIndex = getMemoryType( memReqs.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT ); enforceVk( vkAllocateMemory( device, &memAlloc, null, &indirectMemory ) ); enforceVk( vkBindBufferMemory( device, indirectBuffer, indirectMemory, 0 ) ); void* mappedStagingMemory; enforceVk( vkMapMemory( device, stagingMemory, 0, bufferInfo.size, 0, &mappedStagingMemory ) ); memcpy( mappedStagingMemory, indirectCommands.ptr, bufferInfo.size ); copyBuffer( stagingBuffer, indirectBuffer, cast(int)bufferInfo.size ); } private void createInstanceData() { int instanceDataCount = 2; VkBuffer stagingBuffer; VkBufferCreateInfo bufferInfo; bufferInfo.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; bufferInfo.size = instanceDataCount * InstanceData.sizeof; bufferInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT; enforceVk( vkCreateBuffer( device, &bufferInfo, null, &stagingBuffer ) ); VkDeviceMemory stagingMemory; VkMemoryRequirements memReqs; VkMemoryAllocateInfo memAlloc; memAlloc.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; vkGetBufferMemoryRequirements( device, stagingBuffer, &memReqs ); memAlloc.allocationSize = memReqs.size; memAlloc.memoryTypeIndex = getMemoryType( memReqs.memoryTypeBits, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT ); enforceVk( vkAllocateMemory( device, &memAlloc, null, &stagingMemory ) ); enforceVk( vkBindBufferMemory( device, stagingBuffer, stagingMemory, 0 ) ); bufferInfo.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; bufferInfo.size = instanceDataCount * InstanceData.sizeof; bufferInfo.usage = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT; enforceVk( vkCreateBuffer( device, &bufferInfo, null, &instanceBuffer ) ); vkGetBufferMemoryRequirements( device, instanceBuffer, &memReqs ); memAlloc.allocationSize = memReqs.size; memAlloc.memoryTypeIndex = getMemoryType( memReqs.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT ); enforceVk( vkAllocateMemory( device, &memAlloc, null, &instanceMemory ) ); enforceVk( vkBindBufferMemory( device, instanceBuffer, instanceMemory, 0 ) ); InstanceData[ 2 ] instanceDatas; instanceDatas[ 0 ].pos = [ 0, 0, 0 ]; instanceDatas[ 0 ].uv = [ 0, 0 ]; instanceDatas[ 0 ].color = [ 1, 1, 1, 1 ]; instanceDatas[ 1 ].pos = [ 100, 0, 0 ]; instanceDatas[ 1 ].uv = [ 0, 0 ]; instanceDatas[ 1 ].color = [ 1, 1, 1, 1 ]; void* mappedStagingMemory; enforceVk( vkMapMemory( device, stagingMemory, 0, bufferInfo.size, 0, &mappedStagingMemory ) ); memcpy( mappedStagingMemory, &instanceDatas, bufferInfo.size ); copyBuffer( stagingBuffer, instanceBuffer, cast(int)bufferInfo.size ); } private void createPso( VertexBuffer vb, Shader shader, BlendMode blendMode, DepthFunc depthFunc, CullMode cullMode, uint64_t psoHash ) { VkPipelineInputAssemblyStateCreateInfo inputAssemblyState; inputAssemblyState.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; inputAssemblyState.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; inputAssemblyState.primitiveRestartEnable = VK_FALSE; VkPipelineRasterizationStateCreateInfo rasterizationState; rasterizationState.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; rasterizationState.polygonMode = VK_POLYGON_MODE_FILL; rasterizationState.cullMode = VK_CULL_MODE_NONE; rasterizationState.frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE; rasterizationState.depthClampEnable = VK_FALSE; rasterizationState.depthBiasClamp = 0.0f; rasterizationState.rasterizerDiscardEnable = VK_FALSE; rasterizationState.depthBiasEnable = VK_FALSE; rasterizationState.depthBiasSlopeFactor = 0.0f; rasterizationState.depthBiasConstantFactor = 0.0f; rasterizationState.lineWidth = 1; VkPipelineColorBlendAttachmentState[ 1 ] blendAttachmentState; blendAttachmentState[ 0 ].colorWriteMask = 0xF; blendAttachmentState[ 0 ].blendEnable = VK_FALSE; VkPipelineColorBlendStateCreateInfo colorBlendState; colorBlendState.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; colorBlendState.attachmentCount = 1; colorBlendState.pAttachments = blendAttachmentState.ptr; VkPipelineDynamicStateCreateInfo dynamicState; VkDynamicState[ 2 ] dynamicStateEnables; dynamicStateEnables[ 0 ] = VK_DYNAMIC_STATE_VIEWPORT; dynamicStateEnables[ 1 ] = VK_DYNAMIC_STATE_SCISSOR; dynamicState.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO; dynamicState.pDynamicStates = &dynamicStateEnables[ 0 ]; dynamicState.dynamicStateCount = 2; VkPipelineDepthStencilStateCreateInfo depthStencilState; depthStencilState.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO; depthStencilState.depthTestEnable = VK_FALSE; depthStencilState.depthWriteEnable = VK_TRUE; depthStencilState.depthCompareOp = VK_COMPARE_OP_LESS_OR_EQUAL; depthStencilState.depthBoundsTestEnable = VK_FALSE; depthStencilState.back.failOp = VK_STENCIL_OP_KEEP; depthStencilState.back.passOp = VK_STENCIL_OP_KEEP; depthStencilState.back.compareOp = VK_COMPARE_OP_ALWAYS; depthStencilState.stencilTestEnable = VK_FALSE; depthStencilState.front = depthStencilState.back; VkPipelineMultisampleStateCreateInfo multisampleState; multisampleState.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; multisampleState.pSampleMask = null; multisampleState.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT; multisampleState.minSampleShading = 0.0f; VkPipelineShaderStageCreateInfo[ 2 ] shaderStages; shaderStages[ 0 ] = shader.vertexInfo; shaderStages[ 1 ] = shader.fragmentInfo; VkPipelineViewportStateCreateInfo viewportState; viewportState.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; viewportState.viewportCount = 1; viewportState.scissorCount = 1; VkGraphicsPipelineCreateInfo pipelineCreateInfo; pipelineCreateInfo.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; pipelineCreateInfo.layout = pipelineLayout; pipelineCreateInfo.renderPass = renderPass; pipelineCreateInfo.pVertexInputState = &vb.inputState; pipelineCreateInfo.pInputAssemblyState = &inputAssemblyState; pipelineCreateInfo.pRasterizationState = &rasterizationState; pipelineCreateInfo.pColorBlendState = &colorBlendState; pipelineCreateInfo.pMultisampleState = &multisampleState; pipelineCreateInfo.pViewportState = &viewportState; pipelineCreateInfo.pDepthStencilState = &depthStencilState; pipelineCreateInfo.stageCount = 2; pipelineCreateInfo.pStages = shaderStages.ptr; pipelineCreateInfo.pDynamicState = &dynamicState; VkPipeline pso; enforceVk( vkCreateGraphicsPipelines( device, pipelineCache, 1, &pipelineCreateInfo, null, &pso ) ); psoCache[ psoHash ] = pso; } struct SwapChainBuffer { VkImage image; VkImageView view; } struct DepthStencil { VkImage image; VkDeviceMemory mem; VkImageView view; } struct VertexPTC { this( float aX, float aY, float aZ, float aU, float aV ) { x = aX; y = aY; z = aZ; u = aU; v = aV; } float x = 0, y = 0, z = 0; float u = 0, v = 0; float r = 0, g = 0, b = 0, a = 0; } struct Face { this( ushort aA, ushort aB, ushort aC ) { a = aA; b = aB; c = aC; } ushort a = 0, b = 0, c = 0; } struct Shader { void load( string vertexPath, string fragmentPath, VkDevice device ) { // Vertex shader { auto file = File( vertexPath, "r" ); if (!file.isOpen()) { assert( false, "Could not open vertex shader file" ); } char[] vertexCode = new char[ file.size ]; auto vertexSlice = file.rawRead( vertexCode ); VkShaderModuleCreateInfo moduleCreateInfo; moduleCreateInfo.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO; moduleCreateInfo.pNext = null; moduleCreateInfo.codeSize = vertexSlice.length; moduleCreateInfo.pCode = cast(uint*)vertexCode.ptr; moduleCreateInfo.flags = 0; VkShaderModule shaderModule; enforceVk( vkCreateShaderModule( device, &moduleCreateInfo, null, &shaderModule ) ); vertexInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO; vertexInfo.stage = VK_SHADER_STAGE_VERTEX_BIT; vertexInfo._module = shaderModule; vertexInfo.pName = "main"; vertexInfo.pNext = null; vertexInfo.flags = 0; vertexInfo.pSpecializationInfo = null; } // Fragment shader { auto file = File( fragmentPath, "r" ); if (!file.isOpen()) { assert( false, "Could not open fragment shader file" ); } char[] fragmentCode = new char[ file.size ]; auto fragmentSlice = file.rawRead( fragmentCode ); VkShaderModuleCreateInfo moduleCreateInfo; moduleCreateInfo.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO; moduleCreateInfo.pNext = null; moduleCreateInfo.codeSize = fragmentSlice.length; moduleCreateInfo.pCode = cast(uint*)fragmentCode.ptr; moduleCreateInfo.flags = 0; VkShaderModule shaderModule; enforceVk( vkCreateShaderModule( device, &moduleCreateInfo, null, &shaderModule ) ); fragmentInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO; fragmentInfo.stage = VK_SHADER_STAGE_FRAGMENT_BIT; fragmentInfo._module = shaderModule; fragmentInfo.pName = "main"; fragmentInfo.pNext = null; fragmentInfo.flags = 0; fragmentInfo.pSpecializationInfo = null; } } VkPipelineShaderStageCreateInfo vertexInfo; VkPipelineShaderStageCreateInfo fragmentInfo; } struct Ubo { VkBuffer ubo; VkDeviceMemory memory; VkDescriptorBufferInfo desc; uint8_t* data; } VkSurfaceKHR surface; VkDevice device; VkInstance instance; VkPhysicalDevice physicalDevice; VkFormat depthFormat; VkFormat colorFormat; VkQueue graphicsQueue; VkPhysicalDeviceMemoryProperties deviceMemoryProperties; VkSwapchainKHR swapChain; VkImage[] swapChainImages; VkCommandBuffer setupCmdBuffer; VkCommandBuffer texCmdBuffer; VkCommandBuffer[] drawCmdBuffers; VkCommandBuffer prePresentCmdBuffer; VkCommandBuffer postPresentCmdBuffer; VkCommandPool cmdPool; VkSemaphore presentCompleteSemaphore; VkSemaphore renderCompleteSemaphore; VkFramebuffer[] frameBuffers; VkRenderPass renderPass; VkDescriptorSetLayout descriptorSetLayout; VkDescriptorSet[] descriptorSets; VkDescriptorPool descriptorPool; VkSampler samplerNearestRepeat; VkPipelineLayout pipelineLayout; VkDrawIndexedIndirectCommand[] indirectCommands; VkBuffer indirectBuffer; VkDeviceMemory indirectMemory; VkBuffer instanceBuffer; VkDeviceMemory instanceMemory; int queueNodeIndex; uint currentBuffer; uint currentFrame; SwapChainBuffer[] swapChainBuffers; DepthStencil depthStencil; VertexPTC[] quadVertices; Face[] quadIndices; Ubo quad1Ubo; Shader shader; VkPipeline[ uint64_t ] psoCache; VkPipelineCache pipelineCache; int descriptorSetIndex; struct VertexBuffer { void generate( VertexPTC[] vertices, Face[] indices, GfxDeviceVulkan gfxDevice ) { float[] positions = new float[ vertices.length * 3 ]; float[] uvs = new float[ vertices.length * 2 ]; float[] colors = new float[ vertices.length * 4 ]; for (int vertexIndex = 0; vertexIndex < vertices.length; ++vertexIndex) { positions[ vertexIndex * 3 + 0 ] = vertices[ vertexIndex ].x; positions[ vertexIndex * 3 + 1 ] = vertices[ vertexIndex ].y; positions[ vertexIndex * 3 + 2 ] = vertices[ vertexIndex ].z; uvs[ vertexIndex * 2 + 0 ] = vertices[ vertexIndex ].u; uvs[ vertexIndex * 2 + 1 ] = vertices[ vertexIndex ].v; colors[ vertexIndex * 4 + 0 ] = vertices[ vertexIndex ].r; colors[ vertexIndex * 4 + 1 ] = vertices[ vertexIndex ].g; colors[ vertexIndex * 4 + 2 ] = vertices[ vertexIndex ].b; colors[ vertexIndex * 4 + 3 ] = vertices[ vertexIndex ].a; } struct StagingBuffer { VkDeviceMemory memory; VkBuffer buffer; } struct StagingBuffers { StagingBuffer positions; StagingBuffer uvs; StagingBuffer colors; StagingBuffer indices; } StagingBuffers stagingBuffers; void* bufferData = null; // Position buffer { int positionBufferSize = cast(int)(positions.length * float.sizeof); gfxDevice.createBuffer( stagingBuffers.positions.buffer, positionBufferSize, stagingBuffers.positions.memory, VK_BUFFER_USAGE_TRANSFER_SRC_BIT, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, "staging position buffer" ); enforceVk( vkMapMemory( gfxDevice.device, stagingBuffers.positions.memory, 0, positionBufferSize, 0, &bufferData ) ); memcpy( bufferData, positions.ptr, positionBufferSize ); vkUnmapMemory( gfxDevice.device, stagingBuffers.positions.memory ); gfxDevice.createBuffer( positionBuffer, positionBufferSize, positionMem, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, "position buffer" ); assert( positionBuffer != VK_NULL_HANDLE, "position buffer is null" ); gfxDevice.copyBuffer( stagingBuffers.positions.buffer, positionBuffer, positionBufferSize ); vkDestroyBuffer( gfxDevice.device, stagingBuffers.positions.buffer, null ); vkFreeMemory( gfxDevice.device, stagingBuffers.positions.memory, null ); } // UV buffer { int uvBufferSize = cast(int)(uvs.length * float.sizeof); gfxDevice.createBuffer( stagingBuffers.uvs.buffer, uvBufferSize, stagingBuffers.uvs.memory, VK_BUFFER_USAGE_TRANSFER_SRC_BIT, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, "staging uv buffer" ); enforceVk( vkMapMemory( gfxDevice.device, stagingBuffers.uvs.memory, 0, uvBufferSize, 0, &bufferData ) ); memcpy( bufferData, uvs.ptr, uvBufferSize ); vkUnmapMemory( gfxDevice.device, stagingBuffers.uvs.memory ); gfxDevice.createBuffer( uvBuffer, uvBufferSize, uvMem, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, "uv buffer" ); assert( uvBuffer != VK_NULL_HANDLE, "uv buffer is null" ); gfxDevice.copyBuffer( stagingBuffers.uvs.buffer, uvBuffer, uvBufferSize ); vkDestroyBuffer( gfxDevice.device, stagingBuffers.uvs.buffer, null ); vkFreeMemory( gfxDevice.device, stagingBuffers.uvs.memory, null ); } // Color buffer { int colorBufferSize = cast(int)(colors.length * float.sizeof); gfxDevice.createBuffer( stagingBuffers.colors.buffer, colorBufferSize, stagingBuffers.colors.memory, VK_BUFFER_USAGE_TRANSFER_SRC_BIT, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, "staging color buffer" ); enforceVk( vkMapMemory( gfxDevice.device, stagingBuffers.colors.memory, 0, colorBufferSize, 0, &bufferData ) ); memcpy( bufferData, colors.ptr, colorBufferSize ); vkUnmapMemory( gfxDevice.device, stagingBuffers.colors.memory ); gfxDevice.createBuffer( colorBuffer, colorBufferSize, colorMem, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, "color buffer" ); assert( colorBuffer != VK_NULL_HANDLE, "color buffer is null" ); gfxDevice.copyBuffer( stagingBuffers.colors.buffer, colorBuffer, colorBufferSize ); vkDestroyBuffer( gfxDevice.device, stagingBuffers.colors.buffer, null ); vkFreeMemory( gfxDevice.device, stagingBuffers.colors.memory, null ); } // Index buffer int indexBufferSize = cast(int)(indices.length * Face.sizeof); gfxDevice.createBuffer( stagingBuffers.indices.buffer, indexBufferSize, stagingBuffers.indices.memory, VK_BUFFER_USAGE_TRANSFER_SRC_BIT, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, "staging index buffer" ); enforceVk( vkMapMemory( gfxDevice.device, stagingBuffers.indices.memory, 0, indexBufferSize, 0, &bufferData ) ); memcpy( bufferData, indices.ptr, indexBufferSize ); vkUnmapMemory( gfxDevice.device, stagingBuffers.indices.memory ); gfxDevice.createBuffer( indexBuffer, indexBufferSize, indexMem, VK_BUFFER_USAGE_INDEX_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, "index buffer" ); gfxDevice.copyBuffer( stagingBuffers.indices.buffer, indexBuffer, indexBufferSize ); vkDestroyBuffer( gfxDevice.device, stagingBuffers.indices.buffer, null ); vkFreeMemory( gfxDevice.device, stagingBuffers.indices.memory, null ); const int POSITION_INDEX = 0; const int TEXCOORD_INDEX = 1; const int COLOR_INDEX = 2; bindingDescriptions = new VkVertexInputBindingDescription[ 4 ]; bindingDescriptions[ 0 ].binding = 0; bindingDescriptions[ 0 ].stride = 3 * float.sizeof; bindingDescriptions[ 0 ].inputRate = VK_VERTEX_INPUT_RATE_VERTEX; bindingDescriptions[ 1 ].binding = 1; bindingDescriptions[ 1 ].stride = 2 * float.sizeof; bindingDescriptions[ 1 ].inputRate = VK_VERTEX_INPUT_RATE_VERTEX; bindingDescriptions[ 2 ].binding = 2; bindingDescriptions[ 2 ].stride = 4 * float.sizeof; bindingDescriptions[ 2 ].inputRate = VK_VERTEX_INPUT_RATE_VERTEX; bindingDescriptions[ 3 ].binding = 3; bindingDescriptions[ 3 ].stride = InstanceData.sizeof; bindingDescriptions[ 3 ].inputRate = VK_VERTEX_INPUT_RATE_INSTANCE; attributeDescriptions = new VkVertexInputAttributeDescription[ 6 ]; // Location 0 : Position attributeDescriptions[ 0 ].binding = 0; attributeDescriptions[ 0 ].location = POSITION_INDEX; attributeDescriptions[ 0 ].format = VK_FORMAT_R32G32B32_SFLOAT; attributeDescriptions[ 0 ].offset = 0; // Location 1 : TexCoord attributeDescriptions[ 1 ].binding = 1; attributeDescriptions[ 1 ].location = TEXCOORD_INDEX; attributeDescriptions[ 1 ].format = VK_FORMAT_R32G32_SFLOAT; attributeDescriptions[ 1 ].offset = 0; // Location 2 : Color attributeDescriptions[ 2 ].binding = 2; attributeDescriptions[ 2 ].location = COLOR_INDEX; attributeDescriptions[ 2 ].format = VK_FORMAT_R32G32B32A32_SFLOAT; attributeDescriptions[ 2 ].offset = 0; // Location 3 : Instanced position attributeDescriptions[ 3 ].binding = 3; attributeDescriptions[ 3 ].location = 3; attributeDescriptions[ 3 ].format = VK_FORMAT_R32G32B32_SFLOAT; attributeDescriptions[ 3 ].offset = 0; // Location 4 : Instanced texcoord attributeDescriptions[ 4 ].binding = 3; attributeDescriptions[ 4 ].location = 4; attributeDescriptions[ 4 ].format = VK_FORMAT_R32G32_SFLOAT; attributeDescriptions[ 4 ].offset = 0; // Location 5 : Instanced color attributeDescriptions[ 5 ].binding = 3; attributeDescriptions[ 5 ].location = 5; attributeDescriptions[ 5 ].format = VK_FORMAT_R32G32B32A32_SFLOAT; attributeDescriptions[ 5 ].offset = 0; inputState.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; inputState.pNext = null; inputState.vertexBindingDescriptionCount = cast(uint32_t)bindingDescriptions.length; inputState.pVertexBindingDescriptions = bindingDescriptions.ptr; inputState.vertexAttributeDescriptionCount = cast(uint32_t)attributeDescriptions.length; inputState.pVertexAttributeDescriptions = attributeDescriptions.ptr; } VkBuffer positionBuffer; VkBuffer uvBuffer; VkBuffer colorBuffer; VkDeviceMemory positionMem; VkDeviceMemory uvMem; VkDeviceMemory colorMem; VkPipelineVertexInputStateCreateInfo inputState; VkBuffer indexBuffer; VkDeviceMemory indexMem; VkVertexInputBindingDescription[] bindingDescriptions; VkVertexInputAttributeDescription[] attributeDescriptions; } VertexBuffer vertexBuffer; }
D
/Users/mayurishekhar/Diary/build/Pods.build/Debug-iphonesimulator/SideMenu.build/Objects-normal/x86_64/SideMenuPresentationController.o : /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Protected.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Initializable.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuPresentationStyle.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/UITableViewVibrantCell.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuManager.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuNavigationController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuAnimationController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuPresentationController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuInteractionController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuTransitionController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuPushCoordinator.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Extensions.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Deprecations.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Print.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/mayurishekhar/Diary/Pods/Target\ Support\ Files/SideMenu/SideMenu-umbrella.h /Users/mayurishekhar/Diary/build/Pods.build/Debug-iphonesimulator/SideMenu.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/mayurishekhar/Diary/build/Pods.build/Debug-iphonesimulator/SideMenu.build/Objects-normal/x86_64/SideMenuPresentationController~partial.swiftmodule : /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Protected.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Initializable.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuPresentationStyle.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/UITableViewVibrantCell.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuManager.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuNavigationController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuAnimationController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuPresentationController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuInteractionController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuTransitionController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuPushCoordinator.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Extensions.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Deprecations.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Print.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/mayurishekhar/Diary/Pods/Target\ Support\ Files/SideMenu/SideMenu-umbrella.h /Users/mayurishekhar/Diary/build/Pods.build/Debug-iphonesimulator/SideMenu.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/mayurishekhar/Diary/build/Pods.build/Debug-iphonesimulator/SideMenu.build/Objects-normal/x86_64/SideMenuPresentationController~partial.swiftdoc : /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Protected.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Initializable.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuPresentationStyle.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/UITableViewVibrantCell.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuManager.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuNavigationController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuAnimationController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuPresentationController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuInteractionController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuTransitionController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuPushCoordinator.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Extensions.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Deprecations.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Print.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/mayurishekhar/Diary/Pods/Target\ Support\ Files/SideMenu/SideMenu-umbrella.h /Users/mayurishekhar/Diary/build/Pods.build/Debug-iphonesimulator/SideMenu.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/mayurishekhar/Diary/build/Pods.build/Debug-iphonesimulator/SideMenu.build/Objects-normal/x86_64/SideMenuPresentationController~partial.swiftsourceinfo : /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Protected.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Initializable.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuPresentationStyle.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/UITableViewVibrantCell.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuManager.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuNavigationController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuAnimationController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuPresentationController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuInteractionController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuTransitionController.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/SideMenuPushCoordinator.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Extensions.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Deprecations.swift /Users/mayurishekhar/Diary/Pods/SideMenu/Pod/Classes/Print.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/mayurishekhar/Diary/Pods/Target\ Support\ Files/SideMenu/SideMenu-umbrella.h /Users/mayurishekhar/Diary/build/Pods.build/Debug-iphonesimulator/SideMenu.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
/* Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license ( the "Software" ) to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ module derelict.sdl2.sdl; public { import derelict.sdl2.types; import derelict.sdl2.functions; } private { import derelict.util.loader; import derelict.util.system; static if( Derelict_OS_Windows ) enum libNames = "SDL2.dll"; else static if( Derelict_OS_Mac ) enum libNames = "/usr/local/lib/libSDL2.dylib, ../Frameworks/SDL2.framework/SDL2, /Library/Frameworks/SDL2.framework/SDL2, /System/Library/Frameworks/SDL2.framework/SDL2"; else static if( Derelict_OS_Posix ) enum libNames = "libSDL2.so, libSDL2-2.0.so, libSDL2-2.0.so.0, /usr/local/lib/libSDL2.so, /usr/local/lib/libSDL2-2.0.so, /usr/local/lib/libSDL2-2.0.so.0"; else static assert( 0, "Need to implement SDL2 libNames for this operating system." ); } /* This function is not part of the public interface, but SDL expects it to be called before any subsystems have been intiailized. Normally, this happens via linking with libSDLmain, but since that doesn't happen when using Derelict, then the loader must load this function and call it before the load method returns. Otherwise, bad things can happen. */ private extern( C ) nothrow alias da_SDL_SetMainReady = void function(); class DerelictSDL2Loader : SharedLibLoader { public this() { super( libNames ); } protected override void loadSymbols() { bindFunc( cast( void** )&SDL_Init, "SDL_Init" ); bindFunc( cast( void** )&SDL_InitSubSystem, "SDL_InitSubSystem" ); bindFunc( cast( void** )&SDL_QuitSubSystem, "SDL_QuitSubSystem" ); bindFunc( cast( void** )&SDL_WasInit, "SDL_WasInit" ); bindFunc( cast( void** )&SDL_Quit, "SDL_Quit" ); bindFunc( cast( void** )&SDL_GetNumAudioDrivers, "SDL_GetNumAudioDrivers" ); bindFunc( cast( void** )&SDL_GetAudioDriver, "SDL_GetAudioDriver" ); bindFunc( cast( void** )&SDL_AudioInit, "SDL_AudioInit" ); bindFunc( cast( void** )&SDL_AudioQuit, "SDL_AudioQuit" ); bindFunc( cast( void** )&SDL_GetCurrentAudioDriver, "SDL_GetCurrentAudioDriver" ); bindFunc( cast( void** )&SDL_OpenAudio, "SDL_OpenAudio" ); bindFunc( cast( void** )&SDL_GetNumAudioDevices, "SDL_GetNumAudioDevices" ); bindFunc( cast( void** )&SDL_GetAudioDeviceName, "SDL_GetAudioDeviceName" ); bindFunc( cast( void** )&SDL_OpenAudioDevice, "SDL_OpenAudioDevice" ); bindFunc( cast( void** )&SDL_GetAudioStatus, "SDL_GetAudioStatus" ); bindFunc( cast( void** )&SDL_GetAudioDeviceStatus, "SDL_GetAudioDeviceStatus" ); bindFunc( cast( void** )&SDL_PauseAudio, "SDL_PauseAudio" ); bindFunc( cast( void** )&SDL_PauseAudioDevice, "SDL_PauseAudioDevice" ); bindFunc( cast( void** )&SDL_LoadWAV_RW, "SDL_LoadWAV_RW" ); bindFunc( cast( void** )&SDL_FreeWAV, "SDL_FreeWAV" ); bindFunc( cast( void** )&SDL_BuildAudioCVT, "SDL_BuildAudioCVT" ); bindFunc( cast( void** )&SDL_ConvertAudio, "SDL_ConvertAudio" ); bindFunc( cast( void** )&SDL_MixAudio, "SDL_MixAudio" ); bindFunc( cast( void** )&SDL_MixAudioFormat, "SDL_MixAudioFormat" ); bindFunc( cast( void** )&SDL_LockAudio, "SDL_LockAudio" ); bindFunc( cast( void** )&SDL_LockAudioDevice, "SDL_LockAudioDevice" ); bindFunc( cast( void** )&SDL_UnlockAudio, "SDL_UnlockAudio" ); bindFunc( cast( void** )&SDL_UnlockAudioDevice, "SDL_UnlockAudioDevice" ); bindFunc( cast( void** )&SDL_CloseAudio, "SDL_CloseAudio" ); bindFunc( cast( void** )&SDL_CloseAudioDevice, "SDL_CloseAudioDevice" ); // bindFunc( cast( void** )&SDL_AudioDeviceConnected, "SDL_AudioDeviceConnected" ); bindFunc( cast( void** )&SDL_SetClipboardText, "SDL_SetClipboardText" ); bindFunc( cast( void** )&SDL_GetClipboardText, "SDL_GetClipboardText" ); bindFunc( cast( void** )&SDL_HasClipboardText, "SDL_HasClipboardText" ); bindFunc( cast( void** )&SDL_GetCPUCount, "SDL_GetCPUCount" ); bindFunc( cast( void** )&SDL_GetCPUCacheLineSize, "SDL_GetCPUCacheLineSize" ); bindFunc( cast( void** )&SDL_HasRDTSC, "SDL_HasRDTSC" ); bindFunc( cast( void** )&SDL_HasAltiVec, "SDL_HasAltiVec" ); bindFunc( cast( void** )&SDL_HasMMX, "SDL_HasMMX" ); bindFunc( cast( void** )&SDL_Has3DNow, "SDL_Has3DNow" ); bindFunc( cast( void** )&SDL_HasSSE, "SDL_HasSSE" ); bindFunc( cast( void** )&SDL_HasSSE2, "SDL_HasSSE2" ); bindFunc( cast( void** )&SDL_HasSSE3, "SDL_HasSSE3" ); bindFunc( cast( void** )&SDL_HasSSE41, "SDL_HasSSE41" ); bindFunc( cast( void** )&SDL_HasSSE42, "SDL_HasSSE42" ); bindFunc( cast( void** )&SDL_SetError, "SDL_SetError" ); bindFunc( cast( void** )&SDL_GetError, "SDL_GetError" ); bindFunc( cast( void** )&SDL_ClearError, "SDL_ClearError" ); bindFunc( cast( void** )&SDL_PumpEvents, "SDL_PumpEvents" ); bindFunc( cast( void** )&SDL_PeepEvents, "SDL_PeepEvents" ); bindFunc( cast( void** )&SDL_HasEvent, "SDL_HasEvent" ); bindFunc( cast( void** )&SDL_HasEvents, "SDL_HasEvents" ); bindFunc( cast( void** )&SDL_FlushEvent, "SDL_FlushEvent" ); bindFunc( cast( void** )&SDL_FlushEvents, "SDL_FlushEvents" ); bindFunc( cast( void** )&SDL_PollEvent, "SDL_PollEvent" ); bindFunc( cast( void** )&SDL_WaitEvent, "SDL_WaitEvent" ); bindFunc( cast( void** )&SDL_WaitEventTimeout, "SDL_WaitEventTimeout" ); bindFunc( cast( void** )&SDL_PushEvent, "SDL_PushEvent" ); bindFunc( cast( void** )&SDL_SetEventFilter, "SDL_SetEventFilter" ); bindFunc( cast( void** )&SDL_GetEventFilter, "SDL_GetEventFilter" ); bindFunc( cast( void** )&SDL_AddEventWatch, "SDL_AddEventWatch" ); bindFunc( cast( void** )&SDL_DelEventWatch, "SDL_DelEventWatch" ); bindFunc( cast( void** )&SDL_FilterEvents, "SDL_FilterEvents" ); bindFunc( cast( void** )&SDL_EventState, "SDL_EventState" ); bindFunc( cast( void** )&SDL_RegisterEvents, "SDL_RegisterEvents" ); bindFunc( cast( void** )&SDL_GameControllerAddMapping, "SDL_GameControllerAddMapping" ); bindFunc( cast( void** )&SDL_GameControllerMappingForGUID, "SDL_GameControllerMappingForGUID" ); bindFunc( cast( void** )&SDL_GameControllerMapping, "SDL_GameControllerMapping" ); bindFunc( cast( void** )&SDL_IsGameController, "SDL_IsGameController" ); bindFunc( cast( void** )&SDL_GameControllerNameForIndex, "SDL_GameControllerNameForIndex" ); bindFunc( cast( void** )&SDL_GameControllerOpen, "SDL_GameControllerOpen" ); bindFunc( cast( void** )&SDL_GameControllerName, "SDL_GameControllerName" ); bindFunc( cast( void** )&SDL_GameControllerGetAttached, "SDL_GameControllerGetAttached" ); bindFunc( cast( void** )&SDL_GameControllerGetJoystick, "SDL_GameControllerGetJoystick" ); bindFunc( cast( void** )&SDL_GameControllerEventState, "SDL_GameControllerEventState" ); bindFunc( cast( void** )&SDL_GameControllerUpdate, "SDL_GameControllerUpdate" ); bindFunc( cast( void** )&SDL_GameControllerGetAxisFromString, "SDL_GameControllerGetAxisFromString" ); bindFunc( cast( void** )&SDL_GameControllerGetStringForAxis, "SDL_GameControllerGetStringForAxis" ); bindFunc( cast( void** )&SDL_GameControllerGetBindForAxis, "SDL_GameControllerGetBindForAxis" ); bindFunc( cast( void** )&SDL_GameControllerGetAxis, "SDL_GameControllerGetAxis" ); bindFunc( cast( void** )&SDL_GameControllerGetButtonFromString, "SDL_GameControllerGetButtonFromString" ); bindFunc( cast( void** )&SDL_GameControllerGetStringForButton, "SDL_GameControllerGetStringForButton" ); bindFunc( cast( void** )&SDL_GameControllerGetBindForButton, "SDL_GameControllerGetBindForButton" ); bindFunc( cast( void** )&SDL_GameControllerGetButton, "SDL_GameControllerGetButton" ); bindFunc( cast( void** )&SDL_GameControllerClose, "SDL_GameControllerClose" ); bindFunc( cast( void** )&SDL_RecordGesture, "SDL_RecordGesture" ); bindFunc( cast( void** )&SDL_SaveAllDollarTemplates, "SDL_SaveAllDollarTemplates" ); bindFunc( cast( void** )&SDL_SaveDollarTemplate, "SDL_SaveDollarTemplate" ); bindFunc( cast( void** )&SDL_LoadDollarTemplates, "SDL_LoadDollarTemplates" ); bindFunc( cast( void** )&SDL_NumHaptics, "SDL_NumHaptics" ); bindFunc( cast( void** )&SDL_HapticName, "SDL_HapticName" ); bindFunc( cast( void** )&SDL_HapticOpen, "SDL_HapticOpen" ); bindFunc( cast( void** )&SDL_HapticOpened, "SDL_HapticOpened" ); bindFunc( cast( void** )&SDL_HapticIndex, "SDL_HapticIndex" ); bindFunc( cast( void** )&SDL_MouseIsHaptic, "SDL_MouseIsHaptic" ); bindFunc( cast( void** )&SDL_HapticOpenFromMouse, "SDL_HapticOpenFromMouse" ); bindFunc( cast( void** )&SDL_JoystickIsHaptic, "SDL_JoystickIsHaptic" ); bindFunc( cast( void** )&SDL_HapticOpenFromJoystick, "SDL_HapticOpenFromJoystick" ); bindFunc( cast( void** )&SDL_HapticClose, "SDL_HapticClose" ); bindFunc( cast( void** )&SDL_HapticNumEffects, "SDL_HapticNumEffects" ); bindFunc( cast( void** )&SDL_HapticNumEffectsPlaying, "SDL_HapticNumEffectsPlaying" ); bindFunc( cast( void** )&SDL_HapticQuery, "SDL_HapticQuery" ); bindFunc( cast( void** )&SDL_HapticNumAxes, "SDL_HapticNumAxes" ); bindFunc( cast( void** )&SDL_HapticEffectSupported, "SDL_HapticEffectSupported" ); bindFunc( cast( void** )&SDL_HapticNewEffect, "SDL_HapticNewEffect" ); bindFunc( cast( void** )&SDL_HapticUpdateEffect, "SDL_HapticUpdateEffect" ); bindFunc( cast( void** )&SDL_HapticRunEffect, "SDL_HapticRunEffect" ); bindFunc( cast( void** )&SDL_HapticStopEffect, "SDL_HapticStopEffect" ); bindFunc( cast( void** )&SDL_HapticDestroyEffect, "SDL_HapticDestroyEffect" ); bindFunc( cast( void** )&SDL_HapticGetEffectStatus, "SDL_HapticGetEffectStatus" ); bindFunc( cast( void** )&SDL_HapticSetGain, "SDL_HapticSetGain" ); bindFunc( cast( void** )&SDL_HapticSetAutocenter, "SDL_HapticSetAutocenter" ); bindFunc( cast( void** )&SDL_HapticPause, "SDL_HapticPause" ); bindFunc( cast( void** )&SDL_HapticUnpause, "SDL_HapticUnpause" ); bindFunc( cast( void** )&SDL_HapticStopAll, "SDL_HapticStopAll" ); bindFunc( cast( void** )&SDL_HapticRumbleSupported, "SDL_HapticRumbleSupported" ); bindFunc( cast( void** )&SDL_HapticRumbleInit, "SDL_HapticRumbleInit" ); bindFunc( cast( void** )&SDL_HapticRumblePlay, "SDL_HapticRumblePlay" ); bindFunc( cast( void** )&SDL_HapticRumbleStop, "SDL_HapticRumbleStop" ); bindFunc( cast( void** )&SDL_SetHintWithPriority, "SDL_SetHintWithPriority" ); bindFunc( cast( void** )&SDL_SetHint, "SDL_SetHint" ); bindFunc( cast( void** )&SDL_GetHint, "SDL_GetHint" ); bindFunc( cast( void** )&SDL_AddHintCallback, "SDL_AddHintCallback" ); bindFunc( cast( void** )&SDL_DelHintCallback, "SDL_DelHintCallback" ); bindFunc( cast( void** )&SDL_ClearHints, "SDL_ClearHints" ); // bindFunc( cast( void** )&SDL_RedetectInputDevices, "SDL_RedetectInputDevices" ); // bindFunc( cast( void** )&SDL_GetNumInputDevices, "SDL_GetNumInputDevices" ); // bindFunc( cast( void** )&SDL_GetInputDeviceName, "SDL_GetInputDeviceName" ); // bindFunc( cast( void** )&SDL_IsDeviceDisconnected, "SDL_IsDeviceDisconnected" ); bindFunc( cast( void** )&SDL_NumJoysticks, "SDL_NumJoysticks" ); bindFunc( cast( void** )&SDL_JoystickNameForIndex, "SDL_JoystickNameForIndex" ); bindFunc( cast( void** )&SDL_JoystickOpen, "SDL_JoystickOpen" ); bindFunc( cast( void** )&SDL_JoystickName, "SDL_JoystickName" ); bindFunc( cast( void** )&SDL_JoystickGetDeviceGUID, "SDL_JoystickGetDeviceGUID" ); bindFunc( cast( void** )&SDL_JoystickGetGUID, "SDL_JoystickGetGUID" ); bindFunc( cast( void** )&SDL_JoystickGetGUIDString, "SDL_JoystickGetGUIDString" ); bindFunc( cast( void** )&SDL_JoystickGetGUIDFromString, "SDL_JoystickGetGUIDFromString" ); bindFunc( cast( void** )&SDL_JoystickGetAttached, "SDL_JoystickGetAttached" ); bindFunc( cast( void** )&SDL_JoystickInstanceID, "SDL_JoystickInstanceID" ); bindFunc( cast( void** )&SDL_JoystickNumAxes, "SDL_JoystickNumAxes" ); bindFunc( cast( void** )&SDL_JoystickNumBalls, "SDL_JoystickNumBalls" ); bindFunc( cast( void** )&SDL_JoystickNumHats, "SDL_JoystickNumHats" ); bindFunc( cast( void** )&SDL_JoystickNumButtons, "SDL_JoystickNumButtons" ); bindFunc( cast( void** )&SDL_JoystickUpdate, "SDL_JoystickUpdate" ); bindFunc( cast( void** )&SDL_JoystickEventState, "SDL_JoystickEventState" ); bindFunc( cast( void** )&SDL_JoystickGetAxis, "SDL_JoystickGetAxis" ); bindFunc( cast( void** )&SDL_JoystickGetHat, "SDL_JoystickGetHat" ); bindFunc( cast( void** )&SDL_JoystickGetBall, "SDL_JoystickGetBall" ); bindFunc( cast( void** )&SDL_JoystickGetButton, "SDL_JoystickGetButton" ); bindFunc( cast( void** )&SDL_JoystickClose, "SDL_JoystickClose" ); bindFunc( cast( void** )&SDL_GetKeyboardFocus, "SDL_GetKeyboardFocus" ); bindFunc( cast( void** )&SDL_GetKeyboardState, "SDL_GetKeyboardState" ); bindFunc( cast( void** )&SDL_GetModState, "SDL_GetModState" ); bindFunc( cast( void** )&SDL_SetModState, "SDL_SetModState" ); bindFunc( cast( void** )&SDL_GetKeyFromScancode, "SDL_GetKeyFromScancode" ); bindFunc( cast( void** )&SDL_GetScancodeFromKey, "SDL_GetScancodeFromKey" ); bindFunc( cast( void** )&SDL_GetScancodeName, "SDL_GetScancodeName" ); bindFunc( cast( void** )&SDL_GetScancodeFromName, "SDL_GetScancodeFromName" ); bindFunc( cast( void** )&SDL_GetKeyName, "SDL_GetKeyName" ); bindFunc( cast( void** )&SDL_GetKeyFromName, "SDL_GetKeyFromName" ); bindFunc( cast( void** )&SDL_StartTextInput, "SDL_StartTextInput" ); bindFunc( cast( void** )&SDL_IsTextInputActive, "SDL_IsTextInputActive" ); bindFunc( cast( void** )&SDL_StopTextInput, "SDL_StopTextInput" ); bindFunc( cast( void** )&SDL_SetTextInputRect, "SDL_SetTextInputRect" ); bindFunc( cast( void** )&SDL_HasScreenKeyboardSupport, "SDL_HasScreenKeyboardSupport" ); bindFunc( cast( void** )&SDL_IsScreenKeyboardShown, "SDL_IsScreenKeyboardShown" ); bindFunc( cast( void** )&SDL_LoadObject, "SDL_LoadObject" ); bindFunc( cast( void** )&SDL_LoadFunction, "SDL_LoadFunction" ); bindFunc( cast( void** )&SDL_UnloadObject, "SDL_UnloadObject" ); bindFunc( cast( void** )&SDL_LogSetAllPriority, "SDL_LogSetAllPriority" ); bindFunc( cast( void** )&SDL_LogSetPriority, "SDL_LogSetPriority" ); bindFunc( cast( void** )&SDL_LogGetPriority, "SDL_LogGetPriority" ); bindFunc( cast( void** )&SDL_LogResetPriorities, "SDL_LogResetPriorities" ); bindFunc( cast( void** )&SDL_Log, "SDL_Log" ); bindFunc( cast( void** )&SDL_LogVerbose, "SDL_LogVerbose" ); bindFunc( cast( void** )&SDL_LogDebug, "SDL_LogDebug" ); bindFunc( cast( void** )&SDL_LogInfo, "SDL_LogInfo" ); bindFunc( cast( void** )&SDL_LogWarn, "SDL_LogWarn" ); bindFunc( cast( void** )&SDL_LogError, "SDL_LogError" ); bindFunc( cast( void** )&SDL_LogCritical, "SDL_LogCritical" ); bindFunc( cast( void** )&SDL_LogMessage, "SDL_LogMessage" ); bindFunc( cast( void** )&SDL_LogMessageV, "SDL_LogMessageV" ); bindFunc( cast( void** )&SDL_LogGetOutputFunction, "SDL_LogGetOutputFunction" ); bindFunc( cast( void** )&SDL_LogSetOutputFunction, "SDL_LogSetOutputFunction" ); bindFunc( cast( void** )&SDL_ShowMessageBox, "SDL_ShowMessageBox" ); bindFunc( cast( void** )&SDL_ShowSimpleMessageBox, "SDL_ShowSimpleMessageBox" ); bindFunc( cast( void** )&SDL_GetMouseFocus, "SDL_GetMouseFocus" ); bindFunc( cast( void** )&SDL_GetMouseState, "SDL_GetMouseState" ); bindFunc( cast( void** )&SDL_GetRelativeMouseState, "SDL_GetRelativeMouseState" ); bindFunc( cast( void** )&SDL_WarpMouseInWindow, "SDL_WarpMouseInWindow" ); bindFunc( cast( void** )&SDL_SetRelativeMouseMode, "SDL_SetRelativeMouseMode" ); bindFunc( cast( void** )&SDL_GetRelativeMouseMode, "SDL_GetRelativeMouseMode" ); bindFunc( cast( void** )&SDL_CreateCursor, "SDL_CreateCursor" ); bindFunc( cast( void** )&SDL_CreateColorCursor, "SDL_CreateColorCursor" ); bindFunc( cast( void** )&SDL_CreateSystemCursor, "SDL_CreateSystemCursor" ); bindFunc( cast( void** )&SDL_SetCursor, "SDL_SetCursor" ); bindFunc( cast( void** )&SDL_GetCursor, "SDL_GetCursor" ); bindFunc( cast( void** )&SDL_FreeCursor, "SDL_FreeCursor" ); bindFunc( cast( void** )&SDL_ShowCursor, "SDL_ShowCursor" ); bindFunc( cast( void** )&SDL_GetPixelFormatName, "SDL_GetPixelFormatName" ); bindFunc( cast( void** )&SDL_PixelFormatEnumToMasks, "SDL_PixelFormatEnumToMasks" ); bindFunc( cast( void** )&SDL_MasksToPixelFormatEnum, "SDL_MasksToPixelFormatEnum" ); bindFunc( cast( void** )&SDL_AllocFormat, "SDL_AllocFormat" ); bindFunc( cast( void** )&SDL_FreeFormat, "SDL_FreeFormat" ); bindFunc( cast( void** )&SDL_AllocPalette, "SDL_AllocPalette" ); bindFunc( cast( void** )&SDL_SetPixelFormatPalette, "SDL_SetPixelFormatPalette" ); bindFunc( cast( void** )&SDL_SetPaletteColors, "SDL_SetPaletteColors" ); bindFunc( cast( void** )&SDL_FreePalette, "SDL_FreePalette" ); bindFunc( cast( void** )&SDL_MapRGB, "SDL_MapRGB" ); bindFunc( cast( void** )&SDL_MapRGBA, "SDL_MapRGBA" ); bindFunc( cast( void** )&SDL_GetRGB, "SDL_GetRGB" ); bindFunc( cast( void** )&SDL_GetRGBA, "SDL_GetRGBA" ); bindFunc( cast( void** )&SDL_CalculateGammaRamp, "SDL_CalculateGammaRamp" ); bindFunc( cast( void** )&SDL_GetPlatform, "SDL_GetPlatform" ); bindFunc( cast( void** )&SDL_GetPowerInfo, "SDL_GetPowerInfo" ); bindFunc( cast( void** )&SDL_HasIntersection, "SDL_HasIntersection" ); bindFunc( cast( void** )&SDL_IntersectRect, "SDL_IntersectRect" ); bindFunc( cast( void** )&SDL_UnionRect, "SDL_UnionRect" ); bindFunc( cast( void** )&SDL_EnclosePoints, "SDL_EnclosePoints" ); bindFunc( cast( void** )&SDL_IntersectRectAndLine, "SDL_IntersectRectAndLine" ); bindFunc( cast( void** )&SDL_GetNumRenderDrivers, "SDL_GetNumRenderDrivers" ); bindFunc( cast( void** )&SDL_GetRenderDriverInfo, "SDL_GetRenderDriverInfo" ); bindFunc( cast( void** )&SDL_CreateWindowAndRenderer, "SDL_CreateWindowAndRenderer" ); bindFunc( cast( void** )&SDL_CreateRenderer, "SDL_CreateRenderer" ); bindFunc( cast( void** )&SDL_CreateSoftwareRenderer, "SDL_CreateSoftwareRenderer" ); bindFunc( cast( void** )&SDL_GetRendererInfo, "SDL_GetRendererInfo" ); bindFunc( cast( void** )&SDL_CreateTexture, "SDL_CreateTexture" ); bindFunc( cast( void** )&SDL_CreateTextureFromSurface, "SDL_CreateTextureFromSurface" ); bindFunc( cast( void** )&SDL_QueryTexture, "SDL_QueryTexture" ); bindFunc( cast( void** )&SDL_SetTextureColorMod, "SDL_SetTextureColorMod" ); bindFunc( cast( void** )&SDL_GetTextureColorMod, "SDL_GetTextureColorMod" ); bindFunc( cast( void** )&SDL_SetTextureAlphaMod, "SDL_SetTextureAlphaMod" ); bindFunc( cast( void** )&SDL_GetTextureAlphaMod, "SDL_GetTextureAlphaMod" ); bindFunc( cast( void** )&SDL_SetTextureBlendMode, "SDL_SetTextureBlendMode" ); bindFunc( cast( void** )&SDL_GetTextureBlendMode, "SDL_GetTextureBlendMode" ); bindFunc( cast( void** )&SDL_UpdateTexture, "SDL_UpdateTexture" ); bindFunc( cast( void** )&SDL_LockTexture, "SDL_LockTexture" ); bindFunc( cast( void** )&SDL_UnlockTexture, "SDL_UnlockTexture" ); bindFunc( cast( void** )&SDL_RenderTargetSupported, "SDL_RenderTargetSupported" ); bindFunc( cast( void** )&SDL_SetRenderTarget, "SDL_SetRenderTarget" ); bindFunc( cast( void** )&SDL_GetRenderTarget, "SDL_GetRenderTarget" ); bindFunc( cast( void** )&SDL_RenderSetLogicalSize, "SDL_RenderSetLogicalSize" ); bindFunc( cast( void** )&SDL_RenderGetLogicalSize, "SDL_RenderGetLogicalSize" ); bindFunc( cast( void** )&SDL_RenderSetViewport, "SDL_RenderSetViewport" ); bindFunc( cast( void** )&SDL_RenderGetViewport, "SDL_RenderGetViewport" ); bindFunc( cast( void** )&SDL_RenderSetScale, "SDL_RenderSetScale" ); bindFunc( cast( void** )&SDL_RenderGetScale, "SDL_RenderGetScale" ); bindFunc( cast( void** )&SDL_SetRenderDrawColor, "SDL_SetRenderDrawColor" ); bindFunc( cast( void** )&SDL_GetRenderDrawColor, "SDL_GetRenderDrawColor" ); bindFunc( cast( void** )&SDL_SetRenderDrawBlendMode, "SDL_SetRenderDrawBlendMode" ); bindFunc( cast( void** )&SDL_GetRenderDrawBlendMode, "SDL_GetRenderDrawBlendMode" ); bindFunc( cast( void** )&SDL_RenderClear, "SDL_RenderClear" ); bindFunc( cast( void** )&SDL_RenderDrawPoint, "SDL_RenderDrawPoint" ); bindFunc( cast( void** )&SDL_RenderDrawPoints, "SDL_RenderDrawPoints" ); bindFunc( cast( void** )&SDL_RenderDrawLine, "SDL_RenderDrawLine" ); bindFunc( cast( void** )&SDL_RenderDrawLines, "SDL_RenderDrawLines" ); bindFunc( cast( void** )&SDL_RenderDrawRect, "SDL_RenderDrawRect" ); bindFunc( cast( void** )&SDL_RenderDrawRects, "SDL_RenderDrawRects" ); bindFunc( cast( void** )&SDL_RenderFillRect, "SDL_RenderFillRect" ); bindFunc( cast( void** )&SDL_RenderFillRects, "SDL_RenderFillRects" ); bindFunc( cast( void** )&SDL_RenderCopy, "SDL_RenderCopy" ); bindFunc( cast( void** )&SDL_RenderCopyEx, "SDL_RenderCopyEx" ); bindFunc( cast( void** )&SDL_RenderReadPixels, "SDL_RenderReadPixels" ); bindFunc( cast( void** )&SDL_RenderPresent, "SDL_RenderPresent" ); bindFunc( cast( void** )&SDL_DestroyTexture, "SDL_DestroyTexture" ); bindFunc( cast( void** )&SDL_DestroyRenderer, "SDL_DestroyRenderer" ); bindFunc( cast( void** )&SDL_GL_BindTexture, "SDL_GL_BindTexture" ); bindFunc( cast( void** )&SDL_GL_UnbindTexture, "SDL_GL_UnbindTexture" ); bindFunc( cast( void** )&SDL_RWFromFile, "SDL_RWFromFile" ); bindFunc( cast( void** )&SDL_RWFromFP, "SDL_RWFromFP" ); bindFunc( cast( void** )&SDL_RWFromMem, "SDL_RWFromMem" ); bindFunc( cast( void** )&SDL_RWFromConstMem, "SDL_RWFromConstMem" ); bindFunc( cast( void** )&SDL_AllocRW, "SDL_AllocRW" ); bindFunc( cast( void** )&SDL_FreeRW, "SDL_FreeRW" ); bindFunc( cast( void** )&SDL_ReadU8, "SDL_ReadU8" ); bindFunc( cast( void** )&SDL_ReadLE16, "SDL_ReadLE16" ); bindFunc( cast( void** )&SDL_ReadBE16, "SDL_ReadBE16" ); bindFunc( cast( void** )&SDL_ReadLE32, "SDL_ReadLE32" ); bindFunc( cast( void** )&SDL_ReadBE32, "SDL_ReadBE32" ); bindFunc( cast( void** )&SDL_ReadLE64, "SDL_ReadLE64" ); bindFunc( cast( void** )&SDL_ReadBE64, "SDL_ReadBE64" ); bindFunc( cast( void** )&SDL_WriteU8, "SDL_WriteU8" ); bindFunc( cast( void** )&SDL_WriteLE16, "SDL_WriteLE16" ); bindFunc( cast( void** )&SDL_WriteBE16, "SDL_WriteBE16" ); bindFunc( cast( void** )&SDL_WriteLE32, "SDL_WriteLE32" ); bindFunc( cast( void** )&SDL_WriteBE32, "SDL_WriteBE32" ); bindFunc( cast( void** )&SDL_WriteLE64, "SDL_WriteLE64" ); bindFunc( cast( void** )&SDL_WriteBE64, "SDL_WriteBE64" ); bindFunc( cast( void** )&SDL_CreateShapedWindow, "SDL_CreateShapedWindow" ); bindFunc( cast( void** )&SDL_IsShapedWindow, "SDL_IsShapedWindow" ); bindFunc( cast( void** )&SDL_SetWindowShape, "SDL_SetWindowShape" ); bindFunc( cast( void** )&SDL_GetShapedWindowMode, "SDL_GetShapedWindowMode" ); bindFunc( cast( void** )&SDL_CreateRGBSurface, "SDL_CreateRGBSurface" ); bindFunc( cast( void** )&SDL_CreateRGBSurfaceFrom, "SDL_CreateRGBSurfaceFrom" ); bindFunc( cast( void** )&SDL_FreeSurface, "SDL_FreeSurface" ); bindFunc( cast( void** )&SDL_SetSurfacePalette, "SDL_SetSurfacePalette" ); bindFunc( cast( void** )&SDL_LockSurface, "SDL_LockSurface" ); bindFunc( cast( void** )&SDL_UnlockSurface, "SDL_UnlockSurface" ); bindFunc( cast( void** )&SDL_LoadBMP_RW, "SDL_LoadBMP_RW" ); bindFunc( cast( void** )&SDL_SaveBMP_RW, "SDL_SaveBMP_RW" ); bindFunc( cast( void** )&SDL_SetSurfaceRLE, "SDL_SetSurfaceRLE" ); bindFunc( cast( void** )&SDL_SetColorKey, "SDL_SetColorKey" ); bindFunc( cast( void** )&SDL_GetColorKey, "SDL_GetColorKey" ); bindFunc( cast( void** )&SDL_SetSurfaceColorMod, "SDL_SetSurfaceColorMod" ); bindFunc( cast( void** )&SDL_GetSurfaceColorMod, "SDL_GetSurfaceColorMod" ); bindFunc( cast( void** )&SDL_SetSurfaceAlphaMod, "SDL_SetSurfaceAlphaMod" ); bindFunc( cast( void** )&SDL_GetSurfaceAlphaMod, "SDL_GetSurfaceAlphaMod" ); bindFunc( cast( void** )&SDL_SetSurfaceBlendMode, "SDL_SetSurfaceBlendMode" ); bindFunc( cast( void** )&SDL_GetSurfaceBlendMode, "SDL_GetSurfaceBlendMode" ); bindFunc( cast( void** )&SDL_SetClipRect, "SDL_SetClipRect" ); bindFunc( cast( void** )&SDL_GetClipRect, "SDL_GetClipRect" ); bindFunc( cast( void** )&SDL_ConvertSurface, "SDL_ConvertSurface" ); bindFunc( cast( void** )&SDL_ConvertSurfaceFormat, "SDL_ConvertSurfaceFormat" ); bindFunc( cast( void** )&SDL_ConvertPixels, "SDL_ConvertPixels" ); bindFunc( cast( void** )&SDL_FillRect, "SDL_FillRect" ); bindFunc( cast( void** )&SDL_FillRects, "SDL_FillRects" ); bindFunc( cast( void** )&SDL_UpperBlit, "SDL_UpperBlit" ); bindFunc( cast( void** )&SDL_LowerBlit, "SDL_LowerBlit" ); bindFunc( cast( void** )&SDL_SoftStretch, "SDL_SoftStretch" ); bindFunc( cast( void** )&SDL_UpperBlitScaled, "SDL_UpperBlitScaled" ); bindFunc( cast( void** )&SDL_LowerBlitScaled, "SDL_LowerBlitScaled" ); bindFunc( cast( void** )&SDL_GetTicks, "SDL_GetTicks" ); bindFunc( cast( void** )&SDL_GetPerformanceCounter, "SDL_GetPerformanceCounter" ); bindFunc( cast( void** )&SDL_GetPerformanceFrequency, "SDL_GetPerformanceFrequency" ); bindFunc( cast( void** )&SDL_Delay, "SDL_Delay" ); bindFunc( cast( void** )&SDL_AddTimer, "SDL_AddTimer" ); bindFunc( cast( void** )&SDL_RemoveTimer, "SDL_RemoveTimer" ); bindFunc( cast( void** )&SDL_GetNumTouchDevices, "SDL_GetNumTouchDevices" ); bindFunc( cast( void** )&SDL_GetTouchDevice, "SDL_GetTouchDevice" ); bindFunc( cast( void** )&SDL_GetNumTouchFingers, "SDL_GetNumTouchFingers" ); bindFunc( cast( void** )&SDL_GetTouchFinger, "SDL_GetTouchFinger" ); bindFunc( cast( void** )&SDL_GetVersion, "SDL_GetVersion" ); bindFunc( cast( void** )&SDL_GetRevision, "SDL_GetRevision" ); bindFunc( cast( void** )&SDL_GetRevisionNumber, "SDL_GetRevisionNumber" ); bindFunc( cast( void** )&SDL_GetNumVideoDrivers, "SDL_GetNumVideoDrivers" ); bindFunc( cast( void** )&SDL_GetVideoDriver, "SDL_GetVideoDriver" ); bindFunc( cast( void** )&SDL_VideoInit, "SDL_VideoInit" ); bindFunc( cast( void** )&SDL_VideoQuit, "SDL_VideoQuit" ); bindFunc( cast( void** )&SDL_GetCurrentVideoDriver, "SDL_GetCurrentVideoDriver" ); bindFunc( cast( void** )&SDL_GetNumVideoDisplays, "SDL_GetNumVideoDisplays" ); bindFunc( cast( void** )&SDL_GetDisplayName, "SDL_GetDisplayName" ); bindFunc( cast( void** )&SDL_GetDisplayBounds, "SDL_GetDisplayBounds" ); bindFunc( cast( void** )&SDL_GetNumDisplayModes, "SDL_GetNumDisplayModes" ); bindFunc( cast( void** )&SDL_GetDisplayMode, "SDL_GetDisplayMode" ); bindFunc( cast( void** )&SDL_GetDesktopDisplayMode, "SDL_GetDesktopDisplayMode" ); bindFunc( cast( void** )&SDL_GetCurrentDisplayMode, "SDL_GetCurrentDisplayMode" ); bindFunc( cast( void** )&SDL_GetClosestDisplayMode, "SDL_GetClosestDisplayMode" ); bindFunc( cast( void** )&SDL_GetWindowDisplayIndex, "SDL_GetWindowDisplayIndex" ); bindFunc( cast( void** )&SDL_SetWindowDisplayMode, "SDL_SetWindowDisplayMode" ); bindFunc( cast( void** )&SDL_GetWindowDisplayMode, "SDL_GetWindowDisplayMode" ); bindFunc( cast( void** )&SDL_GetWindowPixelFormat, "SDL_GetWindowPixelFormat" ); bindFunc( cast( void** )&SDL_CreateWindow, "SDL_CreateWindow" ); bindFunc( cast( void** )&SDL_CreateWindowFrom, "SDL_CreateWindowFrom" ); bindFunc( cast( void** )&SDL_GetWindowID, "SDL_GetWindowID" ); bindFunc( cast( void** )&SDL_GetWindowFromID, "SDL_GetWindowFromID" ); bindFunc( cast( void** )&SDL_GetWindowFlags, "SDL_GetWindowFlags" ); bindFunc( cast( void** )&SDL_SetWindowTitle, "SDL_SetWindowTitle" ); bindFunc( cast( void** )&SDL_GetWindowTitle, "SDL_GetWindowTitle" ); bindFunc( cast( void** )&SDL_SetWindowIcon, "SDL_SetWindowIcon" ); bindFunc( cast( void** )&SDL_SetWindowData, "SDL_SetWindowData" ); bindFunc( cast( void** )&SDL_GetWindowData, "SDL_GetWindowData" ); bindFunc( cast( void** )&SDL_SetWindowPosition, "SDL_SetWindowPosition" ); bindFunc( cast( void** )&SDL_GetWindowPosition, "SDL_GetWindowPosition" ); bindFunc( cast( void** )&SDL_SetWindowSize, "SDL_SetWindowSize" ); bindFunc( cast( void** )&SDL_GetWindowSize, "SDL_GetWindowSize" ); bindFunc( cast( void** )&SDL_SetWindowMinimumSize, "SDL_SetWindowMinimumSize" ); bindFunc( cast( void** )&SDL_GetWindowMinimumSize, "SDL_GetWindowMinimumSize" ); bindFunc( cast( void** )&SDL_SetWindowMaximumSize, "SDL_SetWindowMaximumSize" ); bindFunc( cast( void** )&SDL_GetWindowMaximumSize, "SDL_GetWindowMaximumSize" ); bindFunc( cast( void** )&SDL_SetWindowBordered, "SDL_SetWindowBordered" ); bindFunc( cast( void** )&SDL_ShowWindow, "SDL_ShowWindow" ); bindFunc( cast( void** )&SDL_HideWindow, "SDL_HideWindow" ); bindFunc( cast( void** )&SDL_RaiseWindow, "SDL_RaiseWindow" ); bindFunc( cast( void** )&SDL_MaximizeWindow, "SDL_MaximizeWindow" ); bindFunc( cast( void** )&SDL_MinimizeWindow, "SDL_MinimizeWindow" ); bindFunc( cast( void** )&SDL_RestoreWindow, "SDL_RestoreWindow" ); bindFunc( cast( void** )&SDL_SetWindowFullscreen, "SDL_SetWindowFullscreen" ); bindFunc( cast( void** )&SDL_GetWindowSurface, "SDL_GetWindowSurface" ); bindFunc( cast( void** )&SDL_UpdateWindowSurface, "SDL_UpdateWindowSurface" ); bindFunc( cast( void** )&SDL_UpdateWindowSurfaceRects, "SDL_UpdateWindowSurfaceRects" ); bindFunc( cast( void** )&SDL_SetWindowGrab, "SDL_SetWindowGrab" ); bindFunc( cast( void** )&SDL_GetWindowGrab, "SDL_GetWindowGrab" ); bindFunc( cast( void** )&SDL_SetWindowBrightness, "SDL_SetWindowBrightness" ); bindFunc( cast( void** )&SDL_GetWindowBrightness, "SDL_GetWindowBrightness" ); bindFunc( cast( void** )&SDL_SetWindowGammaRamp, "SDL_SetWindowGammaRamp" ); bindFunc( cast( void** )&SDL_GetWindowGammaRamp, "SDL_GetWindowGammaRamp" ); bindFunc( cast( void** )&SDL_DestroyWindow, "SDL_DestroyWindow" ); bindFunc( cast( void** )&SDL_IsScreenSaverEnabled, "SDL_IsScreenSaverEnabled" ); bindFunc( cast( void** )&SDL_EnableScreenSaver, "SDL_EnableScreenSaver" ); bindFunc( cast( void** )&SDL_DisableScreenSaver, "SDL_DisableScreenSaver" ); bindFunc( cast( void** )&SDL_GL_LoadLibrary, "SDL_GL_LoadLibrary" ); bindFunc( cast( void** )&SDL_GL_GetProcAddress, "SDL_GL_GetProcAddress" ); bindFunc( cast( void** )&SDL_GL_UnloadLibrary, "SDL_GL_UnloadLibrary" ); bindFunc( cast( void** )&SDL_GL_ExtensionSupported, "SDL_GL_ExtensionSupported" ); bindFunc( cast( void** )&SDL_GL_SetAttribute, "SDL_GL_SetAttribute" ); bindFunc( cast( void** )&SDL_GL_GetAttribute, "SDL_GL_GetAttribute" ); bindFunc( cast( void** )&SDL_GL_CreateContext, "SDL_GL_CreateContext" ); bindFunc( cast( void** )&SDL_GL_MakeCurrent, "SDL_GL_MakeCurrent" ); bindFunc( cast( void** )&SDL_GL_GetCurrentWindow, "SDL_GL_GetCurrentWindow" ); bindFunc( cast( void** )&SDL_GL_GetCurrentContext, "SDL_GL_GetCurrentContext" ); bindFunc( cast( void** )&SDL_GL_SetSwapInterval, "SDL_GL_SetSwapInterval" ); bindFunc( cast( void** )&SDL_GL_GetSwapInterval, "SDL_GL_GetSwapInterval" ); bindFunc( cast( void** )&SDL_GL_SwapWindow, "SDL_GL_SwapWindow" ); bindFunc( cast( void** )&SDL_GL_DeleteContext, "SDL_GL_DeleteContext" ); // SDL_init will fail if SDL_SetMainReady has not been called. // Since there's no SDL_main on the D side, it needs to be handled // manually. My understanding that this is fine on the platforms // that D is currently available on. If we ever get on to Android // or iPhone, though, this will need to be versioned. // I've wrapped it in a try/catch because it seem the function is // not always exported on Linux. See issue #153 // https://github.com/aldacron/Derelict3/issues/153 import derelict.util.exception; try { da_SDL_SetMainReady setReady; bindFunc( cast( void** )&setReady, "SDL_SetMainReady" ); setReady(); } catch( DerelictException de ) {} } } __gshared DerelictSDL2Loader DerelictSDL2; shared static this() { DerelictSDL2 = new DerelictSDL2Loader(); }
D
/Users/WenNiao/myproject/iosprojects/HackerNews/build/HackerNews.build/Debug-iphonesimulator/HackerNews.build/Objects-normal/x86_64/AppDelegate.o : /Users/WenNiao/myproject/iosprojects/HackerNews/HackerNews/ViewController.swift /Users/WenNiao/myproject/iosprojects/HackerNews/HackerNews/TableViewCell.swift /Users/WenNiao/myproject/iosprojects/HackerNews/TopStoryData.swift /Users/WenNiao/myproject/iosprojects/HackerNews/HackerNews/TableViewController.swift /Users/WenNiao/myproject/iosprojects/HackerNews/HackerNews/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/Alamofire.framework/Headers/Alamofire-Swift.h /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/Alamofire.framework/Modules/module.modulemap /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/SwiftyJSON.framework/Modules/SwiftyJSON.swiftmodule/x86_64.swiftmodule /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/SwiftyJSON.framework/Headers/SwiftyJSON-Swift.h /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/SwiftyJSON.framework/Headers/SwiftyJSON-umbrella.h /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/SwiftyJSON.framework/Modules/module.modulemap /Users/WenNiao/myproject/iosprojects/HackerNews/build/HackerNews.build/Debug-iphonesimulator/HackerNews.build/Objects-normal/x86_64/AppDelegate~partial.swiftmodule : /Users/WenNiao/myproject/iosprojects/HackerNews/HackerNews/ViewController.swift /Users/WenNiao/myproject/iosprojects/HackerNews/HackerNews/TableViewCell.swift /Users/WenNiao/myproject/iosprojects/HackerNews/TopStoryData.swift /Users/WenNiao/myproject/iosprojects/HackerNews/HackerNews/TableViewController.swift /Users/WenNiao/myproject/iosprojects/HackerNews/HackerNews/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/Alamofire.framework/Headers/Alamofire-Swift.h /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/Alamofire.framework/Modules/module.modulemap /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/SwiftyJSON.framework/Modules/SwiftyJSON.swiftmodule/x86_64.swiftmodule /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/SwiftyJSON.framework/Headers/SwiftyJSON-Swift.h /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/SwiftyJSON.framework/Headers/SwiftyJSON-umbrella.h /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/SwiftyJSON.framework/Modules/module.modulemap /Users/WenNiao/myproject/iosprojects/HackerNews/build/HackerNews.build/Debug-iphonesimulator/HackerNews.build/Objects-normal/x86_64/AppDelegate~partial.swiftdoc : /Users/WenNiao/myproject/iosprojects/HackerNews/HackerNews/ViewController.swift /Users/WenNiao/myproject/iosprojects/HackerNews/HackerNews/TableViewCell.swift /Users/WenNiao/myproject/iosprojects/HackerNews/TopStoryData.swift /Users/WenNiao/myproject/iosprojects/HackerNews/HackerNews/TableViewController.swift /Users/WenNiao/myproject/iosprojects/HackerNews/HackerNews/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/Alamofire.framework/Headers/Alamofire-Swift.h /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/Alamofire.framework/Modules/module.modulemap /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/SwiftyJSON.framework/Modules/SwiftyJSON.swiftmodule/x86_64.swiftmodule /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/SwiftyJSON.framework/Headers/SwiftyJSON-Swift.h /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/SwiftyJSON.framework/Headers/SwiftyJSON-umbrella.h /Users/WenNiao/myproject/iosprojects/HackerNews/build/Debug-iphonesimulator/SwiftyJSON.framework/Modules/module.modulemap
D
instance TPL_8018_TEMPLER(Npc_Default) { name[0] = NAME_TPL; guild = GIL_TPL; id = 8018; voice = 8; flags = 0; npcType = NPCTYPE_AMBIENT; B_SetAttributesToChapter(self,4); fight_tactic = FAI_HUMAN_STRONG; EquipItem(self,itmw_zweihaender5); CreateInvItems(self,ItPo_Health_03,1); B_CreateAmbientInv(self); B_SetNpcVisual(self,MALE,"Hum_Head_Bald",FACE_N_TEMPLER_5,BodyTex_N,itar_tpl_l); Mdl_ApplyOverlayMds(self,"Humans_Militia.mds"); B_GiveNpcTalents(self); B_SetFightSkills(self,80); daily_routine = rtn_start_8018; }; func void rtn_start_8018() { TA_Stand_ArmsCrossed(8,0,23,0,"NW_PSICAMP_23"); TA_Stand_Eating(23,0,8,0,"NW_PSICAMP_23_EAT"); }; func void rtn_campon_8018() { TA_Stand_ArmsCrossed(9,0,23,0,"NW_BIGFARM_CAMPON_PSI_02"); TA_Stand_ArmsCrossed(23,0,9,0,"NW_BIGFARM_CAMPON_PSI_02"); }; func void rtn_inbattle_8018() { ta_bigfight(8,0,22,0,"NW_BIGFIGHT_8679"); ta_bigfight(22,0,8,0,"NW_BIGFIGHT_8679"); };
D
/* * This file is part of gtkD. * * gtkD is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * gtkD is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with gtkD; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // generated automatically - do not change // find conversion definition on APILookup.txt // implement new conversion functionalities on the wrap.utils pakage /* * Conversion parameters: * inFile = GtkTooltips.html * outPack = gtk * outFile = Tooltips * strct = GtkTooltips * realStrct= * ctorStrct= * clss = Tooltips * interf = * class Code: No * interface Code: No * template for: * extend = * implements: * prefixes: * - gtk_tooltips_ * - gtk_ * omit structs: * omit prefixes: * omit code: * omit signals: * imports: * - gtkD.glib.Str * - gtkD.gtk.Widget * - gtkD.gtk.Window * structWrap: * - GtkWidget* -> Widget * - GtkWindow* -> Window * module aliases: * local aliases: * overrides: */ module gtkD.gtk.Tooltips; public import gtkD.gtkc.gtktypes; private import gtkD.gtkc.gtk; private import gtkD.glib.ConstructionException; private import gtkD.glib.Str; private import gtkD.gtk.Widget; private import gtkD.gtk.Window; private import gtkD.gtk.ObjectGtk; /** * Description * GtkTooltips has been deprecated in GTK+ 2.12, in favor of the new * GtkTooltip API. * Tooltips are the messages that appear next to a widget when the mouse pointer is held over it for a short amount of time. They are especially helpful for adding more verbose descriptions of things such as buttons in a toolbar. * An individual tooltip belongs to a group of tooltips. A group is created with a call to gtk_tooltips_new(). Every tooltip in the group can then be turned off with a call to gtk_tooltips_disable() and enabled with gtk_tooltips_enable(). * The length of time the user must keep the mouse over a widget before the tip is shown, can be altered with gtk_tooltips_set_delay(). This is set on a 'per group of tooltips' basis. * To assign a tip to a particular GtkWidget, gtk_tooltips_set_tip() is used. * Note * Tooltips can only be set on widgets which have their own X window and * receive enter and leave events. * To check if a widget has its own window use GTK_WIDGET_NO_WINDOW(). * To add a tooltip to a widget that doesn't have its own window, place the * widget inside a GtkEventBox and add a tooltip to that instead. * The default appearance of all tooltips in a program is determined by the current GTK+ theme that the user has selected. * Information about the tooltip (if any) associated with an arbitrary widget can be retrieved using gtk_tooltips_data_get(). * Example 62. Adding tooltips to buttons. * GtkWidget *load_button, *save_button, *hbox; * GtkTooltips *button_bar_tips; * button_bar_tips = gtk_tooltips_new (); * /+* Create the buttons and pack them into a GtkHBox +/ * hbox = gtk_hbox_new (TRUE, 2); * load_button = gtk_button_new_with_label ("Load a file"); * gtk_box_pack_start (GTK_BOX (hbox), load_button, TRUE, TRUE, 2); * gtk_widget_show (load_button); * save_button = gtk_button_new_with_label ("Save a file"); * gtk_box_pack_start (GTK_BOX (hbox), save_button, TRUE, TRUE, 2); * gtk_widget_show (save_button); * gtk_widget_show (hbox); * /+* Add the tips +/ * gtk_tooltips_set_tip (GTK_TOOLTIPS (button_bar_tips), load_button, * "Load a new document into this window", * "Requests the filename of a document. * This will then be loaded into the current * window, replacing the contents of whatever * is already loaded."); * gtk_tooltips_set_tip (GTK_TOOLTIPS (button_bar_tips), save_button, * "Saves the current document to a file", * "If you have saved the document previously, * then the new version will be saved over the * old one. Otherwise, you will be prompted for * a filename."); */ public class Tooltips : ObjectGtk { /** the main Gtk struct */ protected GtkTooltips* gtkTooltips; public GtkTooltips* getTooltipsStruct() { return gtkTooltips; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkTooltips; } /** * Sets our main struct and passes it to the parent class */ public this (GtkTooltips* gtkTooltips) { if(gtkTooltips is null) { this = null; return; } //Check if there already is a D object for this gtk struct void* ptr = getDObject(cast(GObject*)gtkTooltips); if( ptr !is null ) { this = cast(Tooltips)ptr; return; } super(cast(GtkObject*)gtkTooltips); this.gtkTooltips = gtkTooltips; } /** */ /** * Warning * gtk_tooltips_new has been deprecated since version 2.12 and should not be used in newly-written code. * Creates an empty group of tooltips. This function initialises a GtkTooltips structure. Without at least one such structure, you can not add tips to your application. * Throws: ConstructionException GTK+ fails to create the object. */ public this () { // GtkTooltips* gtk_tooltips_new (void); auto p = gtk_tooltips_new(); if(p is null) { throw new ConstructionException("null returned by gtk_tooltips_new()"); } this(cast(GtkTooltips*) p); } /** * Warning * gtk_tooltips_enable has been deprecated since version 2.12 and should not be used in newly-written code. * Allows the user to see your tooltips as they navigate your application. */ public void enable() { // void gtk_tooltips_enable (GtkTooltips *tooltips); gtk_tooltips_enable(gtkTooltips); } /** * Warning * gtk_tooltips_disable has been deprecated since version 2.12 and should not be used in newly-written code. * Causes all tooltips in tooltips to become inactive. Any widgets that have tips associated with that group will no longer display their tips until they are enabled again with gtk_tooltips_enable(). */ public void disable() { // void gtk_tooltips_disable (GtkTooltips *tooltips); gtk_tooltips_disable(gtkTooltips); } /** * Warning * gtk_tooltips_set_delay has been deprecated since version 2.12 and should not be used in newly-written code. * Sets the time between the user moving the mouse over a widget and the widget's tooltip appearing. * Params: * delay = an integer value representing milliseconds. */ public void setDelay(uint delay) { // void gtk_tooltips_set_delay (GtkTooltips *tooltips, guint delay); gtk_tooltips_set_delay(gtkTooltips, delay); } /** * Warning * gtk_tooltips_set_tip has been deprecated since version 2.12 and should not be used in newly-written code. * Adds a tooltip containing the message tip_text to the specified GtkWidget. * Params: * widget = the GtkWidget you wish to associate the tip with. * tipText = a string containing the tip itself. * tipPrivate = a string of any further information that may be useful if the user gets stuck. */ public void setTip(Widget widget, string tipText, string tipPrivate) { // void gtk_tooltips_set_tip (GtkTooltips *tooltips, GtkWidget *widget, const gchar *tip_text, const gchar *tip_private); gtk_tooltips_set_tip(gtkTooltips, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(tipText), Str.toStringz(tipPrivate)); } /** * Warning * gtk_tooltips_data_get has been deprecated since version 2.12 and should not be used in newly-written code. * Retrieves any GtkTooltipsData previously associated with the given widget. * Params: * widget = a GtkWidget. * Returns:a GtkTooltipsData struct, or NULL if the widget has no tooltip. */ public static GtkTooltipsData* dataGet(Widget widget) { // GtkTooltipsData* gtk_tooltips_data_get (GtkWidget *widget); return gtk_tooltips_data_get((widget is null) ? null : widget.getWidgetStruct()); } /** * Warning * gtk_tooltips_force_window has been deprecated since version 2.12 and should not be used in newly-written code. * Ensures that the window used for displaying the given tooltips is created. * Applications should never have to call this function, since GTK+ takes * care of this. */ public void forceWindow() { // void gtk_tooltips_force_window (GtkTooltips *tooltips); gtk_tooltips_force_window(gtkTooltips); } /** * Warning * gtk_tooltips_get_info_from_tip_window has been deprecated since version 2.12 and should not be used in newly-written code. * Determines the tooltips and the widget they belong to from the window in * which they are displayed. * This function is mostly intended for use by accessibility technologies; * applications should have little use for it. * Since 2.4 * Params: * tipWindow = a GtkWindow * tooltips = the return location for the tooltips which are displayed * in tip_window, or NULL * currentWidget = the return location for the widget whose tooltips * are displayed, or NULL * Returns: TRUE if tip_window is displaying tooltips, otherwise FALSE. */ public static int getInfoFromTipWindow(Window tipWindow, out GtkTooltips* tooltips, out Widget currentWidget) { // gboolean gtk_tooltips_get_info_from_tip_window (GtkWindow *tip_window, GtkTooltips **tooltips, GtkWidget **current_widget); GtkWidget* outcurrentWidget = null; auto p = gtk_tooltips_get_info_from_tip_window((tipWindow is null) ? null : tipWindow.getWindowStruct(), &tooltips, &outcurrentWidget); currentWidget = new Widget(outcurrentWidget); return p; } }
D
/** * A dummy-ish main() function, just used for testing. * * When running a program liked to the FewDee library, the unit tests within the * library are not executed (as of DMD 2.061). So, in order to test the library, * we compile all FewDee sources with this additional source file, so that we * get an executable that actually tests the library code. * * Authors: Leandro Motta Barros */ import std.stdio; void main() { version (unittest) { writeln("It seems that all unit tests passed."); } else { static assert(false, "Must compile this with unit tests enabled!"); } }
D
module taxforms.framework.standardquestions; import scriptlike.std; import scriptlike.interact; private auto marriageFiling = ["Single", "Married Filing Separate", "Married Filing Jointly", "Head of House"]; enum MarriageFiling { unanswered, single, separate, jointly, headofhouse } private MarriageFiling mfAnswer; MarriageFiling askMarriageFiling() { if(mfAnswer == MarriageFiling.unanswered) mfAnswer = cast(MarriageFiling) menu!int("Are you: ", marriageFiling); return mfAnswer; } private Nullable!bool claimedAnswer; bool askClaimedAsDependent() { if(claimedAnswer.isNull) claimedAnswer = userInput!bool("Are you being claimed as a dependent?"); return claimedAnswer; }
D
import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric; enum P = 10L^^9+7; long pow(long x, long n) { long y = 1; while (n) { if (n%2 == 1) y = (y * x) % P; x = x^^2 % P; n /= 2; } return y; } void main() { auto N = readln.chomp.to!int; auto vs = new long[](N); long max_a; foreach (i, a; readln.split.to!(long[])) { if ((i == 0 && a != 0) || (i != 0 && a == 0)) { writeln(0); return; } max_a = max(max_a, a); ++vs[a]; } long r = 1; foreach (i; 1..max_a+1) { auto c = pow((pow(2, vs[i-1])-1+P)%P, vs[i]); auto d = pow(2, vs[i] * (vs[i]-1) / 2); (r *= c * d % P) %= P; } writeln(r); }
D
instance DIA_DRAGON_BLACK_EXIT(C_Info) { npc = dragon_black; nr = 999; condition = dia_dragon_black_exit_condition; information = dia_dragon_black_exit_info; permanent = TRUE; description = Dialog_Ende; }; func int dia_dragon_black_exit_condition() { if(DragonTalk_Exit_Free == TRUE) { return TRUE; }; }; func void dia_dragon_black_exit_info() { AI_StopProcessInfos(self); DragonTalk_Exit_Free = FALSE; self.flags = 0; }; instance DIA_DRAGON_BLACK_HELLO(C_Info) { npc = dragon_black; nr = 5; condition = dia_dragon_black_hello_condition; information = dia_dragon_black_hello_info; important = TRUE; }; func int dia_dragon_black_hello_condition() { if((DRAGONBLACKMEET == FALSE) && (AZGOLORAPPEAR == TRUE)) { return TRUE; }; }; func void dia_dragon_black_hello_info() { Snd_Play("MFX_FEAR_CAST"); AI_Output(self,other,"DIA_Dragon_Black_Hello_01_00"); //Человек!? А я-то думал, что уничтожил вас всех, жалкие людишки! AI_Output(other,self,"DIA_Dragon_Black_Hello_01_01"); //Как видишь, ты немного ошибся. И думаю, что это станет твоей последней ошибкой. AI_Output(self,other,"DIA_Dragon_Black_Hello_01_05"); //(рычит) Значит, своим беспокойством я обязан тебе?! Простому смертному? AI_Output(other,self,"DIA_Dragon_Black_Hello_01_03"); //Именно так оно и есть, дракон. Я пришел сюда, чтобы снести тебе твою поганую голову! AI_Output(self,other,"DIA_Dragon_Black_Hello_01_07"); //(рычит) Раз ты сумел добраться до меня, то, очевидно, мой верный слуга Дакат потерпел неудачу. AI_Output(self,other,"DIA_Dragon_Black_Hello_01_08"); //Безмозглая тварь! Все надо доделывать самому! AI_Output(self,other,"DIA_Dragon_Black_Hello_01_09"); //Ну что же, я вырву у тебя сердце, заберу душу, а плоть разорву на мелкие кусочки! AI_Output(other,self,"DIA_Dragon_Black_Hello_01_10"); //Это мы еще посмотрим, кто кому вырвет сердце! Привет тебе от Ур-Тралла! AI_Output(self,other,"DIA_Dragon_Black_Hello_01_14"); //Ур-Тралл? Ах да, я помню этого слизняка. Сам он не осмелился бросить мне вызов? Впрочем, это не важно. if(MEETURGROM == 4) { AI_Output(self,other,"DIA_Dragon_Black_Hello_01_19"); //Я вижу, ты привел с собой могучего Ур-Грома! AI_Output(self,other,"DIA_Dragon_Black_Hello_01_20"); //Его душа принадлежит мне, так же как и весь их мерзкий народец! }; if(Npc_HasItems(other,itrw_addon_magiccrossbow_shv) >= 1) { AI_Output(self,other,"DIA_Dragon_Black_Hello_01_21"); //О, я вижу, ты отыскал Вершителя - оружие воина-духа, низвергнутого мной! AI_Output(self,other,"DIA_Dragon_Black_Hello_01_22"); //И ты наивно полагаешь, что он тебе поможет одолеть меня? }; AI_Output(other,self,"DIA_Dragon_Black_Hello_01_17"); //Хватит попусту тратить время на болтовню! Пора заняться делом. AI_Output(self,other,"DIA_Dragon_Black_Hello_01_18"); //(презрительно) Я уже чувствую вкус твоей крови, герой... AI_PlayAni(self,"T_WARN"); AI_Output(self,other,"DIA_Dragon_Black_Hello_01_23"); //МОИ ЗУБЫ - МЕЧИ! МОИ КОГТИ - КОПЬЯ! МОИ КРЫЛЬЯ - УРАГАН! AI_Output(self,other,"DIA_Dragon_Black_Hello_01_24"); //Я - ЭТО ПЛАМЯ! Я - ЭТО... СМЕРТЬ! B_LogEntry(TOPIC_URNAZULRAGE,"Великая Тень, Азгалор, - здесь! Око Гнева пробудило черного дракона и он явился в Долину Теней, ведомый зовом этого могущественного артефакта. В общем, именно этого я и добивался. Теперь только мой меч сможет дать ответ - не напрасно ли все это было сделано?"); AI_StopProcessInfos(self); DragonTalk_Exit_Free = FALSE; DRAGONBLACKMEET = TRUE; self.flags = 0; self.aivar[AIV_EnemyOverride] = FALSE; };
D
# FIXED third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.obj: C:/ti/TivaWare_C_Series-2.1.4.178/third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.c third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.obj: C:/ti/TivaWare_C_Series-2.1.4.178/third_party/FreeRTOS/Source/include/FreeRTOS.h third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/stddef.h third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/stdint.h third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/sys/stdint.h third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/sys/cdefs.h third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/sys/_types.h third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/machine/_types.h third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/machine/_stdint.h third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/sys/_stdint.h third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.obj: C:/Users/rucha/workspace_v8/freertos_demo/FreeRTOSConfig.h third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.obj: C:/ti/TivaWare_C_Series-2.1.4.178/third_party/FreeRTOS/Source/include/projdefs.h third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.obj: C:/ti/TivaWare_C_Series-2.1.4.178/third_party/FreeRTOS/Source/include/portable.h third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.obj: C:/ti/TivaWare_C_Series-2.1.4.178/third_party/FreeRTOS/Source/include/deprecated_definitions.h third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.obj: C:/ti/TivaWare_C_Series-2.1.4.178/third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/portmacro.h third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.obj: C:/ti/TivaWare_C_Series-2.1.4.178/third_party/FreeRTOS/Source/include/mpu_wrappers.h third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.obj: C:/ti/TivaWare_C_Series-2.1.4.178/third_party/FreeRTOS/Source/include/task.h third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.obj: C:/ti/TivaWare_C_Series-2.1.4.178/third_party/FreeRTOS/Source/include/list.h C:/ti/TivaWare_C_Series-2.1.4.178/third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.c: C:/ti/TivaWare_C_Series-2.1.4.178/third_party/FreeRTOS/Source/include/FreeRTOS.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/stddef.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/stdint.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/sys/stdint.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/sys/cdefs.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/sys/_types.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/machine/_types.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/machine/_stdint.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/sys/_stdint.h: C:/Users/rucha/workspace_v8/freertos_demo/FreeRTOSConfig.h: C:/ti/TivaWare_C_Series-2.1.4.178/third_party/FreeRTOS/Source/include/projdefs.h: C:/ti/TivaWare_C_Series-2.1.4.178/third_party/FreeRTOS/Source/include/portable.h: C:/ti/TivaWare_C_Series-2.1.4.178/third_party/FreeRTOS/Source/include/deprecated_definitions.h: C:/ti/TivaWare_C_Series-2.1.4.178/third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/portmacro.h: C:/ti/TivaWare_C_Series-2.1.4.178/third_party/FreeRTOS/Source/include/mpu_wrappers.h: C:/ti/TivaWare_C_Series-2.1.4.178/third_party/FreeRTOS/Source/include/task.h: C:/ti/TivaWare_C_Series-2.1.4.178/third_party/FreeRTOS/Source/include/list.h:
D
/home/parsa/codes/RUST/parallel/target/debug/deps/cfg_if-ab1bd98be96b57b3.rmeta: /home/parsa/.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-0.1.10/src/lib.rs /home/parsa/codes/RUST/parallel/target/debug/deps/libcfg_if-ab1bd98be96b57b3.rlib: /home/parsa/.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-0.1.10/src/lib.rs /home/parsa/codes/RUST/parallel/target/debug/deps/cfg_if-ab1bd98be96b57b3.d: /home/parsa/.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-0.1.10/src/lib.rs /home/parsa/.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-0.1.10/src/lib.rs:
D
/***************************************************************************** * * Higgs JavaScript Virtual Machine * * This file is part of the Higgs project. The project is distributed at: * https://github.com/maximecb/Higgs * * Copyright (c) 2012-2014, Maxime Chevalier-Boisvert. All rights reserved. * * This software is licensed under the following license (Modified BSD * License): * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * *****************************************************************************/ module jit.jit; import std.stdio; import std.string; import std.array; import std.stdint; import std.conv; import std.algorithm; import std.typecons; import std.bitmanip; import options; import ir.ir; import ir.ast; import ir.livevars; import runtime.vm; import runtime.layout; import runtime.object; import runtime.string; import runtime.gc; import jit.codeblock; import jit.x86; import jit.util; import jit.moves; import jit.ops; /// R15: VM object pointer (C callee-save) alias vmReg = R15; /// R14: word stack pointer (C callee-save) alias wspReg = R14; /// R13: type stack pointer (C callee-save) alias tspReg = R13; // RSP: C stack pointer (used for C calls only) alias cspReg = RSP; /// C argument registers immutable X86Reg[] cargRegs = [RDI, RSI, RDX, RCX, R8, R9]; /// C fp argument registers immutable X86Reg[] cfpArgRegs = [XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7]; /// C return value register alias cretReg = RAX; /// Scratch registers, these do not conflict with the C arguments immutable X86Reg[] scrRegs = [RAX, RBX, RBP]; /// RCX, RBX, RBP, R8-R12: 9 allocatable registers immutable X86Reg[] allocRegs = [RDI, RSI, RCX, RDX, R8, R9, R10, R11, R12]; /// Return word register alias retWordReg = RCX; /// Return type tag register alias retTagReg = DL; /// Minimum heap space required to compile a block (256KB) const size_t JIT_MIN_BLOCK_SPACE = 1 << 18; /** Type and allocation state of a live value */ struct ValState { /// Value kind enum Kind { STACK, REG, CONST } /// Bit field for compact encoding mixin(bitfields!( /// Value kind Kind, "kind", 2, /// Type written to stack flag bool, "tagWritten", 1, /// Local index, or register number, or constant value int, "val", 24, /// Padding bits uint, "", 5 )); /// Value type, may be unknown ValType type; /// Stack value constructor static ValState stack() { ValState val; val.kind = Kind.STACK; val.tagWritten = false; val.val = 0xFFFF; return val; } /// Register value constructor static ValState reg(X86Reg reg) { ValState val; val.kind = Kind.REG; val.tagWritten = false; val.val = reg.regNo; return val; } bool isStack() const { return kind is Kind.STACK; } bool isReg() const { return kind is Kind.REG; } bool isConst() const { return kind is Kind.CONST; } bool tagKnown() const { return type.tagKnown; } Tag tag() const { assert (tagKnown); return type.tag; } bool shapeKnown() const { return type.shapeKnown; } ObjShape shape() const { assert (!opts.shape_novers || !type.shapeKnown); return cast(ObjShape)type.shape; } /// Get a word operand for this value X86Opnd getWordOpnd(size_t numBits, StackIdx stackIdx = StackIdx.max) const { switch (kind) { case Kind.STACK: assert (stackIdx !is StackIdx.max); return wordStackOpnd(stackIdx, numBits); case Kind.REG: return X86Reg(X86Reg.GP, val, numBits).opnd; // TODO: const kind default: assert (false); } } /// Get a type tag operand for this value X86Opnd getTagOpnd(StackIdx stackIdx = StackIdx.max) const { if (type.tagKnown) return X86Opnd(type.tag); assert (stackIdx !is StackIdx.max); return tagStackOpnd(stackIdx); } /// Set the type tag for this value ValState setTag(Tag tag) const { assert (!isConst); ValState val = cast(ValState)this; val.type = ValType(tag); return val; } /// Set the shape for this value ValState setShape(ObjShape shape) const { assert (!isConst); if (opts.shape_novers) return cast(ValState)this; ValState val = cast(ValState)this; val.type.shape = shape; val.type.shapeKnown = true; val.type.fptrKnown = false; return val; } /// Set the type for this value ValState setType(const ValType type) const { assert (!isConst); ValState val = cast(ValState)this; val.type = cast(ValType)type; if (opts.shape_novers) { val.type.shape = null; val.type.shapeKnown = false; val.type.fptrKnown = false; } if (opts.noovfelim) { val.type.subMax = false; } return val; } /// Clear the type tag information for this value ValState clearTag() const { assert (!isConst); ValState val = cast(ValState)this; val.type.tagKnown = false; return val; } /// Clear the shape information for this value ValState clearShape() const { assert (!isConst); ValState val = cast(ValState)this; if (type.shapeKnown) { assert (!type.fptrKnown); val.type.shape = null; val.type.shapeKnown = false; } return val; } /// Clear all type information for this value ValState clearType() const { assert (!isConst); ValState val = cast(ValState)this; val.type = ValType(); return val; } /// Move this value to the stack ValState toStack() const { ValState val = cast(ValState)this; val.kind = Kind.STACK; val.val = 0xFFFF; return val; } /// Move this value to a register ValState toReg(X86Reg reg) const { ValState val = cast(ValState)this; val.kind = Kind.REG; val.val = reg.regNo; return val; } /// Mark the type as written to the stack ValState writeTag() const { ValState val = cast(ValState)this; val.tagWritten = true; return val; } } /** Current code generation state. This includes register allocation state and known type information. */ class CodeGenState { /// Associated IR function IRFunction fun; /// Map of live values to current type/allocation states private ValState[IRDstValue] valMap; /// Map of general-purpose registers to values /// If a register is free, its value is null private IRDstValue[NUM_REGS] gpRegMap; /** Constructor for a function entry code generation state */ this(IRFunction fun) { this.fun = fun; mapToStack(fun.raVal); mapToStack(fun.closVal); mapToStack(fun.thisVal); mapToStack(fun.argcVal); foreach (ident, param; fun.paramMap) mapToStack(param); // Set the tags for the untagged hidden argument values setTag(fun.raVal, Tag.RETADDR); setTag(fun.closVal, Tag.CLOSURE); setTag(fun.argcVal, Tag.INT32); } /** Copy constructor */ this(CodeGenState that) { this.fun = that.fun; this.valMap = that.valMap.dup; this.gpRegMap = that.gpRegMap; } /** Construct the successor state for a given predecessor state and branch edge */ this(CodeGenState predState, BranchEdge branch) { // Call the copy constructor this(predState); auto liveInfo = fun.liveInfo; // Map each successor phi node on the stack or in its register // in a way that best matches the predecessor state for (auto phi = branch.target.firstPhi; phi !is null; phi = phi.next) { if (branch.branch is null || phi.hasNoUses) continue; // Get the phi argument auto arg = branch.getPhiArg(phi); assert ( arg !is null, "missing phi argument from:\n" ~ branch.branch.block.toString ~ "\nto phi:\n" ~ phi.toString() ~ "\nin block:\n" ~ phi.block.toString() ); // Free the register currently used by the phi node (if any) auto predPhiState = getState(phi); if (predPhiState.isReg) { auto regNo = predPhiState.val; gpRegMap[regNo] = null; } // Get the default register for the phi node auto phiReg = getDefReg(phi); // If the argument is a dst value if (auto dstArg = cast(IRDstValue)arg) { // Get the word operand for the argument X86Opnd argOpnd = dstArg? predState.getWordOpnd(dstArg, 64):X86Opnd.NONE; // If the argument is in a register which is about to become free if (argOpnd.isReg && liveInfo.liveAfterPhi(dstArg, phi.block) is false) { // Try to use the arg register for the phi node phiReg = argOpnd.reg; } } // Get the value currently mapped to this register auto regVal = gpRegMap[phiReg.regNo]; ValState phiState; // If the register is free if (regVal is null || liveInfo.liveAfterPhi(regVal, phi.block) is false) { // Map the phi node to the register phiState = ValState.reg(phiReg); gpRegMap[phiReg.regNo] = phi; } else { // Map the phi node to its stack location phiState = ValState.stack(); } // If the phi value is flowing into itself and the // type was previously written to the stack if (arg is phi && predPhiState.tagWritten) { // Mark the type as written to the stack phiState = phiState.writeTag(); } // Set the phi type to the argument type auto argType = predState.getType(arg); phiState = phiState.setType(argType); // Set the phi node's new state valMap[phi] = phiState; } // Remove information about values dead after // the phi nodes in the successor block removeDead(liveInfo, branch.target); } /** Produce a string representation of the type information in this code generation state */ override string toString() const { string str; foreach (val, st; valMap) { str ~= format("%s: %s\n", val.getName, st.tagKnown? to!string(st.type):"unknown"); } return str; } /** Remove information about values dead at the beginning of a given block */ void removeDead(LiveInfo liveInfo, IRBlock block) { // For each value in the value map // Note: a value being mapped to a register/slot does not mean that // this register/slot is necessarily mapped to that value in the // presence of inlined calls foreach (value; valMap.keys) { // If this value is not from this function, skip it if (value.block.fun !is block.fun) continue; if (liveInfo.liveAfterPhi(value, block) is false) valMap.remove(value); } // For each general-purpose register foreach (regNo, value; gpRegMap) { // If nothing is mapped to this register, skip it if (value is null) continue; // If this value is not from this function, skip it if (value.block.fun !is block.fun) continue; // If the value is no longer live, remove it if (liveInfo.liveAfterPhi(value, block) is false) gpRegMap[regNo] = null; } } /** Compute the difference (similarity) between this state and another - If states are identical, 0 will be returned - If states are incompatible, size_t.max will be returned */ size_t diff(CodeGenState succ) { assert (this.fun is succ.fun); auto pred = this; // Difference (penalty) sum size_t diff = 0; debug { foreach (value, state; pred.valMap) { assert ( value in succ.valMap, "value not in succ valMap: " ~ value.toString ); } } // For each value in the successor type state map foreach (value, state; succ.valMap) { auto predSt = pred.getState(value); auto succSt = succ.getState(value); // If the type states match perfectly, no penalty if (predSt == succSt) continue; // If the types do not match perfectly if (predSt.type != succSt.type) { // If the predecessor type is a subtype of the successor if (predSt.type.isSubType(succSt.type)) { // Add a penalty for the inexact type match, // since information would be lost diff += 1; } else { // The types are incompatible return size_t.max; } } } // Return the total difference return diff; } /** Get the default register for a given value */ X86Reg getDefReg(IRDstValue value) { assert ( value.outSlot !is NULL_STACK, "no out slot for value: " ~ value.toString ); // For each use of the value for (auto use = value.getFirstUse; use !is null; use = use.next) { // Get the owner of the first use auto owner = use.owner; // If the value flows into a phi node other than itself if (cast(PhiNode)owner && !cast(PhiNode)value) { // Prefer the register of the destination phi node return getDefReg(owner); } // If the value flows into a return instruction auto ownerInstr = cast(IRInstr)owner; if (ownerInstr && ownerInstr.opcode is &ir.ops.RET) { // Prefer the return value register return retWordReg; } } // Choose a register based on the output slot auto regIdx = value.outSlot % allocRegs.length; auto reg = allocRegs[regIdx]; return reg; } /** Map a register to a value */ X86Reg mapReg(X86Reg reg, IRDstValue value, size_t numBits) { assert (getState(value).isReg is false); assert (gpRegMap[reg.regNo] is null); // Map the register to the new value gpRegMap[reg.regNo] = value; // Map the value to the register valMap[value] = getState(value).toReg(reg); // Return the operand for this register return reg.reg(numBits); } /** Find a free register or spill one */ X86Reg freeReg( CodeBlock as, IRInstr instr, X86Reg defReg = allocRegs[0] ) { auto liveInfo = fun.liveInfo; // Get the value mapped to the default register auto defRegVal = gpRegMap[defReg.regNo]; // If the default register is free if (defRegVal is null) return defReg; // If the value mapped to the default register is not live if (!liveInfo.liveBefore(defRegVal, instr) && defRegVal !is instr) { // Remove the mapped value from the value map valMap.remove(defRegVal); gpRegMap[defReg.regNo] = null; return defReg; } // For each allocatable general-purpose register foreach (reg; allocRegs) { auto regVal = gpRegMap[reg.regNo]; // If nothing is mapped to this register if (regVal is null) { return reg; } // If the value mapped is not live if (!liveInfo.liveBefore(regVal, instr) && regVal !is instr) { // Remove the mapped value from the value map valMap.remove(regVal); gpRegMap[reg.regNo] = null; return reg; } } // If the value mapped to the default register // is not an argument of the instruction if (!instr.hasArg(defRegVal) && defRegVal !is instr) { // Spill the default register spillReg(as, defReg); return defReg; } // Chosen register to spill immutable(X86Reg)* chosenReg = null; // For each allocatable general-purpose register foreach (reg; allocRegs) { auto regVal = gpRegMap[reg.regNo]; // If an argument of the instruction uses this register, skip it if (instr.hasArg(regVal) || regVal is instr) continue; chosenReg = &reg; break; } // If no non-argument register could be found, spill a // register which isn't the mapped to the instruction if (chosenReg is null) { foreach (reg; allocRegs) { auto regVal = gpRegMap[reg.regNo]; if (regVal is instr) continue; chosenReg = &reg; break; } } // Spill the chosen register assert ( chosenReg !is null, "couldn't find register to spill" ); spillReg(as, *chosenReg); return *chosenReg; } /** Allocate a register for a value */ X86Reg allocReg( CodeBlock as, IRInstr instr, IRDstValue value, size_t numBits, X86Opnd defReg = X86Opnd.NONE ) { assert (value !is null); // If no default register was specified, assign one if (defReg == X86Opnd.NONE) defReg = getDefReg(value).opnd; // Find or free a register auto reg = freeReg(as, instr, defReg.reg); // Map the value to the chosen register return mapReg(reg, value, numBits); } /** Get the operand for an instruction's output */ X86Opnd getOutOpnd( CodeBlock as, IRInstr instr, size_t numBits, bool useArgReg = false ) { assert (instr !is null); X86Opnd defReg = X86Opnd.NONE; // If we should try to reuse an argument register if (useArgReg) { // For each argument of the instruction for (size_t i = 0; i < instr.numArgs; ++i) { // If the argument is a constant, skip it auto dstArg = cast(IRDstValue)instr.getArg(i); if (dstArg is null) continue; // If the argument is not mapped to a register, skip it auto state = getState(dstArg); if (state.isReg is false) continue; // If the argument is live after the instruction, skip it if (fun.liveInfo.liveAfter(dstArg, instr) is true) continue; auto argOpnd = state.getWordOpnd(64); // Free the register valMap.remove(dstArg); gpRegMap[argOpnd.reg.regNo] = null; // Bias the register allocation towards this register defReg = argOpnd; break; } } // Attempt to allocate a register for the output value auto reg = allocReg( as, instr, instr, numBits, defReg ); assert (instr in valMap); return reg.opnd; } /** Map a value to its stack location */ void mapToStack(IRDstValue value) { // Map the value and its type to the stack valMap[value] = ValState.stack().writeTag(); } /** Spill a specific register to the stack */ void spillReg(CodeBlock as, X86Reg reg) { // Get the value mapped to this register auto regVal = gpRegMap[reg.regNo]; // If no value is mapped to this register, stop if (regVal is null) return; // Get the state for this value auto state = getState(regVal); assert ( state.isReg, "value not mapped to reg in spillReg:\n" ~ regVal.toString ); // Mark the value as being on the stack valMap[regVal] = state.toStack(); // Mark the register as free gpRegMap[reg.regNo] = null; // If the value is a function parameter, // we don't actually need to spill it if (cast(FunParam)regVal) return; //writeln("spilling: ", regVal); auto mem = wordStackOpnd(regVal.outSlot); //as.printStr("spilling " ~ regVal.toString); //as.printStr("spilling " ~ reg.toString); //writefln("spilling: %s (%s)", regVal.toString, reg); // Spill the value currently in the register if (opts.genasm) as.comment("Spilling " ~ regVal.getName); as.mov(mem, reg.opnd(64)); // If the type is known, spill it if (state.tagKnown && !state.tagWritten) { // Write the type tag to the type stack //if (opts.genasm) // as.comment("Spilling type for " ~ regVal.getName); as.mov(tagStackOpnd(regVal.outSlot), state.getTagOpnd()); valMap[regVal] = valMap[regVal].writeTag(); } } /// Spill test function alias SpillTestFn = bool delegate(LiveInfo liveInfo, IRDstValue value); /** Spill a set of values to the stack */ void spillValues(CodeBlock as, SpillTestFn spillTest) { auto liveInfo = fun.liveInfo; // For each allocatable general-purpose register foreach (reg; allocRegs) { auto value = gpRegMap[reg.regNo]; // If nothing is mapped to this register, skip it if (value is null) continue; // If the value should be spilled, spill it if (spillTest(liveInfo, value) is true) spillReg(as, reg); } // For each value in the value map foreach (value, state; valMap) { if (cast(FunParam)value) continue; // If the value has a known type and is not in a register if (state.tagKnown && !state.tagWritten && !state.isReg) { // If the value should be spilled if (spillTest(liveInfo, value) is true) { // Spill the type for this value as.mov(tagStackOpnd(value.outSlot), state.getTagOpnd()); valMap[value] = state.writeTag(); } } } } /** Spill the values live before a given instruction */ void spillLiveBefore(CodeBlock as, IRInstr instr) { return spillValues( as, delegate bool(LiveInfo liveInfo, IRDstValue value) { return liveInfo.liveBefore(value, instr); } ); } /** Spill the values live after a given instruction */ void spillLiveAfter(CodeBlock as, IRInstr instr) { return spillValues( as, delegate bool(LiveInfo liveInfo, IRDstValue value) { return liveInfo.liveAfter(value, instr); } ); } /** Spill live registers from the register save space */ void spillSavedRegs(SpillTestFn spillTest) { auto liveInfo = fun.liveInfo; // For each allocatable register foreach (regIdx, reg; allocRegs) { // Get the value mapped to this register auto regVal = gpRegMap[reg.regNo]; // If nothing is mapped to this register, skip it if (regVal is null) continue; // If the value is not live, skip it if (spillTest(liveInfo, regVal) is false) continue; //writefln("spilling reg %s val %s", reg, regVal); //writefln(" val=%s", vm.regSave[regIdx].uint64Val); // Get the state for this value auto state = getState(regVal); assert ( state.isReg, "value not mapped to reg to be spilled" ); // Store the value in its stack location vm.wsp[regVal.outSlot] = vm.regSave[regIdx]; // If the type is known, store it if (state.tagKnown) { //writeln("spilling known type"); // Write the type tag to the type stack vm.tsp[regVal.outSlot] = state.tag; } } } /** Reload registers from the stack to the register save space */ void loadSavedRegs(SpillTestFn spillTest) { auto liveInfo = fun.liveInfo; // For each allocatable register foreach (regIdx, reg; allocRegs) { // Get the value mapped to this register auto regVal = gpRegMap[reg.regNo]; // If nothing is mapped to this register, skip it if (regVal is null) continue; // If the value is not live, skip it if (spillTest(liveInfo, regVal) is false) continue; // Restore the register value from its stack location // Note: this is important because a GC may have occurred vm.regSave[regIdx] = vm.wsp[regVal.outSlot]; } } /** Clear known shape information. Used at function calls. */ void clearShapes() { // For each value in the value map foreach (value, state; valMap) { if (state.type.shapeKnown) { assert (!state.type.fptrKnown); valMap[value] = state.clearShape(); } } } /** Get an operand for any IR value without allocating a register */ X86Opnd getWordOpnd(IRValue value, size_t numBits) { assert ( value !is null, "cannot get operand for null value" ); auto dstVal = cast(IRDstValue)value; // If the value is an IR constant if (dstVal is null) { auto word = value.cstValue.word; // Note: the sequence below is necessary because the 64-bit // value of a 32-bit negative integer is positive as the // higher bits are all zeros. if (numBits is 8) return X86Opnd(word.int8Val); if (numBits is 32) return X86Opnd(word.int32Val); else return X86Opnd(word.int64Val); } // Get the state for this value auto state = getState(dstVal); return state.getWordOpnd(numBits, dstVal.outSlot); } /** Get the word operand for an instruction argument, allocating a register when possible. - If tmpReg is supplied, memory operands will be loaded in the tmpReg - If acceptImm is false, constant operants will be loaded into tmpReg - If loadVal is false, memory operands will not be loaded */ X86Opnd getWordOpnd( CodeBlock as, IRInstr instr, size_t argIdx, size_t numBits, X86Opnd tmpReg = X86Opnd.NONE, bool acceptImm = false, bool loadVal = true ) { assert (instr !is null); assert ( argIdx < instr.numArgs, "invalid argument index" ); // Get the IR value for the argument auto argVal = instr.getArg(argIdx); auto argDst = cast(IRDstValue)argVal; // If the argument is a string if (auto argStr = cast(IRString)argVal) { // Ensure that the string is allocated argStr.getPtr(vm); // If no temporary register is supplied, free one if (tmpReg == X86Opnd.NONE) tmpReg = freeReg(as, instr).opnd; // Load the string pointer into the tmp reg as.ptr(tmpReg.reg, argStr); as.getMember!("IRString.ptr")(tmpReg.reg, tmpReg.reg); return tmpReg; } // Ensure that the value was previously defined and is live assert ( argDst is null || argDst in valMap, "argument not in val map: " ~ argDst.toString ); // Get the current operand for the argument value auto curOpnd = getWordOpnd(argVal, numBits); // If the argument is already in a register if (curOpnd.isReg) { return curOpnd; } // If the operand is immediate if (curOpnd.isImm) { if (acceptImm && curOpnd.imm.immSize <= 32) { return curOpnd; } assert ( !tmpReg.isNone, "immediates not accepted but no tmpReg supplied:\n" ~ instr.toString() ); if (tmpReg.isGPR) { as.mov(tmpReg.reg, curOpnd.imm); return tmpReg; } if (tmpReg.isXMM) { if (curOpnd.imm.imm is 0) { as.xorps(tmpReg, tmpReg); } else { // Write the FP constant in the code stream and load it as.movsd(tmpReg, X86Opnd(64, RIP, 2)); as.jmp8(8); as.writeInt(curOpnd.imm.imm, 64); } return tmpReg; } assert ( false, "unhandled immediate" ); } // If the operand is a memory location if (curOpnd.isMem) { // Try to allocate a register for the operand assert (argDst !is null); assert (getState(argDst).isStack); auto opnd = loadVal? allocReg(as, instr, argDst, numBits).opnd:curOpnd; // If a register was successfully allocated if (opnd.isReg && curOpnd.isMem) { //writeln("loading: ", argDst); // Load the value into the register // Note: we load all 64 bits, not just the requested bits as.mov(opnd.reg.opnd(64), wordStackOpnd(argDst.outSlot)); assert (getState(argDst).isReg); } // If the register allocation failed but a temp reg was supplied else if (opnd.isMem && !tmpReg.isNone) { if (tmpReg.isXMM) as.movsd(tmpReg, curOpnd); else as.mov(tmpReg, curOpnd); return tmpReg; } // Return the allocated operand return opnd; } assert (false, "invalid cur opnd type"); } /** Get an x86 operand for the type tag of any IR value */ X86Opnd getTagOpnd(IRValue value) const { assert (value !is null); auto dstVal = cast(IRDstValue)value; // If the value is not a dst value if (dstVal is null) { // If the value is a string if (auto argStr = cast(IRString)value) { return X86Opnd(Tag.STRING); } return X86Opnd(value.cstValue.tag); } // Get the type operand for this value return getState(dstVal).getTagOpnd(dstVal.outSlot); } /** Get an x86 operand for the type of an instruction argument */ X86Opnd getTagOpnd( CodeBlock as, IRInstr instr, size_t argIdx, X86Opnd tmpReg8 = X86Opnd.NONE, bool acceptImm = false ) const { assert (instr !is null); assert ( argIdx < instr.numArgs, "invalid argument index" ); // Get an operand for the argument value auto argVal = instr.getArg(argIdx); auto curOpnd = getTagOpnd(argVal); if (acceptImm is true && curOpnd.isImm) { return curOpnd; } if (!tmpReg8.isNone) { assert (tmpReg8.reg.size is 8); as.mov(tmpReg8, curOpnd); return tmpReg8; } return curOpnd; } /// Set the type tag value for an instruction's output void setOutTag( CodeBlock as, IRInstr instr, Tag tag ) { assert ( instr !is null, "null instruction" ); // getOutOpnd should be called before setOutTag assert ( instr in valMap, "setOutTag: instr not in valMap:\n" ~ instr.toString ); auto state = getState(instr); // Set a known type for this value valMap[instr] = state.setTag(tag); } /// Write the type tag for an instruction's output to the type stack void setOutTag(CodeBlock as, IRInstr instr, X86Reg tagReg) { assert ( instr !is null, "null instruction" ); // getOutOpnd should be called before setOutTag assert (instr in valMap); auto state = getState(instr); // Clear the type tag information for the value valMap[instr] = state.clearTag(); // Write the type to the type stack as.mov(tagStackOpnd(instr.outSlot), X86Opnd(tagReg)); } /// Set the type tag for a given value void setTag(IRDstValue value, Tag tag) { assert (value in valMap, "value not in val map: " ~ value.toString); ValState state = getState(value); // Assert that we aren't contradicting existing information assert (!state.tagKnown || tag is state.tag); // If the type was previously unknown, it must have // been written on the stack, mark it as such if (!state.tagKnown) state = state.writeTag(); // Set a known type for this value valMap[value] = state.setTag(tag); } /// Set shape information for a given value void setShape(IRDstValue value, ObjShape shape) { assert ( value in valMap, "setShape: value not in value map" ); ValState state = getState(value); // Set a known type for this value valMap[value] = state.setShape(shape); } /// Set the type for a given value void setType(IRDstValue value, ValType type) { assert (value in valMap); ValState state = getState(value); // Assert that we aren't contradicting existing information assert (!type.tagKnown || !state.tagKnown || type.tag is state.tag); // Set a known type for this value valMap[value] = state.setType(type); } /// Clear shape information for a given value void clearShape(IRDstValue value) { assert (value in valMap); ValState state = getState(value); // Set a known type for this value valMap[value] = state.clearShape(); } /// Get the type for a given value auto getType(IRValue value) { // If this is a dst value if (auto dstVal = cast(IRDstValue)value) { assert ( dstVal.hasUses, "getType: value has no uses: " ~ value.toString ); assert ( dstVal in valMap, "getType: value not in val map: " ~ value.toString ); ValState state = getState(dstVal); return state.type; } // If the value is a string if (auto argStr = cast(IRString)value) { return ValType(Tag.STRING); } return ValType(value.cstValue.tag); } /// Test if the shape is known for a given value auto shapeKnown(IRDstValue value) { assert ( value in valMap, "shapeKnown: value not in val map " ~ value.toString ); ValState state = getState(value); return state.type.shapeKnown; } /// Get shape information for a given value auto getShape(IRDstValue value) { assert (value in valMap); ValState state = getState(value); assert ( state.type.shapeKnown, "shape is not known" ); return state.type.shape; } /// Get the state for a given value ValState getState(IRDstValue val) const { assert (val !is null); return cast(ValState)valMap.get( val, ValState.stack() ); } } /** Executable code fragment */ abstract class CodeFragment { /// Start index in the executable heap uint32_t startIdx = uint32_t.max; /// End index in the executable heap uint32_t endIdx = uint32_t.max; /// Produce a string representation of this blocks's code final string genString(CodeBlock cb) { return cb.toString(startIdx, endIdx); } /// Get the name string for this fragment final string getName() { assert ( opts.genasm || opts.dumpinfo || opts.trace_instrs ); if (auto ver = cast(BlockVersion)this) { return ver.block.getName; } if (auto branch = cast(BranchCode)this) { return "branch_" ~ branch.branch.target.getName; } if (auto stub = cast(EntryStub)this) { return "entry_stub"; } if (auto stub = cast(BranchStub)this) { return "branch_stub_" ~ to!string(stub.targetIdx); } if (auto stub = cast(ContStub)this) { return "cont_stub_" ~ stub.contBranch.getName; } if (auto exit = cast(ExitCode)this) { return "unit_exit_" ~ exit.fun.getName; } assert (false); } /// Get the length of the code fragment final auto length() { assert (startIdx !is startIdx.max); assert (ended); return endIdx - startIdx; } /// Get a pointer to the executable code for this version final auto getCodePtr(CodeBlock cb) { return cb.getAddress(startIdx); } /** Store the start position of the code */ final void markStart(CodeBlock as, VM vm) { assert ( startIdx is startIdx.max, "start position is already marked" ); startIdx = cast(uint32_t)as.getWritePos(); // Add a label string comment if (opts.genasm) as.writeString(this.getName ~ ":"); } /** Store the end position of the code */ final void markEnd(CodeBlock as, VM vm) { assert ( !ended, "end position is already marked" ); endIdx = cast(uint32_t)as.getWritePos(); // Add this fragment to the back of to the list of compiled fragments vm.fragList.assumeSafeAppend ~= this; // Update the generated code size stat stats.genCodeSize += this.length(); } /** Check if the fragment start has been marked (fragment is instantiated) */ final bool started() { return startIdx !is startIdx.max; } /** Check if the end of the fragment has been marked */ final bool ended() { return endIdx !is endIdx.max; } /** Patch this code fragment to jump to a newer version */ final void patch(CodeBlock as, CodeFragment next) { assert (this.started && next.started); // Clear the old ASM comments as.delStrings(startIdx, endIdx); // Write a relative 32-bit jump to the instance over the stub code auto startPos = as.getWritePos(); as.setWritePos(this.startIdx); if (opts.genasm) as.writeASM("jmp", next.getName); as.writeByte(JMP_REL32_OPCODE); auto offset = next.startIdx - (as.getWritePos + 4); as.writeInt(offset, 32); // Ensure that we did not overrun the code fragment length assert (as.getWritePos() <= this.endIdx); // Return to the original write position as.setWritePos(startPos); } } /** Function entry stub */ class EntryStub : CodeFragment { /// Associated VM VM vm; /// Constructor call flag bool ctorCall; this(VM vm, bool ctorCall) { this.vm = vm; this.ctorCall = ctorCall; } } /** Branch target stub */ class BranchStub : CodeFragment { /// Associated VM VM vm; /// Branch target index size_t targetIdx; this(VM vm, size_t targetIdx) { this.vm = vm; this.targetIdx = targetIdx; } } /** Call continuation stub */ class ContStub : CodeFragment { /// Block version containing the call instruction BlockVersion callVer; /// Call continuation branch BranchCode contBranch; this(BlockVersion callVer, BranchCode contBranch) { this.callVer = callVer; this.contBranch = contBranch; } } /** Unit exit code */ class ExitCode : CodeFragment { IRFunction fun; this(IRFunction fun) { this.fun = fun; } } /// Branch edge prelude code generation delegate alias PrelGenFn = void delegate( CodeBlock as, VM vm ); /** Branch edge transition code */ class BranchCode : CodeFragment { /// Predecessor state CodeGenState predState; /// IR branch edge object BranchEdge branch; /// Prelude code generation function PrelGenFn prelGenFn; /// Target block version (null until compiled) BlockVersion target = null; this( CodeGenState predState, BranchEdge branch, PrelGenFn prelGenFn ) { this.predState = predState; this.branch = branch; this.prelGenFn = prelGenFn; } } /// Branch code shape enumeration enum BranchShape { NEXT0, // Target 0 is next NEXT1, // Target 1 is next DEFAULT // Neither target is next } /// Branch code generation delegate alias BranchGenFn = void delegate( CodeBlock as, VM vm, BlockVersion block, CodeFragment target0, CodeFragment target1, BranchShape shape ); /** Basic block version */ class BlockVersion : CodeFragment { /// Final branch code generation function BranchGenFn branchGenFn; /// Associated block IRBlock block; /// Code generation state at block entry CodeGenState state; /// Branch targets CodeFragment[] targets; /// Inner code length, excluding final branches uint32_t codeLen; this(IRBlock block, CodeGenState state) { this.block = block; this.state = state; } /** Generate the final branch for the block */ void genBranch( CodeBlock as, CodeFragment target0, CodeFragment target1, BranchGenFn genFn ) { assert (started); // Store the branch generation function and targets assert (target0 !is null); this.branchGenFn = genFn; this.targets = [target0, target1]; // Compute the code length codeLen = cast(uint32_t)as.getWritePos - startIdx; // Determine the branch shape BranchShape shape = BranchShape.DEFAULT; if (vm.compQueue.length > 0) { if (vm.compQueue.back is targets[0]) shape = BranchShape.NEXT0; else if (vm.compQueue.back is targets[1]) shape = BranchShape.NEXT1; } // Generate the final branch code branchGenFn( as, vm, this, target0, target1, shape ); // Store the code end index markEnd(as, vm); } /** Rewrite the final branch of this block */ void regenBranch(CodeBlock as) { // Ensure that this block has already been compiled assert (started && ended); // Move to the branch code position auto origPos = as.getWritePos(); as.setWritePos(startIdx + codeLen); // Clear the ASM comments of the old branch code as.delStrings(as.getWritePos, endIdx); auto stub0 = ( targets[0] && !targets[0].started && !vm.compQueue.canFind(targets[0]) ); auto stub1 = ( targets[1] && !targets[1].started && !vm.compQueue.canFind(targets[1]) ); // Determine the branch shape, whether a target is immediately next BranchShape shape = BranchShape.DEFAULT; if (targets[0]) { if (targets[0].startIdx is endIdx) shape = BranchShape.NEXT0; if (endIdx is origPos && vm.compQueue.length > 0 && vm.compQueue.back is targets[0]) shape = BranchShape.NEXT0; } if (targets[1]) { if (targets[1].startIdx is endIdx) shape = BranchShape.NEXT1; if (endIdx is origPos && vm.compQueue.length > 0 && vm.compQueue.back is targets[1]) shape = BranchShape.NEXT1; } // Generate the final branch code assert (branchGenFn !is null); branchGenFn( as, vm, this, targets[0], targets[1], shape ); // Ensure that we did not overwrite the next block assert (as.getWritePos <= endIdx); // If this is the last block in the executable heap if (endIdx is origPos) { // Resize the block to the current position endIdx = cast(uint32_t)as.getWritePos; } else { // Pad the end of the fragment with noops as.nop(endIdx - as.getWritePos); // Return to the previous write position as.setWritePos(origPos); } } } /** Produce a string representation of the code generated for a function */ string asmString(IRFunction fun, CodeFragment entryFrag, CodeBlock execHeap) { auto workList = [entryFrag]; void queue(CodeFragment frag, CodeFragment target) { if (target is null || target.ended is false) return; // Don't re-visit fragments at smaller addresses if (target.startIdx < frag.startIdx || target is frag) return; // Don't queue multiple identical targets if (workList.length > 0 && workList[$-1] is target) return; workList ~= target; } CodeFragment[] fragList; // Until the work list is empty while (workList.empty is false) { // Get a fragment from the work list auto frag = workList.back; workList.popBack(); fragList ~= frag; if (auto branch = cast(BranchCode)frag) { queue(frag, branch.target); } if (auto cont = cast(ContStub)frag) { queue(frag, cont.contBranch); } else if (auto inst = cast(BlockVersion)frag) { foreach (target; inst.targets) queue(frag, target); } else { // Do nothing } } // Sort the fragment by increasing memory address fragList.sort!"a.startIdx < b.startIdx"; auto str = appender!string; // For each fragment queued foreach (fIdx, frag; fragList) { if (frag.length is 0) continue; if (str.data != "") str.put("\n\n"); str.put(frag.genString(execHeap)); if (fIdx < fragList.length - 1) { auto next = fragList[fIdx+1]; if (next.startIdx > frag.endIdx) { auto numBytes = next.startIdx - frag.endIdx; str.put(format("\n\n; ### %s byte gap ###", numBytes)); } } } return str.data; } /** Request a block version matching the incoming state */ BlockVersion getBlockVersion( IRBlock block, CodeGenState state ) { auto fun = state.fun; // Get the list of versions for this block auto versions = fun.versionMap.get(block, []); // Best version found BlockVersion bestVer; size_t bestDiff = size_t.max; //writeln("requesting: ", block.getName); // For each successor version available foreach (ver; versions) { // Compute the difference with the incoming state auto diff = state.diff(ver.state); //writeln("diff: ", diff); // If this is a perfect match, return it if (diff is 0) return ver; // Update the best version found if (diff < bestDiff) { bestDiff = diff; bestVer = ver; } } // If the block version cap is hit if (versions.length >= opts.maxvers) { debug { if (opts.maxvers > 0) writefln("version limit hit (%s) in %s", versions.length, fun.getName); } // If a compatible match was found if (bestDiff < size_t.max) { // Return the best match found assert (bestVer.state.fun is fun); return bestVer; } //writeln("producing general version for: ", block.getName); // Strip the state of known types and constants, // except for hidden function arguments auto genState = new CodeGenState(state); foreach (val, valSt; genState.valMap) { if (val !is fun.closVal && val !is fun.argcVal && val !is fun.raVal && (valSt.tagKnown || valSt.shapeKnown)) { genState.valMap[val] = valSt.clearType(); } } // Ensure that the general version matches assert(state.diff(genState) !is size_t.max); assert (genState.fun is fun); state = genState; } //writeln("best ver diff: ", bestDiff, " (", versions.length, ")"); // Create a new block version object using the predecessor's state auto ver = new BlockVersion(block, state); // Add the new version to the list for this block fun.versionMap[block] ~= ver; // If block version stats should be computed if (opts.stats) { auto numVersions = fun.versionMap[block].length; // If this is the first version for this block if (numVersions is 1) { // Increment the number of compiled blocks stats.numBlocks++; // Increment the number of blocks with 1 version stats.numVerBlocks[1]++; } else { // Update counts of blocks with specific numbers of versions stats.numVerBlocks[numVersions-1]--; stats.numVerBlocks[numVersions]++; } // Increment the total number of block versions generated stats.numVersions++; // Update the maximum version count stats.maxVersions = max(stats.maxVersions, numVersions); } // Queue the block version for compilation vm.queue(ver); // Return the newly created block version assert (ver.state.fun is fun); return ver; } /** Request a branch edge transition matching the incoming state */ BranchCode getBranchEdge( BranchEdge branch, CodeGenState predState, bool noStub, PrelGenFn prelGenFn = null ) { // If eager codegen is enabled, force the version // to be generated now if (opts.bbv_eager) noStub = true; assert ( branch !is null, "getBranchEdge: branch edge is null" ); // Return a branch edge code object for the successor auto branchCode = new BranchCode( predState, branch, prelGenFn ); // If we know this will be executed, queue the branch edge for compilation if (noStub) vm.queue(branchCode); return branchCode; } /** Generate the moves to transition from a predecessor to a successor state */ void genBranchMoves( CodeBlock as, CodeGenState predState, CodeGenState succState, BranchEdge branch ) { // List of moves to transition to the successor state Move[] moveList; // String values and phi nodes for string moves IRString[] strVals; X86Opnd[] strDsts; // For each value in the successor state foreach (succVal, succSt; succState.valMap) { auto succPhi = ( (branch.branch !is null && succVal.block is branch.target)? cast(PhiNode)succVal:null ); auto predVal = ( succPhi? branch.getPhiArg(succPhi):succVal ); assert (succVal !is null); assert (predVal !is null); bool moveAdded = false; // Test if the successor value is a parameter // We don't need to move parameter values to the stack bool succParam = cast(FunParam)succVal !is null; // If the pred value is a string if (auto predStr = cast(IRString)predVal) { // Get the destionation operand for the phi word X86Opnd dstWordOpnd = succState.getWordOpnd(succVal, 64); strVals ~= predStr; strDsts ~= dstWordOpnd; } else { // Get the source and destination operands for the phi word X86Opnd srcWordOpnd = predState.getWordOpnd(predVal, 64); X86Opnd dstWordOpnd = succState.getWordOpnd(succVal, 64); if (srcWordOpnd != dstWordOpnd && !dstWordOpnd.isImm && !(succParam && dstWordOpnd.isMem)) { moveList ~= Move(dstWordOpnd, srcWordOpnd); moveAdded = true; } } // Get the source and destination operands for the phi type X86Opnd srcTypeOpnd = predState.getTagOpnd(predVal); X86Opnd dstTypeOpnd = succState.getTagOpnd(succVal); assert (!(opts.maxvers is 0 && !srcTypeOpnd.isImm && dstTypeOpnd.isImm)); if (srcTypeOpnd != dstTypeOpnd && !dstTypeOpnd.isImm && !(succParam && dstTypeOpnd.isMem)) { moveList ~= Move(dstTypeOpnd, srcTypeOpnd); moveAdded = true; } // Get the successor value state auto succState = succState.getState(succVal); // Check if the predecessor is the same value and had its type written auto predWritten = predVal is succVal && predState.getState(succVal).tagWritten; // If the successor is not a function parameter and the successor // state requires the type be written and the predecessor type was not // written to the stack, then write the type if (!succParam && !dstTypeOpnd.isMem && succState.tagWritten && !predWritten) { as.mov(tagStackOpnd(succVal.outSlot), succState.getTagOpnd()); moveAdded = true; } if (opts.genasm && moveAdded) { if (succPhi) as.comment(succPhi.getName ~ " = phi " ~ predVal.getName); else as.comment("move " ~ succVal.getName); } } //foreach (move; moveList) // as.printStr(format("move from %s to %s", move.src, move.dst)); // Execute the moves execMoves(as, moveList, scrRegs[0], scrRegs[1]); // For each string value foreach (idx, strVal; strVals) { auto dstOpnd = strDsts[idx]; // Ensure that the string is allocated strVal.getPtr(vm); as.ptr(scrRegs[0], strVal); if (dstOpnd.isReg) { as.getMember!("IRString.ptr")(dstOpnd.reg, scrRegs[0]); } else { as.getMember!("IRString.ptr")(scrRegs[0], scrRegs[0]); as.mov(dstOpnd, scrRegs[0].opnd); } } } /// Return address entry alias RetEntry = Tuple!( IRInstr, "callInstr", CodeFragment, "retCode", CodeFragment, "excCode" ); /// Fragment reference tuple alias FragmentRef = Tuple!( BlockVersion, "srcBlock", // Source block, origin fragment CodeFragment, "frag", // Referenced/destination code fragment uint32_t, "pos", // Position of the reference uint16_t, "targetIdx", // Branch target index at source fragment uint16_t, "size" // Size of the reference (32-bit rel or 64-bit abs) ); /** Add a fragment reference to the reference list */ void addFragRef( VM vm, size_t pos, size_t size, BlockVersion src, CodeFragment frag, size_t targetIdx ) { vm.refList ~= FragmentRef( src, frag, cast(uint32_t)pos, cast(uint16_t)targetIdx, cast(uint16_t)size ); } /** Queue a block version to be compiled */ void queue(VM vm, CodeFragment frag) { //writeln("queueing: ", frag.getName); vm.compQueue ~= frag; } /** Set the current instruction when calling host code from JITted code. Must set the current instruction to null when returning from host code. */ void setCurInstr(VM vm, IRInstr curInstr) { //writeln("curInstr=", curInstr); // Ensure proper usage assert ( !(vm.curInstr !is null && curInstr !is null), "current instr is not null" ); vm.curInstr = curInstr; } /** Set the return address entry for a call instruction */ void setRetEntry( VM vm, IRInstr callInstr, CodeFragment retCode, CodeFragment excCode ) { auto retAddr = retCode.getCodePtr(vm.execHeap); vm.retAddrMap[retAddr] = RetEntry(callInstr, retCode, excCode); } /** Compile all blocks in the compile queue */ void compile(VM vm, IRInstr curInstr) { //writeln("entering compile"); assert (vm !is null); auto as = vm.execHeap; assert (as !is null); // Set the current instruction vm.setCurInstr(curInstr); // Until the compilation queue is empty while (vm.compQueue.length > 0) { assert ( vm.stubStartPos - as.getWritePos >= JIT_MIN_BLOCK_SPACE, "insufficient space to compile version" ); // Get a fragment to compile from the queue auto frag = vm.compQueue.back; vm.compQueue.popBack(); //writeln("compiling fragment: ", frag.getName); // If this is a version instance if (auto ver = cast(BlockVersion)frag) { assert ( ver.ended is false, "version already compiled: " ~ ver.getName ); auto block = ver.block; assert ( ver.block !is null, ver.state.fun.getName ); // Copy the instance's state object auto state = new CodeGenState(ver.state); // Store the code start index for this fragment if (ver.startIdx is ver.startIdx.max) ver.markStart(as, vm); if (opts.dumpinfo) writeln("compiling block: ", block.getName); if (opts.trace_instrs) { if (block is block.fun.entryBlock) as.printStr("; entry block for " ~ block.fun.getName); as.printStr(block.getName ~ ":"); } /* if (opts.stats && block is block.fun.entryBlock && !block.fun.isUnit) { auto nameStr = to!string(block.fun.getName); as.incStatCnt(stats.getCallCtr(nameStr), scrRegs[0]); } */ // For each instruction of the block for (auto instr = block.firstInstr; instr !is null; instr = instr.next) { if (opts.dumpinfo) writeln("compiling instr: ", instr.toString()); // If we should generate disassembly strings if (opts.genasm) as.comment(instr.toString()); if (opts.trace_instrs) as.printStr(instr.toString()); /* import main; as.ptr(scrRegs[0], &instrPtr); as.ptr(scrRegs[1], instr); as.mov(X86Opnd(64, scrRegs[0]), scrRegs[1].opnd); */ auto opcode = instr.opcode; assert (opcode !is null); assert ( opcode.genFn !is null, "no codegen function for \"" ~ instr.toString() ~ "\" in " ~ block.fun.getName() ); // Call the code generation function for the opcode opcode.genFn( ver, state, instr, as ); // Link block-internal labels as.linkLabels(); // If the end of the block was marked, skip further instructions if (ver.ended) break; } // Ensure that the end of the fragment was marked assert ( frag.ended, "unterminated code fragment: " ~ ver.block.toString ); // If this is a function entry block if (block is block.fun.entryBlock) { // Set the function entry code pointer block.fun.entryCode = frag.getCodePtr(vm.execHeap); } } // If this is a branch code fragment else if (auto branch = cast(BranchCode)frag) { assert (branch.predState !is null); // Store the code start index branch.markStart(as, vm); //as.printStr("branch code to " ~ branch.branch.target.getName); // Generate the prelude code, if any if (branch.prelGenFn) branch.prelGenFn(as, vm); // Generate the successor state for this branch auto succState = new CodeGenState( branch.predState, branch.branch ); // Get a version of the successor matching the incoming state branch.target = getBlockVersion( branch.branch.target, succState ); // Generate the moves to transition to the successor state genBranchMoves( as, branch.predState, branch.target.state, branch.branch ); // The predecessor state is no longer needed branch.predState = null; // If the target was already compiled before if (branch.target.started) { // Encode the final jump and version reference as.jmp32Ref(vm, null, branch.target); } // Store the code end index branch.markEnd(as, vm); if (opts.dumpinfo) { writeln("branch code length: ", branch.length); writeln(); } } // If this is a call continuation stub else if (auto stub = cast(ContStub)frag) { auto callInstr = stub.callVer.block.lastInstr; stub.markStart(as, vm); if (opts.genasm) as.comment("Cont stub for " ~ stub.contBranch.getName); if (opts.trace_instrs) as.printStr("Cont stub for " ~ stub.contBranch.getName); as.saveJITRegs(); // Save the return value if (callInstr.hasUses) { as.setWord(callInstr.outSlot, retWordReg.opnd(64)); as.setTag(callInstr.outSlot, retTagReg.opnd(8)); } // The first argument is the stub object as.ptr(cargRegs[0], stub); // Call the JIT compilation function, auto compileFn = &compileCont; as.ptr(scrRegs[0], compileFn); as.call(scrRegs[0]); as.loadJITRegs(); // Restore the return value if (callInstr.hasUses) { as.getWord(retWordReg.reg(64), callInstr.outSlot); as.getTag(retTagReg.reg(8), callInstr.outSlot); } // Jump to the compiled continuation as.jmp(X86Opnd(cretReg)); stub.markEnd(as, vm); // Set the return address entry for this stub vm.setRetEntry( callInstr, stub, stub.callVer.targets[1] ); } else { assert (false, "invalid code fragment"); } if (opts.dumpasm && frag.length > 0) { writeln(frag.genString(as)); writeln(); } } assert (vm.compQueue.length is 0); // For each fragment reference foreach (refr; vm.refList) { // Code position to jump to size_t jumpDstPos; // If the target is compiled, get its start index if (refr.frag.started) { jumpDstPos = cast(int32_t)refr.frag.startIdx; } // The target is not yet compiled else { // Store the current write position auto startPos = as.getWritePos(); // Store the code position for the custom branch stub jumpDstPos = vm.stubWritePos; // Move the write position to the stub write position as.setWritePos(vm.stubWritePos); // Write the block pointer scrRegs[0] assert (refr.srcBlock !is null); as.ptr(scrRegs[0], refr.srcBlock); // Get the branch stub corresponding to this target index assert (refr.targetIdx < 2); auto branchStub = getBranchStub(vm, refr.targetIdx); // Jump to the generic branch stub auto offset = cast(int32_t)(branchStub.startIdx - (as.getWritePos + 5)); as.jmp32(offset); // Update the stub write position vm.stubWritePos = as.getWritePos; // Return to the previous write position as.setWritePos(startPos); } // Set the write position at the reference point auto startPos = as.getWritePos(); as.setWritePos(refr.pos); // Switch on the reference size/type switch (refr.size) { case 32: auto offset = jumpDstPos - (cast(int32_t)refr.pos + 4); as.writeInt(offset, 32); break; case 64: auto targetAddr = cast(int64_t)as.getAddress(0) + jumpDstPos; as.writeInt(targetAddr, 64); break; default: assert (false); } // Return to the previous write position as.setWritePos(startPos); } // Clear the reference list vm.refList.length = 0; if (opts.dumpinfo) { writeln("write pos: ", as.getWritePos, " / ", as.getRemSpace); writeln("num blocks: ", stats.numBlocks); writeln("num versions: ", stats.numVersions); writeln(); } // Unset the current instruction vm.setCurInstr(null); //writeln("leaving compile"); } /// Unit function entry point alias extern (C) void function() EntryFn; /** Compile an entry point for a unit-level function */ EntryFn compileUnit(VM vm, IRFunction fun) { // Start recording compilation time stats.compTimeStart(); assert (fun.isUnit, "compileUnit on non-unit function"); if (opts.dumpinfo) writeln("compiling unit ", fun.getName); auto as = vm.execHeap; // // Create the return branch code // auto retEdge = new ExitCode(fun); retEdge.markStart(as, vm); if (opts.trace_instrs) as.printStr("Unit return branch for " ~ fun.getName); // Push one slot for the return value as.sub(tspReg.opnd, X86Opnd(1)); as.sub(wspReg.opnd, X86Opnd(8)); // Place the return value on top of the stack as.setWord(0, retWordReg.opnd); as.setTag(0, retTagReg.opnd); // Store the stack pointers back in the VM as.setMember!("VM.wsp")(vmReg, wspReg); as.setMember!("VM.tsp")(vmReg, tspReg); // Restore the callee-save GP registers as.pop(R15); as.pop(R14); as.pop(R13); as.pop(R12); as.pop(RBP); as.pop(RBX); debug { as.checkStackAlign("stack unaligned at unit exit for " ~ fun.getName); } // Pop the stack alignment padding as.add(X86Opnd(RSP), X86Opnd(8)); // Return to the host as.ret(); retEdge.markEnd(as, vm); // Get the return code address auto retAddr = retEdge.getCodePtr(as); // // Compile the unit entry // // Create a version instance object for the function entry auto entryInst = getBlockVersion( fun.entryBlock, new CodeGenState(fun) ); // Mark the code start index entryInst.markStart(as, vm); as.comment("unit " ~ fun.getName); // Align SP to a multiple of 16 bytes as.sub(X86Opnd(RSP), X86Opnd(8)); // Save the callee-save GP registers as.push(RBX); as.push(RBP); as.push(R12); as.push(R13); as.push(R14); as.push(R15); // Load a pointer to the VM object as.ptr(vmReg, vm); // Load the stack pointers into RBX and RBP as.getMember!("VM.wsp")(wspReg, vmReg); as.getMember!("VM.tsp")(tspReg, vmReg); // Set the argument count (0) as.setWord(-1, X86Opnd(0)); // Set the "this" argument (global object) as.getMember!("VM.globalObj.word")(scrRegs[0], vmReg); as.setWord(-2, scrRegs[0].opnd); as.setTag(-2, Tag.OBJECT); // Set the closure argument (null) as.setWord(-3, X86Opnd(0)); // Set the return address as.ptr(scrRegs[0], retAddr); as.setWord(-4, scrRegs[0].opnd); // Push space for the callee locals as.sub(tspReg.opnd, X86Opnd(1 * fun.numLocals)); as.sub(wspReg.opnd, X86Opnd(8 * fun.numLocals)); debug { as.checkStackAlign("stack unaligned at unit entry"); } // Compile the unit entry version vm.compile(null); // Set the return address entry for this call vm.setRetEntry(null, retEdge, null); // Get a pointer to the entry block version's code auto entryFn = cast(EntryFn)entryInst.getCodePtr(vm.execHeap); // Stop recording compilation time stats.compTimeStop(); // Return the unit entry function return entryFn; } /** Compile an entry block instance for a function */ extern (C) CodePtr compileEntry(EntryStub stub) { // Stop recording execution time, start recording compilation time stats.execTimeStop(); stats.compTimeStart(); if (opts.dumpinfo) { writeln("entering compileEntry"); } // Get the closure and IRFunction pointers auto argCount = vm.getWord(3).uint32Val; auto closPtr = vm.getWord(1).ptrVal; assert ( closPtr !is null, "closure pointer is null in compileEntry" ); auto fun = getFunPtr(closPtr); assert ( fun !is null, "closure IRFunction is null" ); if (opts.dumpinfo) writeln("compiling entry for " ~ fun.getName); /* writeln("closPtr=", closPtr); writeln("fun=", cast(ubyte*)fun); writeln("argCount=", argCount); if (argCount > 0) writeln("first arg: ", vm.getWord(4).uint64Val); writeln("orig stack size: ", vm.stackSize()); */ // Store the original number of locals for the function auto origLocals = fun.numLocals; // Generate the IR for this function try { fun.entryBlock = null; astToIR(vm, fun.ast, fun); } catch (Error err) { assert ( false, "failed to generate IR for: \"" ~ fun.getName ~ "\"\n" ~ err.toString ); } // Add space for the newly allocated locals vm.push(fun.numLocals - origLocals); /* writeln("fun.numLocals=", fun.numLocals); writeln("origLocals=", origLocals); writeln("new stack size: ", vm.stackSize()); */ // Request an instance for the function entry blocks auto entryInst = getBlockVersion( fun.entryBlock, new CodeGenState(fun) ); /* // warning, ctor is first on queue auto as = vm.execHeap; entryInst.markStart(as, vm); as.getMember!"VM.tsp"(scrRegs[0], vmReg); as.getMember!"VM.tStack"(scrRegs[1], vmReg); as.cmp(scrRegs[0].opnd, scrRegs[1].opnd); as.jle(Label.TRUE); as.jmp(Label.FALSE); as.label(Label.TRUE); as.printStr("stack limit exceeded"); //as.printStack(fun.getCtx(ctorCall, vm)); as.mov(scrRegs[0].opnd, X86Opnd(0)); as.jmp(scrRegs[0].opnd); as.label(Label.FALSE); as.linkLabels(); */ // Compile the entry versions // Note: the entry code pointer is set in the compile function vm.compile(fun.entryBlock.firstInstr); // Store the entry code pointer on the function //fun.entryCode = entryInst.getCodePtr(vm.execHeap); if (opts.dumpinfo) { writeln("leaving compileEntry"); } // Stop recording compilation time, resume recording execution time stats.compTimeStop(); stats.execTimeStart(); return fun.entryCode; } /** Compile the branch code when a branch stub is hit */ extern (C) CodePtr compileBranch(VM vm, BlockVersion srcBlock, uint32_t targetIdx) { // Stop recording execution time, start recording compilation time stats.execTimeStop(); stats.compTimeStart(); assert (srcBlock !is null); if (opts.dumpinfo) { writeln("entering compileBranch"); writeln("srcBlock name: ", srcBlock.getName); writeln("targetIdx=", targetIdx); } // Get the branch edge assert (targetIdx < srcBlock.targets.length); auto branchCode = cast(BranchCode)srcBlock.targets[targetIdx]; assert (branchCode !is null); assert (branchCode.started is false, "branchCode already compiled"); auto predState = branchCode.predState; auto targetBlock = branchCode.branch.target; if (opts.dumpinfo) { writefln( "branch from %s to %s", srcBlock.block.getName, branchCode.branch.target.getName ); } auto spillTest = delegate bool(LiveInfo liveInfo, IRDstValue val) { return liveInfo.liveAtEntry(val, targetBlock); }; // Spill the saved registers predState.spillSavedRegs(spillTest); // Queue the branch edge to be compiled vm.queue(branchCode); // Rewrite the final branch of the source block srcBlock.regenBranch(vm.execHeap); // Compile fragments and patch references vm.compile(branchCode.branch.target.firstInstr); // Reload the saved registers predState.loadSavedRegs(spillTest); // Stop recording compilation time, resume recording execution time stats.compTimeStop(); stats.execTimeStart(); if (opts.dumpinfo) { writeln("leaving compileBranch"); writeln(); } // Return a pointer to the compiled branch code return branchCode.getCodePtr(vm.execHeap); } /** Called when a call continuation stub is hit, compiles the continuation */ extern (C) CodePtr compileCont(ContStub stub) { // Stop recording execution time, start recording compilation time stats.execTimeStop(); stats.compTimeStart(); if (opts.dumpinfo) { writeln("entering compileCont"); } auto callVer = stub.callVer; auto contBranch = stub.contBranch; // Queue the continuation branch edge to be compiled assert (!contBranch.started); vm.queue(contBranch); // Update the continuation target in the call version stub.callVer.targets[0] = contBranch; // Rewrite the final branch of the call block stub.callVer.regenBranch(vm.execHeap); // Compile fragments and patch references vm.compile(contBranch.branch.target.firstInstr); // Patch the stub to jump to the continuation branch stub.patch(vm.execHeap, contBranch); // Set the return entry for the call continuation vm.setRetEntry( callVer.block.lastInstr, contBranch, callVer.targets[1] ); // Stop recording compilation time, resume recording execution time stats.compTimeStop(); stats.execTimeStart(); if (opts.dumpinfo) { writeln("leaving compileCont"); } // Return a pointer to the compiled branch code return contBranch.getCodePtr(vm.execHeap); } /** Get a function entry stub */ CodePtr getEntryStub(VM vm, bool ctorCall) { auto as = vm.execHeap; if (vm.entryStub) return vm.entryStub.getCodePtr(as); auto stub = new EntryStub(vm, ctorCall); stub.markStart(as, vm); as.saveJITRegs(); debug { as.checkStackAlign("stack unaligned before compileEntry"); } // Call the JIT compile function, // passing it a pointer to the stub auto compileFn = &compileEntry; as.ptr(scrRegs[0], compileFn); as.ptr(cargRegs[0], stub); as.call(scrRegs[0]); as.loadJITRegs(); // Jump to the compiled version as.jmp(X86Opnd(RAX)); stub.markEnd(as, vm); vm.entryStub = stub; return stub.getCodePtr(as); } /** Get the generic branch target stub for a given target index This stub expects the source block pointer to be written in scrRegs[0] */ BranchStub getBranchStub(VM vm, size_t targetIdx) { auto as = vm.execHeap; // If this stub was already generated, return it if (targetIdx < vm.branchStubs.length && vm.branchStubs[targetIdx] !is null) return vm.branchStubs[targetIdx]; auto stub = new BranchStub(vm, targetIdx); vm.branchStubs.length = targetIdx + 1; vm.branchStubs[targetIdx] = stub; stub.markStart(as, vm); // Insert the label for this block in the out of line code as.comment("Branch stub (target " ~ to!string(targetIdx) ~ ")"); //as.printStr("hit branch stub (target " ~ to!string(targetIdx) ~ ")"); //as.printUint(scrRegs[0].opnd); // Save the allocatable registers as.saveAllocRegs(); as.saveJITRegs(); // The first argument is the VM object as.mov(cargRegs[0].opnd, vmReg.opnd); // The second argument is the src block pointer, // which was passed in scrRegs[0] as.mov(cargRegs[1].opnd(64), scrRegs[0].opnd(64)); // The third argument is the branch target index as.mov(cargRegs[2].opnd(32), X86Opnd(targetIdx)); debug { as.checkStackAlign("stack unaligned before compileBranch"); } // Call the JIT compilation function, auto compileFn = &compileBranch; as.ptr(scrRegs[0], compileFn); as.call(scrRegs[0]); as.loadJITRegs(); // Restore the allocatable registers as.loadAllocRegs(); // Jump to the compiled version as.jmp(cretReg.opnd); // Store the code end index stub.markEnd(as, vm); return stub; }
D
module android.java.android.widget.ZoomButtonsController_d_interface; import arsd.jni : IJavaObjectImplementation, JavaPackageId, JavaName, IJavaObject, ImportExportImpl, JavaInterfaceMembers; static import arsd.jni; import import0 = android.java.android.view.View_d_interface; import import1 = android.java.android.widget.ZoomButtonsController_OnZoomListener_d_interface; import import4 = android.java.java.lang.Class_d_interface; import import2 = android.java.android.view.ViewGroup_d_interface; import import3 = android.java.android.view.MotionEvent_d_interface; final class ZoomButtonsController : IJavaObject { static immutable string[] _d_canCastTo = [ "android/view/View$OnTouchListener", ]; @Import this(import0.View); @Import void setZoomInEnabled(bool); @Import void setZoomOutEnabled(bool); @Import void setZoomSpeed(long); @Import void setOnZoomListener(import1.ZoomButtonsController_OnZoomListener); @Import void setFocusable(bool); @Import bool isAutoDismissed(); @Import void setAutoDismissed(bool); @Import bool isVisible(); @Import void setVisible(bool); @Import import2.ViewGroup getContainer(); @Import import0.View getZoomControls(); @Import bool onTouch(import0.View, import3.MotionEvent); @Import import4.Class getClass(); @Import int hashCode(); @Import bool equals(IJavaObject); @Import @JavaName("toString") string toString_(); override string toString() { return arsd.jni.javaObjectToString(this); } @Import void notify(); @Import void notifyAll(); @Import void wait(long); @Import void wait(long, int); @Import void wait(); mixin IJavaObjectImplementation!(false); public static immutable string _javaParameterString = "Landroid/widget/ZoomButtonsController;"; }
D
/** License: Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Authors: Alexandru Ermicioi **/ module aermicioi.aedi.instantiator; public import aermicioi.aedi.instantiator.instantiator; public import aermicioi.aedi.instantiator.prototype_instantiator; public import aermicioi.aedi.instantiator.singleton_instantiator;
D
module stdio.__stdio_read; import stdio; import posix.sys.uio; import sys.linux.syscalls; extern(C): nothrow: @nogc: size_t __stdio_read(FILE *f, ubyte *buf, size_t len) { iovec[2] iov = [ { iov_base: buf, iov_len: len - !!f.buf_size }, { iov_base: cast(void*)f.buf, iov_len: f.buf_size } ]; ssize_t cnt; cnt = iov[0].iov_len ? syscall(SYS.readv, f.fd, cast(int)&iov, 2) : syscall(SYS.read, f.fd, cast(int)iov[1].iov_base, cast(int)iov[1].iov_len); if (cnt <= 0) { auto flags = cnt ? f.flags | F_ERR : f.flags | F_EOF; f.flags = flags; return 0; } if (cnt <= iov[0].iov_len) return cnt; cnt -= iov[0].iov_len; f.rpos = f.buf; f.rend = f.buf + cnt; if (f.buf_size) { *f.rpos = cast(ubyte)(*f.rpos + 1); buf[len-1] = *f.rpos; } return len; }
D
template TFoo(T) { void bar() { func(); } } import a; void func() { } alias f = TFoo!(int); // error: func not defined in module a template TFoo(T) { void bar() { func(1); } } void func(double d) { } import a; void func(int i) { } alias f = TFoo!(int); f.bar(); // will call a.func(double)
D
/** * Compiler implementation of the * $(LINK2 http://www.dlang.org, D programming language). * * Copyright: Copyright (c) 1999-2017 by Digital Mars, All Rights Reserved * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(DMDSRC _optimize.d) */ module ddmd.optimize; import core.stdc.stdio; import ddmd.constfold; import ddmd.ctfeexpr; import ddmd.dclass; import ddmd.declaration; import ddmd.dsymbol; import ddmd.expression; import ddmd.expressionsem; import ddmd.globals; import ddmd.init; import ddmd.mtype; import ddmd.root.ctfloat; import ddmd.sideeffect; import ddmd.tokens; import ddmd.visitor; /************************************* * If variable has a const initializer, * return that initializer. * Returns: * initializer if there is one, * null if not, * ErrorExp if error */ extern (C++) Expression expandVar(int result, VarDeclaration v) { //printf("expandVar(result = %d, v = %p, %s)\n", result, v, v ? v.toChars() : "null"); static Expression errorReturn() { return new ErrorExp(); } Expression e = null; if (!v) return e; if (!v.originalType && v.semanticRun < PASSsemanticdone) // semantic() not yet run v.semantic(null); if (v.isConst() || v.isImmutable() || v.storage_class & STCmanifest) { if (!v.type) { return e; } Type tb = v.type.toBasetype(); if (v.storage_class & STCmanifest || v.type.toBasetype().isscalar() || ((result & WANTexpand) && (tb.ty != Tsarray && tb.ty != Tstruct))) { if (v._init) { if (v.inuse) { if (v.storage_class & STCmanifest) { v.error("recursive initialization of constant"); return errorReturn(); } goto L1; } Expression ei = v.getConstInitializer(); if (!ei) { if (v.storage_class & STCmanifest) { v.error("enum cannot be initialized with %s", v._init.toChars()); return errorReturn(); } goto L1; } if (ei.op == TOKconstruct || ei.op == TOKblit) { AssignExp ae = cast(AssignExp)ei; ei = ae.e2; if (ei.isConst() == 1) { } else if (ei.op == TOKstring) { // https://issues.dlang.org/show_bug.cgi?id=14459 // Do not constfold the string literal // if it's typed as a C string, because the value expansion // will drop the pointer identity. if (!(result & WANTexpand) && ei.type.toBasetype().ty == Tpointer) goto L1; } else goto L1; if (ei.type == v.type) { // const variable initialized with const expression } else if (ei.implicitConvTo(v.type) >= MATCHconst) { // const var initialized with non-const expression ei = ei.implicitCastTo(null, v.type); ei = ei.semantic(null); } else goto L1; } else if (!(v.storage_class & STCmanifest) && ei.isConst() != 1 && ei.op != TOKstring && ei.op != TOKaddress) { goto L1; } if (!ei.type) { goto L1; } else { // Should remove the copy() operation by // making all mods to expressions copy-on-write e = ei.copy(); } } else { version (all) { goto L1; } else { // BUG: what if const is initialized in constructor? e = v.type.defaultInit(); e.loc = e1.loc; } } if (e.type != v.type) { e = e.castTo(null, v.type); } v.inuse++; e = e.optimize(result); v.inuse--; } } L1: //if (e) printf("\te = %p, %s, e.type = %d, %s\n", e, e.toChars(), e.type.ty, e.type.toChars()); return e; } extern (C++) Expression fromConstInitializer(int result, Expression e1) { //printf("fromConstInitializer(result = %x, %s)\n", result, e1.toChars()); //static int xx; if (xx++ == 10) assert(0); Expression e = e1; if (e1.op == TOKvar) { VarExp ve = cast(VarExp)e1; VarDeclaration v = ve.var.isVarDeclaration(); e = expandVar(result, v); if (e) { // If it is a comma expression involving a declaration, we mustn't // perform a copy -- we'd get two declarations of the same variable. // See bugzilla 4465. if (e.op == TOKcomma && (cast(CommaExp)e).e1.op == TOKdeclaration) e = e1; else if (e.type != e1.type && e1.type && e1.type.ty != Tident) { // Type 'paint' operation e = e.copy(); e.type = e1.type; } e.loc = e1.loc; } else { e = e1; } } return e; } extern (C++) Expression Expression_optimize(Expression e, int result, bool keepLvalue) { extern (C++) final class OptimizeVisitor : Visitor { alias visit = super.visit; public: int result; bool keepLvalue; Expression ret; extern (D) this(int result, bool keepLvalue) { this.result = result; this.keepLvalue = keepLvalue; } void error() { ret = new ErrorExp(); } bool expOptimize(ref Expression e, int flags, bool keepLvalue = false) { if (!e) return false; Expression ex = e.optimize(flags, keepLvalue); if (ex.op == TOKerror) { ret = ex; // store error result return true; } else { e = ex; // modify original return false; } } bool unaOptimize(UnaExp e, int flags) { return expOptimize(e.e1, flags); } bool binOptimize(BinExp e, int flags) { expOptimize(e.e1, flags); expOptimize(e.e2, flags); return ret.op == TOKerror; } override void visit(Expression e) { //printf("Expression::optimize(result = x%x) %s\n", result, e.toChars()); } override void visit(VarExp e) { if (keepLvalue) { VarDeclaration v = e.var.isVarDeclaration(); if (v && !(v.storage_class & STCmanifest)) return; } ret = fromConstInitializer(result, e); } override void visit(TupleExp e) { expOptimize(e.e0, WANTvalue); for (size_t i = 0; i < e.exps.dim; i++) { expOptimize((*e.exps)[i], WANTvalue); } } override void visit(ArrayLiteralExp e) { if (e.elements) { expOptimize(e.basis, result & WANTexpand); for (size_t i = 0; i < e.elements.dim; i++) { expOptimize((*e.elements)[i], result & WANTexpand); } } } override void visit(AssocArrayLiteralExp e) { assert(e.keys.dim == e.values.dim); for (size_t i = 0; i < e.keys.dim; i++) { expOptimize((*e.keys)[i], result & WANTexpand); expOptimize((*e.values)[i], result & WANTexpand); } } override void visit(StructLiteralExp e) { if (e.stageflags & stageOptimize) return; int old = e.stageflags; e.stageflags |= stageOptimize; if (e.elements) { for (size_t i = 0; i < e.elements.dim; i++) { expOptimize((*e.elements)[i], result & WANTexpand); } } e.stageflags = old; } override void visit(UnaExp e) { //printf("UnaExp::optimize() %s\n", e.toChars()); if (unaOptimize(e, result)) return; } override void visit(NegExp e) { if (unaOptimize(e, result)) return; if (e.e1.isConst() == 1) { ret = Neg(e.type, e.e1).copy(); } } override void visit(ComExp e) { if (unaOptimize(e, result)) return; if (e.e1.isConst() == 1) { ret = Com(e.type, e.e1).copy(); } } override void visit(NotExp e) { if (unaOptimize(e, result)) return; if (e.e1.isConst() == 1) { ret = Not(e.type, e.e1).copy(); } } override void visit(SymOffExp e) { assert(e.var); } override void visit(AddrExp e) { //printf("AddrExp::optimize(result = %d) %s\n", result, e.toChars()); /* Rewrite &(a,b) as (a,&b) */ if (e.e1.op == TOKcomma) { CommaExp ce = cast(CommaExp)e.e1; auto ae = new AddrExp(e.loc, ce.e2); ae.type = e.type; ret = new CommaExp(ce.loc, ce.e1, ae); ret.type = e.type; return; } // Keep lvalue-ness if (expOptimize(e.e1, result, true)) return; // Convert &*ex to ex if (e.e1.op == TOKstar) { Expression ex = (cast(PtrExp)e.e1).e1; if (e.type.equals(ex.type)) ret = ex; else if (e.type.toBasetype().equivalent(ex.type.toBasetype())) { ret = ex.copy(); ret.type = e.type; } return; } if (e.e1.op == TOKvar) { VarExp ve = cast(VarExp)e.e1; if (!ve.var.isOut() && !ve.var.isRef() && !ve.var.isImportedSymbol()) { ret = new SymOffExp(e.loc, ve.var, 0, ve.hasOverloads); ret.type = e.type; return; } } if (e.e1.op == TOKindex) { // Convert &array[n] to &array+n IndexExp ae = cast(IndexExp)e.e1; if (ae.e2.op == TOKint64 && ae.e1.op == TOKvar) { sinteger_t index = ae.e2.toInteger(); VarExp ve = cast(VarExp)ae.e1; if (ve.type.ty == Tsarray && !ve.var.isImportedSymbol()) { TypeSArray ts = cast(TypeSArray)ve.type; sinteger_t dim = ts.dim.toInteger(); if (index < 0 || index >= dim) { e.error("array index %lld is out of bounds `[0..%lld]`", index, dim); return error(); } import core.checkedint : mulu; bool overflow; const offset = mulu(index, ts.nextOf().size(e.loc), overflow); if (overflow) { e.error("array offset overflow"); return error(); } ret = new SymOffExp(e.loc, ve.var, offset); ret.type = e.type; return; } } } } override void visit(PtrExp e) { //printf("PtrExp::optimize(result = x%x) %s\n", result, e.toChars()); if (expOptimize(e.e1, result)) return; // Convert *&ex to ex // But only if there is no type punning involved if (e.e1.op == TOKaddress) { Expression ex = (cast(AddrExp)e.e1).e1; if (e.type.equals(ex.type)) ret = ex; else if (e.type.toBasetype().equivalent(ex.type.toBasetype())) { ret = ex.copy(); ret.type = e.type; } } if (keepLvalue) return; // Constant fold *(&structliteral + offset) if (e.e1.op == TOKadd) { Expression ex = Ptr(e.type, e.e1).copy(); if (!CTFEExp.isCantExp(ex)) { ret = ex; return; } } if (e.e1.op == TOKsymoff) { SymOffExp se = cast(SymOffExp)e.e1; VarDeclaration v = se.var.isVarDeclaration(); Expression ex = expandVar(result, v); if (ex && ex.op == TOKstructliteral) { StructLiteralExp sle = cast(StructLiteralExp)ex; ex = sle.getField(e.type, cast(uint)se.offset); if (ex && !CTFEExp.isCantExp(ex)) { ret = ex; return; } } } } override void visit(DotVarExp e) { //printf("DotVarExp::optimize(result = x%x) %s\n", result, e.toChars()); if (expOptimize(e.e1, result)) return; if (keepLvalue) return; Expression ex = e.e1; if (ex.op == TOKvar) { VarExp ve = cast(VarExp)ex; VarDeclaration v = ve.var.isVarDeclaration(); ex = expandVar(result, v); } if (ex && ex.op == TOKstructliteral) { StructLiteralExp sle = cast(StructLiteralExp)ex; VarDeclaration vf = e.var.isVarDeclaration(); if (vf && !vf.overlapped) { /* https://issues.dlang.org/show_bug.cgi?id=13021 * Prevent optimization if vf has overlapped fields. */ ex = sle.getField(e.type, vf.offset); if (ex && !CTFEExp.isCantExp(ex)) { ret = ex; return; } } } } override void visit(NewExp e) { expOptimize(e.thisexp, WANTvalue); // Optimize parameters if (e.newargs) { for (size_t i = 0; i < e.newargs.dim; i++) { expOptimize((*e.newargs)[i], WANTvalue); } } if (e.arguments) { for (size_t i = 0; i < e.arguments.dim; i++) { expOptimize((*e.arguments)[i], WANTvalue); } } } override void visit(CallExp e) { //printf("CallExp::optimize(result = %d) %s\n", result, e.toChars()); // Optimize parameters with keeping lvalue-ness if (expOptimize(e.e1, result)) return; if (e.arguments) { Type t1 = e.e1.type.toBasetype(); if (t1.ty == Tdelegate) t1 = t1.nextOf(); assert(t1.ty == Tfunction); TypeFunction tf = cast(TypeFunction)t1; for (size_t i = 0; i < e.arguments.dim; i++) { Parameter p = Parameter.getNth(tf.parameters, i); bool keep = p && (p.storageClass & (STCref | STCout)) != 0; expOptimize((*e.arguments)[i], WANTvalue, keep); } } } override void visit(CastExp e) { //printf("CastExp::optimize(result = %d) %s\n", result, e.toChars()); //printf("from %s to %s\n", e.type.toChars(), e.to.toChars()); //printf("from %s\n", e.type.toChars()); //printf("e1.type %s\n", e.e1.type.toChars()); //printf("type = %p\n", e.type); assert(e.type); TOK op1 = e.e1.op; Expression e1old = e.e1; if (expOptimize(e.e1, result)) return; e.e1 = fromConstInitializer(result, e.e1); if (e.e1 == e1old && e.e1.op == TOKarrayliteral && e.type.toBasetype().ty == Tpointer && e.e1.type.toBasetype().ty != Tsarray) { // Casting this will result in the same expression, and // infinite loop because of Expression::implicitCastTo() return; // no change } if ((e.e1.op == TOKstring || e.e1.op == TOKarrayliteral) && (e.type.ty == Tpointer || e.type.ty == Tarray)) { const esz = e.type.nextOf().size(e.loc); const e1sz = e.e1.type.toBasetype().nextOf().size(e.e1.loc); if (esz == SIZE_INVALID || e1sz == SIZE_INVALID) return error(); if (e1sz == esz) { // https://issues.dlang.org/show_bug.cgi?id=12937 // If target type is void array, trying to paint // e.e1 with that type will cause infinite recursive optimization. if (e.type.nextOf().ty == Tvoid) return; ret = e.e1.castTo(null, e.type); //printf(" returning1 %s\n", ret.toChars()); return; } } if (e.e1.op == TOKstructliteral && e.e1.type.implicitConvTo(e.type) >= MATCHconst) { //printf(" returning2 %s\n", e.e1.toChars()); L1: // Returning e1 with changing its type ret = (e1old == e.e1 ? e.e1.copy() : e.e1); ret.type = e.type; return; } /* The first test here is to prevent infinite loops */ if (op1 != TOKarrayliteral && e.e1.op == TOKarrayliteral) { ret = e.e1.castTo(null, e.to); return; } if (e.e1.op == TOKnull && (e.type.ty == Tpointer || e.type.ty == Tclass || e.type.ty == Tarray)) { //printf(" returning3 %s\n", e.e1.toChars()); goto L1; } if (e.type.ty == Tclass && e.e1.type.ty == Tclass) { import ddmd.aggregate : SIZEOKdone; // See if we can remove an unnecessary cast ClassDeclaration cdfrom = e.e1.type.isClassHandle(); ClassDeclaration cdto = e.type.isClassHandle(); // Need to determine correct offset before optimizing away the cast. // https://issues.dlang.org/show_bug.cgi?id=16980 cdfrom.size(e.loc); assert(cdfrom.sizeok == SIZEOKdone); assert(cdto.sizeok == SIZEOKdone || !cdto.isBaseOf(cdfrom, null)); int offset; if (cdto.isBaseOf(cdfrom, &offset) && offset == 0) { //printf(" returning4 %s\n", e.e1.toChars()); goto L1; } } // We can convert 'head const' to mutable if (e.to.mutableOf().constOf().equals(e.e1.type.mutableOf().constOf())) { //printf(" returning5 %s\n", e.e1.toChars()); goto L1; } if (e.e1.isConst()) { if (e.e1.op == TOKsymoff) { if (e.type.toBasetype().ty != Tsarray) { const esz = e.type.size(e.loc); const e1sz = e.e1.type.size(e.e1.loc); if (esz == SIZE_INVALID || e1sz == SIZE_INVALID) return error(); if (esz == e1sz) goto L1; } return; } if (e.to.toBasetype().ty != Tvoid) { if (e.e1.type.equals(e.type) && e.type.equals(e.to)) ret = e.e1; else ret = Cast(e.loc, e.type, e.to, e.e1).copy(); } } //printf(" returning6 %s\n", ret.toChars()); } override void visit(BinExp e) { //printf("BinExp::optimize(result = %d) %s\n", result, e.toChars()); // don't replace const variable with its initializer in e1 bool e2only = (e.op == TOKconstruct || e.op == TOKblit); if (e2only ? expOptimize(e.e2, result) : binOptimize(e, result)) return; if (e.op == TOKshlass || e.op == TOKshrass || e.op == TOKushrass) { if (e.e2.isConst() == 1) { sinteger_t i2 = e.e2.toInteger(); d_uns64 sz = e.e1.type.size(e.e1.loc); assert(sz != SIZE_INVALID); sz *= 8; if (i2 < 0 || i2 >= sz) { e.error("shift assign by %lld is outside the range 0..%llu", i2, cast(ulong)sz - 1); return error(); } } } } override void visit(AddExp e) { //printf("AddExp::optimize(%s)\n", e.toChars()); if (binOptimize(e, result)) return; if (e.e1.isConst() && e.e2.isConst()) { if (e.e1.op == TOKsymoff && e.e2.op == TOKsymoff) return; ret = Add(e.loc, e.type, e.e1, e.e2).copy(); } } override void visit(MinExp e) { if (binOptimize(e, result)) return; if (e.e1.isConst() && e.e2.isConst()) { if (e.e2.op == TOKsymoff) return; ret = Min(e.loc, e.type, e.e1, e.e2).copy(); } } override void visit(MulExp e) { //printf("MulExp::optimize(result = %d) %s\n", result, e.toChars()); if (binOptimize(e, result)) return; if (e.e1.isConst() == 1 && e.e2.isConst() == 1) { ret = Mul(e.loc, e.type, e.e1, e.e2).copy(); } } override void visit(DivExp e) { //printf("DivExp::optimize(%s)\n", e.toChars()); if (binOptimize(e, result)) return; if (e.e1.isConst() == 1 && e.e2.isConst() == 1) { ret = Div(e.loc, e.type, e.e1, e.e2).copy(); } } override void visit(ModExp e) { if (binOptimize(e, result)) return; if (e.e1.isConst() == 1 && e.e2.isConst() == 1) { ret = Mod(e.loc, e.type, e.e1, e.e2).copy(); } } void shift_optimize(BinExp e, UnionExp function(Loc, Type, Expression, Expression) shift) { if (binOptimize(e, result)) return; if (e.e2.isConst() == 1) { sinteger_t i2 = e.e2.toInteger(); d_uns64 sz = e.e1.type.size(e.e1.loc); assert(sz != SIZE_INVALID); sz *= 8; if (i2 < 0 || i2 >= sz) { e.error("shift by %lld is outside the range 0..%llu", i2, cast(ulong)sz - 1); return error(); } if (e.e1.isConst() == 1) ret = (*shift)(e.loc, e.type, e.e1, e.e2).copy(); } } override void visit(ShlExp e) { //printf("ShlExp::optimize(result = %d) %s\n", result, e.toChars()); shift_optimize(e, &Shl); } override void visit(ShrExp e) { //printf("ShrExp::optimize(result = %d) %s\n", result, e.toChars()); shift_optimize(e, &Shr); } override void visit(UshrExp e) { //printf("UshrExp::optimize(result = %d) %s\n", result, toChars()); shift_optimize(e, &Ushr); } override void visit(AndExp e) { if (binOptimize(e, result)) return; if (e.e1.isConst() == 1 && e.e2.isConst() == 1) ret = And(e.loc, e.type, e.e1, e.e2).copy(); } override void visit(OrExp e) { if (binOptimize(e, result)) return; if (e.e1.isConst() == 1 && e.e2.isConst() == 1) ret = Or(e.loc, e.type, e.e1, e.e2).copy(); } override void visit(XorExp e) { if (binOptimize(e, result)) return; if (e.e1.isConst() == 1 && e.e2.isConst() == 1) ret = Xor(e.loc, e.type, e.e1, e.e2).copy(); } override void visit(PowExp e) { if (binOptimize(e, result)) return; // Replace 1 ^^ x or 1.0^^x by (x, 1) if ((e.e1.op == TOKint64 && e.e1.toInteger() == 1) || (e.e1.op == TOKfloat64 && e.e1.toReal() == CTFloat.one)) { ret = new CommaExp(e.loc, e.e2, e.e1); ret.type = e.type; return; } // Replace -1 ^^ x by (x&1) ? -1 : 1, where x is integral if (e.e2.type.isintegral() && e.e1.op == TOKint64 && cast(sinteger_t)e.e1.toInteger() == -1) { ret = new AndExp(e.loc, e.e2, new IntegerExp(e.loc, 1, e.e2.type)); ret.type = e.e2.type; ret = new CondExp(e.loc, ret, new IntegerExp(e.loc, -1, e.type), new IntegerExp(e.loc, 1, e.type)); ret.type = e.type; return; } // Replace x ^^ 0 or x^^0.0 by (x, 1) if ((e.e2.op == TOKint64 && e.e2.toInteger() == 0) || (e.e2.op == TOKfloat64 && e.e2.toReal() == CTFloat.zero)) { if (e.e1.type.isintegral()) ret = new IntegerExp(e.loc, 1, e.e1.type); else ret = new RealExp(e.loc, CTFloat.one, e.e1.type); ret = new CommaExp(e.loc, e.e1, ret); ret.type = e.type; return; } // Replace x ^^ 1 or x^^1.0 by (x) if ((e.e2.op == TOKint64 && e.e2.toInteger() == 1) || (e.e2.op == TOKfloat64 && e.e2.toReal() == CTFloat.one)) { ret = e.e1; return; } // Replace x ^^ -1.0 by (1.0 / x) if (e.e2.op == TOKfloat64 && e.e2.toReal() == CTFloat.minusone) { ret = new DivExp(e.loc, new RealExp(e.loc, CTFloat.one, e.e2.type), e.e1); ret.type = e.type; return; } // All other negative integral powers are illegal if (e.e1.type.isintegral() && (e.e2.op == TOKint64) && cast(sinteger_t)e.e2.toInteger() < 0) { e.error("cannot raise %s to a negative integer power. Did you mean (cast(real)%s)^^%s ?", e.e1.type.toBasetype().toChars(), e.e1.toChars(), e.e2.toChars()); return error(); } // If e2 *could* have been an integer, make it one. if (e.e2.op == TOKfloat64) { version (all) { // Work around redundant REX.W prefix breaking Valgrind // when built with affected versions of DMD. // https://issues.dlang.org/show_bug.cgi?id=14952 // This can be removed once compiling with DMD 2.068 or // older is no longer supported. const r = e.e2.toReal(); if (r == real_t(cast(sinteger_t)r)) e.e2 = new IntegerExp(e.loc, e.e2.toInteger(), Type.tint64); } else { if (e.e2.toReal() == cast(sinteger_t)e.e2.toReal()) e.e2 = new IntegerExp(e.loc, e.e2.toInteger(), Type.tint64); } } if (e.e1.isConst() == 1 && e.e2.isConst() == 1) { Expression ex = Pow(e.loc, e.type, e.e1, e.e2).copy(); if (!CTFEExp.isCantExp(ex)) { ret = ex; return; } } // (2 ^^ n) ^^ p -> 1 << n * p if (e.e1.op == TOKint64 && e.e1.toInteger() > 0 && !((e.e1.toInteger() - 1) & e.e1.toInteger()) && e.e2.type.isintegral() && e.e2.type.isunsigned()) { dinteger_t i = e.e1.toInteger(); dinteger_t mul = 1; while ((i >>= 1) > 1) mul++; Expression shift = new MulExp(e.loc, e.e2, new IntegerExp(e.loc, mul, e.e2.type)); shift.type = e.e2.type; shift = shift.castTo(null, Type.tshiftcnt); ret = new ShlExp(e.loc, new IntegerExp(e.loc, 1, e.e1.type), shift); ret.type = e.type; return; } } override void visit(CommaExp e) { //printf("CommaExp::optimize(result = %d) %s\n", result, e.toChars()); // Comma needs special treatment, because it may // contain compiler-generated declarations. We can interpret them, but // otherwise we must NOT attempt to constant-fold them. // In particular, if the comma returns a temporary variable, it needs // to be an lvalue (this is particularly important for struct constructors) expOptimize(e.e1, WANTvalue); expOptimize(e.e2, result, keepLvalue); if (ret.op == TOKerror) return; if (!e.e1 || e.e1.op == TOKint64 || e.e1.op == TOKfloat64 || !hasSideEffect(e.e1)) { ret = e.e2; if (ret) ret.type = e.type; } //printf("-CommaExp::optimize(result = %d) %s\n", result, e.e.toChars()); } override void visit(ArrayLengthExp e) { //printf("ArrayLengthExp::optimize(result = %d) %s\n", result, e.toChars()); if (unaOptimize(e, WANTexpand)) return; // CTFE interpret static immutable arrays (to get better diagnostics) if (e.e1.op == TOKvar) { VarDeclaration v = (cast(VarExp)e.e1).var.isVarDeclaration(); if (v && (v.storage_class & STCstatic) && (v.storage_class & STCimmutable) && v._init) { if (Expression ci = v.getConstInitializer()) e.e1 = ci; } } if (e.e1.op == TOKstring || e.e1.op == TOKarrayliteral || e.e1.op == TOKassocarrayliteral || e.e1.type.toBasetype().ty == Tsarray) { ret = ArrayLength(e.type, e.e1).copy(); } } override void visit(EqualExp e) { //printf("EqualExp::optimize(result = %x) %s\n", result, e.toChars()); if (binOptimize(e, WANTvalue)) return; Expression e1 = fromConstInitializer(result, e.e1); Expression e2 = fromConstInitializer(result, e.e2); if (e1.op == TOKerror) { ret = e1; return; } if (e2.op == TOKerror) { ret = e2; return; } ret = Equal(e.op, e.loc, e.type, e1, e2).copy(); if (CTFEExp.isCantExp(ret)) ret = e; } override void visit(IdentityExp e) { //printf("IdentityExp::optimize(result = %d) %s\n", result, e.toChars()); if (binOptimize(e, WANTvalue)) return; if ((e.e1.isConst() && e.e2.isConst()) || (e.e1.op == TOKnull && e.e2.op == TOKnull)) { ret = Identity(e.op, e.loc, e.type, e.e1, e.e2).copy(); if (CTFEExp.isCantExp(ret)) ret = e; } } /* It is possible for constant folding to change an array expression of * unknown length, into one where the length is known. * If the expression 'arr' is a literal, set lengthVar to be its length. */ static void setLengthVarIfKnown(VarDeclaration lengthVar, Expression arr) { if (!lengthVar) return; if (lengthVar._init && !lengthVar._init.isVoidInitializer()) return; // we have previously calculated the length size_t len; if (arr.op == TOKstring) len = (cast(StringExp)arr).len; else if (arr.op == TOKarrayliteral) len = (cast(ArrayLiteralExp)arr).elements.dim; else { Type t = arr.type.toBasetype(); if (t.ty == Tsarray) len = cast(size_t)(cast(TypeSArray)t).dim.toInteger(); else return; // we don't know the length yet } Expression dollar = new IntegerExp(Loc(), len, Type.tsize_t); lengthVar._init = new ExpInitializer(Loc(), dollar); lengthVar.storage_class |= STCstatic | STCconst; } override void visit(IndexExp e) { //printf("IndexExp::optimize(result = %d) %s\n", result, e.toChars()); if (expOptimize(e.e1, result & WANTexpand)) return; Expression ex = fromConstInitializer(result, e.e1); // We might know $ now setLengthVarIfKnown(e.lengthVar, ex); if (expOptimize(e.e2, WANTvalue)) return; if (keepLvalue) return; ret = Index(e.type, ex, e.e2).copy(); if (CTFEExp.isCantExp(ret)) ret = e; } override void visit(SliceExp e) { //printf("SliceExp::optimize(result = %d) %s\n", result, e.toChars()); if (expOptimize(e.e1, result & WANTexpand)) return; if (!e.lwr) { if (e.e1.op == TOKstring) { // Convert slice of string literal into dynamic array Type t = e.e1.type.toBasetype(); if (Type tn = t.nextOf()) ret = e.e1.castTo(null, tn.arrayOf()); } } else { e.e1 = fromConstInitializer(result, e.e1); // We might know $ now setLengthVarIfKnown(e.lengthVar, e.e1); expOptimize(e.lwr, WANTvalue); expOptimize(e.upr, WANTvalue); if (ret.op == TOKerror) return; ret = Slice(e.type, e.e1, e.lwr, e.upr).copy(); if (CTFEExp.isCantExp(ret)) ret = e; } // https://issues.dlang.org/show_bug.cgi?id=14649 // Leave the slice form so it might be // a part of array operation. // Assume that the backend codegen will handle the form `e[]` // as an equal to `e` itself. if (ret.op == TOKstring) { e.e1 = ret; e.lwr = null; e.upr = null; ret = e; } //printf("-SliceExp::optimize() %s\n", ret.toChars()); } override void visit(AndAndExp e) { //printf("AndAndExp::optimize(%d) %s\n", result, e.toChars()); if (expOptimize(e.e1, WANTvalue)) return; if (e.e1.isBool(false)) { // Replace with (e1, false) ret = new IntegerExp(e.loc, 0, Type.tbool); ret = Expression.combine(e.e1, ret); if (e.type.toBasetype().ty == Tvoid) { ret = new CastExp(e.loc, ret, Type.tvoid); ret.type = e.type; } return; } if (expOptimize(e.e2, WANTvalue)) return; if (e.e1.isConst()) { if (e.e2.isConst()) { bool n1 = e.e1.isBool(true); bool n2 = e.e2.isBool(true); ret = new IntegerExp(e.loc, n1 && n2, e.type); } else if (e.e1.isBool(true)) { if (e.type.toBasetype().ty == Tvoid) ret = e.e2; else { ret = new CastExp(e.loc, e.e2, e.type); ret.type = e.type; } } } } override void visit(OrOrExp e) { //printf("OrOrExp::optimize(%d) %s\n", result, e.toChars()); if (expOptimize(e.e1, WANTvalue)) return; if (e.e1.isBool(true)) { // Replace with (e1, true) ret = new IntegerExp(e.loc, 1, Type.tbool); ret = Expression.combine(e.e1, ret); if (e.type.toBasetype().ty == Tvoid) { ret = new CastExp(e.loc, ret, Type.tvoid); ret.type = e.type; } return; } if (expOptimize(e.e2, WANTvalue)) return; if (e.e1.isConst()) { if (e.e2.isConst()) { bool n1 = e.e1.isBool(true); bool n2 = e.e2.isBool(true); ret = new IntegerExp(e.loc, n1 || n2, e.type); } else if (e.e1.isBool(false)) { if (e.type.toBasetype().ty == Tvoid) ret = e.e2; else { ret = new CastExp(e.loc, e.e2, e.type); ret.type = e.type; } } } } override void visit(CmpExp e) { //printf("CmpExp::optimize() %s\n", e.toChars()); if (binOptimize(e, WANTvalue)) return; Expression e1 = fromConstInitializer(result, e.e1); Expression e2 = fromConstInitializer(result, e.e2); ret = Cmp(e.op, e.loc, e.type, e1, e2).copy(); if (CTFEExp.isCantExp(ret)) ret = e; } override void visit(CatExp e) { //printf("CatExp::optimize(%d) %s\n", result, e.toChars()); if (binOptimize(e, result)) return; if (e.e1.op == TOKcat) { // https://issues.dlang.org/show_bug.cgi?id=12798 // optimize ((expr ~ str1) ~ str2) CatExp ce1 = cast(CatExp)e.e1; scope CatExp cex = new CatExp(e.loc, ce1.e2, e.e2); cex.type = e.type; Expression ex = cex.optimize(result); if (ex != cex) { e.e1 = ce1.e1; e.e2 = ex; } } // optimize "str"[] -> "str" if (e.e1.op == TOKslice) { SliceExp se1 = cast(SliceExp)e.e1; if (se1.e1.op == TOKstring && !se1.lwr) e.e1 = se1.e1; } if (e.e2.op == TOKslice) { SliceExp se2 = cast(SliceExp)e.e2; if (se2.e1.op == TOKstring && !se2.lwr) e.e2 = se2.e1; } ret = Cat(e.type, e.e1, e.e2).copy(); if (CTFEExp.isCantExp(ret)) ret = e; } override void visit(CondExp e) { if (expOptimize(e.econd, WANTvalue)) return; if (e.econd.isBool(true)) ret = e.e1.optimize(result, keepLvalue); else if (e.econd.isBool(false)) ret = e.e2.optimize(result, keepLvalue); else { expOptimize(e.e1, result, keepLvalue); expOptimize(e.e2, result, keepLvalue); } } } scope OptimizeVisitor v = new OptimizeVisitor(result, keepLvalue); Expression ex = null; v.ret = e; // Optimize the expression until it can no longer be simplified. while (ex != v.ret) { ex = v.ret; ex.accept(v); } return ex; }
D
/Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/FluentSQLite.build/Exports.swift.o : /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/FluentSQLiteSchema.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteDatabase+SchemaSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteDatabase+JoinSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteDatabase+MigrationSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteDatabase+TransactionSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteDatabase+QuerySupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/FluentSQLiteProvider.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/FluentSQLiteError.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteTypes.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteModels.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/Exports.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/FluentSQLiteQuery.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/SQL.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/FluentSQL.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Command.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Console.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/SQLite.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/DatabaseKit.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Fluent.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/cpp_magic.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIODarwin/include/c_nio_darwin.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/c-atomics.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOLinux/include/c_nio_linux.h /Users/nice/HelloWord/.build/checkouts/swift-nio-zlib-support.git--6556802241718767980/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/FluentSQLite.build/Exports~partial.swiftmodule : /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/FluentSQLiteSchema.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteDatabase+SchemaSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteDatabase+JoinSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteDatabase+MigrationSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteDatabase+TransactionSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteDatabase+QuerySupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/FluentSQLiteProvider.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/FluentSQLiteError.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteTypes.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteModels.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/Exports.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/FluentSQLiteQuery.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/SQL.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/FluentSQL.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Command.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Console.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/SQLite.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/DatabaseKit.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Fluent.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/cpp_magic.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIODarwin/include/c_nio_darwin.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/c-atomics.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOLinux/include/c_nio_linux.h /Users/nice/HelloWord/.build/checkouts/swift-nio-zlib-support.git--6556802241718767980/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/FluentSQLite.build/Exports~partial.swiftdoc : /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/FluentSQLiteSchema.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteDatabase+SchemaSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteDatabase+JoinSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteDatabase+MigrationSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteDatabase+TransactionSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteDatabase+QuerySupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/FluentSQLiteProvider.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/FluentSQLiteError.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteTypes.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/SQLiteModels.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/Exports.swift /Users/nice/HelloWord/.build/checkouts/fluent-sqlite.git-2294650027361755373/Sources/FluentSQLite/FluentSQLiteQuery.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/SQL.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/FluentSQL.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Command.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Console.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/SQLite.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/DatabaseKit.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Fluent.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/cpp_magic.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIODarwin/include/c_nio_darwin.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/c-atomics.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOLinux/include/c_nio_linux.h /Users/nice/HelloWord/.build/checkouts/swift-nio-zlib-support.git--6556802241718767980/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
module bigfloat; import core.bitop; import std.array; import std.exception; import std.stdio; import std.algorithm; import std.traits; import std.meta; import std.math; import std.bitmanip; import biguintcore; version(D_InlineAsm_X86) { import biguintx86; } else { import biguintnoasm; } private template ScaledFloatRep(T) if (isFloatingPoint!T) { static if (is(Unqual!T == float)) alias ScaledFloatRep = FloatRep; else static if (is(Unqual!T == double)) alias ScaledFloatRep = DoubleRep; else static assert(false, "No XRep for type "~T.stringof); } struct BigFloat(size_t bits) if (bits % (BigDigit.sizeof*8) == 0 && bits > 0) { private enum digits = bits / (BigDigit.sizeof*8); bool nan; bool sign; long exponent; immutable(BigDigit)[] fraction; private BigDigit[] createFraction(ulong value) { static if (BigDigit.sizeof == ulong.sizeof) return [Repeat!(digits-1, 0), value]; else return [Repeat!(digits-2, 0), (value >> 32) & 0xFFFF_FFFF, value & 0xFFFF_FFFF]; } this(long value) { sign = value < 0; exponent = cast(long)log2(value); value = abs(value); fraction = createFraction(cast(ulong)abs(value)).adjustFraction(digits, &exponent).assumeUnique; } this(T)(T value) if (isFloatingPoint!T) { auto a = ScaledFloatRep!T(value); sign = a.sign; exponent = a.exponent - a.bias; ulong frac = cast(ulong)a.fraction << (63 - a.fractionBits) | 0x8000_0000_0000_0000; fraction = createFraction(frac); } T opCast(T)() const if (isFloatingPoint!T) { ScaledFloatRep!T result; result.sign = sign; ulong frac = fraction[$-1]; static if (BigDigit.sizeof != ulong.sizeof) { frac <<= 32; frac |= fraction[$-2]; } result.fraction = (frac & 0x7FFF_FFFF_FFFF_FFFF) >> (63-result.fractionBits); result.exponent = cast(typeof(result.exponent))(exponent + result.bias); return result.value; } BigFloat opUnary(string op)() const if (op.among("+", "-")) { BigFloat result = this; result.sign = sign == (op == "+"); return result; } BigFloat opBinary(string op, size_t bits2)(BigFloat!bits2 rhs) const if (bits >= bits2) { BigFloat result; static if (op == "+") { } else static if (op == "-") { } else static if (op == "*") { result.sign = sign != rhs.sign; result.exponent = exponent + rhs.exponent; BigDigit[digits*2] frac; mulInternal(frac, fraction, rhs.fraction); result.fraction = frac.adjustFraction(digits, &result.exponent).assumeUnique; } else static if (op == "/") { result.sign = sign == rhs.sign; } else static if (op == "^^") { result.nan = sign; } return result; } string toStringa() const { import std.conv : to; return (cast(float)this).to!string; } } BigDigit[] adjustFraction(BigDigit[] arr, size_t digits, long* exponent) { while (arr.back == 0) arr.popBack(); arr = arr[$-digits..$]; BigDigit[] data = new BigDigit[digits]; auto bits = bsr(arr[$-1]); multibyteShl(data, arr, BigDigit.sizeof*8 - bits); *exponent += bits; return data; } //pure nothrow @safe unittest { const BigFloat!128 a = 2.5; const BigFloat!128 b = -14; const c = a * b; const BigFloat!128 d = -35; writeln(a, " * ", b, " = ", c, " (expect ", d, ")"); assert(c == d); } pure nothrow @safe unittest { const BigFloat!128 a = 3.14; const BigFloat!128 b = -3.14; assert( a != b); assert( a == a); assert(-a == b); }
D
/* \file lockedexecutor * \brief Runs commands in a мютекс замок */ /* Originally written by Doug Lea and released into the public domain. This may be used for any purposes whatsoever without acknowledgment. Thanks for the assistance and support of Sun Microsystems Labs, and everyone contributing, testing, and using this code. History: Date Who What 01May2004 Mike Swieton Translated to D 21Jun1998 dl Create public version */ module conc.lockedexecutor; import conc.executor; import conc.sync; /** * An implementation of Исполнитель that * invokes the пуск method of the supplied команда within * a synchronization замок and then returns. * **/ class БлокированныйИсполнитель : Исполнитель { /** The мютекс **/ protected: Синх мютекс_; public: /** * Create a new БлокированныйИсполнитель that relies on the given mutual * exclusion замок. * @param мютекс Any mutual exclusion замок. * Standard usage is to supply an instance of <code>Мютекс</code>, * but, for example, a Семафор initialized to 1 also works. * On the другое hand, many другое Синх implementations would not * work here, so some care is required to supply a sensible * synchronization object. **/ this(Синх мютекс) { мютекс_ = мютекс; } /** * Execute the given команда directly in the current нить, * within the supplied замок. **/ проц выполни(цел delegate() команда) { мютекс_.обрети(); try { команда(); } finally { мютекс_.отпусти(); } } }
D
/** * Copyright © DiamondMVC 2018 * License: MIT (https://github.com/DiamondMVC/Diamond/blob/master/LICENSE) * Author: Jacob Jensen (bausshf) */ module diamond.web.elements.image; import diamond.web.elements.element; /// Wrapper around a image. final class Image : Element { private: /// The source. string _source; /// The alt text. string _alt; public: final: /// Creates a new image. this() { super("img"); alt = ""; } /** * Creates a new image. * Params: * source = The source of the image. */ this(string source) { this(); this.source = source; } @property { /// Gets the source. string source() { return _source; } /// Sets the source. void source(string newSource) { _source = newSource; addAttribute("src", _source); } /// Gets the alt text. string alt() { return _alt; } /// Sets the alt text. void alt(string newAlt) { _alt = newAlt; } } }
D
func void B_CheckStolenEquipment() { var C_Item melee; var C_Item ranged; var C_Item armor; melee = Npc_GetEquippedMeleeWeapon(other); ranged = Npc_GetEquippedRangedWeapon(other); armor = Npc_GetEquippedArmor(other); if(Npc_OwnedByNpc(melee,self)) { PrintDebugNpc(PD_ZS_Check,"...SC trägt Nahkampf-Waffe des NSCs offen!"); self.aivar[AIV_WANTEDITEM] = Hlp_GetInstanceID(melee); if(!Npc_HasNews(self,NEWS_DEFEAT,other,self) && (self.aivar[AIV_PCISSTRONGER] == 0)) { PrintDebugNpc(PD_ZS_Check,"...NSC ist nicht vom SC besiegt worden & hat noch nicht danach gefragt!"); Npc_ClearAIQueue(self); C_LookAtNpc(self,other); AI_TurnToNPC(self,other); AI_PointAtNpc(self,other); B_Say(self,other,"$THATSMYWEAPON"); AI_StartState(self,ZS_GetBackBelongings,1,""); return; }; } else if(Npc_OwnedByNpc(ranged,self)) { PrintDebugNpc(PD_ZS_Check,"...SC trägt Fernkampf-Waffe des NSCs offen!"); self.aivar[AIV_WANTEDITEM] = Hlp_GetInstanceID(ranged); if(!Npc_HasNews(self,NEWS_DEFEAT,other,self) && (self.aivar[AIV_PCISSTRONGER] == 0)) { Npc_ClearAIQueue(self); C_LookAtNpc(self,other); AI_TurnToNPC(self,other); AI_PointAtNpc(self,other); B_Say(self,other,"$THATSMYWEAPON"); AI_StartState(self,ZS_GetBackBelongings,1,""); return; }; }; }; func void B_AssessSC() { var C_Npc her; var C_Npc rock; PrintDebugNpc(PD_ZS_FRAME,"B_AssessSc"); if(self.npcType == Npctype_ROGUE) { B_SetRoguesToHostile(); }; if(Npc_CanSeeNpcFreeLOS(self,other) && (Npc_GetDistToNpc(self,other) < PERC_DIST_DIALOG)) { PrintDebugNpc(PD_ZS_Check,"...SC sichtbar und in Dialogreichweite!"); her = Hlp_GetNpc(PC_Hero); rock = Hlp_GetNpc(PC_Rockefeller); if((Hlp_GetInstanceID(her) != Hlp_GetInstanceID(hero)) && (Hlp_GetInstanceID(rock) != Hlp_GetInstanceID(hero)) && Npc_IsInState(self,ZS_GuardPassage)) { if(Wld_GetGuildAttitude(self.guild,other.guild) != ATT_FRIENDLY) { B_FullStop(self); B_Say(self,other,"$NOWWAIT"); B_IntruderAlert(self,other); B_SetAttackReason(self,AIV_AR_INTRUDER); Npc_SetTarget(self,other); AI_StartState(self,ZS_Attack,1,""); }; }; B_CheckForImportantInfo(self,other); if(C_NpcIsInFightMode(other)) { PrintDebugNpc(PD_ZS_Check,"...SC im Kampfmodus!"); B_AssessFighter(); return; }; if(!C_BodyStateContains(other,BS_SNEAK)) { PrintDebugNpc(PD_ZS_Check,"...SC schleicht NICHT!"); if(Npc_GetDistToNpc(self,other) < HAI_DIST_OBSERVEINTRUDER) { PrintDebugNpc(PD_ZS_Check,"...SC in ObserveIntruder-Reichweite!"); B_ObserveIntruder(); return; } else { PrintDebugNpc(PD_ZS_Check,"...SC außerhalb ObserveIntruder-Reichweite!"); }; }; B_CheckStolenEquipment(); }; if((hero.aivar[AIV_GUARDPASSAGE_STATUS] == AIV_GPS_FIRSTWARN) || (hero.aivar[AIV_GUARDPASSAGE_STATUS] == AIV_GPS_LASTWARN)) { PrintDebugNpc(PD_ZS_Check,"...SC wurde von Durchgangswachen verwarnt!"); PrintDebugInt(PD_ZS_Check,"hero.aivar[AIV_GUARDPASSAGE_STATUS] = ",hero.aivar[AIV_GUARDPASSAGE_STATUS]); if(Npc_IsInState(self,ZS_GuardPassage) && (Npc_GetDistToNpc(self,hero) > HAI_DIST_GUARDPASSAGE_RESET)) { PrintDebugNpc(PD_ZS_Check,"...Status für Durchgangswachen zurücksetzen!"); hero.aivar[AIV_GUARDPASSAGE_STATUS] = AIV_GPS_BEGIN; }; }; };
D
module AODCore.matrix; import AODCore.vector; /** A simple 2x2 matrix capable of 2D translation, rotation and scaling */ struct Matrix { public: float a, b, c, d, tx, ty; float rot, prev_rot; Vector scale; /** Constructs a new matrix based off the parameters (if you do not know what params to supply use `Matrix.New()` instead) Params: _a = (0, 0) _b = (0, 1) _c = (1, 0) _d = (1, 1) _tx = translation x _ty = translation y */ this(float _a, float _b, float _c, float _d, float _tx, float _ty) { a = _a; b = _b; c = _c; d = _d; tx = _tx; ty = _ty; rot = prev_rot = 0; scale = Vector( 1,1 ); } /** Constructs a new matrix with default parameters. That is, the matrix starts off as an identity matrix. This is probably what you want to use. Returns: An identity matrix at translation (0, 0) */ static Matrix New() { return Matrix(1, 0, 0, 1, 0, 0); } /** Sets the matrix to be an identity, that is, the main diagonal is 1 and every other element is set to 0 (including the position) */ void Identity() { a = 1; b = 0; c = 0; d = 1; tx = 0; ty = 0; } /** Translates the matrix relative to the current position Params: vec = Vector to translate relative to the current position */ void Translate(inout(Vector) vec) { tx += vec.x; ty += vec.y; } /** Translates the matrix relative to the current position Params: x = Value to translate on the x-axis relative to the current position y = Value to translate on the y-axis relative to the current position */ void Translate(float x, float y) { tx += x; ty += y; } /** Translates the matrix relative to the origin (0, 0) Params: vec = Vector to translate relative to origin */ void Set_Translation(inout(Vector) vec) { tx = vec.x; ty = vec.y; } /** Translates the matrix relative to the origin (0, 0) Params: x = Value to translate on the x-axis relative to origin y = Value to translate on the y-axis relative to origin */ void Set_Translation(float x, float y) { tx = x; ty = y; } /** Composes the matrix with a new translation, rotation and scale Params: pos = vector to set translation of matrix rot = Angle to rotate matrix (in radians) scale = vector to set scale of matrix; (1, 1) is default */ void Compose(inout(Vector) pos, float rot, Vector scale) { Identity(); Scale( scale ); Rotate( rot ); Set_Translation( pos ); } /** Rotates the matrix Params: rot = Angle to rotate matrix (in radians) */ void Rotate(float rot) { import std.math; float x = cos(rot), y = sin(rot); float a1 = a * x - b * y; b = a * y + b * x; a = a1; float c1 = c * x - d * y; d = c * y + d * x; c = c1; float tx1 = tx * x - ty * y; ty = tx * y + ty * x; tx = tx1; } /** Scales the matrix Params: sc = vector to set scale of matrix; (1, 1) is default */ void Scale(Vector sc) { a *= sc.x; b *= sc.y; c *= sc.x; d *= sc.y; tx *= sc.x; ty *= sc.y; } }
D
module demo.readBits; import tango.io.FileConduit; import tango.io.Stdout; import util.BitStream; int main(char[][] args){ ubyte[1] buffer; FileConduit file = new FileConduit(args[1]); while(true){ if(file.read(buffer) != 1){ break; } Stdout.formatln("{}", buffer[0]); } BitStream bs = new BitStream(args[1]); while(!bs.EOF()){ Stdout.formatln("{}", bs.readAbit()); } return 0; }
D
/** * Credentials Manager * * Copyright: * (C) 2011,2012 Jack Lloyd * (C) 2014-2015 Etienne Cimon * * License: * Botan is released under the Simplified BSD License (see LICENSE.md) */ module botan.tls.credentials_manager; import botan.constants; static if (BOTAN_HAS_TLS): import botan.cert.x509.x509cert; import botan.cert.x509.certstor; import botan.math.bigint.bigint; import botan.pubkey.pk_keys; import botan.algo_base.symkey; import botan.tls.credentials_manager; import botan.cert.x509.x509path; import botan.utils.types; import botan.pubkey.algo.ecdsa; /** * Interface for a credentials manager. * * A type is a fairly static value that represents the general nature * of the transaction occuring. Currently used values are "tls-client" * and "tls-server". Context represents a hostname, email address, * username, or other identifier. */ abstract class TLSCredentialsManager { public: /** * Return a list of the certificates of CAs that we trust in this * type/context. * * Params: * type = specifies the type of operation occuring * * context = specifies a context relative to type. For instance * for type "tls-client", context specifies the servers name. */ abstract Vector!CertificateStore trustedCertificateAuthorities(in string type, in string context) { return Vector!CertificateStore(); } /** * Check the certificate chain is valid up to a trusted root, and * optionally (if hostname != "") that the hostname given is * consistent with the leaf certificate. * * This function should throw new an exception derived from * $(D Exception) with an informative what() result if the * certificate chain cannot be verified. * Params: * type = specifies the type of operation occuring * purported_hostname = specifies the purported hostname * cert_chain = specifies a certificate chain leading to a * trusted root CA certificate. */ abstract void verifyCertificateChain(in string type, in string purported_hostname, const ref Vector!X509Certificate cert_chain) { if (cert_chain.empty) throw new InvalidArgument("Certificate chain was empty"); auto trusted_CAs = trustedCertificateAuthorities(type, purported_hostname); PathValidationRestrictions restrictions; auto result = x509PathValidate(cert_chain, restrictions, trusted_CAs); if (!result.successfulValidation()) throw new Exception("Certificate validation failure: " ~ result.resultString()); if (!certInSomeStore(trusted_CAs, result.trustRoot())) throw new Exception("Certificate chain roots in unknown/untrusted CA"); if (purported_hostname != "" && !cert_chain[0].matchesDnsName(purported_hostname)) throw new Exception("Certificate did not match hostname"); } /** * Return a cert chain we can use, ordered from leaf to root, * or else an empty vector. * * It is assumed that the caller can get the private key of the * leaf with privateKeyFor * * Params: * cert_key_types = specifies the key types desired ("RSA", * "DSA", "ECDSA", etc), or empty if there * is no preference by the caller. * * type = specifies the type of operation occuring * * context = specifies a context relative to type. */ abstract Vector!X509Certificate certChain(const ref Vector!string cert_key_types, in string type, in string context) { return Vector!X509Certificate(); } /// ditto final Vector!X509Certificate certChain(T : string[])(auto ref T cert_key_types, in string type, in string context) { return certChain(Vector!string(cert_key_types), type, context); } /** * Return a cert chain we can use, ordered from leaf to root, * or else an empty vector. * * It is assumed that the caller can get the private key of the * leaf with privateKeyFor * * Params: * cert_key_type = specifies the type of key requested * ("RSA", "DSA", "ECDSA", etc) * * type = specifies the type of operation occuring * * context = specifies a context relative to type. */ abstract Vector!X509Certificate certChainSingleType(in string cert_key_type, in string type, in string context) { Vector!string cert_types; cert_types.pushBack(cert_key_type); return certChain(cert_types, type, context); } /** * * Params: * cert = as returned by cert_chain * type = specifies the type of operation occuring * context = specifies a context relative to type. * * Returns: private key associated with this certificate if we should * use it with this context. * * Notes: this object should retain ownership of the returned key; * it should not be deleted by the caller. */ abstract PrivateKey privateKeyFor(in X509Certificate cert, in string type, in string context) { return null; } /** * Params: * type = specifies the type of operation occuring * context = specifies a context relative to type. * Returns: true if we should attempt SRP authentication */ abstract bool attemptSrp(in string type, in string context) { return false; } /** * Params: * type = specifies the type of operation occuring * context = specifies a context relative to type. * Returns: identifier for client-side SRP auth, if available for this type/context. Should return empty string if password auth not desired/available. */ abstract string srpIdentifier(in string type, in string context) { return ""; } /** * Params: * type = specifies the type of operation occuring * context = specifies a context relative to type. * identifier = specifies what identifier we want the * password for. This will be a value previously returned * by srp_identifier. * Returns: password for client-side SRP auth, if available for this identifier/type/context. */ abstract string srpPassword(in string type, in string context, in string identifier) { return ""; } /** * Retrieve SRP verifier parameters */ abstract bool srpVerifier(in string type, in string context, in string identifier, ref string group_name, ref BigInt verifier, ref Vector!ubyte salt, bool generate_fake_on_unknown) { return false; } /** * Params: * type = specifies the type of operation occuring * context = specifies a context relative to type. * Returns: the PSK identity hint for this type/context */ abstract string pskIdentityHint(in string type, in string context) { return ""; } /** * Params: * type = specifies the type of operation occuring * context = specifies a context relative to type. * identity_hint = was passed by the server (but may be empty) * Returns: the PSK identity we want to use */ abstract string pskIdentity(in string type, in string context, in string identity_hint) { return ""; } /// Override and return true to signal PSK usage abstract bool hasPsk() { return false; } /// In TLSClient, identifies this machine with the server PrivateKey channelPrivateKey(string hostname) { import botan.rng.auto_rng; static ECDSAPrivateKey[string] pkey_saved; if (hostname !in pkey_saved) { auto rng = scoped!AutoSeededRNG(); pkey_saved[hostname] = ECDSAPrivateKey(rng, ECGroup("secp256r1")); } return *pkey_saved[hostname]; } /** * Params: * type = specifies the type of operation occuring * context = specifies a context relative to type. * identity = is a PSK identity previously returned by psk_identity for the same type and context. * Returns: the PSK used for identity, or throw new an exception if no * key exists */ abstract SymmetricKey psk(in string type, in string context, in string identity) { throw new InternalError("No PSK set for identity " ~ identity); } } bool certInSomeStore(const ref Vector!CertificateStore trusted_CAs, in X509Certificate trust_root) { foreach (const ref CertificateStore CAs; trusted_CAs[]) if (CAs.certificateKnown(trust_root)) return true; return false; }
D
<?xml version="1.0" encoding="ASCII" standalone="no"?> <di:SashWindowsMngr xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmi:version="2.0"> <pageList> <availablePage> <emfPageIdentifier href="VAR_8_BeT-7671375658.notation#_copSALmGEeKQQp7P9cQvNQ"/> </availablePage> </pageList> <sashModel currentSelection="//@sashModel/@windows.0/@children.0"> <windows> <children xsi:type="di:TabFolder"> <children> <emfPageIdentifier href="VAR_8_BeT-7671375658.notation#_copSALmGEeKQQp7P9cQvNQ"/> </children> </children> </windows> </sashModel> </di:SashWindowsMngr>
D
/home/feynman/rust/rustlings/exercises/clippy/target/debug/deps/clippy2-c540b8336497c22b.rmeta: clippy2.rs /home/feynman/rust/rustlings/exercises/clippy/target/debug/deps/clippy2-c540b8336497c22b.d: clippy2.rs clippy2.rs: # env-dep:CLIPPY_ARGS=-D__CLIPPY_HACKERY__warnings__CLIPPY_HACKERY__
D
/Users/Leex/TableView_Test2/Build/Intermediates.noindex/TableView_Test2.build/Debug-iphonesimulator/TableView_Test2.build/Objects-normal/x86_64/LoadingViewable.o : /Users/Leex/TableView_Test2/TableView_Test2/Common/LoadingViewable.swift /Users/Leex/TableView_Test2/TableView_Test2/AppDelegate.swift /Users/Leex/TableView_Test2/TableView_Test2/ViewModel/SectionModel.swift /Users/Leex/TableView_Test2/TableView_Test2/ViewModel/ViewModel.swift /Users/Leex/TableView_Test2/TableView_Test2/Cells/MyFirstCell.swift /Users/Leex/TableView_Test2/TableView_Test2/Common/VCTrasnsition.swift /Users/Leex/TableView_Test2/TableView_Test2/ViewController.swift /Users/Leex/TableView_Test2/TableView_Test2/DetailViewController.swift /Users/Leex/TableView_Test2/TableView_Test2/Common/Extensions.swift /Users/Leex/TableView_Test2/TableView_Test2/APIManager/APIClient.swift /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Modules/RxCocoa.swiftmodule/x86_64.swiftmodule /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/Differentiator/Differentiator.framework/Modules/Differentiator.swiftmodule/x86_64.swiftmodule /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxDataSources/RxDataSources.framework/Modules/RxDataSources.swiftmodule/x86_64.swiftmodule /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/RxSwift.swiftmodule/x86_64.swiftmodule /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxRelay/RxRelay.framework/Modules/RxRelay.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/_RX.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/RxCocoa-umbrella.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/Differentiator/Differentiator.framework/Headers/Differentiator-umbrella.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxDataSources/RxDataSources.framework/Headers/RxDataSources-umbrella.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-umbrella.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxRelay/RxRelay.framework/Headers/RxRelay-umbrella.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/RxCocoa.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/_RXObjCRuntime.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/RxCocoaRuntime.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/_RXKVOObserver.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/RxCocoa-Swift.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/Differentiator/Differentiator.framework/Headers/Differentiator-Swift.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxDataSources/RxDataSources.framework/Headers/RxDataSources-Swift.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-Swift.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxRelay/RxRelay.framework/Headers/RxRelay-Swift.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/_RXDelegateProxy.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Modules/module.modulemap /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/Differentiator/Differentiator.framework/Modules/module.modulemap /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxDataSources/RxDataSources.framework/Modules/module.modulemap /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/module.modulemap /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxRelay/RxRelay.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/Leex/TableView_Test2/Build/Intermediates.noindex/TableView_Test2.build/Debug-iphonesimulator/TableView_Test2.build/Objects-normal/x86_64/LoadingViewable~partial.swiftmodule : /Users/Leex/TableView_Test2/TableView_Test2/Common/LoadingViewable.swift /Users/Leex/TableView_Test2/TableView_Test2/AppDelegate.swift /Users/Leex/TableView_Test2/TableView_Test2/ViewModel/SectionModel.swift /Users/Leex/TableView_Test2/TableView_Test2/ViewModel/ViewModel.swift /Users/Leex/TableView_Test2/TableView_Test2/Cells/MyFirstCell.swift /Users/Leex/TableView_Test2/TableView_Test2/Common/VCTrasnsition.swift /Users/Leex/TableView_Test2/TableView_Test2/ViewController.swift /Users/Leex/TableView_Test2/TableView_Test2/DetailViewController.swift /Users/Leex/TableView_Test2/TableView_Test2/Common/Extensions.swift /Users/Leex/TableView_Test2/TableView_Test2/APIManager/APIClient.swift /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Modules/RxCocoa.swiftmodule/x86_64.swiftmodule /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/Differentiator/Differentiator.framework/Modules/Differentiator.swiftmodule/x86_64.swiftmodule /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxDataSources/RxDataSources.framework/Modules/RxDataSources.swiftmodule/x86_64.swiftmodule /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/RxSwift.swiftmodule/x86_64.swiftmodule /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxRelay/RxRelay.framework/Modules/RxRelay.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/_RX.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/RxCocoa-umbrella.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/Differentiator/Differentiator.framework/Headers/Differentiator-umbrella.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxDataSources/RxDataSources.framework/Headers/RxDataSources-umbrella.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-umbrella.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxRelay/RxRelay.framework/Headers/RxRelay-umbrella.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/RxCocoa.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/_RXObjCRuntime.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/RxCocoaRuntime.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/_RXKVOObserver.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/RxCocoa-Swift.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/Differentiator/Differentiator.framework/Headers/Differentiator-Swift.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxDataSources/RxDataSources.framework/Headers/RxDataSources-Swift.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-Swift.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxRelay/RxRelay.framework/Headers/RxRelay-Swift.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/_RXDelegateProxy.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Modules/module.modulemap /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/Differentiator/Differentiator.framework/Modules/module.modulemap /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxDataSources/RxDataSources.framework/Modules/module.modulemap /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/module.modulemap /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxRelay/RxRelay.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/Leex/TableView_Test2/Build/Intermediates.noindex/TableView_Test2.build/Debug-iphonesimulator/TableView_Test2.build/Objects-normal/x86_64/LoadingViewable~partial.swiftdoc : /Users/Leex/TableView_Test2/TableView_Test2/Common/LoadingViewable.swift /Users/Leex/TableView_Test2/TableView_Test2/AppDelegate.swift /Users/Leex/TableView_Test2/TableView_Test2/ViewModel/SectionModel.swift /Users/Leex/TableView_Test2/TableView_Test2/ViewModel/ViewModel.swift /Users/Leex/TableView_Test2/TableView_Test2/Cells/MyFirstCell.swift /Users/Leex/TableView_Test2/TableView_Test2/Common/VCTrasnsition.swift /Users/Leex/TableView_Test2/TableView_Test2/ViewController.swift /Users/Leex/TableView_Test2/TableView_Test2/DetailViewController.swift /Users/Leex/TableView_Test2/TableView_Test2/Common/Extensions.swift /Users/Leex/TableView_Test2/TableView_Test2/APIManager/APIClient.swift /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Modules/RxCocoa.swiftmodule/x86_64.swiftmodule /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/Differentiator/Differentiator.framework/Modules/Differentiator.swiftmodule/x86_64.swiftmodule /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxDataSources/RxDataSources.framework/Modules/RxDataSources.swiftmodule/x86_64.swiftmodule /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/RxSwift.swiftmodule/x86_64.swiftmodule /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxRelay/RxRelay.framework/Modules/RxRelay.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/_RX.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/RxCocoa-umbrella.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/Differentiator/Differentiator.framework/Headers/Differentiator-umbrella.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxDataSources/RxDataSources.framework/Headers/RxDataSources-umbrella.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-umbrella.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxRelay/RxRelay.framework/Headers/RxRelay-umbrella.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/RxCocoa.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/_RXObjCRuntime.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/RxCocoaRuntime.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/_RXKVOObserver.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/RxCocoa-Swift.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/Differentiator/Differentiator.framework/Headers/Differentiator-Swift.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxDataSources/RxDataSources.framework/Headers/RxDataSources-Swift.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-Swift.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxRelay/RxRelay.framework/Headers/RxRelay-Swift.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Headers/_RXDelegateProxy.h /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxCocoa/RxCocoa.framework/Modules/module.modulemap /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/Differentiator/Differentiator.framework/Modules/module.modulemap /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxDataSources/RxDataSources.framework/Modules/module.modulemap /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/module.modulemap /Users/Leex/TableView_Test2/Build/Products/Debug-iphonesimulator/RxRelay/RxRelay.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
module CPUblit.drawing.common; version(unittest) { import std.stdio; public import CPUblit.composing.common : fillWithSingleValue; void printMatrix(T)(T[] matrix, size_t width) { const size_t height = matrix.length / width; for (int y ; y < height ; y++) { for (int x ; x < width ; x++) { write(matrix[x + y * width]); } writeln(); } } }
D
/** Generator for project files Copyright: © 2012-2013 Matthias Dondorff License: Subject to the terms of the MIT license, as written in the included LICENSE.txt file. Authors: Matthias Dondorff */ module dub.generators.generator; import dub.compilers.compiler; import dub.generators.build; import dub.generators.visuald; import dub.internal.vibecompat.core.file; import dub.internal.vibecompat.core.log; import dub.internal.vibecompat.inet.path; import dub.package_; import dub.packagemanager; import dub.project; import std.algorithm : map, filter, canFind, balancedParens; import std.array : array; import std.array; import std.exception; import std.file; import std.string; /** Common interface for project generators/builders. */ class ProjectGenerator { /** Information about a single binary target. A binary target can either be an executable or a static/dynamic library. It consists of one or more packages. */ struct TargetInfo { /// The root package of this target Package pack; /// All packages compiled into this target Package[] packages; /// The configuration used for building the root package string config; /** Build settings used to build the target. The build settings include all sources of all contained packages. Depending on the specific generator implementation, it may be necessary to add any static or dynamic libraries generated for child targets ($(D linkDependencies)). */ BuildSettings buildSettings; /** List of all dependencies. This list includes dependencies that are not the root of a binary target. */ string[] dependencies; /** List of all binary dependencies. This list includes all dependencies that are the root of a binary target. */ string[] linkDependencies; } protected { Project m_project; } this(Project project) { m_project = project; } /** Performs the full generator process. */ final void generate(GeneratorSettings settings) { if (!settings.config.length) settings.config = m_project.getDefaultConfiguration(settings.platform); TargetInfo[string] targets; string[string] configs = m_project.getPackageConfigs(settings.platform, settings.config); foreach (pack; m_project.getTopologicalPackageList(true, null, configs)) { BuildSettings buildsettings; buildsettings.processVars(m_project, pack, pack.getBuildSettings(settings.platform, configs[pack.name]), true); prepareGeneration(pack.name, buildsettings); } string[] mainfiles; collect(settings, m_project.rootPackage, targets, configs, mainfiles, null); downwardsInheritSettings(m_project.rootPackage.name, targets, targets[m_project.rootPackage.name].buildSettings); auto bs = &targets[m_project.rootPackage.name].buildSettings; if (bs.targetType == TargetType.executable) bs.addSourceFiles(mainfiles); generateTargets(settings, targets); foreach (pack; m_project.getTopologicalPackageList(true, null, configs)) { BuildSettings buildsettings; buildsettings.processVars(m_project, pack, pack.getBuildSettings(settings.platform, configs[pack.name]), true); bool generate_binary = !(buildsettings.options & BuildOptions.syntaxOnly); finalizeGeneration(pack.name, buildsettings, pack.path, Path(bs.targetPath), generate_binary); } performPostGenerateActions(settings, targets); } /** Overridden in derived classes to implement the actual generator functionality. The function should go through all targets recursively. The first target (which is guaranteed to be there) is $(D targets[m_project.rootPackage.name]). The recursive descent is then done using the $(D TargetInfo.linkDependencies) list. This method is also potentially responsible for running the pre and post build commands, while pre and post generate commands are already taken care of by the $(D generate) method. Params: settings = The generator settings used for this run targets = A map from package name to TargetInfo that contains all binary targets to be built. */ protected abstract void generateTargets(GeneratorSettings settings, in TargetInfo[string] targets); /** Overridable method to be invoked after the generator process has finished. An examples of functionality placed here is to run the application that has just been built. */ protected void performPostGenerateActions(GeneratorSettings settings, in TargetInfo[string] targets) {} private BuildSettings collect(GeneratorSettings settings, Package pack, ref TargetInfo[string] targets, in string[string] configs, ref string[] main_files, string bin_pack) { if (auto pt = pack.name in targets) return pt.buildSettings; // determine the actual target type auto shallowbs = pack.getBuildSettings(settings.platform, configs[pack.name]); TargetType tt = shallowbs.targetType; if (pack is m_project.rootPackage) { if (tt == TargetType.autodetect || tt == TargetType.library) tt = TargetType.staticLibrary; } else { if (tt == TargetType.autodetect || tt == TargetType.library) tt = settings.combined ? TargetType.sourceLibrary : TargetType.staticLibrary; else if (tt == TargetType.dynamicLibrary) { logWarn("Dynamic libraries are not yet supported as dependencies - building as static library."); tt = TargetType.staticLibrary; } } if (tt != TargetType.none && tt != TargetType.sourceLibrary && shallowbs.sourceFiles.empty) { logWarn(`Configuration '%s' of package %s contains no source files. Please add {"targetType": "none"} to it's package description to avoid building it.`, configs[pack.name], pack.name); tt = TargetType.none; } shallowbs.targetType = tt; bool generates_binary = tt != TargetType.sourceLibrary && tt != TargetType.none; enforce (generates_binary || pack !is m_project.rootPackage, format("Main package must have a binary target type, not %s. Cannot build.", tt)); if (tt == TargetType.none) { // ignore any build settings for targetType none (only dependencies will be processed) shallowbs = BuildSettings.init; } // start to build up the build settings BuildSettings buildsettings; if (generates_binary) buildsettings = settings.buildSettings.dup; processVars(buildsettings, m_project, pack, shallowbs, true); // remove any mainSourceFile from library builds if (buildsettings.targetType != TargetType.executable && buildsettings.mainSourceFile.length) { buildsettings.sourceFiles = buildsettings.sourceFiles.filter!(f => f != buildsettings.mainSourceFile)().array; main_files ~= buildsettings.mainSourceFile; } logDiagnostic("Generate target %s (%s %s %s)", pack.name, buildsettings.targetType, buildsettings.targetPath, buildsettings.targetName); if (generates_binary) targets[pack.name] = TargetInfo(pack, [pack], configs[pack.name], buildsettings, null); foreach (depname, depspec; pack.dependencies) { if (!pack.hasDependency(depname, configs[pack.name])) continue; auto dep = m_project.getDependency(depname, depspec.optional); if (!dep) continue; auto depbs = collect(settings, dep, targets, configs, main_files, generates_binary ? pack.name : bin_pack); if (depbs.targetType != TargetType.sourceLibrary && depbs.targetType != TargetType.none) { // add a reference to the target binary and remove all source files in the dependency build settings depbs.sourceFiles = depbs.sourceFiles.filter!(f => f.isLinkerFile()).array; depbs.importFiles = null; } buildsettings.add(depbs); auto pt = (generates_binary ? pack.name : bin_pack) in targets; assert(pt !is null); if (auto pdt = depname in targets) { pt.dependencies ~= depname; pt.linkDependencies ~= depname; if (depbs.targetType == TargetType.staticLibrary) pt.linkDependencies = pt.linkDependencies.filter!(d => !pdt.linkDependencies.canFind(d)).array ~ pdt.linkDependencies; } else pt.packages ~= dep; } if (generates_binary) { // add build type settings and convert plain DFLAGS to build options m_project.addBuildTypeSettings(buildsettings, settings.platform, settings.buildType); settings.compiler.extractBuildOptions(buildsettings); enforceBuildRequirements(buildsettings); targets[pack.name].buildSettings = buildsettings.dup; } return buildsettings; } private string[] downwardsInheritSettings(string target, TargetInfo[string] targets, in BuildSettings root_settings) { auto ti = &targets[target]; ti.buildSettings.addVersions(root_settings.versions); ti.buildSettings.addDebugVersions(root_settings.debugVersions); ti.buildSettings.addOptions(root_settings.options); // special support for overriding string imports in parent packages // this is a candidate for deprecation, once an alternative approach // has been found if (ti.buildSettings.stringImportPaths.length) ti.buildSettings.prependStringImportPaths(root_settings.stringImportPaths); string[] packs = ti.packages.map!(p => p.name).array; foreach (d; ti.dependencies) packs ~= downwardsInheritSettings(d, targets, root_settings); logDebug("%s: %s", target, packs); // Add Have_* versions *after* downwards inheritance, so that dependencies // are build independently of the parent packages w.r.t the other parent // dependencies. This enables sharing of the same package build for // multiple dependees. ti.buildSettings.addVersions(packs.map!(pn => "Have_" ~ stripDlangSpecialChars(pn)).array); return packs; } } struct GeneratorSettings { BuildPlatform platform; Compiler compiler; string config; string buildType; BuildSettings buildSettings; BuildMode buildMode = BuildMode.separate; bool combined; // compile all in one go instead of each dependency separately // only used for generator "build" bool run, force, direct, clean, rdmd, tempBuild; string[] runArgs; void delegate(int status, string output) compileCallback; void delegate(int status, string output) linkCallback; void delegate(int status, string output) runCallback; } /** Determines the mode in which the compiler and linker are invoked. */ enum BuildMode { separate, /// Compile and link separately allAtOnce, /// Perform compile and link with a single compiler invocation singleFile, /// Compile each file separately //multipleObjects, /// Generate an object file per module //multipleObjectsPerModule, /// Use the -multiobj switch to generate multiple object files per module //compileOnly /// Do not invoke the linker (can be done using a post build command) } /** Creates a project generator of the given type for the specified project. */ ProjectGenerator createProjectGenerator(string generator_type, Project project) { assert(project !is null, "Project instance needed to create a generator."); generator_type = generator_type.toLower(); switch(generator_type) { default: throw new Exception("Unknown project generator: "~generator_type); case "build": logDebug("Creating build generator."); return new BuildGenerator(project); case "mono-d": throw new Exception("The Mono-D generator has been removed. Use Mono-D's built in DUB support instead."); case "visuald": logDebug("Creating VisualD generator."); return new VisualDGenerator(project); } } /** Runs pre-build commands and performs other required setup before project files are generated. */ private void prepareGeneration(string pack, in BuildSettings buildsettings) { if( buildsettings.preGenerateCommands.length ){ logInfo("Running pre-generate commands for %s...", pack); runBuildCommands(buildsettings.preGenerateCommands, buildsettings); } } /** Runs post-build commands and copies required files to the binary directory. */ private void finalizeGeneration(string pack, in BuildSettings buildsettings, Path pack_path, Path target_path, bool generate_binary) { if (buildsettings.postGenerateCommands.length) { logInfo("Running post-generate commands for %s...", pack); runBuildCommands(buildsettings.postGenerateCommands, buildsettings); } if (generate_binary) { if (!exists(buildsettings.targetPath)) mkdirRecurse(buildsettings.targetPath); if (buildsettings.copyFiles.length) { void tryCopyFile(string file) { auto src = Path(file); if (!src.absolute) src = pack_path ~ src; auto dst = target_path ~ Path(file).head; if (src == dst) { logDiagnostic("Skipping copy of %s (same source and destination)", file); return; } logDiagnostic(" %s to %s", src.toNativeString(), dst.toNativeString()); try { copyFile(src, dst, true); } catch(Exception e) logWarn("Failed to copy %s to %s: %s", src.toNativeString(), dst.toNativeString(), e.msg); } logInfo("Copying files for %s...", pack); string[] globs; foreach (f; buildsettings.copyFiles) { if (f.canFind("*", "?") || (f.canFind("{") && f.balancedParens('{', '}')) || (f.canFind("[") && f.balancedParens('[', ']'))) { globs ~= f; } else { tryCopyFile(f); } } if (globs.length) // Search all files for glob matches { foreach (f; dirEntries(pack_path.toNativeString(), SpanMode.breadth)) { foreach (glob; globs) { if (f.globMatch(glob)) { tryCopyFile(f); break; } } } } } } } void runBuildCommands(in string[] commands, in BuildSettings build_settings) { import std.process; import dub.internal.utils; string[string] env = environment.toAA(); // TODO: do more elaborate things here // TODO: escape/quote individual items appropriately env["DFLAGS"] = join(cast(string[])build_settings.dflags, " "); env["LFLAGS"] = join(cast(string[])build_settings.lflags," "); env["VERSIONS"] = join(cast(string[])build_settings.versions," "); env["LIBS"] = join(cast(string[])build_settings.libs," "); env["IMPORT_PATHS"] = join(cast(string[])build_settings.importPaths," "); env["STRING_IMPORT_PATHS"] = join(cast(string[])build_settings.stringImportPaths," "); runCommands(commands, env); }
D
D [0, 54]["void", "main", "int", "i", "=", "a"] +-D.Module [0, 54]["void", "main", "int", "i", "=", "a"] +-D.DeclDefs [0, 54]["void", "main", "int", "i", "=", "a"] +-D.DeclDef [24, 54]["void", "main", "int", "i", "=", "a"] +-D.Declaration [24, 54]["void", "main", "int", "i", "=", "a"] +-D.Decl [24, 54]["void", "main", "int", "i", "=", "a"] +-D.basicFunction [24, 54]["void", "main", "int", "i", "=", "a"] +-D.BasicType [24, 29]["void"] | +-D.BasicTypeX [24, 28]["void"] +-D.Declarator [29, 36]["main"] | +-D.Identifier [29, 33]["main"] +-D.FunctionBody [36, 54]["int", "i", "=", "a"] +-D.BlockStatement [36, 54]["int", "i", "=", "a"] +-D.StatementList [39, 52]["int", "i", "=", "a"] +-D.Statement [39, 52]["int", "i", "=", "a"] +-D.NonEmptyStatement [39, 52]["int", "i", "=", "a"] +-D.NonEmptyStatementNoCaseNoDefault [39, 52]["int", "i", "=", "a"] +-D.DeclarationStatement [39, 52]["int", "i", "=", "a"] +-D.Declaration [39, 52]["int", "i", "=", "a"] +-D.Decl [39, 52]["int", "i", "=", "a"] +-D.BasicType [39, 43]["int"] | +-D.BasicTypeX [39, 42]["int"] +-D.Declarators [43, 50]["i", "=", "a"] +-D.DeclaratorInitializer [43, 50]["i", "=", "a"] +-D.Declarator [43, 45]["i"] | +-D.Identifier [43, 45]["i"] +-D.Initializer [47, 50]["a"] +-D.NonVoidInitializer [47, 50]["a"] +-D.AssignExpression [47, 50]["a"] +-D.ConditionalExpression [47, 50]["a"] +-D.OrOrExpression [47, 50]["a"] +-D.AndAndExpression [47, 50]["a"] +-D.OrExpression [47, 50]["a"] +-D.XorExpression [47, 50]["a"] +-D.AndExpression [47, 50]["a"] +-D.ShiftExpression [47, 50]["a"] +-D.AddExpression [47, 50]["a"] +-D.MulExpression [47, 50]["a"] +-D.UnaryExpression [47, 50]["a"] +-D.PowExpression [47, 50]["a"] +-D.PostfixExpression [47, 50]["a"] +-D.PrimaryExpression [47, 50]["a"] +-D.IntegerLiteral [47, 50]["a"] +-D.Integer [47, 50]["a"] +-D.HexadecimalInteger [47, 50]["a"]
D
extern (C): enum FOO = 0; enum FOOBAR = 1; enum FOOBARBAZ = 2; enum FOOSTR = "foo"; enum FOOBARSTR = "foobar"; enum FOOBARBAZSTR = "foobarbaz";
D
// Hello World in D import std.stdio; void main() { writefln("Hello World!"); }
D
/root/Documents/Github/Rust/Mouse-and-Key/target/debug/deps/adler32-a46835df0b16be6f.rmeta: /root/.cargo/registry/src/github.com-1ecc6299db9ec823/adler32-1.0.3/src/lib.rs /root/Documents/Github/Rust/Mouse-and-Key/target/debug/deps/adler32-a46835df0b16be6f.d: /root/.cargo/registry/src/github.com-1ecc6299db9ec823/adler32-1.0.3/src/lib.rs /root/.cargo/registry/src/github.com-1ecc6299db9ec823/adler32-1.0.3/src/lib.rs:
D
module UnrealScript.Engine.DrawCylinderComponent; import ScriptClasses; import UnrealScript.Helpers; import UnrealScript.Core.UObject; import UnrealScript.Engine.PrimitiveComponent; import UnrealScript.Engine.Material; extern(C++) interface DrawCylinderComponent : PrimitiveComponent { public extern(D): private static __gshared ScriptClass mStaticClass; @property final static ScriptClass StaticClass() { mixin(MGSCC("Class Engine.DrawCylinderComponent")); } private static __gshared DrawCylinderComponent mDefaultProperties; @property final static DrawCylinderComponent DefaultProperties() { mixin(MGDPC("DrawCylinderComponent", "DrawCylinderComponent Engine.Default__DrawCylinderComponent")); } @property final { auto ref { int CylinderSides() { mixin(MGPC("int", 512)); } float CylinderHeightOffset() { mixin(MGPC("float", 508)); } float CylinderHeight() { mixin(MGPC("float", 504)); } float CylinderTopRadius() { mixin(MGPC("float", 500)); } float CylinderRadius() { mixin(MGPC("float", 496)); } Material CylinderMaterial() { mixin(MGPC("Material", 492)); } UObject.Color CylinderColor() { mixin(MGPC("UObject.Color", 488)); } } bool bDrawOnlyIfSelected() { mixin(MGBPC(516, 0x4)); } bool bDrawOnlyIfSelected(bool val) { mixin(MSBPC(516, 0x4)); } bool bDrawLitCylinder() { mixin(MGBPC(516, 0x2)); } bool bDrawLitCylinder(bool val) { mixin(MSBPC(516, 0x2)); } bool bDrawWireCylinder() { mixin(MGBPC(516, 0x1)); } bool bDrawWireCylinder(bool val) { mixin(MSBPC(516, 0x1)); } } }
D
512 sergei_eisenstein 1 edwin_s_porter 643 josef_von_sternberg 132 daniel_bressanutti 135 fritz_lang 782 georg_wilhelm_pabst 15 dw_griffith 274 dorothy_arzner 148 herbert_blache 260 john_s_robertson 796 dziga_verto 542 rupert_julian 800 luis_bunuel 673 ja_howe 166 robert_wiene 681 paul_leni 455 alfred_hitchcock 690 walt_disney 563 clyde_bruckman 312 benjamin_christensen 187 carl_boese 705 1051480-david_sutherland 325 robert_flaherty 583 bonnie_hill 714 carl_theodor_dreyer 591 george_fitzmaurice 602 albert_parker 655 walter_ruttmann 348 fred_c_newmeyer 734 edward_m_sedgwick 223 fw_murnau 100 charlie_chaplin 806 robert_florey 361 buster-keaton-jr 749 _0064600 775 james_w_horne 119 yakov_protazanov
D
PLONG PLAT ED95 KD LOMAGAGE HIMAGAGE SLAT SLONG RESULTNO DP DM WT ROCKTYPE 256.399994 77.0999985 13 0 2 56 46 -112 3368 21.7000008 21.7000008 0.416666667 extrusives, intrusives 93.4000015 81.1999969 12.3000002 61 26 36 29.2999992 -103.300003 3078 7.0999999 12.1000004 0.942083333 extrusives, basalts, andesites 149 66 5 77.5 27 30 39.7999992 -105.800003 6886 5.5999999 5.5999999 0.896 intrusives
D
/** * Copyright: Copyright (c) 2011 Jacob Carlborg. All rights reserved. * Authors: Jacob Carlborg * Version: Initial created: Apr 26, 2011 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) */ module orbit.orb.commands.Build; import mambo.core._; import orbit.dsl.Specification; import Path = orbit.io.Path; import orbit.orbit.Archiver; import orbit.orbit.Orb; import orbit.orb.Command; class Build : Command { private string orbspecPath_; this () { super("build", "Build an orb from an orbspec"); } override void execute () { auto currentWorkingDirectory = Path.workingDirectory; Path.workingDirectory = workingDirectory; auto spec = Specification.load(orbspecPath); scope archiver = new Archiver(spec, output); archiver.archive; Path.workingDirectory = currentWorkingDirectory; } protected override void setupArguments () { arguments.output.aliased('o').params(1).defaults(&defaultOutput).help("The name of the output file."); } private: string orbspecPath () { if (orbspecPath_) return orbspecPath_; auto path = Path.toAbsolute(arguments.first); return orbspecPath_ = Path.setExtension(path, Specification.extension); } string defaultOutput () { return cast(string)Path.parse(cast(char[])orbspecPath).name; } string output () { auto path = Path.toAbsolute(arguments.output); return cast(string)Path.setExtension(path, Orb.extension); } string workingDirectory () { return cast(string)Path.parse(cast(char[])orbspecPath).folder; } }
D
# FIXED uartstdio.obj: C:/ti/TivaWare_C_Series-2.1.4.178/utils/uartstdio.c uartstdio.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/stdbool.h uartstdio.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/stdint.h uartstdio.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/_stdint40.h uartstdio.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/sys/stdint.h uartstdio.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/sys/cdefs.h uartstdio.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/sys/_types.h uartstdio.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/machine/_types.h uartstdio.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/machine/_stdint.h uartstdio.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/sys/_stdint.h uartstdio.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/stdarg.h uartstdio.obj: C:/ti/TivaWare_C_Series-2.1.4.178/inc/hw_ints.h uartstdio.obj: C:/ti/TivaWare_C_Series-2.1.4.178/inc/hw_memmap.h uartstdio.obj: C:/ti/TivaWare_C_Series-2.1.4.178/inc/hw_types.h uartstdio.obj: C:/ti/TivaWare_C_Series-2.1.4.178/inc/hw_uart.h uartstdio.obj: C:/ti/TivaWare_C_Series-2.1.4.178/driverlib/debug.h uartstdio.obj: C:/ti/TivaWare_C_Series-2.1.4.178/driverlib/interrupt.h uartstdio.obj: C:/ti/TivaWare_C_Series-2.1.4.178/driverlib/rom.h uartstdio.obj: C:/ti/TivaWare_C_Series-2.1.4.178/driverlib/rom_map.h uartstdio.obj: C:/ti/TivaWare_C_Series-2.1.4.178/driverlib/sysctl.h uartstdio.obj: C:/ti/TivaWare_C_Series-2.1.4.178/driverlib/uart.h uartstdio.obj: C:/ti/TivaWare_C_Series-2.1.4.178/utils/uartstdio.h C:/ti/TivaWare_C_Series-2.1.4.178/utils/uartstdio.c: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/stdbool.h: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/stdint.h: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/_stdint40.h: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/sys/stdint.h: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/sys/cdefs.h: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/sys/_types.h: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/machine/_types.h: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/machine/_stdint.h: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/sys/_stdint.h: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/stdarg.h: C:/ti/TivaWare_C_Series-2.1.4.178/inc/hw_ints.h: C:/ti/TivaWare_C_Series-2.1.4.178/inc/hw_memmap.h: C:/ti/TivaWare_C_Series-2.1.4.178/inc/hw_types.h: C:/ti/TivaWare_C_Series-2.1.4.178/inc/hw_uart.h: C:/ti/TivaWare_C_Series-2.1.4.178/driverlib/debug.h: C:/ti/TivaWare_C_Series-2.1.4.178/driverlib/interrupt.h: C:/ti/TivaWare_C_Series-2.1.4.178/driverlib/rom.h: C:/ti/TivaWare_C_Series-2.1.4.178/driverlib/rom_map.h: C:/ti/TivaWare_C_Series-2.1.4.178/driverlib/sysctl.h: C:/ti/TivaWare_C_Series-2.1.4.178/driverlib/uart.h: C:/ti/TivaWare_C_Series-2.1.4.178/utils/uartstdio.h:
D
/* * $Id: displaylist.d,v 1.1.1.1 2005/06/18 00:46:00 kenta Exp $ * * Copyright 2005 Kenta Cho. Some rights reserved. */ module abagames.util.sdl.displaylist; private import opengl; private import abagames.util.sdl.sdlexception; /** * Manage a display list. */ public class DisplayList { private: bool registered; int num; int idx; int enumIdx; public this(int num) { this.num = num; idx = glGenLists(num); } public void beginNewList() { resetList(); newList(); } public void nextNewList() { glEndList(); enumIdx++; if (enumIdx >= idx + num || enumIdx < idx) throw new SDLException("Can't create new list. Index out of bound."); glNewList(enumIdx, GL_COMPILE); } public void endNewList() { glEndList(); registered = true; } public void resetList() { enumIdx = idx; } public void newList() { glNewList(enumIdx, GL_COMPILE); } public void endList() { glEndList(); enumIdx++; registered = true; } public void call(int i = 0) { glCallList(idx + i); } public void close() { if (!registered) return; glDeleteLists(idx, num); } }
D
module ppl.Operator; import ppl.internal; Operator parseOperator(Tokens t) { /// '>' is tokenised to separate tokens to ease parsing of nested parameterised templates. /// Account for this here: if(t.type==TT.RANGLE) { if(t.peek(1).type==TT.RANGLE) { if(t.peek(2).type==TT.RANGLE) { t.next(2); return Operator.USHR; } t.next; return Operator.SHR; } } if(t.type==TT.LSQBRACKET) { if(t.peek(1).type==TT.RSQBRACKET) { t.next; return Operator.INDEX; } } auto p = t.type in g_ttToOperator; if(p) return *p; switch(t.value) { case "and": return Operator.BOOL_AND; case "or": return Operator.BOOL_OR; case "neg": return Operator.NEG; default: break; } return Operator.NOTHING; } struct Op { int id; int priority; string value; } enum Operator : Op { NOTHING = Op(0, 0,null), /// Dot = 2 /// Index = 2 INDEX = Op(1, 2, "[]"), /// Call = 2 /// BuiltinFunc = 2 /// As = 3 NEG = Op(2, 5, "neg"), BIT_NOT = Op(3, 5, "~"), BOOL_NOT = Op(4, 5, "not"), /// & addressof = 3 /// * valueof = 3 DIV = Op(5, 6, "/"), MUL = Op(6, 6, "*"), MOD = Op(7, 6, "%"), UDIV = Op(8, 6, "%"), UMOD = Op(9, 6, "%"), ADD = Op(10, 7, "+"), SUB = Op(11, 7, "-"), SHL = Op(12, 7, "<<"), SHR = Op(13, 7, ">>"), USHR = Op(14, 7, ">>>"), BIT_AND = Op(15, 7, "&"), BIT_XOR = Op(16, 7, "^"), BIT_OR = Op(17, 7, "|"), LT = Op(18, 9, "<"), GT = Op(19, 9, ">"), LTE = Op(20, 9, "<="), GTE = Op(21, 9, ">="), ULT = Op(22, 9, "u<"), UGT = Op(23, 9, "u>"), ULTE = Op(24, 9, "u<="), UGTE = Op(25, 9, "u>="), BOOL_EQ = Op(26, 9, "=="), BOOL_NE = Op(27, 9, "!="), /// Is = 9 BOOL_AND = Op(28, 11, "and"), BOOL_OR = Op(29, 11, "or"), /// assignments below here ADD_ASSIGN = Op(30, 14, "+="), SUB_ASSIGN = Op(31, 14, "-="), MUL_ASSIGN = Op(32, 14, "*="), DIV_ASSIGN = Op(33, 14, "/="), MOD_ASSIGN = Op(34, 14, "%="), BIT_AND_ASSIGN = Op(35, 14, "&="), BIT_XOR_ASSIGN = Op(36, 14, "^="), BIT_OR_ASSIGN = Op(37, 14, "|="), SHL_ASSIGN = Op(38, 14, "<<="), SHR_ASSIGN = Op(39, 14, ">>="), USHR_ASSIGN = Op(40, 14, ">>>="), ASSIGN = Op(41, 14, "="), REASSIGN = Op(42, 14, ":=") /// Calloc = 15 /// Lambda = 15 /// Composite = 15 /// Constructor = 15 /// Identifier = 15 /// If = 15 /// Initialiser = 15 /// Literals = 15 /// ModuleAlias = 15 /// Parenthesis = 15 /// Select = 15 /// TypeExpr = 15 } //=========================================================================== Operator removeAssign(Operator o) { switch(o.id) with(Operator) { case ADD_ASSIGN.id: return ADD; case SUB_ASSIGN.id: return SUB; case MUL_ASSIGN.id: return MUL; case DIV_ASSIGN.id: return DIV; case MOD_ASSIGN.id: return MOD; case BIT_AND_ASSIGN.id: return BIT_AND; case BIT_XOR_ASSIGN.id: return BIT_XOR; case BIT_OR_ASSIGN.id: return BIT_OR; case SHL_ASSIGN.id: return SHL; case SHR_ASSIGN.id: return SHR; case USHR_ASSIGN.id: return USHR; default: assert(false, "not an assign operator %s".format(o)); } } bool isAssign(Operator o) { return o.id >= Operator.ADD_ASSIGN.id && o.id <= Operator.REASSIGN.id; } bool isBool(Operator o) { switch(o.id) with(Operator) { case BOOL_AND.id: case BOOL_OR.id: case BOOL_NOT.id: case BOOL_EQ.id: case BOOL_NE.id: case LT.id: case GT.id: case LTE.id: case GTE.id: case ULT.id: case UGT.id: case ULTE.id: case UGTE.id: return true; default: return false; } } Operator switchLeftRightBool(Operator o) { switch(o.id) with(Operator) { case BOOL_EQ.id: return BOOL_EQ; case BOOL_NE.id: return BOOL_NE; case LT.id: return GTE; case GT.id: return LTE; case LTE.id: return GT; case GTE.id: return LT; case ULT.id: return UGTE; case UGT.id: return ULTE; case ULTE.id: return UGT; case UGTE.id: return ULT; default: assert(false, "not a bool"); } } bool isUnary(Operator o) { switch(o.id) with(Operator) { case NEG.id: case BIT_NOT.id: case BOOL_NOT.id: return true; default: return false; } } bool isCommutative(Operator o) { switch(o.id) with(Operator) { case ADD.id: case MUL.id: case BIT_AND.id: case BIT_OR.id: case BIT_XOR.id: return true; default: return false; } } bool isOverloadable(Operator o) { switch(o.id) with(Operator) { case BOOL_EQ.id: /// == case BOOL_NE.id: /// != case INDEX.id: /// [] return true; default: return false; } } // bool isComparison(Operator o) { // switch(o.id) with(Operator) { // case LT.id: // case LTE.id: // case GT.id: // case GTE.id: // case BOOL_EQ.id: // case BOOL_NE.id: // return true; // default: // return false; // } // } bool isPtrArithmetic(Operator o) { switch(o.id) with(Operator) { case ADD.id: case SUB.id: case ADD_ASSIGN.id: case SUB_ASSIGN.id: return true; default: return false; } }
D
instance DIA_Milten_DI_EXIT(C_Info) { npc = PC_Mage_DI; nr = 999; condition = DIA_Milten_DI_EXIT_Condition; information = DIA_Milten_DI_EXIT_Info; permanent = TRUE; description = Dialog_Ende; }; func int DIA_Milten_DI_EXIT_Condition() { return TRUE; }; func void DIA_Milten_DI_EXIT_Info() { AI_StopProcessInfos(self); }; instance DIA_Milten_DI_Hello(C_Info) { npc = PC_Mage_DI; nr = 3; condition = DIA_Milten_DI_Hello_Condition; information = DIA_Milten_DI_Hello_Info; description = "Прямо как в старые времена."; }; func int DIA_Milten_DI_Hello_Condition() { if(UndeadDragonIsDead == FALSE) { return TRUE; }; }; func void DIA_Milten_DI_Hello_Info() { AI_Output(other,self,"DIA_Milten_DI_Hello_15_00"); //Прямо как в старые времена. AI_Output(self,other,"DIA_Milten_DI_Hello_03_01"); //Ты сам сказал это. Мне даже интересно, сможешь ли ты выкарабкаться на этот раз. AI_Output(other,self,"DIA_Milten_DI_Hello_15_02"); //Ты о чем? AI_Output(self,other,"DIA_Milten_DI_Hello_03_03"); //Удастся ли тебе спасти свою задницу, когда на тебя опять обрушится весь этот ад. }; instance DIA_Milten_DI_TRADE(C_Info) { npc = PC_Mage_DI; nr = 12; condition = DIA_Milten_DI_TRADE_Condition; information = DIA_Milten_DI_TRADE_Info; permanent = TRUE; trade = TRUE; description = "Есть несколько лишних зелий?"; }; func int DIA_Milten_DI_TRADE_Condition() { if((UndeadDragonIsDead == FALSE) && Npc_KnowsInfo(other,DIA_Milten_DI_Hello)) { return TRUE; }; }; func void DIA_Milten_DI_TRADE_Info() { if(C_BodyStateContains(self,BS_SIT)) { AI_Standup(self); AI_TurnToNPC(self,other); }; AI_Output(other,self,"DIA_Milten_DI_TRADE_15_00"); //Есть несколько лишних зелий? if(Npc_HasItems(self,itpo_anpois) != 3) { Npc_RemoveInvItems(self,itpo_anpois,Npc_HasItems(self,itpo_anpois)); CreateInvItems(self,itpo_anpois,3); }; B_GiveTradeInv(self); Npc_RemoveInvItems(self,ItPo_Health_02,Npc_HasItems(self,ItPo_Health_02)); CreateInvItems(self,ItPo_Health_02,15); Npc_RemoveInvItems(self,ItPo_Mana_02,Npc_HasItems(self,ItPo_Mana_02)); CreateInvItems(self,ItPo_Mana_02,15); CreateInvItems(self,ItMi_Flask,3); AI_Output(self,other,"DIA_Milten_DI_TRADE_03_01"); //Пока запас достаточный. }; instance DIA_Milten_DI_Rat(C_Info) { npc = PC_Mage_DI; nr = 3; condition = DIA_Milten_DI_Rat_Condition; information = DIA_Milten_DI_Rat_Info; description = "Какой совет ты можешь дать мне?"; }; func int DIA_Milten_DI_Rat_Condition() { if(Npc_KnowsInfo(other,DIA_Milten_DI_Hello) && (UndeadDragonIsDead == FALSE)) { return TRUE; }; }; func void DIA_Milten_DI_Rat_Info() { AI_Output(other,self,"DIA_Milten_DI_Rat_15_00"); //Можешь дать мне какой-нибудь совет? AI_Output(self,other,"DIA_Milten_DI_Rat_03_01"); //Ммм. Это большая честь, что ты спрашиваешь у меня совета. Но у меня в голове все это время вертится только одно. AI_Output(self,other,"DIA_Milten_DI_Rat_03_02"); //У тебя есть Глаз Инноса? Info_ClearChoices(DIA_Milten_DI_Rat); if(SC_InnosEyeVergessen_DI == TRUE) { Info_AddChoice(DIA_Milten_DI_Rat,"Нет.",DIA_Milten_DI_Rat_nein); } else { Info_AddChoice(DIA_Milten_DI_Rat,"Конечно.",DIA_Milten_DI_Rat_ja); }; }; func void DIA_Milten_DI_Rat_nein() { AI_Output(other,self,"DIA_Milten_DI_Rat_nein_15_00"); //Нет. AI_Output(self,other,"DIA_Milten_DI_Rat_nein_03_01"); //(возмущенно) Ты такой...Что ты будешь делать, если ты встретишься с драконами здесь, на острове? AI_Output(self,other,"DIA_Milten_DI_Rat_nein_03_02"); //Ты так и не поумнел? Здесь у нас есть даже алхимический стол, мы могли бы спокойно перезарядить Глаз. AI_Output(self,other,"DIA_Milten_DI_Rat_nein_03_03"); //А ты о чем думаешь? Мне остается только надеяться, что твоя непредусмотрительность не будет стоить нам жизней. Info_ClearChoices(DIA_Milten_DI_Rat); }; func void DIA_Milten_DI_Rat_ja() { AI_Output(other,self,"DIA_Milten_DI_Rat_ja_15_00"); //Конечно. AI_Output(self,other,"DIA_Milten_DI_Rat_ja_03_01"); //Извини, что я задаю такой глупый вопрос. Я немного нервничаю. B_GivePlayerXP(XP_Ambient); Info_ClearChoices(DIA_Milten_DI_Rat); }; instance DIA_Milten_DI_PEDROTOT(C_Info) { npc = PC_Mage_DI; nr = 3; condition = DIA_Milten_DI_PEDROTOT_Condition; information = DIA_Milten_DI_PEDROTOT_Info; description = "Я нашел Педро."; }; func int DIA_Milten_DI_PEDROTOT_Condition() { if(Npc_KnowsInfo(other,DIA_Pedro_DI_YOU)) { return TRUE; }; }; func void DIA_Milten_DI_PEDROTOT_Info() { B_GivePlayerXP(XP_Ambient); AI_Output(other,self,"DIA_Milten_DI_PEDROTOT_15_00"); //Я нашел Педро. AI_Output(self,other,"DIA_Milten_DI_PEDROTOT_03_01"); //Что?! Где?!...(пораженно) Здесь на острове? Проклятие, это действительно невероятно. AI_Output(self,other,"DIA_Milten_DI_PEDROTOT_03_02"); //Теперь я не буду считать его таким идиотом. if(Npc_IsDead(Pedro_DI)) { AI_Output(other,self,"DIA_Milten_DI_PEDROTOT_15_03"); //Он мертв. AI_Output(self,other,"DIA_Milten_DI_PEDROTOT_03_04"); //Да? Хорошо. Да упокоится его прах с миром. Хотя я не могу сказать, что мне жаль его, я все же был бы не прочь задать ему парочку вопросов. } else { AI_Output(self,other,"DIA_Milten_DI_PEDROTOT_03_05"); //У меня с ним давние счеты. }; }; instance DIA_Milten_DI_TeachMagic(C_Info) { npc = PC_Mage_DI; nr = 31; condition = DIA_Milten_DI_TeachMagic_Condition; information = DIA_Milten_DI_TeachMagic_Info; permanent = TRUE; description = "Я хочу повысить свои магические способности."; }; func int DIA_Milten_DI_TeachMagic_Condition() { if((UndeadDragonIsDead == FALSE) && Npc_KnowsInfo(other,DIA_Milten_DI_Hello)) { return TRUE; }; }; var int DIA_Milten_DI_TeachMagic_OneTime; func void DIA_Milten_DI_TeachMagic_Info() { AI_Output(other,self,"DIA_Milten_DI_TeachMagic_15_00"); //Я хочу повысить свои магические способности. if(ORkSturmDI == FALSE) { AI_Output(self,other,"DIA_Milten_DI_TeachMagic_03_01"); //Я сделаю все, что смогу. } else if(DIA_Milten_DI_TeachMagic_OneTime == FALSE) { AI_Output(self,other,"DIA_Milten_DI_TeachMagic_03_02"); //Я помогу тебе, но только при условии, что ты позаботишься, чтобы орки оставались там, где они есть сейчас. DIA_Milten_DI_TeachMagic_OneTime = TRUE; } else { AI_Output(self,other,"DIA_Milten_DI_TeachMagic_03_03"); //Хорошо. Что тебе требуется? }; Info_ClearChoices(DIA_Milten_DI_TeachMagic); Info_AddChoice(DIA_Milten_DI_TeachMagic,Dialog_Back,DIA_Milten_DI_TeachMagic_BACK); Info_AddChoice(DIA_Milten_DI_TeachMagic,b_buildlearnstringforskills(PRINT_LearnMANA1,B_GetLearnCostAttribute(other,ATR_MANA_MAX)),DIA_Milten_DI_TeachMagic_MANA_1); Info_AddChoice(DIA_Milten_DI_TeachMagic,b_buildlearnstringforskills(PRINT_LearnMANA5,B_GetLearnCostAttribute(other,ATR_MANA_MAX) * 5),DIA_Milten_DI_TeachMagic_MANA_5); if((hero.guild == GIL_KDF) || (CHOOSEFIRE == TRUE)) { Info_AddChoice(DIA_Milten_DI_TeachMagic,"Создать руну",DIA_Milten_DI_TeachMagic_RUNES); }; }; func void DIA_Milten_DI_TeachMagic_MANA_1() { if(B_TeachAttributePoints(self,other,ATR_MANA_MAX,1,T_MAX)) { AI_Output(self,other,"DIA_Milten_DI_TeachMagic_MANA_1_03_00"); //Да ведет тебя рука Инноса. }; Info_ClearChoices(DIA_Milten_DI_TeachMagic); Info_AddChoice(DIA_Milten_DI_TeachMagic,Dialog_Back,DIA_Milten_DI_TeachMagic_BACK); Info_AddChoice(DIA_Milten_DI_TeachMagic,b_buildlearnstringforskills(PRINT_LearnMANA1,B_GetLearnCostAttribute(other,ATR_MANA_MAX)),DIA_Milten_DI_TeachMagic_MANA_1); Info_AddChoice(DIA_Milten_DI_TeachMagic,b_buildlearnstringforskills(PRINT_LearnMANA5,B_GetLearnCostAttribute(other,ATR_MANA_MAX) * 5),DIA_Milten_DI_TeachMagic_MANA_5); if((hero.guild == GIL_KDF) || (CHOOSEFIRE == TRUE)) { Info_AddChoice(DIA_Milten_DI_TeachMagic,"Создать руну",DIA_Milten_DI_TeachMagic_RUNES); }; }; func void DIA_Milten_DI_TeachMagic_MANA_5() { if(B_TeachAttributePoints(self,other,ATR_MANA_MAX,5,T_MAX)) { AI_Output(self,other,"DIA_Milten_DI_TeachMagic_MANA_5_03_00"); //Пусть Инноса осветит твой путь. }; Info_ClearChoices(DIA_Milten_DI_TeachMagic); Info_AddChoice(DIA_Milten_DI_TeachMagic,Dialog_Back,DIA_Milten_DI_TeachMagic_BACK); Info_AddChoice(DIA_Milten_DI_TeachMagic,b_buildlearnstringforskills(PRINT_LearnMANA1,B_GetLearnCostAttribute(other,ATR_MANA_MAX)),DIA_Milten_DI_TeachMagic_MANA_1); Info_AddChoice(DIA_Milten_DI_TeachMagic,b_buildlearnstringforskills(PRINT_LearnMANA5,B_GetLearnCostAttribute(other,ATR_MANA_MAX) * 5),DIA_Milten_DI_TeachMagic_MANA_5); if((hero.guild == GIL_KDF) || (CHOOSEFIRE == TRUE)) { Info_AddChoice(DIA_Milten_DI_TeachMagic,"Создать руну",DIA_Milten_DI_TeachMagic_RUNES); }; }; func void DIA_Milten_DI_TeachMagic_RUNES() { Info_ClearChoices(DIA_Milten_DI_TeachMagic); Info_AddChoice(DIA_Milten_DI_TeachMagic,Dialog_Back,DIA_Milten_DI_TeachMagic_BACK); AI_Output(self,other,"DIA_Milten_DI_TeachMagic_RUNES_03_00"); //Ох, нет! Я не большой специалист в этом, но мы как-нибудь справимся. if((Npc_GetTalentSkill(hero,NPC_TALENT_MAGE) >= 4) && ((hero.guild == GIL_KDF) || (CHOOSEFIRE == TRUE))) { Info_AddChoice(DIA_Milten_DI_TeachMagic,"Круг четвертый",DIA_Milten_DI_TeachMagic_Runen_Circle_4); }; if((Npc_GetTalentSkill(hero,NPC_TALENT_MAGE) >= 5) && ((hero.guild == GIL_KDF) || (CHOOSEFIRE == TRUE))) { Info_AddChoice(DIA_Milten_DI_TeachMagic,"Круг пятый",DIA_Milten_DI_TeachMagic_Runen_Circle_5); }; if((Npc_GetTalentSkill(hero,NPC_TALENT_MAGE) == 6) && ((hero.guild == GIL_KDF) || (CHOOSEFIRE == TRUE))) { Info_AddChoice(DIA_Milten_DI_TeachMagic,"Круг шестой",DIA_Milten_DI_TeachMagic_Runen_Circle_6); }; }; func void DIA_Milten_DI_TeachMagic_Runen_Circle_4() { Info_ClearChoices(DIA_Milten_DI_TeachMagic); Info_AddChoice(DIA_Milten_DI_TeachMagic,Dialog_Back,DIA_Milten_DI_TeachMagic_BACK); if(PLAYER_TALENT_RUNES[SPL_ChargeFireball] == FALSE) { Info_AddChoice(DIA_Milten_DI_TeachMagic,b_buildlearnstringforrunes(NAME_SPL_ChargeFireball,B_GetLearnCostTalent(other,NPC_TALENT_RUNES,SPL_ChargeFireball)),DIA_Milten_DI_TeachMagic_Runen_Circle_4_SPL_ChargeFireball); }; if(PLAYER_TALENT_RUNES[93] == FALSE) { Info_AddChoice(DIA_Milten_DI_TeachMagic,b_buildlearnstringforrunes(NAME_SPL_FIRELIGHT,B_GetLearnCostTalent(other,NPC_TALENT_RUNES,SPL_FIRELIGHT)),dia_milten_di_teachmagic_runen_circle_4_spl_firelight); }; }; func void DIA_Milten_DI_TeachMagic_Runen_Circle_4_SPL_ChargeFireball() { B_TeachPlayerTalentRunes(self,other,SPL_ChargeFireball); }; func void dia_milten_di_teachmagic_runen_circle_4_spl_firelight() { B_TeachPlayerTalentRunes(self,other,SPL_FIRELIGHT); }; func void DIA_Milten_DI_TeachMagic_Runen_Circle_5() { Info_ClearChoices(DIA_Milten_DI_TeachMagic); Info_AddChoice(DIA_Milten_DI_TeachMagic,Dialog_Back,DIA_Milten_DI_TeachMagic_BACK); if(PLAYER_TALENT_RUNES[SPL_Pyrokinesis] == FALSE) { Info_AddChoice(DIA_Milten_DI_TeachMagic,b_buildlearnstringforrunes(NAME_SPL_Pyrokinesis,B_GetLearnCostTalent(other,NPC_TALENT_RUNES,SPL_Pyrokinesis)),DIA_Milten_DI_TeachMagic_Runen_Circle_5_SPL_Pyrokinesis); }; if(PLAYER_TALENT_RUNES[SPL_Explosion] == FALSE) { Info_AddChoice(DIA_Milten_DI_TeachMagic,b_buildlearnstringforrunes(NAME_SPL_Explosion,B_GetLearnCostTalent(other,NPC_TALENT_RUNES,SPL_Explosion)),DIA_Milten_DI_TeachMagic_Runen_Circle_5_SPL_Explosion); }; }; func void DIA_Milten_DI_TeachMagic_Runen_Circle_5_SPL_Pyrokinesis() { B_TeachPlayerTalentRunes(self,other,SPL_Pyrokinesis); }; func void DIA_Milten_DI_TeachMagic_Runen_Circle_5_SPL_Explosion() { B_TeachPlayerTalentRunes(self,other,SPL_Explosion); }; func void DIA_Milten_DI_TeachMagic_Runen_Circle_6() { Info_ClearChoices(DIA_Milten_DI_TeachMagic); Info_AddChoice(DIA_Milten_DI_TeachMagic,Dialog_Back,DIA_Milten_DI_TeachMagic_BACK); if(PLAYER_TALENT_RUNES[SPL_Firerain] == FALSE) { Info_AddChoice(DIA_Milten_DI_TeachMagic,b_buildlearnstringforrunes(NAME_SPL_Firerain,B_GetLearnCostTalent(other,NPC_TALENT_RUNES,SPL_Firerain)),DIA_Milten_DI_TeachMagic_Runen_Circle_6_SPL_Firerain); }; }; func void DIA_Milten_DI_TeachMagic_Runen_Circle_6_SPL_Firerain() { B_TeachPlayerTalentRunes(self,other,SPL_Firerain); }; func void DIA_Milten_DI_TeachMagic_BACK() { Info_ClearChoices(DIA_Milten_DI_TeachMagic); }; instance DIA_Milten_DI_DementorObsessionBook(C_Info) { npc = PC_Mage_DI; nr = 99; condition = DIA_Milten_DI_DementorObsessionBook_Condition; information = DIA_Milten_DI_DementorObsessionBook_Info; description = "Эта книга, Альманах Одержимых, говорит тебе о чем-то?"; }; func int DIA_Milten_DI_DementorObsessionBook_Condition() { if(Npc_HasItems(other,ITWR_DementorObsessionBook_MIS)) { return TRUE; }; }; func void DIA_Milten_DI_DementorObsessionBook_Info() { AI_Output(other,self,"DIA_Milten_DI_DementorObsessionBook_15_00"); //Эта книга, Альманах Одержимых, говорит тебе о чем-то? AI_Output(self,other,"DIA_Milten_DI_DementorObsessionBook_03_01"); //Пирокар эксперт по таким книгам. AI_Output(self,other,"DIA_Milten_DI_DementorObsessionBook_03_02"); //Извини. Я знаю слишком мало, чтобы сказать что-либо умное об этом. B_GivePlayerXP(XP_Ambient); }; instance DIA_Milten_DI_DragonEgg(C_Info) { npc = PC_Mage_DI; nr = 99; condition = DIA_Milten_DI_DragonEgg_Condition; information = DIA_Milten_DI_DragonEgg_Info; description = "Ты имел дело с драконьими яйцами?"; }; func int DIA_Milten_DI_DragonEgg_Condition() { if(Npc_HasItems(other,ItAt_DragonEgg_MIS)) { return TRUE; }; }; func void DIA_Milten_DI_DragonEgg_Info() { AI_Output(other,self,"DIA_Milten_DI_DragonEgg_15_00"); //Ты имел дело с драконьими яйцами? AI_Output(self,other,"DIA_Milten_DI_DragonEgg_03_01"); //Нет, не совсем. Я слышал, что искусный алхимик как-то смог сварить зелье из них. AI_Output(self,other,"DIA_Milten_DI_DragonEgg_03_02"); //Но, пожалуйста, не спрашивай меня о рецепте. Я понятия не имею, как оно готовится. B_GivePlayerXP(XP_Ambient); }; instance DIA_Milten_DI_UndeadDragonDead(C_Info) { npc = PC_Mage_DI; nr = 31; condition = DIA_Milten_DI_UndeadDragonDead_Condition; information = DIA_Milten_DI_UndeadDragonDead_Info; permanent = TRUE; description = "Хорошо. Дело сделано!"; }; func int DIA_Milten_DI_UndeadDragonDead_Condition() { if(UndeadDragonIsDead == TRUE) { return TRUE; }; }; var int DIA_Milten_DI_UndeadDragonDead_OneTime; func void DIA_Milten_DI_UndeadDragonDead_Info() { AI_Output(other,self,"DIA_Milten_DI_UndeadDragonDead_15_00"); //Хорошо. Дело сделано! Храм теперь лишен своей силы. if(DIA_Milten_DI_UndeadDragonDead_OneTime == FALSE) { AI_Output(self,other,"DIA_Milten_DI_UndeadDragonDead_03_01"); //Как тебе всегда удается выходись сухим из воды? AI_Output(other,self,"DIA_Milten_DI_UndeadDragonDead_15_02"); //Черт меня побери, если я знаю. AI_Output(self,other,"DIA_Milten_DI_UndeadDragonDead_03_03"); //(смеется) Мы, когда-нибудь сможем пожить спокойно? Мы, определенно, заслужили это. if(hero.guild == GIL_KDF) { AI_Output(other,self,"DIA_Milten_DI_UndeadDragonDead_15_04"); //Что ты собираешься делать сейчас? AI_Output(self,other,"DIA_Milten_DI_UndeadDragonDead_03_05"); //Я думаю об основании собственной академии, чтобы проповедовать нашу веру. Но из этого может ничего не получиться. AI_Output(self,other,"DIA_Milten_DI_UndeadDragonDead_03_06"); //Я никогда не жалел о том, что стал Магом Огня. А как тебе это? AI_Output(other,self,"DIA_Milten_DI_UndeadDragonDead_15_07"); //Я даже не знаю. AI_Output(self,other,"DIA_Milten_DI_UndeadDragonDead_03_08"); //(смеется) Сухо, как всегда. Эй, парень. Ты только что спас мир. Разве это недостаточная причина для радости? AI_Output(other,self,"DIA_Milten_DI_UndeadDragonDead_15_09"); //Ммм. Может быть. }; AI_Output(self,other,"DIA_Milten_DI_UndeadDragonDead_03_10"); //Да ладно, дружище, я думаю, что главное, что тебе сейчас нужно, - немного поспать. DIA_Milten_DI_UndeadDragonDead_OneTime = TRUE; }; AI_Output(self,other,"DIA_Milten_DI_UndeadDragonDead_03_11"); //Тебе нужно пойти к капитану и сказать ему, чтобы он поднимал якорь. AI_StopProcessInfos(self); Npc_ExchangeRoutine(self,"Start"); }; instance DIA_Mage_DI_PICKPOCKET(C_Info) { npc = PC_Mage_DI; nr = 900; condition = DIA_Mage_DI_PICKPOCKET_Condition; information = DIA_Mage_DI_PICKPOCKET_Info; permanent = TRUE; description = PICKPOCKET_COMM; }; func int DIA_Mage_DI_PICKPOCKET_Condition() { return C_Beklauen(45,120); }; func void DIA_Mage_DI_PICKPOCKET_Info() { Info_ClearChoices(DIA_Mage_DI_PICKPOCKET); Info_AddChoice(DIA_Mage_DI_PICKPOCKET,Dialog_Back,DIA_Mage_DI_PICKPOCKET_BACK); Info_AddChoice(DIA_Mage_DI_PICKPOCKET,DIALOG_PICKPOCKET,DIA_Mage_DI_PICKPOCKET_DoIt); }; func void DIA_Mage_DI_PICKPOCKET_DoIt() { B_Beklauen(); Info_ClearChoices(DIA_Mage_DI_PICKPOCKET); }; func void DIA_Mage_DI_PICKPOCKET_BACK() { Info_ClearChoices(DIA_Mage_DI_PICKPOCKET); };
D
/* Copyright (c) 2019 Timur Gafarov Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ module dagon.postproc.filterstage; import std.stdio; import dlib.core.memory; import dlib.core.ownership; import dagon.core.bindings; import dagon.graphics.screensurface; import dagon.graphics.shader; import dagon.render.pipeline; import dagon.render.stage; import dagon.render.framebuffer; class FilterStage: RenderStage { Framebuffer inputBuffer; Framebuffer outputBuffer; ScreenSurface screenSurface; Shader shader; this(RenderPipeline pipeline, Shader shader) { super(pipeline); screenSurface = New!ScreenSurface(this); this.shader = shader; } override void render() { if (inputBuffer && view) { if (outputBuffer) outputBuffer.bind(); state.colorTexture = inputBuffer.colorTexture; state.depthTexture = inputBuffer.depthTexture; glScissor(view.x, view.y, view.width, view.height); glViewport(view.x, view.y, view.width, view.height); glDisable(GL_DEPTH_TEST); shader.bind(); shader.bindParameters(&state); screenSurface.render(&state); shader.unbindParameters(&state); shader.unbind(); glEnable(GL_DEPTH_TEST); if (outputBuffer) outputBuffer.unbind(); } } }
D
module openzwave.options; import openzwave.types; version (OpenZWave): extern extern (C++, "OpenZWave") { extern(C++, class) struct Options { pragma(mangle, "_ZN9OpenZWave7Options6CreateERKSsS2_S2_") static Options* Create(ref const stdstring _configPath, ref const stdstring _userPath, ref const stdstring _commandLine); static Options* Get(); bool Lock(); pragma(mangle, "_ZN9OpenZWave7Options12AddOptionIntERKSsi") bool AddOptionInt(const ref stdstring _name, int _default); bool AddOptionBool(const ref stdstring _name, bool _default); pragma(mangle, "_ZN9OpenZWave7Options15AddOptionStringERKSsS2_b") bool AddOptionString(const ref stdstring _name, const ref stdstring _default, bool _append); pragma(mangle, "_ZN9OpenZWave7Options17GetOptionAsStringERKSsPSs") bool GetOptionAsString(const ref stdstring _name, stdstring* o_value); } }
D
instance DIA_MiltenNW_EXIT(C_Info) { npc = PC_Mage_NW; nr = 999; condition = DIA_MiltenNW_EXIT_Condition; information = DIA_MiltenNW_EXIT_Info; permanent = TRUE; description = Dialog_Ende; }; func int DIA_MiltenNW_EXIT_Condition() { if(Kapitel < 3) { return TRUE; }; }; func void DIA_MiltenNW_EXIT_Info() { AI_StopProcessInfos(self); }; instance DIA_MiltenNW_KAP3_EXIT(C_Info) { npc = PC_Mage_NW; nr = 999; condition = DIA_MiltenNW_KAP3_EXIT_Condition; information = DIA_MiltenNW_KAP3_EXIT_Info; permanent = TRUE; description = Dialog_Ende; }; func int DIA_MiltenNW_KAP3_EXIT_Condition() { if(Kapitel == 3) { return TRUE; }; }; func void DIA_MiltenNW_KAP3_EXIT_Info() { AI_StopProcessInfos(self); }; instance DIA_MiltenNW_KAP3_Hello(C_Info) { npc = PC_Mage_NW; nr = 31; condition = DIA_MiltenNW_KAP3_Hello_Condition; information = DIA_MiltenNW_KAP3_Hello_Info; permanent = FALSE; important = TRUE; }; func int DIA_MiltenNW_KAP3_Hello_Condition() { if((hero.guild == GIL_PAL) || (hero.guild == GIL_DJG) || (hero.guild == GIL_KDW) || (hero.guild == GIL_KDM) || (hero.guild == GIL_TPL) || (hero.guild == GIL_GUR)) { return TRUE; }; }; func void DIA_MiltenNW_KAP3_Hello_Info() { if(hero.guild == GIL_PAL) { AI_Output(self,other,"DIA_MiltenNW_KAP3_Hello_03_00"); //(nevěřícně) Nejde mi to na rozum. Opravdu jsi paladin? AI_Output(other,self,"DIA_MiltenNW_KAP3_Hello_15_01"); //Evidentně. AI_Output(self,other,"DIA_MiltenNW_KAP3_Hello_03_02"); //(euforicky) Pokud je mezi paladiny někdo jako ty, měli by se mít Beliarovi pohůnci radši na pozoru. AI_Output(self,other,"DIA_MiltenNW_KAP3_Hello_03_03"); //Jestli jsi porazil Spáče, nemělo by ti pár skřetů dělat sebemenší potíže. AI_Output(other,self,"DIA_MiltenNW_KAP3_Hello_15_04"); //Ve hře nejsou jenom skřeti. AI_Output(self,other,"DIA_MiltenNW_KAP3_Hello_03_05"); //To vím, ale i tak je dobré tě mít na své straně. AI_Output(other,self,"DIA_MiltenNW_KAP3_Hello_15_06"); //No dobrá. AI_Output(self,other,"DIA_MiltenNW_KAP3_Hello_03_07"); //Co děláš tady v klášteře? Nech mě hádat. Chceš se učit umění magie. AI_Output(other,self,"DIA_MiltenNW_KAP3_Hello_15_08"); //Možná. AI_Output(self,other,"DIA_MiltenNW_KAP3_Hello_03_09"); //Věděl jsem to - běž si promluvit s Mardukem, on je zodpovědný za vás paladiny. Najdeš ho před kaplí. }; if(hero.guild == GIL_DJG) { AI_Output(self,other,"DIA_MiltenNW_KAP3_Hello_03_10"); //Vidím, že ty řeči měly pravdu. AI_Output(other,self,"DIA_MiltenNW_KAP3_Hello_15_11"); //Jaké řeči? AI_Output(self,other,"DIA_MiltenNW_KAP3_Hello_03_12"); //Že ses spolčil s těmi drakobijci. AI_Output(self,other,"DIA_MiltenNW_KAP3_Hello_03_13"); //No, nikdy jsi nebyl dobrý materiál pro církev. Ať je to ale jak chce, bojuješ za naši věc a to je to, co se počítá. AI_Output(other,self,"DIA_MiltenNW_KAP3_Hello_15_14"); //Je to vše? AI_Output(self,other,"DIA_MiltenNW_KAP3_Hello_03_15"); //Mám samozřejmě radost, a vypadáš tak, že se tě musí každý skřet hned leknout. AI_Output(other,self,"DIA_MiltenNW_KAP3_Hello_15_16"); //Ve hře nejsou jenom skřeti. AI_Output(self,other,"DIA_MiltenNW_KAP3_Hello_03_17"); //To vím, ale i tak s nimi jsou problémy. Jsi velmi důležitý. AI_Output(self,other,"DIA_MiltenNW_KAP3_Hello_03_18"); //Porazil jsi Spáče. Možná jednoho dne budeme všichni potřebovat pomoc. AI_Output(other,self,"DIA_MiltenNW_KAP3_Hello_15_19"); //No dobrá. }; }; instance DIA_MiltenNW_Pashal(C_Info) { npc = PC_Mage_NW; nr = 3; condition = DIA_MiltenNW_Pashal_Condition; information = DIA_MiltenNW_Pashal_Info; permanent = FALSE; description = "Chtěl bych se tě na něco zeptat."; }; func int DIA_MiltenNW_Pashal_Condition() { if((MIS_PashalQuest == LOG_Running) && (PashalQuestMageStep == TRUE) && (PashalQuestCaveStep == FALSE)) { return TRUE; }; }; func void DIA_MiltenNW_Pashal_Info() { AI_Output(other,self,"DIA_MiltenOW_Pashal_01_00"); //Chtěl bych se tě na něco zeptat. AI_Output(self,other,"DIA_MiltenOW_Pashal_01_01"); //Na co? AI_Output(other,self,"DIA_MiltenOW_Pashal_01_02"); //Už si někdy slyšel o jednom magickém artefaktu, který absorboval veškerou moc tohoto světa? AI_Output(self,other,"DIA_MiltenOW_Pashal_01_03"); //Hmmm...(zamyšleně) Ano! Vzpomínám si... můj mistr ze Starého tábora se jednou zmínil. AI_Output(self,other,"DIA_MiltenOW_Pashal_01_04"); //Měl dokonce plán, použít ten artefakt ke zničení magické bariéry! AI_Output(self,other,"DIA_MiltenOW_Pashal_01_05"); //Protože se ten artefakt nikdy nenašel, tak zůstaly jenom slova. AI_Output(other,self,"DIA_MiltenOW_Pashal_01_06"); //Co konkrétně bys mi mohl říct? AI_Output(self,other,"DIA_MiltenOW_Pashal_01_07"); //Jak si tak vzpomínám, jeden mág byl poslán aby ho našel. AI_Output(self,other,"DIA_MiltenOW_Pashal_01_08"); //Ale nikdy se nevrátil zpátky! A my jsme ho hledaly marně. AI_Output(other,self,"DIA_MiltenOW_Pashal_01_09"); //Dobře. PashalQuestCaveStep = TRUE; PashalQuestCaveStepIns = TRUE; B_LogEntry(TOPIC_PashalQuest,"Milten mi řekl že mágové Ohně se ten artefakt snažily najít, dokonce jeden z nich byl pověřen speciálním posláním, bohužel bylo vše marné."); }; instance DIA_MiltenNW_Monastery(C_Info) { npc = PC_Mage_NW; nr = 35; condition = DIA_MiltenNW_Monastery_Condition; information = DIA_MiltenNW_Monastery_Info; permanent = FALSE; description = "Jak ses dostal do kláštera tak rychle?"; }; func int DIA_MiltenNW_Monastery_Condition() { if(Kapitel == 3) { return TRUE; }; }; func void DIA_MiltenNW_Monastery_Info() { AI_Output(other,self,"DIA_MiltenNW_Monastery_15_00"); //Jak ses dostal do kláštera tak rychle? AI_Output(self,other,"DIA_MiltenNW_Monastery_03_01"); //Co je to za otázku? Proplížil jsem se průsmykem a namířil si to rovnou do kláštera. AI_Output(self,other,"DIA_MiltenNW_Monastery_03_02"); //Přiznávám, že nebylo vždycky snadné proklouznout mezi těmi všemi příšerami, které se zabydlují na téhle straně údolí, ale přece jenom jsem měl míň problémů, než jsem čekal. }; instance DIA_MiltenNW_FourFriends(C_Info) { npc = PC_Mage_NW; nr = 35; condition = DIA_MiltenNW_FourFriends_Condition; information = DIA_MiltenNW_FourFriends_Info; permanent = FALSE; description = "Víš, kde jsou ostatní?"; }; func int DIA_MiltenNW_FourFriends_Condition() { if(Kapitel == 3) { return TRUE; }; }; func void DIA_MiltenNW_FourFriends_Info() { AI_Output(other,self,"DIA_MiltenNW_FourFriends_15_00"); //Víš, kde jsou ostatní? if(Npc_IsDead(PC_Fighter_NW_vor_DJG) == FALSE) { AI_Output(self,other,"DIA_MiltenNW_FourFriends_03_01"); //Zdá se, že Gorn se vypořádal s pobytem v Garondově vězení docela dobře. if(MIS_RescueGorn != LOG_SUCCESS) { AI_Output(other,self,"DIA_MiltenNW_FourFriends_15_02"); //Jak se dostal ven? AI_Output(self,other,"DIA_MiltenNW_FourFriends_03_03"); //Musel jsem Garondovi trochu zalhat, abych ho přesvědčil, že má obvinění stáhnout. AI_Output(self,other,"DIA_MiltenNW_FourFriends_03_04"); //Ale bude to jen mezi námi, rozuměno? }; AI_Output(self,other,"DIA_MiltenNW_FourFriends_03_05"); //Každopádně chtěl jít za Leem a podívat se, co se děje na farmě. AI_Output(self,other,"DIA_MiltenNW_FourFriends_03_06"); //Po tom blivajzu, co dostával ve vězení, se určitě cpe ze všech sil. To bude pro zásoby žoldáků těžká zkouška. } else { AI_Output(self,other,"DIA_MiltenNW_FourFriends_03_07"); //Gorn to nepřežil. }; if(Npc_IsDead(PC_Thief_NW) == FALSE) { AI_Output(self,other,"DIA_MiltenNW_FourFriends_03_08"); //Diego mumlal něco o zúčtování. Netuším, co měl na mysli. AI_Output(self,other,"DIA_MiltenNW_FourFriends_03_09"); //Ale řekl bych, že je ve městě. Znáš ho - vždycky se něco najde. } else { AI_Output(self,other,"DIA_MiltenNW_FourFriends_03_10"); //Diego to koupil - zdá se, že ho bariéra přece jenom dostala. }; }; instance DIA_MiltenNW_KAP3_Entry(C_Info) { npc = PC_Mage_NW; nr = 32; condition = DIA_MiltenNW_KAP3_Entry_Condition; information = DIA_MiltenNW_KAP3_Entry_Info; permanent = TRUE; description = "Potřebuji se dostat do kláštera. Je to důležité!"; }; func int DIA_MiltenNW_KAP3_Entry_Condition() { if((Kapitel == 3) && (hero.guild != GIL_KDF) && (MiltenNW_GivesMonasteryKey == FALSE) && !Npc_HasItems(other,ItKe_Innos_MIS)) { return TRUE; }; }; func void DIA_MiltenNW_KAP3_Entry_Info() { AI_Output(other,self,"DIA_MiltenNW_KAP3_Entry_15_00"); //Potřebuji se dostat do kláštera. Je to důležité! if(hero.guild == GIL_PAL) { AI_Output(self,other,"DIA_MiltenNW_KAP3_Entry_03_01"); //Yes, sure. Here's the key. CreateInvItems(self,ItKe_Innos_MIS,1); B_GiveInvItems(self,other,ItKe_Innos_MIS,1); MiltenNW_GivesMonasteryKey = TRUE; CanEnterKloster = TRUE; } else { AI_Output(self,other,"DIA_MiltenNW_KAP3_Entry_03_02"); //Nemůžu tě do kláštera vpustit. Měl bych problémy před Nejvyšší radou. AI_Output(self,other,"DIA_MiltenNW_KAP3_Entry_03_03"); //Bez povolení mých nadřízených nesmím do kláštera nikoho vpouštět. Info_ClearChoices(DIA_MiltenNW_KAP3_Entry); Info_AddChoice(DIA_MiltenNW_KAP3_Entry,Dialog_Back,DIA_MiltenNW_KAP3_Entry_BACK); Info_AddChoice(DIA_MiltenNW_KAP3_Entry,"Je to důležité!",DIA_MiltenNW_KAP3_Entry_Important); if(Npc_HasItems(other,ItWr_PermissionToWearInnosEye_MIS) >= 1) { Info_AddChoice(DIA_MiltenNW_KAP3_Entry,"Přináším dopis od lorda Hagena.",DIA_MiltenNW_KAP3_Entry_Permit); }; }; }; func void DIA_MiltenNW_KAP3_Entry_BACK() { Info_ClearChoices(DIA_MiltenNW_KAP3_Entry); }; func void DIA_MiltenNW_KAP3_Entry_Important() { AI_Output(other,self,"DIA_MiltenNW_KAP3_Entry_Important_15_00"); //Je to důležité! AI_Output(self,other,"DIA_MiltenNW_KAP3_Entry_Important_03_01"); //To nepůjde. Pyrokar by mi utrhl hlavu. Info_ClearChoices(DIA_MiltenNW_KAP3_Entry); }; func void DIA_MiltenNW_KAP3_Entry_Permit() { AI_Output(other,self,"DIA_MiltenNW_KAP3_Entry_Permit_15_00"); //Přináším dopis od lorda Hagena. AI_Output(self,other,"DIA_MiltenNW_KAP3_Entry_Permit_03_01"); //Ukaž mi ho. B_GiveInvItems(other,self,ItWr_PermissionToWearInnosEye_MIS,1); B_UseFakeScroll(); AI_Output(self,other,"DIA_MiltenNW_KAP3_Entry_Permit_03_02"); //(váhavě) Dobrá. Tady je klíč od kláštera. Pyrokar je v chrámu. CreateInvItems(self,ItKe_Innos_MIS,1); B_GiveInvItems(self,other,ItKe_Innos_MIS,1); B_GiveInvItems(self,other,ItWr_PermissionToWearInnosEye_MIS,1); MiltenNW_GivesMonasteryKey = TRUE; CanEnterKloster = TRUE; Info_ClearChoices(DIA_MiltenNW_KAP3_Entry); }; instance DIA_MiltenNW_KAP3_NovizenChase(C_Info) { npc = PC_Mage_NW; nr = 31; condition = DIA_MiltenNW_KAP3_NovizenChase_Condition; information = DIA_MiltenNW_KAP3_NovizenChase_Info; permanent = FALSE; description = "Nevíš, kde je Pedro?"; }; func int DIA_MiltenNW_KAP3_NovizenChase_Condition() { if((Kapitel == 3) && (MIS_NovizenChase == LOG_Running) && (MIS_SCKnowsInnosEyeIsBroken == FALSE)) { return TRUE; }; }; func void DIA_MiltenNW_KAP3_NovizenChase_Info() { AI_Output(other,self,"DIA_MiltenNW_KAP3_NovizenChase_15_00"); //Nevíš, kde je Pedro? AI_Output(self,other,"DIA_MiltenNW_KAP3_NovizenChase_03_01"); //Myslíš, že bych tady jen tak stál, kdybych věděl, kde se ten odpadlík schovává? AI_Output(self,other,"DIA_MiltenNW_KAP3_NovizenChase_03_02"); //Musí zaplatit za své činy. Doufám, že se nám podaří dostat Oko zpátky. AI_Output(self,other,"DIA_MiltenNW_KAP3_NovizenChase_03_03"); //Musíš nám pomoci. Najdi ho a přines zpět Innosovo oko. }; instance DIA_MiltenNW_KAP3_Perm(C_Info) { npc = PC_Mage_NW; nr = 39; condition = DIA_MiltenNW_KAP3_Perm_Condition; information = DIA_MiltenNW_KAP3_Perm_Info; permanent = FALSE; description = "Nevíš něco o těch postavách v kápích?"; }; func int DIA_MiltenNW_KAP3_Perm_Condition() { if(Kapitel == 3) { return TRUE; }; }; func void DIA_MiltenNW_KAP3_Perm_Info() { AI_Output(other,self,"DIA_MiltenNW_KAP3_Perm_15_00"); //Nevíš něco o těch postavách v kápích? AI_Output(self,other,"DIA_MiltenNW_KAP3_Perm_03_01"); //Ne, ale nemám z těch chlapíků dobrý pocit. AI_Output(self,other,"DIA_MiltenNW_KAP3_Perm_03_02"); //Pokud na ně narazíš, buď opatrný. }; instance DIA_MiltenNW_KAP4_EXIT(C_Info) { npc = PC_Mage_NW; nr = 999; condition = DIA_MiltenNW_KAP4_EXIT_Condition; information = DIA_MiltenNW_KAP4_EXIT_Info; permanent = TRUE; description = Dialog_Ende; }; func int DIA_MiltenNW_KAP4_EXIT_Condition() { if(Kapitel == 4) { return TRUE; }; }; func void DIA_MiltenNW_KAP4_EXIT_Info() { AI_StopProcessInfos(self); }; instance DIA_MILTENNW_BEFOREDRAGONS(C_Info) { npc = PC_Mage_NW; nr = 1; condition = dia_miltennw_beforedragons_condition; information = dia_miltennw_beforedragons_info; permanent = FALSE; important = TRUE; }; func int dia_miltennw_beforedragons_condition() { if((Kapitel == 4) && (MIS_RitualInnosEyeRepair == LOG_SUCCESS) && (MIS_AllDragonsDead == FALSE) && (Npc_HasItems(self,itke_miltenkey_nw) > 0)) { return TRUE; }; }; func void dia_miltennw_beforedragons_info() { AI_Output(self,other,"DIA_MiltenNW_BeforeDragons_03_00"); //Jdeš na draky? AI_Output(other,self,"DIA_MiltenNW_BeforeDragons_15_01"); //Něco na ten způsob. AI_Output(self,other,"DIA_MiltenNW_BeforeDragons_03_02"); //Tohle je klíč od truhly na hradě v údolí. AI_Output(self,other,"DIA_MiltenNW_BeforeDragons_03_03"); //Myslím, že její obsah by se ti mohl hodit. B_GiveInvItems(self,other,itke_miltenkey_nw,1); AI_StopProcessInfos(self); }; instance DIA_MiltenNW_KAP4_PERM(C_Info) { npc = PC_Mage_NW; nr = 49; condition = DIA_MiltenNW_KAP4_PERM_Condition; information = DIA_MiltenNW_KAP4_PERM_Info; permanent = TRUE; description = "Co je nového?"; }; func int DIA_MiltenNW_KAP4_PERM_Condition() { if(Kapitel == 4) { return TRUE; }; }; func void DIA_MiltenNW_KAP4_PERM_Info() { AI_Output(other,self,"DIA_MiltenNW_KAP4_PERM_15_00"); //Co je nového? AI_Output(self,other,"DIA_MiltenNW_KAP4_PERM_03_01"); //Na to bych se měl zeptat já. Máme tady dost starostí. AI_Output(self,other,"DIA_MiltenNW_KAP4_PERM_03_02"); //Nejvyšší rada se snaží zjistit, co nepřítel udělá příště. AI_Output(other,self,"DIA_MiltenNW_KAP4_PERM_15_03"); //Něco dalšího? if(hero.guild == GIL_PAL) { AI_Output(self,other,"DIA_MiltenNW_KAP4_PERM_03_04"); //V poslední době jsou útoky skřetů častější, dokonce i mimo Hornické údolí. AI_Output(self,other,"DIA_MiltenNW_KAP4_PERM_03_05"); //Vůbec se mi to nechce líbit - myslím, že už nemáme moc času. } else if(hero.guild == GIL_DJG) { AI_Output(self,other,"DIA_MiltenNW_KAP4_PERM_03_06"); //Jeden farmář říkal, že poblíž jeho farmy se objevila nějaká šupinatá stvoření. AI_Output(self,other,"DIA_MiltenNW_KAP4_PERM_03_07"); //Nevím, jaký to dává dohromady smysl, ale mám pocit, že nepřítel něco chystá. } else if(MIS_FindTheObesessed == LOG_Running) { AI_Output(self,other,"DIA_MiltenNW_KAP4_PERM_03_08"); //Dostáváme čím dál tím víc zpráv o posedlých lidech. Nepřítel je silný, silnější, než jsme čekali. } else { AI_Output(self,other,"DIA_MiltenNW_KAP4_PERM_03_09"); //Ne, situace je stále vážná. Jediné co můžeme dělat, je věřit v Innose. }; }; instance DIA_MiltenNW_KAP5_EXIT(C_Info) { npc = PC_Mage_NW; nr = 999; condition = DIA_MiltenNW_KAP5_EXIT_Condition; information = DIA_MiltenNW_KAP5_EXIT_Info; permanent = TRUE; description = Dialog_Ende; }; func int DIA_MiltenNW_KAP5_EXIT_Condition() { if(Kapitel == 5) { return TRUE; }; }; func void DIA_MiltenNW_KAP5_EXIT_Info() { AI_StopProcessInfos(self); }; instance DIA_MiltenNW_AllDragonsDead(C_Info) { npc = PC_Mage_NW; nr = 900; condition = DIA_MiltenNW_AllDragonsDead_Condition; information = DIA_MiltenNW_AllDragonsDead_Info; permanent = FALSE; description = "Pobil jsem všechny draky."; }; func int DIA_MiltenNW_AllDragonsDead_Condition() { if(Kapitel == 5) { return TRUE; }; }; func void DIA_MiltenNW_AllDragonsDead_Info() { AI_Output(other,self,"DIA_MiltenNW_AllDragonsDead_15_00"); //Pobil jsem všechny draky. AI_Output(self,other,"DIA_MiltenNW_AllDragonsDead_03_01"); //Vážně? Takže naděje přece jenom ještě žije. Teď už zbývá jen useknout Zlu hlavu. AI_Output(self,other,"DIA_MiltenNW_AllDragonsDead_03_02"); //Pokud jsi to vážně dokázal, mohli bychom válku vyhrát. AI_Output(other,self,"DIA_MiltenNW_AllDragonsDead_15_03"); //Kdo, já? AI_Output(self,other,"DIA_MiltenNW_AllDragonsDead_03_04"); //Samozřejmě, že ty. Kdo jiný? if(MiltenNW_IsOnBoard == LOG_SUCCESS) { AI_Output(self,other,"DIA_MiltenNW_AllDragonsDead_03_05"); //Hej, slyšel jsem, že jsi strávil dlouhý čas v klášterních sklepech. Co jsi zjistil? }; }; instance DIA_MiltenNW_KnowWhereEnemy(C_Info) { npc = PC_Mage_NW; nr = 55; condition = DIA_MiltenNW_KnowWhereEnemy_Condition; information = DIA_MiltenNW_KnowWhereEnemy_Info; permanent = TRUE; description = "Vím, kde se nepřítel ukrývá. Je to malý ostrůvek nedaleko odsud."; }; func int DIA_MiltenNW_KnowWhereEnemy_Condition() { if((MIS_SCKnowsWayToIrdorath == TRUE) && (MiltenNW_IsOnBoard == FALSE) && (CAPITANORDERDIAWAY == FALSE) && (SCGotCaptain == TRUE)) { return TRUE; }; }; var int SCToldMiltenHeKnowWhereEnemy; func void DIA_MiltenNW_KnowWhereEnemy_Info() { AI_Output(other,self,"DIA_MiltenNW_KnowWhereEnemy_15_00"); //Vím, kde se nepřítel ukrývá. Je to malý ostrůvek nedaleko odsud. AI_Output(self,other,"DIA_MiltenNW_KnowWhereEnemy_03_01"); //To je naše velká šance. Musíme okamžitě vyrazit a zničit zlo jednou provždy. SCToldMiltenHeKnowWhereEnemy = TRUE; Log_CreateTopic(Topic_Crew,LOG_MISSION); Log_SetTopicStatus(Topic_Crew,LOG_Running); if(Npc_IsDead(DiegoNW) == FALSE) { AI_Output(self,other,"DIA_MiltenNW_KnowWhereEnemy_03_02"); //Mluvil jsi o tom s Diegem? Myslím, že by chtěl jet s tebou. B_LogEntry(Topic_Crew,"Diego mi může velmi pomoci - nikdy dlouho nepobyl na jednom místě."); }; if(Npc_IsDead(GornNW_nach_DJG) == FALSE) { AI_Output(self,other,"DIA_MiltenNW_KnowWhereEnemy_03_03"); //A co Gorn? Promluv si s ním. Slyšel jsem, že se vrátil z Hornického údolí. B_LogEntry(Topic_Crew,"Gorn by mi jistě byl také zdatným pomocníkem. Nikdy neuškodí, máš-li po boku zdatného válečníka. Snad by mě mohl trochu vycvičit."); }; if(Npc_IsDead(Lester) == FALSE) { AI_Output(self,other,"DIA_MiltenNW_KnowWhereEnemy_03_04"); //A nezapomeň na Lestera. Pokud ho nevytáhneš z toho jeho údolí, tak tam shnije. B_LogEntry(Topic_Crew,"Jestli Lestera nevezmu s sebou, nejspíš se z tohoto údolí nikdy nedostane."); }; AI_Output(self,other,"DIA_MiltenNW_KnowWhereEnemy_03_05"); //Znám také svou vlastní roli, kterou bych měl hrát. Až budeme čelit nepříteli, můžu ti posílit magickou energii a pomáhat ti při vytváření run. Kdy začneme? B_LogEntry(Topic_Crew,"Půjde-li Milten se mnou, může mě naučit, jak vyrábět runy a zvýšit si zásoby many."); if(Crewmember_Count >= Max_Crew) { AI_Output(other,self,"DIA_MiltenNW_KnowWhereEnemy_15_06"); //Ne tak rychle, už mám dost lidí. AI_Output(self,other,"DIA_MiltenNW_KnowWhereEnemy_03_07"); //Víš, že bych s tebou šel. Pokud si to rozmyslíš, budu tady na tebe čekat. AI_Output(self,other,"DIA_MiltenNW_KnowWhereEnemy_03_08"); //Hodně štěstí, a ať nad tebou Innos drží ochrannou ruku. } else { Info_ClearChoices(DIA_MiltenNW_KnowWhereEnemy); Info_AddChoice(DIA_MiltenNW_KnowWhereEnemy,"V tuhle chvíli pro tebe nemám využití.",DIA_MiltenNW_KnowWhereEnemy_No); Info_AddChoice(DIA_MiltenNW_KnowWhereEnemy,"Vítej na palubě!",DIA_MiltenNW_KnowWhereEnemy_Yes); }; }; func void DIA_MiltenNW_KnowWhereEnemy_Yes() { AI_Output(other,self,"DIA_MiltenNW_KnowWhereEnemy_Yes_15_00"); //Vítej na palubě! AI_Output(other,self,"DIA_MiltenNW_KnowWhereEnemy_Yes_15_01"); //Setkáme se v přístavu. Počkej tam na mě. AI_Output(self,other,"DIA_MiltenNW_KnowWhereEnemy_Yes_03_02"); //Dobrá. Budu tam, až budeš připraven. MiltenNW_IsOnBoard = LOG_SUCCESS; B_GivePlayerXP(XP_Crewmember_Success); Crewmember_Count = Crewmember_Count + 1; if(MIS_ReadyforChapter6 == TRUE) { Npc_ExchangeRoutine(self,"SHIP"); } else { Npc_ExchangeRoutine(self,"WAITFORSHIP"); }; Info_ClearChoices(DIA_MiltenNW_KnowWhereEnemy); }; func void DIA_MiltenNW_KnowWhereEnemy_No() { AI_Output(other,self,"DIA_MiltenNW_KnowWhereEnemy_No_15_00"); //V tuhle chvíli pro tebe nemám využití. AI_Output(self,other,"DIA_MiltenNW_KnowWhereEnemy_No_03_01"); //Víš, že bych to s tebou táhl až do konce. Pokud si to rozmyslíš, budu tady na tebe čekat. MiltenNW_IsOnBoard = LOG_OBSOLETE; Info_ClearChoices(DIA_MiltenNW_KnowWhereEnemy); }; instance DIA_MiltenNW_WhereCaptain(C_Info) { npc = PC_Mage_NW; nr = 3; condition = DIA_MiltenNW_WhereCaptain_Condition; information = DIA_MiltenNW_WhereCaptain_Info; description = "Kde bych měl hledat kapitána?"; }; func int DIA_MiltenNW_WhereCaptain_Condition() { if((MIS_SCKnowsWayToIrdorath == TRUE) && (SCToldMiltenHeKnowWhereEnemy == TRUE) && (SCGotCaptain == FALSE)) { return TRUE; }; }; func void DIA_MiltenNW_WhereCaptain_Info() { AI_Output(other,self,"DIA_MiltenNW_WhereCaptain_15_00"); //Kde bych měl hledat kapitána? AI_Output(self,other,"DIA_MiltenNW_WhereCaptain_03_01"); //Zeptej se Jorgena. Je to koneckonců námořník. Měl by být ještě pořád v klášteře. AI_Output(self,other,"DIA_MiltenNW_WhereCaptain_03_02"); //Ale jestli ti nebude schopen pomoci, budeš muset hledat někoho, kdo by ti řídil loď, na farmách nebo ve městě. AI_Output(self,other,"DIA_MiltenNW_WhereCaptain_03_03"); //Nejlepší asi bude promluvit si s Leem nebo jít do přístavu v Khorinisu. Nic lepšího mě teď nenapadá. Log_CreateTopic(Topic_Captain,LOG_MISSION); Log_SetTopicStatus(Topic_Captain,LOG_Running); B_LogEntry(Topic_Captain,"Snad by se mi mohlo podařit najmout kapitána - Jorgena. Měl by se ještě zdržovat v klášteře. Kromě něho bych měl na statcích či ve městě natrefit i na jiné kandidáty na tuto funkci. Snad bych si mohl promluvit s Leem nebo se poptat po přístavu."); }; instance DIA_MiltenNW_LeaveMyShip(C_Info) { npc = PC_Mage_NW; nr = 55; condition = DIA_MiltenNW_LeaveMyShip_Condition; information = DIA_MiltenNW_LeaveMyShip_Info; permanent = TRUE; description = "Nakonec tě přece jenom nemůžu vzít s sebou."; }; func int DIA_MiltenNW_LeaveMyShip_Condition() { if((MiltenNW_IsOnBoard == LOG_SUCCESS) && (MIS_ReadyforChapter6 == FALSE)) { return TRUE; }; }; func void DIA_MiltenNW_LeaveMyShip_Info() { AI_Output(other,self,"DIA_MiltenNW_LeaveMyShip_15_00"); //Nakonec tě přece jenom nemůžu vzít s sebou. AI_Output(self,other,"DIA_MiltenNW_LeaveMyShip_03_01"); //Sám musíš nejlíp vědět, koho budeš potřebovat. Pokud si to rozmyslíš, budu na tebe čekat v klášteře. MiltenNW_IsOnBoard = LOG_OBSOLETE; Crewmember_Count = Crewmember_Count - 1; Npc_ExchangeRoutine(self,"ShipOff"); }; instance DIA_MiltenNW_StillNeedYou(C_Info) { npc = PC_Mage_NW; nr = 55; condition = DIA_MiltenNW_StillNeedYou_Condition; information = DIA_MiltenNW_StillNeedYou_Info; permanent = TRUE; description = "Potřebuji tě."; }; func int DIA_MiltenNW_StillNeedYou_Condition() { if((MiltenNW_IsOnBoard == LOG_OBSOLETE) && (Crewmember_Count < Max_Crew) && (CAPITANORDERDIAWAY == FALSE)) { return TRUE; }; }; func void DIA_MiltenNW_StillNeedYou_Info() { AI_Output(other,self,"DIA_MiltenNW_StillNeedYou_15_00"); //Potřebuji tě. AI_Output(self,other,"DIA_MiltenNW_StillNeedYou_03_01"); //Bude mi ctí. Pojďme, nemáme času nazbyt. AI_Output(self,other,"DIA_MiltenNW_StillNeedYou_03_02"); //Jdu do přístavu. Potkáme se tam. MiltenNW_IsOnBoard = LOG_SUCCESS; Crewmember_Count = Crewmember_Count + 1; if(MIS_ReadyforChapter6 == TRUE) { Npc_ExchangeRoutine(self,"SHIP"); } else { Npc_ExchangeRoutine(self,"WAITFORSHIP"); }; AI_StopProcessInfos(self); }; instance DIA_MiltenNW_Teach(C_Info) { npc = PC_Mage_NW; nr = 90; condition = DIA_MiltenNW_Teach_Condition; information = DIA_MiltenNW_Teach_Info; permanent = TRUE; description = "Chci se naučit nějaká nová kouzla."; }; func int DIA_MiltenNW_Teach_Condition() { if(other.guild == GIL_KDF) { return TRUE; }; }; func void DIA_MiltenNW_Teach_Info() { AI_Output(other,self,"DIA_MiltenNW_Teach_15_00"); //Chci se naučit nějaká nová kouzla. if(Npc_GetTalentSkill(other,NPC_TALENT_MAGE) >= 2) { Info_ClearChoices(DIA_MiltenNW_Teach); Info_AddChoice(DIA_MiltenNW_Teach,Dialog_Back,DIA_MiltenNW_Teach_BACK); if(PLAYER_TALENT_RUNES[SPL_InstantFireball] == FALSE) { Info_AddChoice(DIA_MiltenNW_Teach,b_buildlearnstringforrunes(NAME_SPL_InstantFireball,B_GetLearnCostTalent(other,NPC_TALENT_RUNES,SPL_InstantFireball)),DIA_MiltenNW_Teach_Feuerball); }; if((PLAYER_TALENT_RUNES[SPL_RapidFirebolt] == FALSE) && (LegoSpells == TRUE)) { Info_AddChoice(DIA_MiltenNW_Teach,b_buildlearnstringforrunes(NAME_SPL_RapidFirebolt,B_GetLearnCostTalent(other,NPC_TALENT_RUNES,SPL_RapidFirebolt)),DIA_MiltenNW_Teach_RapidFirebolt); }; } else { AI_Output(self,other,"DIA_MiltenNW_Teach_03_01"); //Ještě jsi nepostoupil do druhého kruh magie. Není nic, co bych tě mohl naučit. }; }; func void DIA_MiltenNW_Teach_BACK() { Info_ClearChoices(DIA_MiltenNW_Teach); }; func void DIA_MiltenNW_Teach_Feuerball() { B_TeachPlayerTalentRunes(self,other,SPL_InstantFireball); }; func void DIA_MiltenNW_Teach_RapidFirebolt() { B_TeachPlayerTalentRunes(self,other,SPL_RapidFirebolt); }; instance DIA_MiltenNW_Mana(C_Info) { npc = PC_Mage_NW; nr = 100; condition = DIA_MiltenNW_Mana_Condition; information = DIA_MiltenNW_Mana_Info; permanent = TRUE; description = "Chtěl bych posílit svoji magickou moc."; }; func int DIA_MiltenNW_Mana_Condition() { if(other.guild == GIL_KDF) { return TRUE; }; }; func void DIA_MiltenNW_Mana_Info() { AI_Output(other,self,"DIA_MiltenNW_Mana_15_00"); //Chtěl bych posílit svoji magickou moc. Info_ClearChoices(DIA_MiltenNW_Mana); Info_AddChoice(DIA_MiltenNW_Mana,Dialog_Back,DIA_MiltenNW_Mana_BACK); Info_AddChoice(DIA_MiltenNW_Mana,b_buildlearnstringforskills(PRINT_LearnMANA1,B_GetLearnCostAttribute(other,ATR_MANA_MAX)),DIA_MiltenNW_Mana_1); Info_AddChoice(DIA_MiltenNW_Mana,b_buildlearnstringforskills(PRINT_LearnMANA5,B_GetLearnCostAttribute(other,ATR_MANA_MAX) * 5),DIA_MiltenNW_Mana_5); }; func void DIA_MiltenNW_Mana_BACK() { if(other.attribute[ATR_MANA_MAX] >= T_MAX) { AI_Output(self,other,"DIA_MiltenNW_Mana_03_00"); //Tvoje magické síly jsou velké. Moc velké na to, abych ti je pomohl ještě zvýšit. }; Info_ClearChoices(DIA_MiltenNW_Mana); }; func void DIA_MiltenNW_Mana_1() { B_TeachAttributePoints(self,other,ATR_MANA_MAX,1,T_MAX); Info_ClearChoices(DIA_MiltenNW_Mana); Info_AddChoice(DIA_MiltenNW_Mana,Dialog_Back,DIA_MiltenNW_Mana_BACK); Info_AddChoice(DIA_MiltenNW_Mana,b_buildlearnstringforskills(PRINT_LearnMANA1,B_GetLearnCostAttribute(other,ATR_MANA_MAX)),DIA_MiltenNW_Mana_1); Info_AddChoice(DIA_MiltenNW_Mana,b_buildlearnstringforskills(PRINT_LearnMANA5,B_GetLearnCostAttribute(other,ATR_MANA_MAX) * 5),DIA_MiltenNW_Mana_5); }; func void DIA_MiltenNW_Mana_5() { B_TeachAttributePoints(self,other,ATR_MANA_MAX,5,T_MAX); Info_ClearChoices(DIA_MiltenNW_Mana); Info_AddChoice(DIA_MiltenNW_Mana,Dialog_Back,DIA_MiltenNW_Mana_BACK); Info_AddChoice(DIA_MiltenNW_Mana,b_buildlearnstringforskills(PRINT_LearnMANA1,B_GetLearnCostAttribute(other,ATR_MANA_MAX)),DIA_MiltenNW_Mana_1); Info_AddChoice(DIA_MiltenNW_Mana,b_buildlearnstringforskills(PRINT_LearnMANA5,B_GetLearnCostAttribute(other,ATR_MANA_MAX) * 5),DIA_MiltenNW_Mana_5); }; instance DIA_MILTENNW_CASSIA(C_Info) { npc = PC_Mage_NW; nr = 40; condition = dia_miltennw_cassia_condition; information = dia_miltennw_cassia_info; permanent = FALSE; description = "Asi nevíš..."; }; func int dia_miltennw_cassia_condition() { if((MIS_CASSIAGOLDCUP == LOG_Running) && (MILTENSAYABOUTOCKEY == FALSE) && (Npc_HasItems(other,ItKe_OC_Store) == 0) && (CAPITANORDERDIAWAY == FALSE)) { return TRUE; }; }; func void dia_miltennw_cassia_info() { AI_Output(other,self,"DIA_MiltenNW_Cassia_15_00"); //Asi nevíš, kde je klíč od skladiště paladinů na hradě? AI_Output(self,other,"DIA_MiltenNW_Cassia_03_01"); //Jsi snad zloděj? Nicméně tam toho stejně moc není a klíč se ztratil. AI_Output(self,other,"DIA_MiltenNW_Cassia_03_02"); //Jednoho krásného dne se šel Engor projít a vrátil se bez klíče. AI_Output(self,other,"DIA_MiltenNW_Cassia_03_03"); //Dříve nebo později dá Garond rozbít dveře a Engor je bude muset opravit. B_LogEntry(TOPIC_CASSIAGOLDCUP,"Engor prý při procházce na čerstvém vzduchu ztratil klíč od skladiště. Mohl bych se po něm podívat..."); MILTENSAYABOUTOCKEY = TRUE; }; instance DIA_Mage_NW_PICKPOCKET(C_Info) { npc = PC_Mage_NW; nr = 900; condition = DIA_Mage_NW_PICKPOCKET_Condition; information = DIA_Mage_NW_PICKPOCKET_Info; permanent = TRUE; description = PICKPOCKET_COMM; }; func int DIA_Mage_NW_PICKPOCKET_Condition() { return C_Beklauen(56,75); }; func void DIA_Mage_NW_PICKPOCKET_Info() { Info_ClearChoices(DIA_Mage_NW_PICKPOCKET); Info_AddChoice(DIA_Mage_NW_PICKPOCKET,Dialog_Back,DIA_Mage_NW_PICKPOCKET_BACK); Info_AddChoice(DIA_Mage_NW_PICKPOCKET,DIALOG_PICKPOCKET,DIA_Mage_NW_PICKPOCKET_DoIt); }; func void DIA_Mage_NW_PICKPOCKET_DoIt() { B_Beklauen(); Info_ClearChoices(DIA_Mage_NW_PICKPOCKET); }; func void DIA_Mage_NW_PICKPOCKET_BACK() { Info_ClearChoices(DIA_Mage_NW_PICKPOCKET); }; instance DIA_MILTENNW_KAP6_EXIT(C_Info) { npc = PC_Mage_NW; nr = 999; condition = dia_miltennw_kap6_exit_condition; information = dia_miltennw_kap6_exit_info; permanent = TRUE; description = Dialog_Ende; }; func int dia_miltennw_kap6_exit_condition() { if(Kapitel >= 6) { return TRUE; }; }; func void dia_miltennw_kap6_exit_info() { AI_StopProcessInfos(self); }; instance DIA_MILTENNW_SOONBATTLE(C_Info) { npc = PC_Mage_NW; nr = 1; condition = dia_miltennw_soonbattle_condition; information = dia_miltennw_soonbattle_info; permanent = FALSE; description = "Víš co se stalo?"; }; func int dia_miltennw_soonbattle_condition() { if((KAPITELORCATC == TRUE) && (STOPBIGBATTLE == FALSE)) { return TRUE; }; }; func void dia_miltennw_soonbattle_info() { AI_Output(other,self,"DIA_MiltenNW_SoonBattle_01_00"); //Víš co se stalo? AI_Output(self,other,"DIA_MiltenNW_SoonBattle_01_01"); //Ano, Pyrokar mi vše řekl, ale překvapen nejsem... AI_Output(self,other,"DIA_MiltenNW_SoonBattle_01_02"); //Dříve nebo později se to stát muselo! AI_Output(self,other,"DIA_MiltenNW_SoonBattle_01_03"); //Ale netušil jsem že tak brzy! AI_Output(other,self,"DIA_MiltenNW_SoonBattle_01_04"); //Bez obav, něco vymyslím. }; instance DIA_MILTENNW_SOONBATTLENOW(C_Info) { npc = PC_Mage_NW; nr = 1; condition = dia_miltennw_soonbattlenow_condition; information = dia_miltennw_soonbattlenow_info; permanent = FALSE; description = "Paladinové potřebují pomoc."; }; func int dia_miltennw_soonbattlenow_condition() { if((KAPITELORCATC == TRUE) && (KDF_JOINHAGEN == TRUE) && (STOPBIGBATTLE == FALSE)) { return TRUE; }; }; func void dia_miltennw_soonbattlenow_info() { AI_Output(other,self,"DIA_MiltenNW_SoonBattleNow_01_00"); //Paladinové potřebují pomoc. AI_Output(self,other,"DIA_MiltenNW_SoonBattleNow_01_01"); //Bez obav... Vím o tom! AI_Output(self,other,"DIA_MiltenNW_SoonBattleNow_01_02"); //Udělám vše co bude v mých silách. }; instance DIA_MILTENNW_BATTLEWIN(C_Info) { npc = PC_Mage_NW; nr = 1; condition = dia_miltennw_battlewin_condition; information = dia_miltennw_battlewin_info; permanent = FALSE; description = "Nepřítel prohrá!"; }; func int dia_miltennw_battlewin_condition() { if((STOPBIGBATTLE == TRUE) && (HUMANSWINSBB == TRUE) && (ALLGREATVICTORY == FALSE)) { return TRUE; }; }; func void dia_miltennw_battlewin_info() { B_GivePlayerXP(200); AI_Output(other,self,"DIA_MiltenNW_BattleWin_01_00"); //Nepřítel prohrál! AI_Output(self,other,"DIA_MiltenNW_BattleWin_01_01"); //Nyní už vše bude lepší! if(MONASTERYISFREE == FALSE) { AI_Output(self,other,"DIA_MiltenNW_BattleWin_01_02"); //Ale o vítězství celé války mluvíme moc brzy. AI_Output(self,other,"DIA_MiltenNW_BattleWin_01_03"); //Klášter je stále obležen skřety. AI_Output(other,self,"DIA_MiltenNW_BattleWin_01_04"); //Bez obav, brzy se s tím vypořádám. AI_Output(self,other,"DIA_MiltenNW_BattleWin_01_05"); //Doufám, že máš pravdu. }; }; instance DIA_MILTENNW_RUNEMAGICNOTWORK(C_Info) { npc = PC_Mage_NW; nr = 1; condition = dia_miltennw_runemagicnotwork_condition; information = dia_miltennw_runemagicnotwork_info; permanent = FALSE; description = "Tvé magické runy, pracují?"; }; func int dia_miltennw_runemagicnotwork_condition() { if((STOPBIGBATTLE == TRUE) && (MIS_RUNEMAGICNOTWORK == LOG_Running) && (FIREMAGERUNESNOT == FALSE)) { return TRUE; }; }; func void dia_miltennw_runemagicnotwork_info() { B_GivePlayerXP(200); AI_Output(other,self,"DIA_MiltenNW_RuneMagicNotWork_01_00"); //Tvé magické runy, pracují? AI_Output(self,other,"DIA_MiltenNW_RuneMagicNotWork_01_01"); //Vůbec nechápu jak se to mohlo stát! Prostě nefungují! AI_Output(other,self,"DIA_MiltenNW_RuneMagicNotWork_01_02"); //A co tvý bratři?! AI_Output(self,other,"DIA_MiltenNW_RuneMagicNotWork_01_03"); //Ani ostatní mágové Ohně... AI_Output(other,self,"DIA_MiltenNW_RuneMagicNotWork_01_04"); //Jasně... B_LogEntry(TOPIC_RUNEMAGICNOTWORK,"Runové kameny ostatních mágů Ohně také ztratili svou moc."); FIREMAGERUNESNOT = TRUE; }; instance DIA_MILTENNW_GOONORKSHUNT(C_Info) { npc = PC_Mage_NW; nr = 1; condition = dia_miltennw_goonorkshunt_condition; information = dia_miltennw_goonorkshunt_info; permanent = FALSE; description = "Jdu na lov skřetů, jdeš také?"; }; func int dia_miltennw_goonorkshunt_condition() { if((HAGENGIVEHELP == TRUE) && (ALLGREATVICTORY == FALSE) && (MILTENTOBIGLAND == FALSE) && (RUNEMAGICNOTWORK == TRUE) && (ALLDISMISSFROMHUNT == FALSE) && Npc_KnowsInfo(hero,dia_miltennw_battlewin)) { return TRUE; }; }; func void dia_miltennw_goonorkshunt_info() { B_GivePlayerXP(100); AI_Output(other,self,"DIA_MiltenNW_GoOnOrksHunt_01_00"); //Jdu na lov skřetů, jdeš také? AI_Output(self,other,"DIA_MiltenNW_GoOnOrksHunt_01_01"); //Rád bych, ale má magie nefunguje. AI_Output(self,other,"DIA_MiltenNW_GoOnOrksHunt_01_02"); //A bez ní už nejsem tak silný! MILTENJOINMEHUNT = TRUE; }; instance DIA_MILTENNW_FOLLOWME(C_Info) { npc = PC_Mage_NW; nr = 1; condition = dia_miltennw_followme_condition; information = dia_miltennw_followme_info; permanent = TRUE; description = "Pojďme!"; }; func int dia_miltennw_followme_condition() { if((MILTENJOINMEHUNT == TRUE) && (self.aivar[AIV_PARTYMEMBER] == FALSE) && (ALLDISMISSFROMHUNT == FALSE) && (MILTENTOBIGLAND == FALSE)) { return TRUE; }; }; func void dia_miltennw_followme_info() { AI_Output(other,self,"DIA_MiltenNW_FollowMe_01_00"); //Pojďme! AI_Output(self,other,"DIA_MiltenNW_FollowMe_01_01"); //Konečně! Jsem připraven. if(Npc_HasItems(self,ItMw_1h_Nov_Mace) < 1) { CreateInvItems(self,ItMw_1h_Nov_Mace,1); }; EquipItem(self,ItMw_1h_Nov_Mace); Npc_ExchangeRoutine(self,"Follow"); self.aivar[AIV_PARTYMEMBER] = TRUE; AI_StopProcessInfos(self); }; instance DIA_MILTENNW_STOPHERE(C_Info) { npc = PC_Mage_NW; nr = 1; condition = dia_miltennw_stophere_condition; information = dia_miltennw_stophere_info; permanent = TRUE; description = "Počkej zde!"; }; func int dia_miltennw_stophere_condition() { if((MILTENJOINMEHUNT == TRUE) && (self.aivar[AIV_PARTYMEMBER] == TRUE) && (ALLDISMISSFROMHUNT == FALSE) && (MILTENTOBIGLAND == FALSE)) { return TRUE; }; }; func void dia_miltennw_stophere_info() { AI_Output(other,self,"DIA_MiltenNW_StopHere_01_00"); //Počkej zde! if(MONASTERYISFREE == FALSE) { AI_Output(self,other,"DIA_MiltenNW_StopHere_01_01"); //Dobrá, jdu zpět na farmu. AI_Output(self,other,"DIA_MiltenNW_StopHere_01_02"); //Najdeš mě tam. Npc_ExchangeRoutine(self,"CampOn"); } else { AI_Output(self,other,"DIA_MiltenNW_StopHere_01_03"); //Dobrá, jdu zpět do kláštera. AI_Output(self,other,"DIA_MiltenNW_StopHere_01_04"); //Najdeš mě tam. Npc_ExchangeRoutine(self,"OrcAtcNW"); }; self.aivar[AIV_PARTYMEMBER] = FALSE; AI_StopProcessInfos(self); }; instance DIA_MILTENNW_ALLGREATVICTORY(C_Info) { npc = PC_Mage_NW; nr = 1; condition = dia_miltennw_allgreatvictory_condition; information = dia_miltennw_allgreatvictory_info; permanent = FALSE; description = "Unaven?"; }; func int dia_miltennw_allgreatvictory_condition() { if(ALLGREATVICTORY == TRUE) { return TRUE; }; }; func void dia_miltennw_allgreatvictory_info() { B_GivePlayerXP(100); AI_Output(other,self,"DIA_MiltenNW_AllGreatVictory_01_00"); //Unaven? AI_Output(self,other,"DIA_MiltenNW_AllGreatVictory_01_01"); //Jen trochu... Poslední dny mě zmohly. AI_Output(self,other,"DIA_MiltenNW_AllGreatVictory_01_02"); //Nicméně lepší než stále žít ve strachu co bude! }; instance DIA_MILTENNW_WHATDONOW(C_Info) { npc = PC_Mage_NW; nr = 1; condition = dia_miltennw_whatdonow_condition; information = dia_miltennw_whatdonow_info; permanent = FALSE; description = "Půjdeš do kláštera?"; }; func int dia_miltennw_whatdonow_condition() { if((ALLGREATVICTORY == TRUE) && (MILTENTOBIGLAND == FALSE)) { return TRUE; }; }; func void dia_miltennw_whatdonow_info() { AI_Output(other,self,"DIA_MiltenNW_WhatDoNow_01_00"); //Půjdeš do kláštera? AI_Output(self,other,"DIA_MiltenNW_WhatDoNow_01_01"); //Pravděpodobně... Nemyslím, že bych teď měl chodit jinam! AI_Output(self,other,"DIA_MiltenNW_WhatDoNow_01_02"); //Mám tam nějakou práci. AI_Output(other,self,"DIA_MiltenNW_WhatDoNow_01_03"); //A jakou?! AI_Output(self,other,"DIA_MiltenNW_WhatDoNow_01_04"); //Hmm... Už dlouho jsem chtěl najít tajnou knihovnu. }; instance DIA_MILTENNW_TRAVELONBIGLAND(C_Info) { npc = PC_Mage_NW; nr = 1; condition = dia_miltennw_travelonbigland_condition; information = dia_miltennw_travelonbigland_info; permanent = FALSE; description = "Popluješ se mnou na kontinent?"; }; func int dia_miltennw_travelonbigland_condition() { if(WHOTRAVELONBIGLAND == TRUE) { return TRUE; }; }; func void dia_miltennw_travelonbigland_info() { B_GivePlayerXP(200); AI_Output(other,self,"DIA_MiltenNW_TravelOnBigLand_01_00"); //Popluješ se mnou na kontinent? AI_Output(self,other,"DIA_MiltenNW_TravelOnBigLand_01_01"); //Hmm... Tvá nabídka je zajímavá. AI_Output(self,other,"DIA_MiltenNW_TravelOnBigLand_01_02"); //Abych řekl tady, ostrov mě trochu nudí a v Nordmaru je slavná knihovna našeho řádu. AI_Output(self,other,"DIA_MiltenNW_TravelOnBigLand_01_04"); //Eh... (úsměv) Dobrá, tak teda jdu s tebou! AI_Output(other,self,"DIA_MiltenNW_TravelOnBigLand_01_05"); //Potkáme se na lodi. COUNTTRAVELONBIGLAND = COUNTTRAVELONBIGLAND + 1; MILTENTOBIGLAND = TRUE; B_LogEntry(TOPIC_SALETOBIGLAND,"Milten jde se mnou na kontinent!"); Npc_ExchangeRoutine(self,"SHIP"); AI_StopProcessInfos(self); };
D
import std.algorithm; import std.conv; import std.stdio; import std.string; {% if mod or yes_str or no_str %} {% endif %} {% if mod %} immutable long MOD = {{ mod }}; {% endif %} {% if yes_str %} immutable string YES = "{{ yes_str }}"; {% endif %} {% if no_str %} immutable string NO = "{{ no_str }}"; {% endif %} {% if prediction_success %} void solve({{ formal_arguments }}){ writeln(N.to!string ~ " " ~ M.to!string); assert(H.length == cast(size_t) (N - 1)); foreach (i; 0 .. cast(size_t) (N - 1)) { assert(H[i].length == M - 2); writeln(H[i].join(" ")); } assert(A.length == cast(size_t) (N - 1)); assert(B.length == cast(size_t) (N - 1)); foreach (i; 0 .. cast(size_t) (N - 1)) { writeln(A[i].to!string ~ " " ~ B[i].to!string); } writeln(Q); assert(X.length == cast(size_t) (M + Q)); foreach (i; 0 .. cast(size_t) (M + Q)) { writeln(X[i]); } writeln(YES); writeln(NO); writeln(MOD); } {% endif %} int main(){ auto input = stdin.byLine.map!split.joiner; {% if prediction_success %} {{ input_part }} solve({{ actual_arguments }}); {% endif %} return 0; }
D
/Users/tangzekun/jerry/photoTag/photoTag/DerivedData/photoTag/Build/Intermediates/photoTag.build/Debug-iphonesimulator/photoTag.build/Objects-normal/x86_64/imageCellModel.o : /Users/tangzekun/jerry/photoTag/photoTag/loadDataFromPlist.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/imageCellModel.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/imageCollectionViewCell.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/imageCollectionViewController.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/categoryCellModel.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/gradiantView.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/addNewAlbumTableViewCell.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/detailViewController.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/WaterfallLayout.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/albumCellModel.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/AppDelegate.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/enumCommon.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/albumTableViewCell.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/MPCManager.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/guessViewController.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/addNewAlbumCellModel.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/albumTableViewController.swift /Users/tangzekun/jerry/photoTag/photoTag/categoryTableViewCell.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AssetsLibrary.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/MultipeerConnectivity.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Users/tangzekun/jerry/photoTag/photoTag/DerivedData/photoTag/Build/Intermediates/photoTag.build/Debug-iphonesimulator/photoTag.build/Objects-normal/x86_64/imageCellModel~partial.swiftmodule : /Users/tangzekun/jerry/photoTag/photoTag/loadDataFromPlist.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/imageCellModel.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/imageCollectionViewCell.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/imageCollectionViewController.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/categoryCellModel.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/gradiantView.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/addNewAlbumTableViewCell.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/detailViewController.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/WaterfallLayout.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/albumCellModel.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/AppDelegate.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/enumCommon.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/albumTableViewCell.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/MPCManager.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/guessViewController.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/addNewAlbumCellModel.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/albumTableViewController.swift /Users/tangzekun/jerry/photoTag/photoTag/categoryTableViewCell.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AssetsLibrary.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/MultipeerConnectivity.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Users/tangzekun/jerry/photoTag/photoTag/DerivedData/photoTag/Build/Intermediates/photoTag.build/Debug-iphonesimulator/photoTag.build/Objects-normal/x86_64/imageCellModel~partial.swiftdoc : /Users/tangzekun/jerry/photoTag/photoTag/loadDataFromPlist.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/imageCellModel.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/imageCollectionViewCell.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/imageCollectionViewController.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/categoryCellModel.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/gradiantView.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/addNewAlbumTableViewCell.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/detailViewController.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/WaterfallLayout.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/albumCellModel.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/AppDelegate.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/enumCommon.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/albumTableViewCell.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/MPCManager.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/guessViewController.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/addNewAlbumCellModel.swift /Users/tangzekun/jerry/photoTag/photoTag/photoTag/albumTableViewController.swift /Users/tangzekun/jerry/photoTag/photoTag/categoryTableViewCell.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AssetsLibrary.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/MultipeerConnectivity.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule
D
instance DIA_STRF_8125_Addon_Nuts_EXIT(C_Info) { npc = STRF_8125_Addon_Nuts; nr = 999; condition = DIA_STRF_8125_Addon_Nuts_EXIT_Condition; information = DIA_STRF_8125_Addon_Nuts_EXIT_Info; permanent = TRUE; description = Dialog_Ende; }; func int DIA_STRF_8125_Addon_Nuts_EXIT_Condition() { return TRUE; }; func void DIA_STRF_8125_Addon_Nuts_EXIT_Info() { AI_StopProcessInfos(self); }; instance DIA_STRF_8125_Addon_Nuts_PreHello(C_Info) { npc = STRF_8125_Addon_Nuts; nr = 2; condition = DIA_STRF_8125_Addon_Nuts_PreHello_condition; information = DIA_STRF_8125_Addon_Nuts_PreHello_info; important = TRUE; permanent = TRUE; }; func int DIA_STRF_8125_Addon_Nuts_PreHello_condition() { if(Npc_IsInState(self,ZS_Talk) && (NutsRest == FALSE)) { return TRUE; }; }; func void DIA_STRF_8125_Addon_Nuts_PreHello_info() { AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_PreHello_01_00"); //Эй, не мешай мне работать! Поговорим позже. AI_StopProcessInfos(self); }; instance DIA_STRF_8125_Addon_Nuts_NotWork(C_Info) { npc = STRF_8125_Addon_Nuts; nr = 1; condition = DIA_STRF_8125_Addon_Nuts_NotWork_Condition; information = DIA_STRF_8125_Addon_Nuts_NotWork_Info; permanent = FALSE; description = "Да я смотрю, ты тут особо и не работаешь."; }; func int DIA_STRF_8125_Addon_Nuts_NotWork_Condition() { if(NutsRest == TRUE) { return TRUE; }; }; func void DIA_STRF_8125_Addon_Nuts_NotWork_Info() { AI_Output(other,self,"DIA_STRF_8125_Addon_Nuts_NotWork_01_00"); //Да я смотрю, ты тут особо и не работаешь. AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_NotWork_01_01"); //Ну...(лукаво) Только когда этот орк охранник спит. AI_Output(other,self,"DIA_STRF_8125_Addon_Nuts_NotWork_01_02"); //А спит он, по всей видимости, очень долго. AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_NotWork_01_03"); //Даже если так...(растерянно) Кто об этом узнает? AI_Output(other,self,"DIA_STRF_8125_Addon_Nuts_NotWork_01_04"); //Я мог бы рассказать про тебя оркам. AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_NotWork_01_05"); //Но ты ведь этого не сделаешь? Правда? AI_Output(other,self,"DIA_STRF_8125_Addon_Nuts_NotWork_01_06"); //Не сделаю. Если только поможешь мне в одном деле. AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_NotWork_01_07"); //Что тебе от меня нужно? AI_Output(other,self,"DIA_STRF_8125_Addon_Nuts_NotWork_01_08"); //Да ладно, расслабься! Я просто пошутил. AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_NotWork_01_09"); //Ну и шутки у тебя, приятель...(нервно) Так можно и последние нервы потерять! }; instance DIA_STRF_8125_Addon_Nuts_YouHereLongTime(C_Info) { npc = STRF_8125_Addon_Nuts; nr = 1; condition = DIA_STRF_8125_Addon_Nuts_YouHereLongTime_Condition; information = DIA_STRF_8125_Addon_Nuts_YouHereLongTime_Info; permanent = FALSE; description = "Ты здесь давно?"; }; func int DIA_STRF_8125_Addon_Nuts_YouHereLongTime_Condition() { if((Npc_KnowsInfo(hero,DIA_STRF_8125_Addon_Nuts_NotWork) == TRUE) && (NutsRest == TRUE)) { return TRUE; }; }; func void DIA_STRF_8125_Addon_Nuts_YouHereLongTime_Info() { AI_Output(other,self,"DIA_STRF_8125_Addon_Nuts_YouHereLongTime_01_00"); //Ты здесь давно? AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_YouHereLongTime_01_01"); //По правде говоря, я уже потерял счет времени. AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_YouHereLongTime_01_02"); //Но если орки и дальше будут заставлять меня столько работать, долго я тут не протяну. }; instance DIA_STRF_8125_Addon_Nuts_Teleport(C_Info) { npc = STRF_8125_Addon_Nuts; nr = 1; condition = DIA_STRF_8125_Addon_Nuts_Teleport_Condition; information = DIA_STRF_8125_Addon_Nuts_Teleport_Info; permanent = FALSE; description = "Чем ты тут занимаешься, когда... работаешь?"; }; func int DIA_STRF_8125_Addon_Nuts_Teleport_Condition() { if((Npc_KnowsInfo(hero,DIA_STRF_8125_Addon_Nuts_NotWork) == TRUE) && (NutsRest == TRUE)) { return TRUE; }; }; func void DIA_STRF_8125_Addon_Nuts_Teleport_Info() { AI_Output(other,self,"DIA_STRF_8125_Addon_Nuts_Teleport_01_00"); //Чем ты тут занимаешься, когда... работаешь? AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_Teleport_01_01"); //Ты будешь удивлен, но я читаю. AI_Output(other,self,"DIA_STRF_8125_Addon_Nuts_Teleport_01_02"); //Читаешь? Что тут можно читать? AI_PlayAni(self,"T_SEARCH"); AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_Teleport_01_03"); //В этой пещере я нашел одну старую каменную табличку. AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_Teleport_01_04"); //Язык в ней немного похож на человеческий. Хотя точно не уверен. AI_Output(other,self,"DIA_STRF_8125_Addon_Nuts_Teleport_01_05"); //Дашь взглянуть? AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_Teleport_01_06"); //Эй, руки прочь! Считай, это единственная вещь, которая наполняет хоть каким-то смыслом всю мою жизнь. AI_Output(other,self,"DIA_STRF_8125_Addon_Nuts_Teleport_01_07"); //Даже так? AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_Teleport_01_08"); //Конечно! Ведь кроме орков и этой проклятой жилы я больше уже тут ничего не увижу. AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_Teleport_01_09"); //А так хоть какое то разнообразие! }; instance DIA_STRF_8125_Addon_Nuts_Want(C_Info) { npc = STRF_8125_Addon_Nuts; nr = 1; condition = DIA_STRF_8125_Addon_Nuts_Want_Condition; information = DIA_STRF_8125_Addon_Nuts_Want_Info; permanent = FALSE; description = "Что ты хочешь за свою табличку?"; }; func int DIA_STRF_8125_Addon_Nuts_Want_Condition() { if((Npc_KnowsInfo(hero,DIA_STRF_8125_Addon_Nuts_Teleport) == TRUE) && (NutsRest == TRUE)) { return TRUE; }; }; func void DIA_STRF_8125_Addon_Nuts_Want_Info() { AI_Output(other,self,"DIA_STRF_8125_Addon_Nuts_Want_01_00"); //Что ты хочешь за свою табличку? AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_Want_01_01"); //Хммм...(лукаво) Вообще-то она для меня бесценна! AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_Want_01_02"); //Но раз уж ты спросил... Полагаю, что хорошая книга будет достойной заменой для нее. AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_Want_01_03"); //И желательно про звезды. AI_Output(other,self,"DIA_STRF_8125_Addon_Nuts_Want_01_04"); //Про звезды? AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_Want_01_05"); //Я всегда любил наблюдать за звездами. Даже еще когда был мальчишкой! AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_Want_01_06"); //Но судьба распорядилась иначе...(обреченно) И теперь я их вряд ли когда-либо увижу. AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_Want_01_07"); //Но зато хотя бы почитаю про них. AI_Output(other,self,"DIA_STRF_8125_Addon_Nuts_Want_01_08"); //Понимаю. MIS_Astronomy = LOG_Running; Log_CreateTopic(TOPIC_Astronomy,LOG_MISSION); Log_SetTopicStatus(TOPIC_Astronomy,LOG_Running); B_LogEntry(TOPIC_Astronomy,"В обмен на свою табличку Нутс хочет заполучить какую-нибудь книгу - и желательно про звезды."); }; instance DIA_STRF_8125_Addon_Nuts_WantDone(C_Info) { npc = STRF_8125_Addon_Nuts; nr = 1; condition = DIA_STRF_8125_Addon_Nuts_WantDone_Condition; information = DIA_STRF_8125_Addon_Nuts_WantDone_Info; permanent = FALSE; description = "Вот нужная тебе книга."; }; func int DIA_STRF_8125_Addon_Nuts_WantDone_Condition() { if((MIS_Astronomy == LOG_Running) && (Npc_HasItems(other,ASTRONOMIE) >= 1) && (NutsRest == TRUE)) { return TRUE; }; }; func void DIA_STRF_8125_Addon_Nuts_WantDone_Info() { B_GivePlayerXP(300); AI_Output(other,self,"DIA_STRF_8125_Addon_Nuts_WantDone_01_00"); //Вот нужная тебе книга. AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_WantDone_01_01"); //Хммм...(недоверчиво) А она хоть интересная? AI_Output(other,self,"DIA_STRF_8125_Addon_Nuts_WantDone_01_02"); //Ну, все как ты и просил. Про звезды там... AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_WantDone_01_03"); //Лучше дай я посмотрю. B_GiveInvItems(other,self,ASTRONOMIE,1); Npc_RemoveInvItems(self,ASTRONOMIE,1); B_UseFakeScroll(); AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_WantDone_01_04"); //Отлично, приятель! Похоже, что именно это мне и надо! AI_Output(other,self,"DIA_STRF_8125_Addon_Nuts_WantDone_01_05"); //А как насчет нашего уговора? AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_WantDone_01_06"); //Все в силе! Вот - держи ту табличку. B_GiveInvItems(self,other,ItWr_OldTextMine,1); AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_WantDone_01_07"); //А книгу, значит, я оставлю себе, да? AI_Output(other,self,"DIA_STRF_8125_Addon_Nuts_WantDone_01_08"); //Конечно. AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_WantDone_01_09"); //Кстати, этой табличкой интересовался в свое время Кроу. AI_Output(self,other,"DIA_STRF_8125_Addon_Nuts_WantDone_01_10"); //Ну, это я так, к слову... RT_Respect = RT_Respect + 1; MIS_Astronomy = LOG_Success; Log_SetTopicStatus(TOPIC_Astronomy,LOG_Success); B_LogEntry(TOPIC_Astronomy,"Я принес книгу Нутсу."); };
D
<?xml version="1.0" encoding="ASCII" standalone="no"?> <di:SashWindowsMngr xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmi:version="2.0"> <pageList> <availablePage> <emfPageIdentifier href="VAR_27_agm-1898343596.notation#_copSALmGEeKQQp7P9cQvNQ"/> </availablePage> </pageList> <sashModel currentSelection="//@sashModel/@windows.0/@children.0"> <windows> <children xsi:type="di:TabFolder"> <children> <emfPageIdentifier href="VAR_27_agm-1898343596.notation#_copSALmGEeKQQp7P9cQvNQ"/> </children> </children> </windows> </sashModel> </di:SashWindowsMngr>
D
/* $OpenBSD: ssl3.h,v 1.57 2021/09/10 14:49:13 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * "This product includes cryptographic software written by * Eric Young (eay@cryptsoft.com)" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. All advertising materials mentioning features or use of this * software must display the following acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" * * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to * endorse or promote products derived from this software without * prior written permission. For written permission, please contact * openssl-core@openssl.org. * * 5. Products derived from this software may not be called "OpenSSL" * nor may "OpenSSL" appear in their names without prior written * permission of the OpenSSL Project. * * 6. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit (http://www.openssl.org/)" * * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * ==================================================================== * * This product includes cryptographic software written by Eric Young * (eay@cryptsoft.com). This product includes software written by Tim * Hudson (tjh@cryptsoft.com). * */ /* ==================================================================== * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. * ECC cipher suite support in OpenSSL originally developed by * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. */ module libressl.openssl.ssl3; public import libressl.openssl.buffer; public import libressl.openssl.evp; public import libressl.openssl.opensslconf; public import libressl.openssl.ssl; extern (C): nothrow @nogc: /** * TLS_EMPTY_RENEGOTIATION_INFO_SCSV from RFC 5746. */ enum SSL3_CK_SCSV = 0x030000FF; /** * TLS_FALLBACK_SCSV from draft-ietf-tls-downgrade-scsv-03. */ enum SSL3_CK_FALLBACK_SCSV = 0x03005600; enum SSL3_CK_RSA_NULL_MD5 = 0x03000001; enum SSL3_CK_RSA_NULL_SHA = 0x03000002; enum SSL3_CK_RSA_RC4_40_MD5 = 0x03000003; enum SSL3_CK_RSA_RC4_128_MD5 = 0x03000004; enum SSL3_CK_RSA_RC4_128_SHA = 0x03000005; enum SSL3_CK_RSA_RC2_40_MD5 = 0x03000006; enum SSL3_CK_RSA_IDEA_128_SHA = 0x03000007; enum SSL3_CK_RSA_DES_40_CBC_SHA = 0x03000008; enum SSL3_CK_RSA_DES_64_CBC_SHA = 0x03000009; enum SSL3_CK_RSA_DES_192_CBC3_SHA = 0x0300000A; enum SSL3_CK_DH_DSS_DES_40_CBC_SHA = 0x0300000B; enum SSL3_CK_DH_DSS_DES_64_CBC_SHA = 0x0300000C; enum SSL3_CK_DH_DSS_DES_192_CBC3_SHA = 0x0300000D; enum SSL3_CK_DH_RSA_DES_40_CBC_SHA = 0x0300000E; enum SSL3_CK_DH_RSA_DES_64_CBC_SHA = 0x0300000F; enum SSL3_CK_DH_RSA_DES_192_CBC3_SHA = 0x03000010; enum SSL3_CK_EDH_DSS_DES_40_CBC_SHA = 0x03000011; enum SSL3_CK_EDH_DSS_DES_64_CBC_SHA = 0x03000012; enum SSL3_CK_EDH_DSS_DES_192_CBC3_SHA = 0x03000013; enum SSL3_CK_EDH_RSA_DES_40_CBC_SHA = 0x03000014; enum SSL3_CK_EDH_RSA_DES_64_CBC_SHA = 0x03000015; enum SSL3_CK_EDH_RSA_DES_192_CBC3_SHA = 0x03000016; enum SSL3_CK_ADH_RC4_40_MD5 = 0x03000017; enum SSL3_CK_ADH_RC4_128_MD5 = 0x03000018; enum SSL3_CK_ADH_DES_40_CBC_SHA = 0x03000019; enum SSL3_CK_ADH_DES_64_CBC_SHA = 0x0300001A; enum SSL3_CK_ADH_DES_192_CBC_SHA = 0x0300001B; /* * VRS Additional Kerberos5 entries */ enum SSL3_CK_KRB5_DES_64_CBC_SHA = 0x0300001E; enum SSL3_CK_KRB5_DES_192_CBC3_SHA = 0x0300001F; enum SSL3_CK_KRB5_RC4_128_SHA = 0x03000020; enum SSL3_CK_KRB5_IDEA_128_CBC_SHA = 0x03000021; enum SSL3_CK_KRB5_DES_64_CBC_MD5 = 0x03000022; enum SSL3_CK_KRB5_DES_192_CBC3_MD5 = 0x03000023; enum SSL3_CK_KRB5_RC4_128_MD5 = 0x03000024; enum SSL3_CK_KRB5_IDEA_128_CBC_MD5 = 0x03000025; enum SSL3_CK_KRB5_DES_40_CBC_SHA = 0x03000026; enum SSL3_CK_KRB5_RC2_40_CBC_SHA = 0x03000027; enum SSL3_CK_KRB5_RC4_40_SHA = 0x03000028; enum SSL3_CK_KRB5_DES_40_CBC_MD5 = 0x03000029; enum SSL3_CK_KRB5_RC2_40_CBC_MD5 = 0x0300002A; enum SSL3_CK_KRB5_RC4_40_MD5 = 0x0300002B; enum SSL3_TXT_RSA_NULL_MD5 = "null-MD5"; enum SSL3_TXT_RSA_NULL_SHA = "null-SHA"; enum SSL3_TXT_RSA_RC4_40_MD5 = "EXP-RC4-MD5"; enum SSL3_TXT_RSA_RC4_128_MD5 = "RC4-MD5"; enum SSL3_TXT_RSA_RC4_128_SHA = "RC4-SHA"; enum SSL3_TXT_RSA_RC2_40_MD5 = "EXP-RC2-CBC-MD5"; enum SSL3_TXT_RSA_IDEA_128_SHA = "IDEA-CBC-SHA"; enum SSL3_TXT_RSA_DES_40_CBC_SHA = "EXP-DES-CBC-SHA"; enum SSL3_TXT_RSA_DES_64_CBC_SHA = "DES-CBC-SHA"; enum SSL3_TXT_RSA_DES_192_CBC3_SHA = "DES-CBC3-SHA"; enum SSL3_TXT_DH_DSS_DES_40_CBC_SHA = "EXP-DH-DSS-DES-CBC-SHA"; enum SSL3_TXT_DH_DSS_DES_64_CBC_SHA = "DH-DSS-DES-CBC-SHA"; enum SSL3_TXT_DH_DSS_DES_192_CBC3_SHA = "DH-DSS-DES-CBC3-SHA"; enum SSL3_TXT_DH_RSA_DES_40_CBC_SHA = "EXP-DH-RSA-DES-CBC-SHA"; enum SSL3_TXT_DH_RSA_DES_64_CBC_SHA = "DH-RSA-DES-CBC-SHA"; enum SSL3_TXT_DH_RSA_DES_192_CBC3_SHA = "DH-RSA-DES-CBC3-SHA"; enum SSL3_TXT_EDH_DSS_DES_40_CBC_SHA = "EXP-EDH-DSS-DES-CBC-SHA"; enum SSL3_TXT_EDH_DSS_DES_64_CBC_SHA = "EDH-DSS-DES-CBC-SHA"; enum SSL3_TXT_EDH_DSS_DES_192_CBC3_SHA = "EDH-DSS-DES-CBC3-SHA"; enum SSL3_TXT_EDH_RSA_DES_40_CBC_SHA = "EXP-EDH-RSA-DES-CBC-SHA"; enum SSL3_TXT_EDH_RSA_DES_64_CBC_SHA = "EDH-RSA-DES-CBC-SHA"; enum SSL3_TXT_EDH_RSA_DES_192_CBC3_SHA = "EDH-RSA-DES-CBC3-SHA"; enum SSL3_TXT_ADH_RC4_40_MD5 = "EXP-ADH-RC4-MD5"; enum SSL3_TXT_ADH_RC4_128_MD5 = "ADH-RC4-MD5"; enum SSL3_TXT_ADH_DES_40_CBC_SHA = "EXP-ADH-DES-CBC-SHA"; enum SSL3_TXT_ADH_DES_64_CBC_SHA = "ADH-DES-CBC-SHA"; enum SSL3_TXT_ADH_DES_192_CBC_SHA = "ADH-DES-CBC3-SHA"; enum SSL3_TXT_KRB5_DES_64_CBC_SHA = "KRB5-DES-CBC-SHA"; enum SSL3_TXT_KRB5_DES_192_CBC3_SHA = "KRB5-DES-CBC3-SHA"; enum SSL3_TXT_KRB5_RC4_128_SHA = "KRB5-RC4-SHA"; enum SSL3_TXT_KRB5_IDEA_128_CBC_SHA = "KRB5-IDEA-CBC-SHA"; enum SSL3_TXT_KRB5_DES_64_CBC_MD5 = "KRB5-DES-CBC-MD5"; enum SSL3_TXT_KRB5_DES_192_CBC3_MD5 = "KRB5-DES-CBC3-MD5"; enum SSL3_TXT_KRB5_RC4_128_MD5 = "KRB5-RC4-MD5"; enum SSL3_TXT_KRB5_IDEA_128_CBC_MD5 = "KRB5-IDEA-CBC-MD5"; enum SSL3_TXT_KRB5_DES_40_CBC_SHA = "EXP-KRB5-DES-CBC-SHA"; enum SSL3_TXT_KRB5_RC2_40_CBC_SHA = "EXP-KRB5-RC2-CBC-SHA"; enum SSL3_TXT_KRB5_RC4_40_SHA = "EXP-KRB5-RC4-SHA"; enum SSL3_TXT_KRB5_DES_40_CBC_MD5 = "EXP-KRB5-DES-CBC-MD5"; enum SSL3_TXT_KRB5_RC2_40_CBC_MD5 = "EXP-KRB5-RC2-CBC-MD5"; enum SSL3_TXT_KRB5_RC4_40_MD5 = "EXP-KRB5-RC4-MD5"; enum SSL3_SSL_SESSION_ID_LENGTH = 32; enum SSL3_MAX_SSL_SESSION_ID_LENGTH = 32; enum SSL3_MASTER_SECRET_SIZE = 48; enum SSL3_RANDOM_SIZE = 32; enum SSL3_SEQUENCE_SIZE = 8; enum SSL3_SESSION_ID_SIZE = 32; enum SSL3_CIPHER_VALUE_SIZE = 2; enum SSL3_RT_HEADER_LENGTH = 5; enum SSL3_HM_HEADER_LENGTH = 4; enum SSL3_ALIGN_PAYLOAD = 8; /** * This is the maximum MAC (digest) size used by the SSL library. * Currently maximum of 20 is used by SHA1, but we reserve for * future extension for 512-bit hashes. */ enum SSL3_RT_MAX_MD_SIZE = 64; /** * Maximum block size used in all ciphersuites. Currently 16 for AES. */ enum SSL_RT_MAX_CIPHER_BLOCK_SIZE = 16; enum SSL3_RT_MAX_EXTRA = 16384; /** * Maximum plaintext length: defined by SSL/TLS standards */ enum SSL3_RT_MAX_PLAIN_LENGTH = 16384; /** * Maximum compression overhead: defined by SSL/TLS standards */ enum SSL3_RT_MAX_COMPRESSED_OVERHEAD = 1024; /** * The standards give a maximum encryption overhead of 1024 bytes. * In practice the value is lower than this. The overhead is the maximum * number of padding bytes (256) plus the mac size. */ enum SSL3_RT_MAX_ENCRYPTED_OVERHEAD = 256 + .SSL3_RT_MAX_MD_SIZE; /* * OpenSSL currently only uses a padding length of at most one block so * the send overhead is smaller. */ enum SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD = .SSL_RT_MAX_CIPHER_BLOCK_SIZE + .SSL3_RT_MAX_MD_SIZE; /* If compression isn't used don't include the compression overhead */ enum SSL3_RT_MAX_COMPRESSED_LENGTH = .SSL3_RT_MAX_PLAIN_LENGTH; enum SSL3_RT_MAX_ENCRYPTED_LENGTH = .SSL3_RT_MAX_ENCRYPTED_OVERHEAD + .SSL3_RT_MAX_COMPRESSED_LENGTH; enum SSL3_RT_MAX_PACKET_SIZE = .SSL3_RT_MAX_ENCRYPTED_LENGTH + .SSL3_RT_HEADER_LENGTH; enum SSL3_MD_CLIENT_FINISHED_CONST = "\x43\x4C\x4E\x54"; enum SSL3_MD_SERVER_FINISHED_CONST = "\x53\x52\x56\x52"; enum SSL3_VERSION = 0x0300; enum SSL3_VERSION_MAJOR = 0x03; enum SSL3_VERSION_MINOR = 0x00; enum SSL3_RT_CHANGE_CIPHER_SPEC = 20; enum SSL3_RT_ALERT = 21; enum SSL3_RT_HANDSHAKE = 22; enum SSL3_RT_APPLICATION_DATA = 23; enum SSL3_AL_WARNING = 1; enum SSL3_AL_FATAL = 2; version (LIBRESSL_INTERNAL) { } else { enum SSL3_AD_CLOSE_NOTIFY = 0; /** * fatal */ enum SSL3_AD_UNEXPECTED_MESSAGE = 10; ///Ditto enum SSL3_AD_BAD_RECORD_MAC = 20; ///Ditto enum SSL3_AD_DECOMPRESSION_FAILURE = 30; ///Ditto enum SSL3_AD_HANDSHAKE_FAILURE = 40; enum SSL3_AD_NO_CERTIFICATE = 41; enum SSL3_AD_BAD_CERTIFICATE = 42; enum SSL3_AD_UNSUPPORTED_CERTIFICATE = 43; enum SSL3_AD_CERTIFICATE_REVOKED = 44; enum SSL3_AD_CERTIFICATE_EXPIRED = 45; enum SSL3_AD_CERTIFICATE_UNKNOWN = 46; /** * fatal */ enum SSL3_AD_ILLEGAL_PARAMETER = 47; } enum TLS1_HB_REQUEST = 1; enum TLS1_HB_RESPONSE = 2; enum SSL3_CT_RSA_SIGN = 1; enum SSL3_CT_DSS_SIGN = 2; enum SSL3_CT_RSA_FIXED_DH = 3; enum SSL3_CT_DSS_FIXED_DH = 4; enum SSL3_CT_RSA_EPHEMERAL_DH = 5; enum SSL3_CT_DSS_EPHEMERAL_DH = 6; enum SSL3_CT_FORTEZZA_DMS = 20; /** * SSL3_CT_NUMBER is used to size arrays and it must be large * enough to contain all of the cert types defined either for * SSLv3 and TLSv1. */ enum SSL3_CT_NUMBER = 13; enum SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS = 0x0001; enum TLS1_FLAGS_SKIP_CERT_VERIFY = 0x0010; enum TLS1_FLAGS_FREEZE_TRANSCRIPT = 0x0020; enum SSL3_FLAGS_CCS_OK = 0x0080; /* SSLv3 */ /*client */ /* extra state */ enum SSL3_ST_CW_FLUSH = 0x0100 | libressl.openssl.ssl.SSL_ST_CONNECT; /* write to server */ enum SSL3_ST_CW_CLNT_HELLO_A = 0x0110 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CW_CLNT_HELLO_B = 0x0111 | libressl.openssl.ssl.SSL_ST_CONNECT; /* read from server */ enum SSL3_ST_CR_SRVR_HELLO_A = 0x0120 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CR_SRVR_HELLO_B = 0x0121 | libressl.openssl.ssl.SSL_ST_CONNECT; enum DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A = 0x0126 | libressl.openssl.ssl.SSL_ST_CONNECT; enum DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B = 0x0127 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CR_CERT_A = 0x0130 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CR_CERT_B = 0x0131 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CR_KEY_EXCH_A = 0x0140 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CR_KEY_EXCH_B = 0x0141 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CR_CERT_REQ_A = 0x0150 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CR_CERT_REQ_B = 0x0151 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CR_SRVR_DONE_A = 0x0160 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CR_SRVR_DONE_B = 0x0161 | libressl.openssl.ssl.SSL_ST_CONNECT; /* write to server */ enum SSL3_ST_CW_CERT_A = 0x0170 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CW_CERT_B = 0x0171 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CW_CERT_C = 0x0172 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CW_CERT_D = 0x0173 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CW_KEY_EXCH_A = 0x0180 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CW_KEY_EXCH_B = 0x0181 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CW_CERT_VRFY_A = 0x0190 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CW_CERT_VRFY_B = 0x0191 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CW_CHANGE_A = 0x01A0 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CW_CHANGE_B = 0x01A1 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CW_FINISHED_A = 0x01B0 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CW_FINISHED_B = 0x01B1 | libressl.openssl.ssl.SSL_ST_CONNECT; /* read from server */ enum SSL3_ST_CR_CHANGE_A = 0x01C0 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CR_CHANGE_B = 0x01C1 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CR_FINISHED_A = 0x01D0 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CR_FINISHED_B = 0x01D1 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CR_SESSION_TICKET_A = 0x01E0 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CR_SESSION_TICKET_B = 0x01E1 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CR_CERT_STATUS_A = 0x01F0 | libressl.openssl.ssl.SSL_ST_CONNECT; enum SSL3_ST_CR_CERT_STATUS_B = 0x01F1 | libressl.openssl.ssl.SSL_ST_CONNECT; /* server */ /* extra state */ enum SSL3_ST_SW_FLUSH = 0x0100 | libressl.openssl.ssl.SSL_ST_ACCEPT; /* read from client */ /* Do not change the number values, they do matter */ enum SSL3_ST_SR_CLNT_HELLO_A = 0x0110 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SR_CLNT_HELLO_B = 0x0111 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SR_CLNT_HELLO_C = 0x0112 | libressl.openssl.ssl.SSL_ST_ACCEPT; /* write to client */ enum DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A = 0x0113 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B = 0x0114 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_HELLO_REQ_A = 0x0120 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_HELLO_REQ_B = 0x0121 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_HELLO_REQ_C = 0x0122 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_SRVR_HELLO_A = 0x0130 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_SRVR_HELLO_B = 0x0131 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_CERT_A = 0x0140 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_CERT_B = 0x0141 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_KEY_EXCH_A = 0x0150 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_KEY_EXCH_B = 0x0151 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_CERT_REQ_A = 0x0160 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_CERT_REQ_B = 0x0161 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_SRVR_DONE_A = 0x0170 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_SRVR_DONE_B = 0x0171 | libressl.openssl.ssl.SSL_ST_ACCEPT; /* read from client */ enum SSL3_ST_SR_CERT_A = 0x0180 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SR_CERT_B = 0x0181 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SR_KEY_EXCH_A = 0x0190 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SR_KEY_EXCH_B = 0x0191 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SR_CERT_VRFY_A = 0x01A0 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SR_CERT_VRFY_B = 0x01A1 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SR_CHANGE_A = 0x01B0 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SR_CHANGE_B = 0x01B1 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SR_FINISHED_A = 0x01C0 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SR_FINISHED_B = 0x01C1 | libressl.openssl.ssl.SSL_ST_ACCEPT; /* write to client */ enum SSL3_ST_SW_CHANGE_A = 0x01D0 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_CHANGE_B = 0x01D1 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_FINISHED_A = 0x01E0 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_FINISHED_B = 0x01E1 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_SESSION_TICKET_A = 0x01F0 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_SESSION_TICKET_B = 0x01F1 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_CERT_STATUS_A = 0x0200 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_ST_SW_CERT_STATUS_B = 0x0201 | libressl.openssl.ssl.SSL_ST_ACCEPT; enum SSL3_MT_HELLO_REQUEST = 0; enum SSL3_MT_CLIENT_HELLO = 1; enum SSL3_MT_SERVER_HELLO = 2; enum SSL3_MT_NEWSESSION_TICKET = 4; enum SSL3_MT_CERTIFICATE = 11; enum SSL3_MT_SERVER_KEY_EXCHANGE = 12; enum SSL3_MT_CERTIFICATE_REQUEST = 13; enum SSL3_MT_SERVER_DONE = 14; enum SSL3_MT_CERTIFICATE_VERIFY = 15; enum SSL3_MT_CLIENT_KEY_EXCHANGE = 16; enum SSL3_MT_FINISHED = 20; enum SSL3_MT_CERTIFICATE_STATUS = 22; enum DTLS1_MT_HELLO_VERIFY_REQUEST = 3; enum SSL3_MT_CCS = 1; version (LIBRESSL_INTERNAL) { } else { /* These are used when changing over to a new cipher */ enum SSL3_CC_READ = 0x01; enum SSL3_CC_WRITE = 0x02; enum SSL3_CC_CLIENT = 0x10; enum SSL3_CC_SERVER = 0x20; enum SSL3_CHANGE_CIPHER_CLIENT_WRITE = .SSL3_CC_CLIENT | .SSL3_CC_WRITE; enum SSL3_CHANGE_CIPHER_SERVER_READ = .SSL3_CC_SERVER | .SSL3_CC_READ; enum SSL3_CHANGE_CIPHER_CLIENT_READ = .SSL3_CC_CLIENT | .SSL3_CC_READ; enum SSL3_CHANGE_CIPHER_SERVER_WRITE = .SSL3_CC_SERVER | .SSL3_CC_WRITE; }
D
module tibia.winapi; public import std.c.windows.windows; pragma(lib,"kernel32.lib"); pragma(lib,"user32.lib"); //kernel32 alias CreateProcessW CreateProcess; alias Module32FirstW Module32First; alias Module32NextW Module32Next; alias Process32FirstW Process32First; alias Process32NextW Process32Next; alias STARTUPINFOW STARTUPINFO; alias STARTUPINFO* LPSTARTUPINFO; alias PROCESS_INFORMATION * LPPROCESS_INFORMATION ; //user32 alias GetClassNameW GetClassName; alias GetWindowLongW GetWindowLong; alias MODULEENTRY32W MODULEENTRY32; alias PROCESSENTRY32W PROCESSENTRY32; alias MODULEENTRY32W* LPMODULEENTRY32W; alias PROCESSENTRY32W* LPPROCESSENTRY32W; extern(Windows) { //kernel32 BOOL CreateProcessW (LPCWSTR, LPWSTR, LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES, BOOL, DWORD, PVOID, LPCWSTR, LPSTARTUPINFOW, LPPROCESS_INFORMATION); HANDLE CreateRemoteThread (HANDLE, LPSECURITY_ATTRIBUTES, DWORD, LPTHREAD_START_ROUTINE, LPVOID, DWORD, LPDWORD); HANDLE CreateToolhelp32Snapshot (DWORD,DWORD); BOOL Module32FirstW (HANDLE,LPMODULEENTRY32W); BOOL Module32NextW (HANDLE,LPMODULEENTRY32W); HANDLE OpenProcess (DWORD, BOOL, DWORD); HANDLE OpenThread (DWORD, BOOL, DWORD); BOOL Process32FirstW (HANDLE,LPPROCESSENTRY32W); BOOL Process32NextW (HANDLE,LPPROCESSENTRY32W); BOOL ReadProcessMemory (HANDLE, LPCVOID, LPVOID, DWORD, PDWORD); DWORD ResumeThread (HANDLE); DWORD SuspendThread (HANDLE); BOOL WriteProcessMemory (HANDLE, LPVOID, LPCVOID, SIZE_T, SIZE_T*); BOOL TerminateProcess (HANDLE, UINT); BOOL TerminateThread (HANDLE, DWORD); PVOID VirtualAllocEx (HANDLE, LPVOID, DWORD, DWORD, DWORD); BOOL VirtualFreeEx (HANDLE, LPVOID, DWORD, DWORD); BOOL VirtualProtectEx (HANDLE, LPVOID, DWORD, DWORD, PDWORD); alias DWORD function(LPVOID) LPTHREAD_START_ROUTINE; //user32 BOOL EnumWindows (WNDENUMPROC, LPARAM); HWND FindWindowW (LPCWSTR, LPCWSTR); int GetClassNameW (HWND, LPWSTR, int); LONG GetWindowLongW (HWND, int); DWORD GetWindowThreadProcessId (HWND, PDWORD); DWORD WaitForInputIdle (HANDLE, DWORD); alias BOOL function (HWND, LPARAM) WNDENUMPROC; } struct VS_FIXEDFILEINFO { DWORD dwSignature; DWORD dwStrucVersion; DWORD dwFileVersionMS; DWORD dwFileVersionLS; DWORD dwProductVersionMS; DWORD dwProductVersionLS; DWORD dwFileFlagsMask; DWORD dwFileFlags; DWORD dwFileOS; DWORD dwFileType; DWORD dwFileSubtype; DWORD dwFileDateMS; DWORD dwFileDateLS; } struct STARTUPINFOW { DWORD cb = STARTUPINFOW.sizeof; LPWSTR lpReserved; LPWSTR lpDesktop; LPWSTR lpTitle; DWORD dwX; DWORD dwY; DWORD dwXSize; DWORD dwYSize; DWORD dwXCountChars; DWORD dwYCountChars; DWORD dwFillAttribute; DWORD dwFlags; WORD wShowWindow; WORD cbReserved2; PBYTE lpReserved2; HANDLE hStdInput; HANDLE hStdOutput; HANDLE hStdError; } alias STARTUPINFOW* LPSTARTUPINFOW; struct PROCESS_INFORMATION { HANDLE hProcess; HANDLE hThread; DWORD dwProcessId; DWORD dwThreadId; } const uint CREATE_SUSPENDED = 0x00000004; struct PROCESSENTRY32W { DWORD dwSize; DWORD cntUsage; DWORD th32ProcessID; DWORD th32DefaultHeapID; DWORD th32ModuleID; DWORD cntThreads; DWORD th32ParentProcessID; LONG pcPriClassBase; DWORD dwFlags; WCHAR szExeFile[MAX_PATH]; } struct MODULEENTRY32W { DWORD dwSize; DWORD th32ModuleID; DWORD th32ProcessID; DWORD GlblcntUsage; DWORD ProccntUsage; BYTE *modBaseAddr; DWORD modBaseSize; HMODULE hModule; WCHAR szModule[MAX_MODULE_NAME32 + 1]; WCHAR szExePath[MAX_PATH]; } const MAX_MODULE_NAME32 = 255; const size_t MAX_PATH = 260; const uint PROCESS_TERMINATE = 0x0001, PROCESS_CREATE_THREAD = 0x0002, PROCESS_SET_SESSIONID = 0x0004, PROCESS_VM_OPERATION = 0x0008, PROCESS_VM_READ = 0x0010, PROCESS_VM_WRITE = 0x0020, PROCESS_DUP_HANDLE = 0x0040, PROCESS_CREATE_PROCESS = 0x0080, PROCESS_SET_QUOTA = 0x0100, PROCESS_SET_INFORMATION = 0x0200, PROCESS_QUERY_INFORMATION = 0x0400, PROCESS_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x0FFF; const uint TH32CS_SNAPHEAPLIST = 0x1, TH32CS_SNAPPROCESS = 0x2, TH32CS_SNAPTHREAD = 0x4, TH32CS_SNAPMODULE = 0x8, TH32CS_SNAPALL = (TH32CS_SNAPHEAPLIST|TH32CS_SNAPPROCESS|TH32CS_SNAPTHREAD|TH32CS_SNAPMODULE), TH32CS_INHERIT = 0x80000000; const uint THREAD_TERMINATE = 0x0001, THREAD_SUSPEND_RESUME = 0x0002, THREAD_GET_CONTEXT = 0x0008, THREAD_SET_CONTEXT = 0x0010, THREAD_SET_INFORMATION = 0x0020, THREAD_QUERY_INFORMATION = 0x0040, THREAD_SET_THREAD_TOKEN = 0x0080, THREAD_IMPERSONATE = 0x0100, THREAD_DIRECT_IMPERSONATION = 0x0200;
D
/home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Routing.build/Utilities.swift.o : /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Method+Wildcard.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Parameterizable.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/RouteBuilder+Grouping.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Request+Routing.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/RouteGroup.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/RouteBuilder.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Router+Responder.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Router.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Utilities.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Parameters.swift /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/URI.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/HTTP.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/TLS.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/libc.swiftmodule /usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Node.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/PathIndexable.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Core.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Debugging.swiftmodule /usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Random.swiftmodule /usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Crypto.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Branches.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Sockets.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/WebSockets.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Bits.swiftmodule /usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Transport.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/checkouts/engine.git--7533756970564908605/Sources/CHTTP/include/http_parser.h /usr/lib/swift/linux/x86_64/glibc.modulemap /home/albertfega/Desktop/LaSalleChat/.build/checkouts/ctls.git--2818177660473049491/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CHTTP.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CSQLite.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Routing.build/Utilities~partial.swiftmodule : /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Method+Wildcard.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Parameterizable.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/RouteBuilder+Grouping.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Request+Routing.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/RouteGroup.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/RouteBuilder.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Router+Responder.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Router.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Utilities.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Parameters.swift /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/URI.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/HTTP.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/TLS.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/libc.swiftmodule /usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Node.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/PathIndexable.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Core.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Debugging.swiftmodule /usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Random.swiftmodule /usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Crypto.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Branches.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Sockets.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/WebSockets.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Bits.swiftmodule /usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Transport.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/checkouts/engine.git--7533756970564908605/Sources/CHTTP/include/http_parser.h /usr/lib/swift/linux/x86_64/glibc.modulemap /home/albertfega/Desktop/LaSalleChat/.build/checkouts/ctls.git--2818177660473049491/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CHTTP.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CSQLite.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Routing.build/Utilities~partial.swiftdoc : /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Method+Wildcard.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Parameterizable.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/RouteBuilder+Grouping.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Request+Routing.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/RouteGroup.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/RouteBuilder.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Router+Responder.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Router.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Utilities.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/routing.git-1485801344613057502/Sources/Routing/Parameters.swift /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/URI.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/HTTP.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/TLS.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/libc.swiftmodule /usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Node.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/PathIndexable.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Core.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Debugging.swiftmodule /usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Random.swiftmodule /usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Crypto.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Branches.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Sockets.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/WebSockets.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Bits.swiftmodule /usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Transport.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/checkouts/engine.git--7533756970564908605/Sources/CHTTP/include/http_parser.h /usr/lib/swift/linux/x86_64/glibc.modulemap /home/albertfega/Desktop/LaSalleChat/.build/checkouts/ctls.git--2818177660473049491/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CHTTP.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CSQLite.build/module.modulemap
D
module textrenderer.textrenderer; import std; import bindbc.freetype; import glamour.texture; import inmath.linalg; import loader = bindbc.loader.sharedlib; import textrenderer.atlas; import textrenderer.glyph; class TextRenderer { this() { scope(failure) loader.errors.each!(info => writeln(info.error.to!string, ": ", info.message.to!string)); FTSupport loadedFreeTypeSupport = loadFreeType(); if (loadedFreeTypeSupport != ftSupport) { enforce(loadedFreeTypeSupport != FTSupport.noLibrary, "Failed to load FreeType library"); enforce(loadedFreeTypeSupport != FTSupport.badLibrary, "Error loading FreeType library"); } FT_Library library; enforce(!FT_Init_FreeType(&library), "Error initializing FreeType"); //auto defaultFont = "fonts/freesansbold.ttf"; //auto defaultFont = "fonts/telegrama_render.otf"; //auto defaultFont = "fonts/Inconsolata.otf"; //auto defaultFont = "fonts/OxygenMono-Regular.otf"; auto defaultFont = "fonts/Orbitron Black.otf"; FT_Face face; auto fontError = FT_New_Face(library, ("./" ~ defaultFont).toStringz(), 0, &face); enforce(fontError != FT_Err_Unknown_File_Format, "Unrecognized font format when loading " ~ defaultFont); enforce(!fontError, "Error loading " ~ defaultFont ~ ": " ~ fontError.to!string); static enum uint glyphSize = 64; FT_Set_Pixel_Sizes(face, glyphSize, glyphSize); foreach (size_t index; iota(0, 256)) //foreach (size_t index; iota(32, 128)) { glyphSet[index/*.to!char*/] = face.loadGlyph(index.to!char, glyphSize); } atlas = glyphSet.createFontAtlas(defaultFont, glyphSize); } public void close() { if (atlas) atlas.remove(); } public void bind() { atlas.bind_and_activate(); } vec2[6] getTexCoordsForLetter(dchar letter) @nogc { int rows = cast(int)sqrt(cast(float)glyphSet.length); int cols = cast(int)sqrt(cast(float)glyphSet.length); int row = letter / rows; int col = letter % cols; float x1 = col / cast(float)rows; float y1 = row / cast(float)cols; float x2 = x1 + 1.0/cast(float)rows; float y2 = y1 + 1.0/cast(float)cols; return [vec2(x1, y1), vec2(x2, y1), vec2(x2, y2), vec2(x2, y2), vec2(x1, y2), vec2(x1, y1)]; } public Glyph getGlyphForLetter(char letter) @nogc { return glyphSet[letter]; } private static uint colorComponents = 4; private Glyph[256] glyphSet; public Texture2D atlas; }
D
module algebraic; import std.meta, std.traits; version (unittest) import std.format; /** Algebraic data type. Params: Args = the list of tags preceded by the (optional) argument types of the tags. Bugs: Self-referential types are not supported. Examples: In Haskell, Maybe is defined as data Maybe a = Nothing | Just a. This is achieved by: --- alias Maybe!A = Algebraic!("Nothing", A, "Just"); --- */ template Algebraic(Args...) { alias children = parseSpecs!Args; mixin (concatStrings!( "Algebraic".generateBaseClassDeclaration!children, staticMap!(ExtractClassDefinition, children) )); } /// unittest { // declaration alias MaybeIndex = Algebraic!("Nothing", size_t, "Just"); // as function return type static MaybeIndex find(E)(E[] haystack, E needle) { foreach (i, h; haystack) if (h == needle) return MaybeIndex.just(i); return MaybeIndex.nothing; } // function argument type (see below) alias f = algebraicFunc!( (MaybeIndex.Just j) => "found: %s-th".format(j.x0), (MaybeIndex.Nothing n) => "not found"); // search and process result assert (f(find([1, 2, 3], 1)) == "found: 0-th"); assert (f(find([1, 2, 3], 0)) == "not found"); } /** (Very simple) pattern match function. Params: Functions = functions each of which take a value of a subtype of an instanciation of Algebraic. x = a value of the instanciation of Algebraic. */ CommonType!(staticMap!(ReturnType, Functions)) algebraicFunc(Functions...)(CommonType!(staticMap!(Parameters, Functions)) x) if (is (CommonType!(staticMap!(Parameters, Functions)) : Algebraic!AlgebraicArgs, AlgebraicArgs...)) { foreach (f; Functions) { if (auto p = cast(Parameters!f[0])x) return f(p); } assert (false, "non-exhaustive patterns!"); } enum ExtractClassDefinition(alias Child) = Child.classDefinition; template concatStrings(Args...) { static if (Args.length) enum concatStrings = Args[0] ~ "\n" ~ concatStrings!(Args[1..$]); else enum concatStrings = ""; } template parseSpecs(Specs...) { static if (Specs.length == 0) alias parseSpecs = AliasSeq!(); else { enum size_t numarg = StaticFindValue!(string, Specs); alias parseSpecs = AliasSeq!( ChildSpec!(Specs[numarg], Specs[0..numarg]), parseSpecs!(Specs[numarg+1..$])); } } template ChildSpec(string name, Args...) { import std.ascii; enum className = name[0].toUpper ~ name[1..$]; enum ctorName = name[0].toLower ~ name[1..$]; alias MemberTypes = Args; enum classDefinition = name.generateClassDeclaration!Args("Algebraic"); } template StaticFindValue(T, Args...) { static assert (Args.length); static if (is (typeof (Args[0]) : T)) enum size_t StaticFindValue = 0; else enum size_t StaticFindValue = StaticFindValue!(T, Args[1..$]) + 1; } auto generateClassDeclaration(Members...)(string className, string parentName) { import std.array, std.format; auto ret = appender!string; ret.put("class _"~className~" : "~parentName); { ret.put("{"); scope (exit) ret.put("}"); foreach (i, MemberType; Members) ret.put("%s x%d;".format(MemberType.stringof, i)); { ret.put("this ("); scope (exit) ret.put(")"); string sep = ""; foreach (i, MemberType; Members) { ret.put("%s%s x%d".format(sep, MemberType.stringof, i)); sep = ", "; } } { ret.put("{"); scope (exit) ret.put("}"); foreach (i, MemberType; Members) { ret.put("this.x%1$s = x%1$s;".format(i)); } } ret.put("static bool equal(%1$s lhs, %1$s rhs)".format(parentName)); { ret.put("{"); scope (exit) ret.put("}"); ret.put("if (auto l = cast(%1$s) lhs) if (auto r = cast(%1$s) rhs)".format(className)); { ret.put("{"); scope (exit) ret.put("}"); foreach (i, MemberType; Members) { ret.put("if (l.x%1$s != r.x%1$s) return false;".format(i)); } ret.put("return true;"); } ret.put("return false;"); } } return ret.data; } auto generateBaseClassDeclaration(Children...)(string className) { import std.array, std.format; auto ret = appender!string; ret.put("abstract class "~className); { ret.put("{"); scope (exit) ret.put("}"); foreach (Child; Children) { ret.put("alias %s = _%s;".format(Child.className, Child.className)); ret.put("static %s %s".format(Child.className, Child.ctorName)); { ret.put("("); scope (exit) ret.put(")"); string sep = ""; foreach (i, MemberType; Child.MemberTypes) { ret.put("%s%s x%d".format(sep, MemberType.stringof, i)); sep = ", "; } } { ret.put("{"); scope (exit) ret.put("}"); ret.put("return new %s".format(Child.className)); scope (exit) ret.put(";"); { ret.put("("); scope (exit) ret.put(")"); string sep = ""; foreach (i, MemberType; Child.MemberTypes) { ret.put("%sx%d".format(sep, i)); sep = ", "; } } } } ret.put("override bool opEquals(Object rhs)"); { ret.put("{"); scope (exit) ret.put("}"); ret.put("auto r = cast(%s)rhs;".format(className)); ret.put("if (r is null) return false;"); foreach (Child; Children) ret.put("if (%1$s.equal(this, r)) return true;".format(Child.className)); ret.put("return false;"); } } return ret.data; }
D
/* * Copyright 2020 Google LLC * Copyright 2022 Coverify Systems Technology * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ module riscv.gen.isa.rv64i_instr; import riscv.gen.riscv_defines; import uvm; version (RISCV_INSTR_STRING_MIXIN) { mixin (riscv_instr_mixin(LWU, I_FORMAT, LOAD, RV64I)); mixin (riscv_instr_mixin(LD, I_FORMAT, LOAD, RV64I)); mixin (riscv_instr_mixin(SD, S_FORMAT, STORE, RV64I)); // SHIFT intructions mixin (riscv_instr_mixin(SLLW, R_FORMAT, SHIFT, RV64I)); mixin (riscv_instr_mixin(SLLIW, I_FORMAT, SHIFT, RV64I)); mixin (riscv_instr_mixin(SRLW, R_FORMAT, SHIFT, RV64I)); mixin (riscv_instr_mixin(SRLIW, I_FORMAT, SHIFT, RV64I)); mixin (riscv_instr_mixin(SRAW, R_FORMAT, SHIFT, RV64I)); mixin (riscv_instr_mixin(SRAIW, I_FORMAT, SHIFT, RV64I)); // ARITHMETIC intructions mixin (riscv_instr_mixin(ADDW, R_FORMAT, ARITHMETIC, RV64I)); mixin (riscv_instr_mixin(ADDIW, I_FORMAT, ARITHMETIC, RV64I)); mixin (riscv_instr_mixin(SUBW, R_FORMAT, ARITHMETIC, RV64I)); } else { class riscv_LWU_instr: riscv_instr { mixin RISCV_INSTR_MIXIN!(LWU, I_FORMAT, LOAD, RV64I); } class riscv_LD_instr: riscv_instr { mixin RISCV_INSTR_MIXIN!(LD, I_FORMAT, LOAD, RV64I); } class riscv_SD_instr: riscv_instr { mixin RISCV_INSTR_MIXIN!(SD, S_FORMAT, STORE, RV64I); } // SHIFT intructions class riscv_SLLW_instr: riscv_instr { mixin RISCV_INSTR_MIXIN!(SLLW, R_FORMAT, SHIFT, RV64I); } class riscv_SLLIW_instr: riscv_instr { mixin RISCV_INSTR_MIXIN!(SLLIW, I_FORMAT, SHIFT, RV64I); } class riscv_SRLW_instr: riscv_instr { mixin RISCV_INSTR_MIXIN!(SRLW, R_FORMAT, SHIFT, RV64I); } class riscv_SRLIW_instr: riscv_instr { mixin RISCV_INSTR_MIXIN!(SRLIW, I_FORMAT, SHIFT, RV64I); } class riscv_SRAW_instr: riscv_instr { mixin RISCV_INSTR_MIXIN!(SRAW, R_FORMAT, SHIFT, RV64I); } class riscv_SRAIW_instr: riscv_instr { mixin RISCV_INSTR_MIXIN!(SRAIW, I_FORMAT, SHIFT, RV64I); } // ARITHMETIC intructions class riscv_ADDW_instr: riscv_instr { mixin RISCV_INSTR_MIXIN!(ADDW, R_FORMAT, ARITHMETIC, RV64I); } class riscv_ADDIW_instr: riscv_instr { mixin RISCV_INSTR_MIXIN!(ADDIW, I_FORMAT, ARITHMETIC, RV64I); } class riscv_SUBW_instr: riscv_instr { mixin RISCV_INSTR_MIXIN!(SUBW, R_FORMAT, ARITHMETIC, RV64I); } }
D
/Users/ming/Desktop/PerfectTemplate/.build/x86_64-apple-macosx/debug/PerfectLib.build/SysProcess.swift.o : /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/JSONConvertible.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/File.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/Log.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/PerfectServer.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/PerfectError.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/Utilities.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/Bytes.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/SysProcess.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/XPC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/os.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/os.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/ming/Desktop/PerfectTemplate/.build/x86_64-apple-macosx/debug/PerfectLib.build/SysProcess~partial.swiftmodule : /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/JSONConvertible.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/File.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/Log.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/PerfectServer.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/PerfectError.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/Utilities.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/Bytes.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/SysProcess.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/XPC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/os.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/os.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/ming/Desktop/PerfectTemplate/.build/x86_64-apple-macosx/debug/PerfectLib.build/SysProcess~partial.swiftdoc : /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/JSONConvertible.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/File.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/Log.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/PerfectServer.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/PerfectError.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/Utilities.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/Bytes.swift /Users/ming/Desktop/PerfectTemplate/.build/checkouts/PerfectLib/Sources/PerfectLib/SysProcess.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/XPC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/os.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/os.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
/Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/build/Pods.build/Debug-iphonesimulator/RxSwift.build/Objects-normal/x86_64/Producer.o : /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Amb.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Deferred.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Deprecated.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Enumerated.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/Maybe.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Sequence.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/ObservableType+PrimitiveSequence.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Debounce.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Reduce.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Range.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Merge.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Take.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Cancelable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/Completable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/GroupedObservable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/Single.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/AsSingle.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Sample.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Throttle.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/ObservableType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/ConnectableObservableType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/SchedulerType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/ObserverType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Create.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Generate.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/DataStructures/Queue.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Reactive.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Materialize.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/AddRef.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/DataStructures/Bag.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Using.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Debug.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Catch.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Switch.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/StartWith.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Concurrency/Lock.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/RecursiveLock.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Sink.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Optional.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Scan.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/Completable+AndThen.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/Platform.Darwin.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Do.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Map.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Zip.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Skip.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Producer.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Buffer.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Timer.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/DeprecationWarner.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Filter.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Never.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/AnyObserver.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Error.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/Disposables.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Errors.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/ElementAt.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Concat.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Repeat.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Subjects/AsyncSubject.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Subjects/PublishSubject.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Subjects/BehaviorSubject.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Subjects/ReplaySubject.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/AtomicInt.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Event.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/SwiftSupport/SwiftSupport.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/TakeLast.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Multicast.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/First.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Just.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Timeout.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Window.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Rx.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/RxMutableBox.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/Platform.Linux.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/GroupBy.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Delay.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/ToArray.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence+Zip+arity.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Empty.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/Target\ Support\ Files/RxAtomic/RxAtomic-umbrella.h /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/Target\ Support\ Files/RxSwift/RxSwift-umbrella.h /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxAtomic/RxAtomic/include/RxAtomic.h /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/build/Pods.build/Debug-iphonesimulator/RxSwift.build/unextended-module.modulemap /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/build/Pods.build/Debug-iphonesimulator/RxAtomic.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/build/Pods.build/Debug-iphonesimulator/RxSwift.build/Objects-normal/x86_64/Producer~partial.swiftmodule : /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Amb.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Deferred.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Deprecated.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Enumerated.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/Maybe.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Sequence.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/ObservableType+PrimitiveSequence.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Debounce.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Reduce.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Range.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Merge.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Take.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Cancelable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/Completable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/GroupedObservable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/Single.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/AsSingle.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Sample.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Throttle.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/ObservableType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/ConnectableObservableType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/SchedulerType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/ObserverType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Create.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Generate.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/DataStructures/Queue.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Reactive.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Materialize.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/AddRef.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/DataStructures/Bag.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Using.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Debug.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Catch.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Switch.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/StartWith.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Concurrency/Lock.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/RecursiveLock.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Sink.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Optional.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Scan.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/Completable+AndThen.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/Platform.Darwin.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Do.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Map.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Zip.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Skip.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Producer.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Buffer.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Timer.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/DeprecationWarner.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Filter.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Never.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/AnyObserver.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Error.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/Disposables.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Errors.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/ElementAt.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Concat.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Repeat.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Subjects/AsyncSubject.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Subjects/PublishSubject.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Subjects/BehaviorSubject.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Subjects/ReplaySubject.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/AtomicInt.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Event.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/SwiftSupport/SwiftSupport.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/TakeLast.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Multicast.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/First.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Just.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Timeout.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Window.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Rx.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/RxMutableBox.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/Platform.Linux.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/GroupBy.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Delay.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/ToArray.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence+Zip+arity.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Empty.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/Target\ Support\ Files/RxAtomic/RxAtomic-umbrella.h /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/Target\ Support\ Files/RxSwift/RxSwift-umbrella.h /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxAtomic/RxAtomic/include/RxAtomic.h /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/build/Pods.build/Debug-iphonesimulator/RxSwift.build/unextended-module.modulemap /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/build/Pods.build/Debug-iphonesimulator/RxAtomic.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/build/Pods.build/Debug-iphonesimulator/RxSwift.build/Objects-normal/x86_64/Producer~partial.swiftdoc : /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Amb.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Deferred.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Deprecated.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Enumerated.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/Maybe.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Sequence.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/ObservableType+PrimitiveSequence.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Debounce.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Reduce.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Range.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Merge.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Take.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Cancelable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/Completable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/GroupedObservable.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/Single.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/AsSingle.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Sample.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Throttle.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/ObservableType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/ConnectableObservableType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/SchedulerType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/ObserverType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Create.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Generate.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/DataStructures/Queue.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Reactive.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Materialize.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/AddRef.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/DataStructures/Bag.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Using.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Debug.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Catch.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Switch.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/StartWith.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Concurrency/Lock.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/RecursiveLock.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Sink.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Optional.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Scan.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/Completable+AndThen.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/Platform.Darwin.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Do.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Map.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Zip.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Skip.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Producer.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Buffer.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Timer.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/DeprecationWarner.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Filter.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Never.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/AnyObserver.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Error.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Disposables/Disposables.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Errors.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/ElementAt.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Concat.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Repeat.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Subjects/AsyncSubject.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Subjects/PublishSubject.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Subjects/BehaviorSubject.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Subjects/ReplaySubject.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/AtomicInt.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Event.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/SwiftSupport/SwiftSupport.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/TakeLast.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Multicast.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/First.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Just.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Timeout.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Window.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Rx.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/RxMutableBox.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/Platform/Platform.Linux.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/GroupBy.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Delay.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/ToArray.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence+Zip+arity.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/Empty.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/Target\ Support\ Files/RxAtomic/RxAtomic-umbrella.h /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/Target\ Support\ Files/RxSwift/RxSwift-umbrella.h /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/Pods/RxAtomic/RxAtomic/include/RxAtomic.h /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/build/Pods.build/Debug-iphonesimulator/RxSwift.build/unextended-module.modulemap /Users/bill/Documents/ios_projects/Swift/ReferenceApps/RxDataSource_CollectionViewTest/build/Pods.build/Debug-iphonesimulator/RxAtomic.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
/home/cyobero/rust/examples/raw_sqlite/target/debug/deps/lazy_static-62b3850b2403b4b6.rmeta: /home/cyobero/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/lib.rs /home/cyobero/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/inline_lazy.rs /home/cyobero/rust/examples/raw_sqlite/target/debug/deps/liblazy_static-62b3850b2403b4b6.rlib: /home/cyobero/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/lib.rs /home/cyobero/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/inline_lazy.rs /home/cyobero/rust/examples/raw_sqlite/target/debug/deps/lazy_static-62b3850b2403b4b6.d: /home/cyobero/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/lib.rs /home/cyobero/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/inline_lazy.rs /home/cyobero/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/lib.rs: /home/cyobero/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/inline_lazy.rs:
D
/Users/ThiagoBevi/Dev_iOS/ListaCompras/Build/Intermediates/ListaCompras.build/Debug-iphonesimulator/ListaCompras.build/Objects-normal/x86_64/NovaListaCompras.o : /Users/ThiagoBevi/Dev_iOS/ListaCompras/ListaCompras/AppDelegate.swift /Users/ThiagoBevi/Dev_iOS/ListaCompras/ListaCompras/ViewController.swift /Users/ThiagoBevi/Dev_iOS/ListaCompras/ListaCompras/NovaListaCompras.swift /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/usr/include/objc/ObjectiveC.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/usr/include/Darwin.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/ThiagoBevi/Dev_iOS/ListaCompras/Build/Intermediates/ListaCompras.build/Debug-iphonesimulator/ListaCompras.build/Objects-normal/x86_64/NovaListaCompras~partial.swiftmodule : /Users/ThiagoBevi/Dev_iOS/ListaCompras/ListaCompras/AppDelegate.swift /Users/ThiagoBevi/Dev_iOS/ListaCompras/ListaCompras/ViewController.swift /Users/ThiagoBevi/Dev_iOS/ListaCompras/ListaCompras/NovaListaCompras.swift /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/usr/include/objc/ObjectiveC.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/usr/include/Darwin.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/ThiagoBevi/Dev_iOS/ListaCompras/Build/Intermediates/ListaCompras.build/Debug-iphonesimulator/ListaCompras.build/Objects-normal/x86_64/NovaListaCompras~partial.swiftdoc : /Users/ThiagoBevi/Dev_iOS/ListaCompras/ListaCompras/AppDelegate.swift /Users/ThiagoBevi/Dev_iOS/ListaCompras/ListaCompras/ViewController.swift /Users/ThiagoBevi/Dev_iOS/ListaCompras/ListaCompras/NovaListaCompras.swift /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/usr/include/objc/ObjectiveC.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/usr/include/Darwin.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/ThiagoBevi/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
/***********************************************************************\ * objbase.d * * * * Windows API header module * * * * Translated from MinGW Windows headers * * * * Placed into public domain * \***********************************************************************/ module win32.objbase; version(Windows): pragma(lib, "ole32"); import win32.cguid, win32.objidl, win32.unknwn, win32.wtypes; private import win32.basetyps, win32.objfwd, win32.rpcdce, win32.winbase, win32.windef; // DAC: Not needed for D? //MACRO #define LISet32(li, v) ((li).HighPart=(v)<0?-1:0, (li).LowPart=(v)) //MACRO #define ULISet32(li, v) ((li).HighPart=0, (li).LowPart=(v)) const CLSCTX_ALL = CLSCTX.CLSCTX_INPROC_SERVER|CLSCTX.CLSCTX_INPROC_HANDLER|CLSCTX.CLSCTX_LOCAL_SERVER; const CLSCTX_INPROC = CLSCTX.CLSCTX_INPROC_SERVER|CLSCTX.CLSCTX_INPROC_HANDLER; const CLSCTX_SERVER = CLSCTX.CLSCTX_INPROC_SERVER|CLSCTX.CLSCTX_LOCAL_SERVER|CLSCTX.CLSCTX_REMOTE_SERVER; const MARSHALINTERFACE_MIN=500; const CWCSTORAGENAME=32; const STGM_DIRECT = 0; const STGM_TRANSACTED = 0x10000L; const STGM_SIMPLE = 0x8000000L; const STGM_READ = 0; const STGM_WRITE = 1; const STGM_READWRITE = 2; const STGM_SHARE_DENY_NONE = 0x40; const STGM_SHARE_DENY_READ = 0x30; const STGM_SHARE_DENY_WRITE = 0x20; const STGM_SHARE_EXCLUSIVE = 0x10; const STGM_PRIORITY = 0x40000L; const STGM_DELETEONRELEASE = 0x4000000; const STGM_NOSCRATCH = 0x100000; const STGM_CREATE = 0x1000; const STGM_CONVERT = 0x20000; const STGM_NOSNAPSHOT = 0x200000; const STGM_FAILIFTHERE = 0; const ASYNC_MODE_COMPATIBILITY = 1; const ASYNC_MODE_DEFAULT = 0; const STGTY_REPEAT = 256; const STG_TOEND = 0xFFFFFFFF; const STG_LAYOUT_SEQUENTIAL = 0; const STG_LAYOUT_INTERLEAVED = 1; const COM_RIGHTS_EXECUTE = 1; const COM_RIGHTS_SAFE_FOR_SCRIPTING = 2; const STGOPTIONS_VERSION = 2; enum STGFMT { STGFMT_STORAGE = 0, STGFMT_FILE = 3, STGFMT_ANY = 4, STGFMT_DOCFILE = 5 } struct STGOPTIONS { USHORT usVersion; USHORT reserved; ULONG ulSectorSize; const(WCHAR)* pwcsTemplateFile; } enum REGCLS { REGCLS_SINGLEUSE = 0, REGCLS_MULTIPLEUSE = 1, REGCLS_MULTI_SEPARATE = 2 } /* BOOL IsEqualGUID(GUID rguid1, GUID rguid2) { return rguid1 == rguid2; } */ extern (Windows) BOOL IsEqualGUID( REFGUID rguid1, REFGUID rguid2 ); alias IsEqualGUID IsEqualIID; alias IsEqualGUID IsEqualCLSID; enum COINIT { COINIT_APARTMENTTHREADED = 2, COINIT_MULTITHREADED = 0, COINIT_DISABLE_OLE1DDE = 4, COINIT_SPEED_OVER_MEMORY = 8 } enum STDMSHLFLAGS { SMEXF_SERVER = 1, SMEXF_HANDLER } extern(Windows) { alias HRESULT function(REFCLSID, REFIID, PVOID*) LPFNGETCLASSOBJECT; alias HRESULT function() LPFNCANUNLOADNOW; DWORD CoBuildVersion(); HRESULT CoInitialize(PVOID); HRESULT CoInitializeEx(LPVOID, DWORD); void CoUninitialize(); HRESULT CoGetMalloc(DWORD, LPMALLOC*); DWORD CoGetCurrentProcess(); HRESULT CoRegisterMallocSpy(LPMALLOCSPY); HRESULT CoRevokeMallocSpy(); HRESULT CoCreateStandardMalloc(DWORD, IMalloc*); //#ifdef DBG ULONG DebugCoGetRpcFault(); void DebugCoSetRpcFault(ULONG); //#endif HRESULT CoGetClassObject(REFCLSID, DWORD, COSERVERINFO*, REFIID, PVOID*); HRESULT CoRegisterClassObject(REFCLSID, LPUNKNOWN, DWORD, DWORD, PDWORD); HRESULT CoRevokeClassObject(DWORD); HRESULT CoGetMarshalSizeMax(ULONG*, REFIID, LPUNKNOWN, DWORD, PVOID, DWORD); HRESULT CoMarshalInterface(LPSTREAM, REFIID, LPUNKNOWN, DWORD, PVOID, DWORD); HRESULT CoUnmarshalInterface(LPSTREAM, REFIID, PVOID*); HRESULT CoMarshalHresult(LPSTREAM, HRESULT); HRESULT CoUnmarshalHresult(LPSTREAM, HRESULT*); HRESULT CoReleaseMarshalData(LPSTREAM); HRESULT CoDisconnectObject(LPUNKNOWN, DWORD); HRESULT CoLockObjectExternal(LPUNKNOWN, BOOL, BOOL); HRESULT CoGetStandardMarshal(REFIID, LPUNKNOWN, DWORD, PVOID, DWORD, LPMARSHAL*); HRESULT CoGetStdMarshalEx(LPUNKNOWN, DWORD, LPUNKNOWN*); BOOL CoIsHandlerConnected(LPUNKNOWN); BOOL CoHasStrongExternalConnections(LPUNKNOWN); HRESULT CoMarshalInterThreadInterfaceInStream(REFIID, LPUNKNOWN, LPSTREAM*); HRESULT CoGetInterfaceAndReleaseStream(LPSTREAM, REFIID, PVOID*); HRESULT CoCreateFreeThreadedMarshaler(LPUNKNOWN, LPUNKNOWN*); HINSTANCE CoLoadLibrary(LPOLESTR, BOOL); void CoFreeLibrary(HINSTANCE); void CoFreeAllLibraries(); void CoFreeUnusedLibraries(); HRESULT CoCreateInstance(REFCLSID, LPUNKNOWN, DWORD, REFIID, PVOID*); HRESULT CoCreateInstanceEx(REFCLSID, IUnknown, DWORD, COSERVERINFO*, DWORD, MULTI_QI*); HRESULT StringFromCLSID(REFCLSID, LPOLESTR*); HRESULT CLSIDFromString(LPOLESTR, LPCLSID); HRESULT StringFromIID(REFIID, LPOLESTR*); HRESULT IIDFromString(LPOLESTR, LPIID); BOOL CoIsOle1Class(REFCLSID); HRESULT ProgIDFromCLSID(REFCLSID, LPOLESTR*); HRESULT CLSIDFromProgID(LPCOLESTR, LPCLSID); int StringFromGUID2(REFGUID, LPOLESTR, int); HRESULT CoCreateGuid(GUID*); BOOL CoFileTimeToDosDateTime(FILETIME*, LPWORD, LPWORD); BOOL CoDosDateTimeToFileTime(WORD, WORD, FILETIME*); HRESULT CoFileTimeNow(FILETIME*); HRESULT CoRegisterMessageFilter(LPMESSAGEFILTER, LPMESSAGEFILTER*); HRESULT CoGetTreatAsClass(REFCLSID, LPCLSID); HRESULT CoTreatAsClass(REFCLSID, REFCLSID); HRESULT DllGetClassObject(REFCLSID, REFIID, PVOID*); HRESULT DllCanUnloadNow(); PVOID CoTaskMemAlloc(ULONG); PVOID CoTaskMemRealloc(PVOID, ULONG); void CoTaskMemFree(PVOID); HRESULT CreateDataAdviseHolder(LPDATAADVISEHOLDER*); HRESULT CreateDataCache(LPUNKNOWN, REFCLSID, REFIID, PVOID*); HRESULT StgCreateDocfile(const(OLECHAR)*, DWORD, DWORD, IStorage*); HRESULT StgCreateDocfileOnILockBytes(ILockBytes, DWORD, DWORD, IStorage*); HRESULT StgOpenStorage(const(OLECHAR)*, IStorage, DWORD, SNB, DWORD, IStorage*); HRESULT StgOpenStorageOnILockBytes(ILockBytes, IStorage, DWORD, SNB, DWORD, IStorage*); HRESULT StgIsStorageFile(const(OLECHAR)*); HRESULT StgIsStorageILockBytes(ILockBytes); HRESULT StgSetTimes(OLECHAR *, FILETIME *, FILETIME *, FILETIME *); HRESULT StgCreateStorageEx(const(WCHAR)*, DWORD, DWORD, DWORD, STGOPTIONS*, void*, REFIID, void**); HRESULT StgOpenStorageEx(const(WCHAR)*, DWORD, DWORD, DWORD, STGOPTIONS*, void*, REFIID, void**); HRESULT BindMoniker(LPMONIKER, DWORD, REFIID, PVOID*); HRESULT CoGetObject(LPCWSTR, BIND_OPTS*, REFIID, void**); HRESULT MkParseDisplayName(LPBC, LPCOLESTR, ULONG*, LPMONIKER*); HRESULT MonikerRelativePathTo(LPMONIKER, LPMONIKER, LPMONIKER*, BOOL); HRESULT MonikerCommonPrefixWith(LPMONIKER, LPMONIKER, LPMONIKER*); HRESULT CreateBindCtx(DWORD, LPBC*); HRESULT CreateGenericComposite(LPMONIKER, LPMONIKER, LPMONIKER*); HRESULT GetClassFile (LPCOLESTR, CLSID*); HRESULT CreateFileMoniker(LPCOLESTR, LPMONIKER*); HRESULT CreateItemMoniker(LPCOLESTR, LPCOLESTR, LPMONIKER*); HRESULT CreateAntiMoniker(LPMONIKER*); HRESULT CreatePointerMoniker(LPUNKNOWN, LPMONIKER*); HRESULT GetRunningObjectTable(DWORD, LPRUNNINGOBJECTTABLE*); HRESULT CoInitializeSecurity(PSECURITY_DESCRIPTOR, LONG, SOLE_AUTHENTICATION_SERVICE*, void*, DWORD, DWORD, void*, DWORD, void*); HRESULT CoGetCallContext(REFIID, void**); HRESULT CoQueryProxyBlanket(IUnknown*, DWORD*, DWORD*, OLECHAR**, DWORD*, DWORD*, RPC_AUTH_IDENTITY_HANDLE*, DWORD*); HRESULT CoSetProxyBlanket(IUnknown*, DWORD, DWORD, OLECHAR*, DWORD, DWORD, RPC_AUTH_IDENTITY_HANDLE, DWORD); HRESULT CoCopyProxy(IUnknown*, IUnknown**); HRESULT CoQueryClientBlanket(DWORD*, DWORD*, OLECHAR**, DWORD*, DWORD*, RPC_AUTHZ_HANDLE*, DWORD*); HRESULT CoImpersonateClient(); HRESULT CoRevertToSelf(); HRESULT CoQueryAuthenticationServices(DWORD*, SOLE_AUTHENTICATION_SERVICE**); HRESULT CoSwitchCallContext(IUnknown*, IUnknown**); HRESULT CoGetInstanceFromFile(COSERVERINFO*, CLSID*, IUnknown*, DWORD, DWORD, OLECHAR*, DWORD, MULTI_QI*); HRESULT CoGetInstanceFromIStorage(COSERVERINFO*, CLSID*, IUnknown*, DWORD, IStorage*, DWORD, MULTI_QI*); ULONG CoAddRefServerProcess(); ULONG CoReleaseServerProcess(); HRESULT CoResumeClassObjects(); HRESULT CoSuspendClassObjects(); HRESULT CoGetPSClsid(REFIID, CLSID*); HRESULT CoRegisterPSClsid(REFIID, REFCLSID); }
D
void main() { problem(); } void problem() { enum MAX = 10_000; enum MIN = 0; alias Desire = Tuple!(long, "x", long, "y", long, "s"); alias Ad = Tuple!(long, "sx", long, "sy", long, "ex", long, "ey"); long[] minimumDistances(Desire[] desires) { auto ret = new long[](desires.length); ret[] = long.max; foreach(i; 0..desires.length-1) { foreach(j; i+1..desires.length) { real d = (desires[i].x - desires[j].x)^^2 + (desires[i].y - desires[j].y) ^^ 2; long ld = d.sqrt.to!long; ret[i] = ret[i].min(ld); ret[j] = ret[j].min(ld); } } return ret; } Ad[] solve(Desire[] desires) { auto ads = desires.map!(d => Ad(d.x, d.y, d.x, d.y)).array; auto distances = minimumDistances(desires); foreach(i, d; distances) { auto r = cast(real)(d / 2) / 2f.sqrt; long l = r.to!long; ads[i].sx = max(MIN, ads[i].sx - l); ads[i].ex = min(MAX, ads[i].ex + l); ads[i].sy = max(MIN, ads[i].sy - l); ads[i].ey = min(MAX, ads[i].ey + l); } return ads; } long calculate(Desire[] desires, Ad[] ads) { enum real GETA = 10^^9; long ans; foreach(i; 0..desires.length) { auto d = desires[i]; auto a = ads[i]; if (a.sx > d.x || a.ex <= d.x || a.sy > d.y || a.ey <= d.y) continue; real seg = (a.ex - a.sx) * (a.ey - a.sy); real des = d.s; real ratio = 1.to!real - min(des, seg) / max(des, seg); ans += (GETA * (1.to!real - ratio.pow(2))).to!long; } return (ans / desires.length).to!long; } auto N = scan!long; auto desires = N.iota.map!(i => Desire(scan!long, scan!long, scan!long)).array; auto ads = solve(desires); debug "========================= OUTPUT =========================".deb; foreach(a; ads) { writefln("%s %s %s %s", a.sx, a.sy, a.ex, a.ey); } debug "========================= SCORE ==========================".deb; debug calculate(desires, ads).deb; } // ---------------------------------------------- import std.stdio, std.conv, std.array, std.string, std.algorithm, std.container, std.range, core.stdc.stdlib, std.math, std.typecons, std.numeric; T[][] combinations(T)(T[] s, in int m) { if (!m) return [[]]; if (s.empty) return []; return s[1 .. $].combinations(m - 1).map!(x => s[0] ~ x).array ~ s[1 .. $].combinations(m); } string scan(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; } T scan(T)(){ return scan.to!T; } T[] scan(T)(long n){ return n.iota.map!(i => scan!T()).array; } void deb(T ...)(T t){ debug writeln(t); } alias Point = Tuple!(long, "x", long, "y"); // -----------------------------------------------
D
/** cl_gl.d Converted from 'cl_gl.h'. Version: 1.0 See_Also: http://www.khronos.org/opencl/ Authors: Koji Kishita */ module c.cl.cl_gl; /********************************************************************************** * Copyright (c) 2008-2009 The Khronos Group Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and/or associated documentation files (the * "Materials"), to deal in the Materials without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Materials, and to * permit persons to whom the Materials are furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Materials. * * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. **********************************************************************************/ import c.cl.cl; alias cl_uint cl_gl_object_type; alias cl_uint cl_gl_texture_info; alias cl_uint cl_gl_platform_info; enum CL_GL_OBJECT_BUFFER = 0x2000; enum CL_GL_OBJECT_TEXTURE2D = 0x2001; enum CL_GL_OBJECT_TEXTURE3D = 0x2002; enum CL_GL_OBJECT_RENDERBUFFER = 0x2003; enum CL_GL_TEXTURE_TARGET = 0x2004; enum CL_GL_MIPMAP_LEVEL = 0x2005; extern(System) export { cl_mem clCreateFromGLBuffer(cl_context, cl_mem_flags, cl_GLuint, int*); cl_mem clCreateFromGLTexture2D(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*); cl_mem clCreateFromGLTexture3D(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*); cl_mem clCreateFromGLRenderbuffer(cl_context, cl_mem_flags, cl_GLuint, cl_int*); cl_int clGetGLObjectInfo(cl_mem, cl_gl_object_type*, cl_GLuint*); cl_int clGetGLTextureInfo(cl_mem, cl_gl_texture_info, size_t, void*, size_t*); cl_int clEnqueueAcquireGLObjects(cl_command_queue, cl_uint, const(cl_mem)*, cl_uint, const(cl_event)*, cl_event*); cl_int clEnqueueReleaseGLObjects(cl_command_queue, cl_uint, const(cl_mem)*, cl_uint, const(cl_event)*, cl_event*); } // extern enum cl_khr_gl_sharing = 1; alias cl_uint cl_gl_context_info; enum CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR = -1000; enum { CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR = 0x2006, CL_DEVICES_FOR_GL_CONTEXT_KHR = 0x2007, } enum { CL_GL_CONTEXT_KHR = 0x2008, CL_EGL_DISPLAY_KHR = 0x2009, CL_GLX_DISPLAY_KHR = 0x200A, CL_WGL_HDC_KHR = 0x200B, CL_CGL_SHAREGROUP_KHR = 0x200C, } extern(System) export cl_int clGetGLContextInfoKHR(const(cl_context_properties)*, cl_gl_context_info, size_t, void*, size_t*);
D
/******************************************************************************* * Copyright (c) 2000, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation * Port to the D programming language: * Frank Benoit <benoit@tionex.de> *******************************************************************************/ module org.eclipse.swt.events.MenuEvent; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.events.TypedEvent; /** * Instances of this class are sent as a result of * menus being shown and hidden. * * @see MenuListener * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public final class MenuEvent : TypedEvent { //static const long serialVersionUID = 3258132440332383025L; /** * Constructs a new instance of this class based on the * information in the given untyped event. * * @param e the untyped event containing the information */ public this(Event e) { super(e); } }
D
/* * Copyright (C) 2008 by Steven Schveighoffer * all rights reserved. * * Examples of how lists can be used. */ import dcollections.ArrayList; import dcollections.LinkList; import dcollections.Deque; import std.stdio; void print(Iterator!(int) s, string message) { write(message ~ " ["); foreach(i; s) write(" ", i); writeln(" ]"); } void main() { auto arrayList = new ArrayList!(int); auto linkList = new LinkList!(int); auto deque = new Deque!(int); for(int i = 0; i < 10; i++) arrayList.add(i*5); print(arrayList, "filled in arraylist"); // // add all the elements from arraylist to linklist // linkList.add(arrayList); print(linkList, "filled in linkList"); deque.add(linkList); print(deque, "filled in deque"); // // you can compare lists // if(arrayList == linkList) writeln("equal!"); else writeln("not equal!"); // // you can concatenate lists together // arrayList ~= linkList; print(arrayList, "appended linkList to arrayList"); linkList = linkList ~ arrayList; print(linkList, "concatenated linkList and arrayList"); // // you can purge elements from a list // // removes all odd elements in the list. foreach(ref doPurge, i; &linkList.purge) doPurge = (i % 2 == 1); print(linkList, "removed all odds from linkList"); // // you can slice ArrayLists // auto slice = arrayList[5..10]; writefln("slice of arrayList: [%s]", slice); // // pushing to a deque front is as efficient as pushing to the back It also // does not invalidate any ranges. // deque.prepend(1).prepend(2).prepend(3); print(deque, "pushed 1 2 3 to front"); // // and slices seamlessly can get data from both front and back // writefln("slice of deque[0..2]: %s, [0..5]: %s, [1..5]: %s, [4..8]: %s", deque[0..2], deque[0..5], deque[1..5], deque[4..8]); }
D
/** Events that are from the input manager to the game logic. */ module game_events.game_event; enum EventType: ubyte { thrust, torque, rotateGun, fire, } struct GameEvent { EventType type; union { ThrustEvent thrust ; TorqueEvent torque ; RotateGunEvent rotateGun ; FireEvent fireGun ; } } struct ThrustEvent { float thrust; } struct TorqueEvent { float torque; } struct RotateGunEvent { float angle; } struct FireEvent { }
D
/** * Windows API header module * * Translated from MinGW Windows headers * * Authors: Stewart Gordon * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(DRUNTIMESRC core/sys/windows/_powrprof.d) */ module core.sys.windows.powrprof; version (Windows): pragma(lib, "powrprof"); import core.sys.windows.windef; import core.sys.windows.ntdef; // FIXME: look up Windows version support enum ULONG EnableSysTrayBatteryMeter = 1, EnableMultiBatteryDisplay = 2, EnablePasswordLogon = 4, EnableWakeOnRing = 8, EnableVideoDimDisplay = 16; enum UINT NEWSCHEME = -1; struct GLOBAL_MACHINE_POWER_POLICY { ULONG Revision; SYSTEM_POWER_STATE LidOpenWakeAc; SYSTEM_POWER_STATE LidOpenWakeDc; ULONG BroadcastCapacityResolution; } alias GLOBAL_MACHINE_POWER_POLICY* PGLOBAL_MACHINE_POWER_POLICY; struct GLOBAL_USER_POWER_POLICY { ULONG Revision; POWER_ACTION_POLICY PowerButtonAc; POWER_ACTION_POLICY PowerButtonDc; POWER_ACTION_POLICY SleepButtonAc; POWER_ACTION_POLICY SleepButtonDc; POWER_ACTION_POLICY LidCloseAc; POWER_ACTION_POLICY LidCloseDc; SYSTEM_POWER_LEVEL[NUM_DISCHARGE_POLICIES] DischargePolicy; ULONG GlobalFlags; } alias GLOBAL_USER_POWER_POLICY* PGLOBAL_USER_POWER_POLICY; struct GLOBAL_POWER_POLICY { GLOBAL_USER_POWER_POLICY user; GLOBAL_MACHINE_POWER_POLICY mach; } alias GLOBAL_POWER_POLICY* PGLOBAL_POWER_POLICY; struct MACHINE_POWER_POLICY { ULONG Revision; SYSTEM_POWER_STATE MinSleepAc; SYSTEM_POWER_STATE MinSleepDc; SYSTEM_POWER_STATE ReducedLatencySleepAc; SYSTEM_POWER_STATE ReducedLatencySleepDc; ULONG DozeTimeoutAc; ULONG DozeTimeoutDc; ULONG DozeS4TimeoutAc; ULONG DozeS4TimeoutDc; UCHAR MinThrottleAc; UCHAR MinThrottleDc; UCHAR[2] pad1; POWER_ACTION_POLICY OverThrottledAc; POWER_ACTION_POLICY OverThrottledDc; } alias MACHINE_POWER_POLICY* PMACHINE_POWER_POLICY; struct MACHINE_PROCESSOR_POWER_POLICY { ULONG Revision; PROCESSOR_POWER_POLICY ProcessorPolicyAc; PROCESSOR_POWER_POLICY ProcessorPolicyDc; } alias MACHINE_PROCESSOR_POWER_POLICY* PMACHINE_PROCESSOR_POWER_POLICY; struct USER_POWER_POLICY { ULONG Revision; POWER_ACTION_POLICY IdleAc; POWER_ACTION_POLICY IdleDc; ULONG IdleTimeoutAc; ULONG IdleTimeoutDc; UCHAR IdleSensitivityAc; UCHAR IdleSensitivityDc; UCHAR ThrottlePolicyAc; UCHAR ThrottlePolicyDc; SYSTEM_POWER_STATE MaxSleepAc; SYSTEM_POWER_STATE MaxSleepDc; ULONG[2] Reserved; ULONG VideoTimeoutAc; ULONG VideoTimeoutDc; ULONG SpindownTimeoutAc; ULONG SpindownTimeoutDc; BOOLEAN OptimizeForPowerAc; BOOLEAN OptimizeForPowerDc; UCHAR FanThrottleToleranceAc; UCHAR FanThrottleToleranceDc; UCHAR ForcedThrottleAc; UCHAR ForcedThrottleDc; } alias USER_POWER_POLICY* PUSER_POWER_POLICY; struct POWER_POLICY { USER_POWER_POLICY user; MACHINE_POWER_POLICY mach; } alias POWER_POLICY* PPOWER_POLICY; extern (Windows) { alias BOOLEAN function(UINT, DWORD, LPTSTR, DWORD, LPTSTR, PPOWER_POLICY, LPARAM) PWRSCHEMESENUMPROC; alias BOOLEAN function(POWER_ACTION, SYSTEM_POWER_STATE, ULONG, BOOLEAN) PFNNTINITIATEPWRACTION; NTSTATUS CallNtPowerInformation(POWER_INFORMATION_LEVEL, PVOID, ULONG, PVOID, ULONG); BOOLEAN CanUserWritePwrScheme(); BOOLEAN DeletePwrScheme(UINT); BOOLEAN EnumPwrSchemes(PWRSCHEMESENUMPROC, LPARAM); BOOLEAN GetActivePwrScheme(PUINT); BOOLEAN GetCurrentPowerPolicies(PGLOBAL_POWER_POLICY, PPOWER_POLICY); BOOLEAN GetPwrCapabilities(PSYSTEM_POWER_CAPABILITIES); BOOLEAN GetPwrDiskSpindownRange(PUINT, PUINT); BOOLEAN IsAdminOverrideActive(PADMINISTRATOR_POWER_POLICY); BOOLEAN IsPwrHibernateAllowed(); BOOLEAN IsPwrShutdownAllowed(); BOOLEAN IsPwrSuspendAllowed(); BOOLEAN ReadGlobalPwrPolicy(PGLOBAL_POWER_POLICY); BOOLEAN ReadProcessorPwrScheme(UINT, PMACHINE_PROCESSOR_POWER_POLICY); BOOLEAN ReadPwrScheme(UINT, PPOWER_POLICY); BOOLEAN SetActivePwrScheme(UINT, PGLOBAL_POWER_POLICY, PPOWER_POLICY); BOOLEAN SetSuspendState(BOOLEAN, BOOLEAN, BOOLEAN); BOOLEAN WriteGlobalPwrPolicy(PGLOBAL_POWER_POLICY); BOOLEAN WriteProcessorPwrScheme(UINT, PMACHINE_PROCESSOR_POWER_POLICY); BOOLEAN ValidatePowerPolicies(PGLOBAL_POWER_POLICY, PPOWER_POLICY); BOOLEAN WritePwrScheme(PUINT, LPTSTR, LPTSTR, PPOWER_POLICY); }
D
<?xml version="1.0" encoding="ASCII" standalone="no"?> <di:SashWindowsMngr xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmi:version="2.0"> <pageList> <availablePage> <emfPageIdentifier href="VAR_3_banking-7581819551.notation#_copSALmGEeKQQp7P9cQvNQ"/> </availablePage> </pageList> <sashModel currentSelection="//@sashModel/@windows.0/@children.0"> <windows> <children xsi:type="di:TabFolder"> <children> <emfPageIdentifier href="VAR_3_banking-7581819551.notation#_copSALmGEeKQQp7P9cQvNQ"/> </children> </children> </windows> </sashModel> </di:SashWindowsMngr>
D
/** * A sorted array to quickly lookup pools. * * Copyright: Copyright Digital Mars 2001 -. * License: $(WEB www.boost.org/LICENSE_1_0.txt, Boost License 1.0). * Authors: Walter Bright, David Friedman, Sean Kelly, Martin Nowak */ module gc.pooltable; static import cstdlib=core.stdc.stdlib; struct PoolTable(Pool) { import core.stdc.string : memmove; nothrow: void Dtor() { cstdlib.free(pools); pools = null; npools = 0; } bool insert(Pool* pool) { auto newpools = cast(Pool **)cstdlib.realloc(pools, (npools + 1) * pools[0].sizeof); if (!newpools) return false; pools = newpools; // Sort pool into newpooltable[] size_t i; for (; i < npools; ++i) { if (pool.baseAddr < pools[i].baseAddr) break; } if (i != npools) memmove(pools + i + 1, pools + i, (npools - i) * pools[0].sizeof); pools[i] = pool; ++npools; _minAddr = pools[0].baseAddr; _maxAddr = pools[npools - 1].topAddr; return true; } @property size_t length() pure const { return npools; } ref inout(Pool*) opIndex(size_t idx) inout pure in { assert(idx < length); } body { return pools[idx]; } inout(Pool*)[] opSlice(size_t a, size_t b) inout pure in { assert(a <= length && b <= length); } body { return pools[a .. b]; } alias opDollar = length; /** * Find Pool that pointer is in. * Return null if not in a Pool. * Assume pooltable[] is sorted. */ Pool *findPool(void *p) nothrow { if (p >= minAddr && p < maxAddr) { assert(npools); // let dmd allocate a register for this.pools auto pools = this.pools; if (npools == 1) return pools[0]; /* The pooltable[] is sorted by address, so do a binary search */ size_t low = 0; size_t high = npools - 1; while (low <= high) { size_t mid = (low + high) >> 1; auto pool = pools[mid]; if (p < pool.baseAddr) high = mid - 1; else if (p >= pool.topAddr) low = mid + 1; else return pool; } } return null; } // semi-stable partition, returns right half for which pred is false Pool*[] minimize() pure { static void swap(ref Pool* a, ref Pool* b) { auto c = a; a = b; b = c; } size_t i; // find first bad entry for (; i < npools; ++i) if (pools[i].isFree) break; // move good in front of bad entries size_t j = i + 1; for (; j < npools; ++j) { if (!pools[j].isFree) // keep swap(pools[i++], pools[j]); } // npooltable[0 .. i] => used pools // npooltable[i .. npools] => free pools if (i) { _minAddr = pools[0].baseAddr; _maxAddr = pools[i - 1].topAddr; } else { _minAddr = _maxAddr = null; } immutable len = npools; npools = i; // return freed pools to the caller return pools[npools .. len]; } void Invariant() const { if (!npools) return; foreach (i, pool; pools[0 .. npools - 1]) assert(pool.baseAddr < pools[i + 1].baseAddr); assert(_minAddr == pools[0].baseAddr); assert(_maxAddr == pools[npools - 1].topAddr); } @property const(void)* minAddr() pure const { return _minAddr; } @property const(void)* maxAddr() pure const { return _maxAddr; } package: Pool** pools; size_t npools; void* _minAddr, _maxAddr; } unittest { enum NPOOLS = 6; enum NPAGES = 10; enum PAGESIZE = 4096; static struct MockPool { byte* baseAddr, topAddr; size_t freepages, npages; @property bool isFree() const pure nothrow { return freepages == npages; } } PoolTable!MockPool pooltable; void reset() { foreach(ref pool; pooltable[0 .. $]) pool.freepages = pool.npages; pooltable.minimize(); assert(pooltable.length == 0); foreach(i; 0 .. NPOOLS) { auto pool = cast(MockPool*)cstdlib.malloc(MockPool.sizeof); *pool = MockPool.init; assert(pooltable.insert(pool)); } } void usePools() { foreach(pool; pooltable[0 .. $]) { pool.npages = NPAGES; pool.freepages = NPAGES / 2; } } // all pools are free reset(); assert(pooltable.length == NPOOLS); auto freed = pooltable.minimize(); assert(freed.length == NPOOLS); assert(pooltable.length == 0); // all pools used reset(); usePools(); assert(pooltable.length == NPOOLS); freed = pooltable.minimize(); assert(freed.length == 0); assert(pooltable.length == NPOOLS); // preserves order of used pools reset(); usePools(); { MockPool*[NPOOLS] opools = pooltable[0 .. NPOOLS]; // make the 2nd pool free pooltable[2].freepages = NPAGES; pooltable.minimize(); assert(pooltable.length == NPOOLS - 1); assert(pooltable[0] == opools[0]); assert(pooltable[1] == opools[1]); assert(pooltable[2] == opools[3]); } // test that PoolTable reduces min/max address span reset(); usePools(); byte* base, top; { // fill with fake addresses size_t i; foreach(pool; pooltable[0 .. NPOOLS]) { pool.baseAddr = cast(byte*)(i++ * NPAGES * PAGESIZE); pool.topAddr = pool.baseAddr + NPAGES * PAGESIZE; } base = pooltable[0].baseAddr; top = pooltable[NPOOLS - 1].topAddr; } freed = pooltable.minimize(); assert(freed.length == 0); assert(pooltable.length == NPOOLS); assert(pooltable.minAddr == base); assert(pooltable.maxAddr == top); pooltable[NPOOLS - 1].freepages = NPAGES; pooltable[NPOOLS - 2].freepages = NPAGES; freed = pooltable.minimize(); assert(freed.length == 2); assert(pooltable.length == NPOOLS - 2); assert(pooltable.minAddr == base); assert(pooltable.maxAddr == pooltable[NPOOLS - 3].topAddr); pooltable[0].freepages = NPAGES; freed = pooltable.minimize(); assert(freed.length == 1); assert(pooltable.length == NPOOLS - 3); assert(pooltable.minAddr != base); assert(pooltable.minAddr == pooltable[0].baseAddr); assert(pooltable.maxAddr == pooltable[NPOOLS - 4].topAddr); // free all foreach(pool; pooltable[0 .. $]) pool.freepages = NPAGES; freed = pooltable.minimize(); assert(freed.length == NPOOLS - 3); assert(pooltable.length == 0); pooltable.Dtor(); }
D
// A function: int multiply1(int a, int b) { return a * b; } // Functions like "multiply1" can be evaluated at compile time if // they are called where a compile-time constant result is asked for: enum result = multiply1(2, 3); // Evaluated at compile time. int[multiply1(2, 4)] array; // Evaluated at compile time. // A templated function: T multiply2(T)(T a, T b) { return a * b; } // Compile-time multiplication can also be done using templates: enum multiply3(int a, int b) = a * b; pragma(msg, multiply3!(2, 3)); // Prints "6" during compilation. void main() { import std.stdio; writeln("2 * 3 = ", result); }
D
/** * actor.d * tower * April 29, 2013 * Brandon Surmanski */ module entity.actor; import std.algorithm; import std.stdio; import std.math; import std.conv; import c.lua; import c.gl.glfw; import gl.glb.glb; import lua.lib.callback; import entity.entity; import entity.item; import entity.sprite; import math.matrix; import math.vector; import camera; /** * Represents shared data across an actor type. Kind of like a runtime class * templated usable by lua. */ class ActorInfo : SpriteInfo { this(lua_State *l, string spritesheet) { super(l, spritesheet, 1, 2); } } /** * an Actor is any character that has a 'personality'. Anything that moves, * talks, attacks etc. */ class Actor : Sprite { static Actor actorFocus = null; Sprite _inventory[4]; ubyte _selectedItem; ubyte _nitems; uint _healthmax; uint _health; uint _wealthmax; uint _wealth; //facing left(-1) vs right(1) //facing back(-1) vs front(1) HVec3 _face; @property uint wealth() { return _wealth; } @property void wealth(uint nwealth) { _wealth = min(_wealthmax, nwealth); } @property ref uint health() { return _health; } @property ref uint healthmax() { return _healthmax; } @property ref ubyte selectedItem() { return _selectedItem; } @property void face(HVec3 v) { _face = v; } @property HVec3 face() { return _face; } this(int id) { super(id); _selectedItem = 0; _nitems = 0; _healthmax = 100; _wealthmax = 100; _health = 60; _wealth = 0; for(int i = 0; i < 4; i++) { _inventory[i] = null; } } @property override ActorInfo info() { return cast(ActorInfo) _info; } @property static void focus(Actor a) { actorFocus = a; } @property static Actor focus() { return actorFocus; } static string typeName() { return "Actor"; } override void collide(Entity other, float dt) { super.collide(other, dt); if(Item item = cast(Item) other) { if(item.info.holdable && !glfwGetKey('Z') && _inventory[0] is null) { _inventory[0] = item; item.phys = false; } } } void drop(int item) { if(_inventory[item]) { _inventory[item].phys = true; _inventory[item] = null; } } override void update(float dt) { Vec3 tmp = position; if(this == focus) // we are the main character! control!!!! { if(glfwGetKey('1')) { _selectedItem = 0; } if(glfwGetKey('2')) { _selectedItem = 1; } if(glfwGetKey('3')) { _selectedItem = 2; } if(glfwGetKey('4')) { _selectedItem = 3; } side = 0; if(glfwGetKey(GLFW_KEY_LEFT)) { position.x -= 0.05f; scale.x = -1; _face.x = -1; } if(glfwGetKey(GLFW_KEY_DOWN)) { position.z += 0.05f; _face.z = 1; } if(glfwGetKey(GLFW_KEY_RIGHT)) { position.x += 0.05f; scale.x = 1; _face.x = 1; } if(glfwGetKey(GLFW_KEY_UP)) { position.z -= 0.05f; side = 1; _face.z = -1; } if(glfwGetKey('Z')) { if(_inventory[_selectedItem]) { _inventory[_selectedItem].velocity = Vec3(face.x * 5, 2, 0); drop(_selectedItem); //TODO: attack, use, etc } } } if(_inventory[0]) { _inventory[0].position = position + Vec3(0.3f, 0.5f, -side * 0.1f + 0.05f); _inventory[0].side = side; } super.update(dt); } }
D
// ********************* // Constants // Phoenix V0.67 // ********************* // ************************************************************* // PrintScreen Fonts // ************************************************************* const string FONT_Screen = "FONT_OLD_20_WHITE.TGA"; const string FONT_ScreenSmall = "FONT_OLD_10_WHITE.TGA"; const string FONT_Book = "FONT_10_BOOK.TGA"; const string FONT_BookHeadline = "FONT_20_BOOK.TGA"; // **************************** // Spellkosten für ALLE SCrolls // **************************** const int SPL_Cost_Scroll = 5; // MH: 19.11.01 Gildennamen geändert --> Änderungen in Text.d (Character-Screen Gildenbezeichnungen) und Species.d (Gildenanhängige Bewegungswerte wie z.B Kletterhöhe) // MH: 19.11.01 Talente hinzugefügt // MH: 15.12.01 Neue Spells hinzugefügt // MH: 15.12.01 Neue Player Talente hinzugefügt // // NPC ATTRIBUTES // const int ATR_HITPOINTS = 0; // Lebenspunkte const int ATR_HITPOINTS_MAX = 1; // Max. Lebenspunkte const int ATR_MANA = 2; // Mana Mana const int ATR_MANA_MAX = 3; // Mana Max const int ATR_STRENGTH = 4; // Stärke const int ATR_DEXTERITY = 5; // Geschick const int ATR_REGENERATEHP = 6; // Regenerierung von HP alle x sekunden const int ATR_REGENERATEMANA = 7; // Regenerierung von Mana alle x sekunden const int ATR_INDEX_MAX = 8; // // NPC FLAGS // CONST INT NPC_FLAG_FRIEND = 1 << 0 ; // wird nicht benutzt (wird über aivar geregelt) CONST INT NPC_FLAG_IMMORTAL = 1 << 1 ; // Unverwundbar CONST INT NPC_FLAG_GHOST = 1 << 2 ; // Halb-Transparenter NPC (Gothic.ini [INTERNAL] 'GhostAlpha') // // FIGHT MODES // CONST INT FMODE_NONE = 0 ; CONST INT FMODE_FIST = 1 ; CONST INT FMODE_MELEE = 2 ; CONST INT FMODE_FAR = 5 ; CONST INT FMODE_MAGIC = 7 ; // // WALK MODES // CONST INT NPC_RUN = 0 ; CONST INT NPC_WALK = 1 ; CONST INT NPC_SNEAK = 2 ; CONST INT NPC_RUN_WEAPON = 0 + 128 ; CONST INT NPC_WALK_WEAPON = 1 + 128 ; CONST INT NPC_SNEAK_WEAPON = 2 + 128 ; // // ARMOR FLAGS // CONST INT WEAR_TORSO = 1 ; // Oberkoerper ( Brustpanzer ) CONST INT WEAR_HEAD = 2 ; // Kopf ( Helm ) CONST INT WEAR_EFFECT = 16 ; // // INVENTORY CATEGORIES // CONST INT INV_WEAPON = 1 ; CONST INT INV_ARMOR = 2 ; CONST INT INV_RUNE = 3 ; CONST INT INV_MAGIC = 4 ; CONST INT INV_FOOD = 5 ; CONST INT INV_POTION = 6 ; CONST INT INV_DOC = 7 ; CONST INT INV_MISC = 8 ; CONST INT INV_CAT_MAX = 9 ; // // INVENTORY CAPACITIES // --- werden vom Programm ignoriert - INV ist unendlich groß! --- // CONST INT INV_MAX_WEAPONS = 6 ; CONST INT INV_MAX_ARMORS = 2 ; CONST INT INV_MAX_RUNES = 1000 ; // virtually infinite CONST INT INV_MAX_FOOD = 15 ; CONST INT INV_MAX_DOCS = 1000 ; // virtually infinite CONST INT INV_MAX_POTIONS = 1000 ; // virtually infinite CONST INT INV_MAX_MAGIC = 1000 ; // virtually infinite CONST INT INV_MAX_MISC = 1000 ; // // ITEM TEXTS // CONST INT ITM_TEXT_MAX = 6 ; //////////////////////////////////////////////////////////////////////////////// // // ITEM FLAGS // // categories (mainflag) const int ITEM_KAT_NONE = 1 << 0; // Sonstiges const int ITEM_KAT_NF = 1 << 1; // Nahkampfwaffen const int ITEM_KAT_FF = 1 << 2; // Fernkampfwaffen const int ITEM_KAT_MUN = 1 << 3; // Munition (MULTI) const int ITEM_KAT_ARMOR = 1 << 4; // Ruestungen const int ITEM_KAT_FOOD = 1 << 5; // Nahrungsmittel (MULTI) const int ITEM_KAT_DOCS = 1 << 6; // Dokumente const int ITEM_KAT_POTIONS = 1 << 7; // Traenke const int ITEM_KAT_LIGHT = 1 << 8; // Lichtquellen const int ITEM_KAT_RUNE = 1 << 9; // Runen/Scrolls const int ITEM_KAT_MAGIC = 1 << 31; // Ringe/Amulette/Guertel const int ITEM_KAT_KEYS = ITEM_KAT_NONE; // weapon type (flags) const int ITEM_DAG = 1 << 13; // (OBSOLETE!) const int ITEM_SWD = 1 << 14; // Schwert const int ITEM_AXE = 1 << 15; // Axt const int ITEM_2HD_SWD = 1 << 16; // Zweihaender const int ITEM_2HD_AXE = 1 << 17; // Streitaxt const int ITEM_SHIELD = 1 << 18; // (OBSOLETE!) const int ITEM_BOW = 1 << 19; // Bogen const int ITEM_CROSSBOW = 1 << 20; // Armbrust // magic type (flags) const int ITEM_RING = 1 << 11; // Ring const int ITEM_AMULET = 1 << 22; // Amulett const int ITEM_BELT = 1 << 24; // Guertel // attributes (flags) const int ITEM_DROPPED = 1 << 10; // (INTERNAL!) const int ITEM_MISSION = 1 << 12; // Missionsgegenstand const int ITEM_MULTI = 1 << 21; // Stapelbar const int ITEM_NFOCUS = 1 << 23; // (INTERNAL!) const int ITEM_CREATEAMMO = 1 << 25; // Erzeugt Munition selbst (magisch) const int ITEM_NSPLIT = 1 << 26; // Kein Split-Item (Waffe als Interact-Item!) const int ITEM_DRINK = 1 << 27; // (OBSOLETE!) const int ITEM_TORCH = 1 << 28; // Fackel const int ITEM_THROW = 1 << 29; // (OBSOLETE!) const int ITEM_ACTIVE = 1 << 30; // (INTERNAL!) // // DAMAGE TYPES v2.0 // CONST INT DAM_INVALID = 0 ; // 0 - 0x00 - nur der Vollstandigkeit und Transparenz wegen hier definiert ( _NICHT_ verwenden ) CONST INT DAM_BARRIER = 1 ; // 1 - 0x01 - nur der Vollstandigkeit und Transparenz wegen hier definiert ( _NICHT_ verwenden ) CONST INT DAM_BLUNT = DAM_BARRIER << 1 ; // 2 - 0x02 - blunt ist das bit links von barrier CONST INT DAM_EDGE = DAM_BLUNT << 1 ; // 4 - 0x04 - edge ist das bit links von blunt CONST INT DAM_FIRE = DAM_EDGE << 1 ; // 8 - 0x08 - fire ist das bit links von edge CONST INT DAM_FLY = DAM_FIRE << 1 ; // 16 - 0x10 - fly ist das bit links von fire CONST INT DAM_MAGIC = DAM_FLY << 1 ; // 32 - 0x20 - magic ist das bit links von fly CONST INT DAM_POINT = DAM_MAGIC << 1 ; // 64 - 0x40 - point ist das bit links von magic CONST INT DAM_FALL = DAM_POINT << 1 ; // 128 - 0x80 - nur der Vollstandigkeit und Transparenz wegen hier definiert ( _NICHT_ verwenden ) // // DAMAGE TYPE ARRAY INDICES ( !!! DAM_XXX = 1 << DAM_INDEX_XXX !!! ) // CONST INT DAM_INDEX_BARRIER = 0 ; // nur der Vollstandigkeit und Transparenz wegen hier definiert ( _NICHT_ verwenden ) CONST INT DAM_INDEX_BLUNT = DAM_INDEX_BARRIER + 1 ; CONST INT DAM_INDEX_EDGE = DAM_INDEX_BLUNT + 1 ; CONST INT DAM_INDEX_FIRE = DAM_INDEX_EDGE + 1 ; CONST INT DAM_INDEX_FLY = DAM_INDEX_FIRE + 1 ; CONST INT DAM_INDEX_MAGIC = DAM_INDEX_FLY + 1 ; CONST INT DAM_INDEX_POINT = DAM_INDEX_MAGIC + 1 ; CONST INT DAM_INDEX_FALL = DAM_INDEX_POINT + 1 ; // nur der Vollstandigkeit und Transparenz wegen hier definiert ( _NICHT_ verwenden ) CONST INT DAM_INDEX_MAX = DAM_INDEX_FALL + 1 ; // // OTHER DAMAGE CONSTANTS // CONST INT NPC_ATTACK_FINISH_DISTANCE = 180 ; CONST INT NPC_BURN_TICKS_PER_DAMAGE_POINT = 100 ; //Default 1000 CONST INT NPC_BURN_DAMAGE_POINTS_PER_INTERVALL = 50 ; //Default 10 CONST INT DAM_CRITICAL_MULTIPLIER = 2 ; //Obsolet, da Treffer-%-CHance CriticalHit ersetzt hat CONST INT BLOOD_SIZE_DIVISOR = 1000 ; CONST INT BLOOD_DAMAGE_MAX = 200 ; CONST INT DAMAGE_FLY_CM_MAX = 2000 ; CONST INT DAMAGE_FLY_CM_MIN = 300 ; const INT DAMAGE_FLY_CM_PER_POINT = 5 ; const int NPC_DAM_DIVE_TIME = 100 ; const int IMMUNE = -1 ; // ------ Wie weit werden Npcs im Kampf voneinander weggeschoben ------- // ------ Faktor zu W-Distanz (BASE + Waffe, bzw. BASE + FIST) ------ const float NPC_COLLISION_CORRECTION_SCALER = 0.75; //Default = 0.75 // // PROTECTION TYPES v2.0 // CONST INT PROT_BARRIER = DAM_INDEX_BARRIER ; CONST INT PROT_BLUNT = DAM_INDEX_BLUNT ; CONST INT PROT_EDGE = DAM_INDEX_EDGE ; CONST INT PROT_FIRE = DAM_INDEX_FIRE ; CONST INT PROT_FLY = DAM_INDEX_FLY ; CONST INT PROT_MAGIC = DAM_INDEX_MAGIC ; CONST INT PROT_POINT = DAM_INDEX_POINT ; CONST INT PROT_FALL = DAM_INDEX_FALL ; CONST INT PROT_INDEX_MAX = DAM_INDEX_MAX ; // // PERCEPTIONS ( ACTIVE ) // CONST INT PERC_ASSESSPLAYER = 1 ; CONST INT PERC_ASSESSENEMY = 2 ; CONST INT PERC_ASSESSFIGHTER = 3 ; CONST INT PERC_ASSESSBODY = 4 ; CONST INT PERC_ASSESSITEM = 5 ; // // SENSES // CONST INT SENSE_SEE = 1 << 0 ; CONST INT SENSE_HEAR = 1 << 1 ; CONST INT SENSE_SMELL = 1 << 2 ; // // PERCEPTIONS ( PASSIVE ) // CONST INT PERC_ASSESSMURDER = 6 ; CONST INT PERC_ASSESSDEFEAT = 7 ; CONST INT PERC_ASSESSDAMAGE = 8 ; CONST INT PERC_ASSESSOTHERSDAMAGE = 9 ; CONST INT PERC_ASSESSTHREAT = 10 ; CONST INT PERC_ASSESSREMOVEWEAPON = 11 ; CONST INT PERC_OBSERVEINTRUDER = 12 ; CONST INT PERC_ASSESSFIGHTSOUND = 13 ; CONST INT PERC_ASSESSQUIETSOUND = 14 ; CONST INT PERC_ASSESSWARN = 15 ; CONST INT PERC_CATCHTHIEF = 16 ; CONST INT PERC_ASSESSTHEFT = 17 ; CONST INT PERC_ASSESSCALL = 18 ; CONST INT PERC_ASSESSTALK = 19 ; CONST INT PERC_ASSESSGIVENITEM = 20 ; CONST INT PERC_ASSESSFAKEGUILD = 21 ; //wird gesendet, sobald der SC sich verwandelt CONST INT PERC_MOVEMOB = 22 ; CONST INT PERC_MOVENPC = 23 ; CONST INT PERC_DRAWWEAPON = 24 ; CONST INT PERC_OBSERVESUSPECT = 25 ; CONST INT PERC_NPCCOMMAND = 26 ; CONST INT PERC_ASSESSMAGIC = 27 ; CONST INT PERC_ASSESSSTOPMAGIC = 28 ; CONST INT PERC_ASSESSCASTER = 29 ; //wird beim 1. investierten Manapunkt gesendet CONST INT PERC_ASSESSSURPRISE = 30 ; //wird beim Zurückverwandeln gesendet CONST INT PERC_ASSESSENTERROOM = 31 ; CONST INT PERC_ASSESSUSEMOB = 32 ; // // NEWS SPREAD MODE // CONST INT NEWS_DONT_SPREAD = 0 ; const INT NEWS_SPREAD_NPC_FRIENDLY_TOWARDS_VICTIM = 1 ; CONST INT NEWS_SPREAD_NPC_FRIENDLY_TOWARDS_WITNESS = 2 ; CONST INT NEWS_SPREAD_NPC_FRIENDLY_TOWARDS_OFFENDER = 3 ; CONST INT NEWS_SPREAD_NPC_SAME_GUILD_VICTIM = 4 ; // // NEWS CONSTANTS // CONST INT IMPORTANT = 1 ; // // INFO STATUS // CONST INT INF_TELL = 0 ; CONST INT INF_UNKNOWN = 2 ; // // MISSION STATUS // const INT LOG_RUNNING = 1 ; // Mission läuft gerade CONST INT LOG_SUCCESS = 2 ; // Mission erfolgreich beendet CONST INT LOG_FAILED = 3 ; // Mission wurde abgebrochen CONST INT LOG_OBSOLETE = 4 ; // Mission ist hinfaellig // // ATTITUDES // CONST INT ATT_FRIENDLY = 3 ; CONST INT ATT_NEUTRAL = 2 ; CONST INT ATT_ANGRY = 1 ; CONST INT ATT_HOSTILE = 0 ; // ****************** // Gilden // ****************** const int GIL_NONE = 0 ; // (keine) const int GIL_HUMAN = 1 ; // Special Guild -> To set Constants for ALL Human Guilds --> wird verwendet in Species.d const int GIL_EBR = 1 ; // Paladin const int GIL_GRD = 2 ; // Miliz const int GIL_STT = 3 ; // Bürger const int GIL_KDF = 4 ; // Magier const int GIL_VLK = 5 ; // Magier Novize const int GIL_KDW = 6 ; // Drachenjäger const int GIL_SLD = 7 ; // Söldner const int GIL_ORG = 8 ; // Bauer const int GIL_BAU = 9 ; // Bandit const int GIL_SFB = 10 ; // Prisoner, Sträfling const int GIL_GUR = 11 ; // Dementoren const int GIL_NOV = 12 ; // Outlander (z.B. kleine Bauernhöfe) const int GIL_TPL = 13 ; //Pirat const int GIL_DMB = 14 ; //KDW const int GIL_BAB = 15 ; // //----------------------------------------------- const int GIL_SEPERATOR_HUM = 16 ; CONST INT GIL_WARAN = 17 ; // Waran CONST INT GIL_SLF = 18 ; // Schläfer CONST INT GIL_GOBBO = 19 ; // Gobbo (Höhlen und Oberwelt) CONST INT GIL_TROLL = 20 ; // Troll CONST INT GIL_SNAPPER = 21 ; // Snapper (neu) CONST INT GIL_MINECRAWLER = 22 ; // Minecrawler & Queen CONST INT GIL_MEATBUG = 23 ; // Meatbugs CONST INT GIL_SCAVENGER = 24 ; // Attack Chicken CONST INT GIL_DEMON = 25 ; // der Geflügel(te) Dämon CONST INT GIL_WOLF = 26 ; // Oberwelt Wolf CONST INT GIL_SHADOWBEAST = 27 ; // Unsere Miezekatz' CONST INT GIL_BLOODFLY = 28 ; // Scorpionlibelle CONST INT GIL_SWAMPSHARK = 29 ; // Sumpfhai CONST INT GIL_ZOMBIE = 30 ; // "Menschen" Zombies CONST INT GIL_UNDEADORC = 31 ; // Untote Orcs (Krieger & Hohepriester) CONST INT GIL_SKELETON = 32 ; // "Menschen" Skelette CONST INT GIL_ORCDOG = 33 ; // Orc-Wachhund (Zähne auf Beinen) CONST INT GIL_MOLERAT = 34 ; // Der Nacktmole CONST INT GIL_GOLEM = 35 ; // Lapidor CONST INT GIL_LURKER = 36 ; CONST INT GIL_SEPERATOR_ORC = 37 ; CONST INT GIL_ORCSHAMAN = 38 ; CONST INT GIL_ORCWARRIOR = 39 ; CONST INT GIL_ORCSCOUT = 40 ; CONST INT GIL_ORCSLAVE = 41 ; const int GIL_SUMMONED_GOLEM2 = 42 ; const int GIL_DEMON2 = 43 ; const int GIL_SUMMONED_DEMON2 = 44 ; const int GIL_TROLL2 = 45 ; // Troll / Schwarzer Troll const int GIL_SWAMPSHARK2 = 46 ; // (bei Bedarf) const int GIL_DRAGON2 = 47 ; // Feuerdrache / Eisdrache / Felsdrache / Sumpfdrache / Untoter Drache const int GIL_MOLERAT2 = 48 ; // Molerat const int GIL_ALLIGATOR2 = 49 ; const int GIL_SWAMPGOLEM2 = 50 ; const int GIL_Stoneguardian2 = 51 ; const int GIL_Gargoyle2 = 52 ; const int GIL_Empty_A2 = 53 ; const int GIL_SummonedGuardian2 = 54 ; const int GIL_SummonedZombie2 = 55 ; const int GIL_EMPTY_B2 = 56 ; const int GIL_EMPTY_C2 = 57 ; const int GIL_SEPERATOR_ORC2 = 58 ; // (ehem. 37) const int GIL_ORC2 = 59 ; // Ork-Krieger / Ork-Shamane / Ork-Elite const int GIL_FRIENDLY_ORC2 = 60 ; // Ork-Sklave / Ur-Shak const int GIL_UNDEADORC2 = 61 ; const int GIL_DRACONIAN2 = 62 ; const int GIL_EMPTY_X2 = 63 ; const int GIL_EMPTY_Y2 = 64 ; const int GIL_EMPTY_Z2 = 65 ; const int GIL_MAX = 66 ; // (ehem. 42) // // GUILDS DESCRIPTION // CLASS C_GILVALUES { VAR INT WATER_DEPTH_KNEE [GIL_MAX] ; VAR INT WATER_DEPTH_CHEST [GIL_MAX] ; VAR INT JUMPUP_HEIGHT [GIL_MAX] ; // DEFAULT = 200; // VAR INT JUMPUP_FORCE [GIL_MAX] ; VAR INT SWIM_TIME [GIL_MAX] ; VAR INT DIVE_TIME [GIL_MAX] ; VAR INT STEP_HEIGHT [GIL_MAX] ; VAR INT JUMPLOW_HEIGHT [GIL_MAX] ; VAR INT JUMPMID_HEIGHT [GIL_MAX] ; VAR INT SLIDE_ANGLE [GIL_MAX] ; VAR INT SLIDE_ANGLE2 [GIL_MAX] ; VAR INT DISABLE_AUTOROLL [GIL_MAX] ; // DEFAULT = 0 ; 0 = Autoroll enabled / 1 = Autoroll disabled VAR INT SURFACE_ALIGN [GIL_MAX] ; // DEFAULT = 0 ; 0 = Alignment disabled / 1 = Alignment enabled VAR INT CLIMB_HEADING_ANGLE [GIL_MAX] ; VAR INT CLIMB_HORIZ_ANGLE [GIL_MAX] ; VAR INT CLIMB_GROUND_ANGLE [GIL_MAX] ; VAR INT FIGHT_RANGE_BASE [GIL_MAX] ; VAR INT FIGHT_RANGE_FIST [GIL_MAX] ; var int FIGHT_RANGE_G [GIL_MAX] ; VAR INT FIGHT_RANGE_1HS [GIL_MAX] ; VAR INT FIGHT_RANGE_1HA [GIL_MAX] ; VAR INT FIGHT_RANGE_2HS [GIL_MAX] ; VAR INT FIGHT_RANGE_2HA [GIL_MAX] ; VAR INT FALLDOWN_HEIGHT [GIL_MAX] ; // Wie tief Fallen ohne Schaden ? VAR INT FALLDOWN_DAMAGE [GIL_MAX] ; // Schaden für jeden weiteren angefangenen Meter. VAR INT BLOOD_DISABLED [GIL_MAX] ; // DEFAULT = 0 ; Blut ganz ausschalten (z.B. bei Sekletten) ? VAR INT BLOOD_MAX_DISTANCE [GIL_MAX] ; // DEFAULT = 1000 ; Wie weit spritzt das Blut (in cm) ? VAR INT BLOOD_AMOUNT [GIL_MAX] ; // DEFAULT = 10 ; Wie viel Blut ? VAR INT BLOOD_FLOW [GIL_MAX] ; // DEFAULT = 0 ; Soll es sich langsam ausbreiten ? VAR STRING BLOOD_EMITTER [GIL_MAX] ; // DEFAULT = "PFX_BLOOD" ; Welcher Partikel-Emitter ? VAR STRING BLOOD_TEXTURE [GIL_MAX] ; // DEFAULT = "ZBLOODSPLAT2.TGA"; Welche Textur ? VAR INT TURN_SPEED [GIL_MAX] ; // DEFAULT = 150 ; }; // // SOUND TYPES // CONST INT NPC_SOUND_DROPTAKE = 1 ; CONST INT NPC_SOUND_SPEAK = 3 ; CONST INT NPC_SOUND_STEPS = 4 ; CONST INT NPC_SOUND_THROWCOLL = 5 ; CONST INT NPC_SOUND_DRAWWEAPON = 6 ; CONST INT NPC_SOUND_SCREAM = 7 ; CONST INT NPC_SOUND_FIGHT = 8 ; // // MATERIAL TYPES // CONST INT MAT_WOOD = 0 ; CONST INT MAT_STONE = 1 ; CONST INT MAT_METAL = 2 ; CONST INT MAT_LEATHER = 3 ; CONST INT MAT_CLAY = 4 ; CONST INT MAT_GLAS = 5 ; // ?? // // LOG // CONST INT LOG_MISSION = 0 ; CONST INT LOG_NOTE = 1 ; // // OTHER CONSTANTS // const int TIME_INFINITE = -1000000 / 1000 ; const int NPC_VOICE_VARIATION_MAX = 10 ; const float TRADE_VALUE_MULTIPLIER = 0.50; // DEFAULT = 0.3 Faktor auf den Wert eines Items, den ein Haendler bezahlt const string TRADE_CURRENCY_INSTANCE = "ITMINUGGET"; // DEFAULT = "ITMI_GOLD" Name der Instanz des Waehrungs-Items // ******* // Talente // ******* const int NPC_TALENT_UNKNOWN = 0; // Skilled Talents const int NPC_TALENT_1H = 1; const int NPC_TALENT_2H = 2; const int NPC_TALENT_BOW = 3; const int NPC_TALENT_CROSSBOW = 4; const int NPC_TALENT_PICKLOCK = 5; //wird jetzt per DEX geregelt //const int NPC_TALENT_PICKPOCKET = 6; //altes Pickpocket aus Gothic 1 - NICHT benutzen! Bleibt als Relikt im Code // Magiekreis const int NPC_TALENT_MAGE = 7; // Special-Talents const int NPC_TALENT_SNEAK = 8; const int NPC_TALENT_REGENERATE = 9; //??? was ist davon drin? const int NPC_TALENT_FIREMASTER = 10; //??? was ist davon drin? const int NPC_TALENT_ACROBAT = 11; //--> Anis ändern! // NEW Talents //werden komplett auf Scriptebene umgesetzt - Programm braucht sie nur für Ausgabe im Characterscreen const int NPC_TALENT_PICKPOCKET = 12; const int NPC_TALENT_SMITH = 13; const int NPC_TALENT_RUNES = 14; const int NPC_TALENT_ALCHEMY = 15; const int NPC_TALENT_TAKEANIMALTROPHY = 16; const int NPC_TALENT_FOREIGNLANGUAGE = 17; const int NPC_TALENT_WISPDETECTOR = 18; const int NPC_TALENT_C = 19; const int NPC_TALENT_D = 20; const int NPC_TALENT_E = 21; const int NPC_TALENT_MAX = 22; //ehem. 12 // ************* // Runen-Talente // ************* // ************* // ForeignLanguage-TalentStufen // ************* const int LANGUAGE_1 = 0; const int LANGUAGE_2 = 1; const int LANGUAGE_3 = 2; const int MAX_LANGUAGE = 3; var int PLAYER_TALENT_FOREIGNLANGUAGE[MAX_LANGUAGE]; // ************* // WispDetector-Talente // ************* const int WISPSKILL_NF = 0; const int WISPSKILL_FF = 1; const int WISPSKILL_NONE = 2; const int WISPSKILL_RUNE = 3; const int WISPSKILL_MAGIC = 4; const int WISPSKILL_FOOD = 5; const int WISPSKILL_POTIONS = 6; const int MAX_WISPSKILL = 7; var int PLAYER_TALENT_WISPDETECTOR [MAX_WISPSKILL]; VAR int WispSearching; const int WispSearch_Follow = 1; const int WispSearch_ALL = 2; const int WispSearch_POTIONS = 3; const int WispSearch_MAGIC = 4; const int WispSearch_FOOD = 5; const int WispSearch_NF = 6; const int WispSearch_FF = 7; const int WispSearch_NONE = 8; const int WispSearch_RUNE = 9; // **************** // Alchemie-Talente // **************** const int POTION_Health_01 = 0; const int POTION_Health_02 = 1; const int POTION_Health_03 = 2; const int POTION_Mana_01 = 3; const int POTION_Mana_02 = 4; const int POTION_Mana_03 = 5; const int POTION_Speed = 6; const int POTION_Perm_STR = 7; const int POTION_Perm_DEX = 8; const int POTION_Perm_Mana = 9; const int POTION_Perm_Health = 10; const int POTION_MegaDrink = 11; const int CHARGE_Innoseye = 12; const int POTION_Mana_04 = 13; const int POTION_Health_04 = 14; const int MAX_POTION = 15; var int PLAYER_TALENT_ALCHEMY[MAX_POTION]; // *************** // Schmied-Talente // *************** const int WEAPON_Common = 0; const int WEAPON_1H_Special_01 = 1; const int WEAPON_2H_Special_01 = 2; const int WEAPON_1H_Special_02 = 3; const int WEAPON_2H_Special_02 = 4; const int WEAPON_1H_Special_03 = 5; const int WEAPON_2H_Special_03 = 6; const int WEAPON_1H_Special_04 = 7; const int WEAPON_2H_Special_04 = 8; const int WEAPON_1H_Harad_01 = 9; const int WEAPON_1H_Harad_02 = 10; const int WEAPON_1H_Harad_03 = 11; const int WEAPON_1H_Harad_04 = 12; const int MAX_WEAPONS = 13; var int PLAYER_TALENT_SMITH[MAX_WEAPONS]; // ******************** // AnimalTrophy-Talente // ******************** const int TROPHY_Teeth = 0; const int TROPHY_Claws = 1; const int TROPHY_Fur = 2; const int TROPHY_Heart = 3; const int TROPHY_ShadowHorn = 4; const int TROPHY_FireTongue = 5; const int TROPHY_BFWing = 6; const int TROPHY_BFSting = 7; const int TROPHY_Mandibles = 8; const int TROPHY_CrawlerPlate = 9; const int TROPHY_DrgSnapperHorn = 10; const int TROPHY_DragonScale = 11; const int TROPHY_DragonBlood = 12; const int TROPHY_ReptileSkin = 13; const int MAX_TROPHIES = 14; var int PLAYER_TALENT_TAKEANIMALTROPHY[MAX_TROPHIES]; // **************************************** // Font-Konstanten der Engine (ausgelagert) // **************************************** const string TEXT_FONT_20 = "Font_old_20_white.tga"; const string TEXT_FONT_10 = "Font_old_10_white.tga"; const string TEXT_FONT_DEFAULT = "Font_old_10_white.tga"; const string TEXT_FONT_Inventory = "Font_old_10_white.tga"; // **************************************** // wie lange bklleibt ein TExt (OU) stehen, // wenn kein wav da ist (msec/character) // **************************************** const float VIEW_TIME_PER_CHAR = 550; // **************************************** // LevelZen-Abfrage im B_Kapitelwechsel // **************************************** const int NEWWORLD_ZEN = 1; const int OLDWORLD_ZEN = 2; const int DRAGONISLAND_ZEN = 3; const int ADDONWORLD_ZEN = 4; // **************************************** // Kamera für Inventory-Items // **************************************** const int INVCAM_ENTF_RING_STANDARD = 400; const int INVCAM_ENTF_AMULETTE_STANDARD = 150; const int INVCAM_ENTF_MISC_STANDARD = 200; const int INVCAM_ENTF_MISC2_STANDARD = 250; const int INVCAM_ENTF_MISC3_STANDARD = 500; const int INVCAM_ENTF_MISC4_STANDARD = 650; const int INVCAM_ENTF_MISC5_STANDARD = 850; const int INVCAM_X_RING_STANDARD = 25; const int INVCAM_Z_RING_STANDARD = 45; /* const int INVCAM_ENTF_MISC_STANDARD = 150; const int INVCAM_X_MISC_STANDARD = 0; const int INVCAM_Y_MISC_STANDARD = 0; const int INVCAM_Z_MISC_STANDARD = 0; */ //////////////////////////////////////////////////////////////////////////////// // // Spells: ID-Konstanten // // Magie-Sprüche const int SPL_LIGHT = 0; const int SPL_FIREBALL = 1; const int SPL_FEAR = 2; const int SPL_HEAL = 3; const int SPL_LIGHTNING = 4; const int SPL_SUMMONDEMON = 5; const int SPL_SUMMONSKELETON= 6; // Psi-Sekte const int SPL_FORGET = 7; const int SPL_WINDFIST = 8; const int SPL_TELEKINESIS = 9; const int SPL_CHARM = 10; const int SPL_SLEEP = 11; const int SPL_PYROKINESIS = 12; const int SPL_MASSDEATH = 13; const int SPL_CONTROL = 14; const int SPL_DESTROYUNDEAD = 15; const int SPL_FIREBOLT = 16; const int SPL_FIRESTORM = 17; const int SPL_FIRERAIN = 18; const int SPL_SPEED = 19; const int SPL_TELEPORT1 = 20; const int SPL_TELEPORT2 = 21; const int SPL_TELEPORT3 = 22; const int SPL_TELEPORT4 = 23; const int SPL_TELEPORT5 = 24; const int SPL_CHAINLIGHTNING= 25; const int SPL_THUNDERBOLT = 26; const int SPL_THUNDERBALL = 27; const int SPL_ICECUBE = 28; const int SPL_ICEWAVE = 29; const int SPL_SUMMONGOLEM = 30; const int SPL_ARMYOFDARKNESS= 31; const int SPL_STORMFIST = 32; const int SPL_TELEKINESIS2 = 33; const int SPL_BREATHOFDEATH = 34; const int SPL_SHRINK = 35; const int SPL_UNDRESS = 36; const int SPL_DANCE = 37; const int SPL_BERZERK = 38; const int SPL_TRF_BLOODFLY = 39; const int SPL_TRF_BLOODHOUND= 40; const int SPL_TRF_CRAWLER = 41; const int SPL_TRF_LURKER = 42; const int SPL_TRF_MEATBUG = 43; const int SPL_TRF_MOLERAT = 44; const int SPL_TRF_ORCDOG = 45; const int SPL_TRF_WARAN = 46; const int SPL_TRF_SCAVENGER = 47; const int SPL_TRF_SHADOWBEAST= 48; const int SPL_TRF_SNAPPER = 49; const int SPL_TRF_WOLF = 50; const int SPL_NEW1 = 51; const int MAX_SPELL = 112; // 59 (Gothic), 68 (Gothic2), 100 (G2Addon), 105 (DM) //////////////////////////////////////////////////////////////////////////////// // // Spells: Fx-/Spell-Klassennamen (Array) // const string spellFxInstanceNames[MAX_SPELL] = { "Light", // 0 SPL_Light "Fireball", // 1 SPL_Fireball "Fear", // 2 SPL_PalHolyBolt "Heal", // 3 SPL_PalMediumHeal "Lightning", // 4 SPL_PalRepelEvil "Demon", // 5 SPL_PalFullHeal "Skeleton", // 6 SPL_PalDestroyEvil // Teleport-Runen "Forget", // 7 SPL_PalTeleportSecret "Windfist", // 8 SPL_TeleportSeaport "Telekinesis", // 9 SPL_TeleportMonastery "Charm", // 10 SPL_TeleportFarm "Sleep", // 11 SPL_TeleportXardas "Pyrokinesis", // 12 SPL_TeleportPassNW "MassDeath", // 13 SPL_TeleportPassOW "Control", // 14 SPL_TeleportOC "DestroyUndead", // 15 SPL_TeleportOWDemonTower "Firebolt", // 16 SPL_TeleportTaverne "Firestorm", // 17 SPL_Teleport_3 // Kreis 1 "Firerain", // 18 SPL_Light "Speed", // 19 SPL_Firebolt // Kreis 2 "Teleport", // 20 SPL_Icebolt // Kreis 1 "Teleport", // 21 SPL_LightHeal "Teleport", // 22 SPL_SummonGoblinSkeleton // Kreis 2 "Teleport", // 23 SPL_InstantFireball // Kreis 1 "Teleport", // 24 SPL_Zap // Kreis 2 "Chainlightning", // 25 SPL_SummonWolf "Thunderbolt", // 26 SPL_WindFist "Thunderball", // 27 SPL_Sleep // Kreis 3 "Icecube", // 28 SPL_MediumHeal "Icewave", // 29 SPL_LightningFlash "Golem", // 30 SPL_ChargeFireball "ArmyOfDarkness", // 31 SPL_SummonSkeleton "Stormfist", // 32 SPL_Fear "Telekinesis2", // 33 SPL_IceCube // Kreis 4 "BreathOfDeath", // 34 SPL_ChargeZap "Shrink", // 53 SPL_SummonGolem "Undress", // 36 SPL_DestroyUndead "Dance", // 37 SPL_Pyrokinesis // Kreis 5 "Berzerk", // 38 SPL_Firestorm "BreathOfDeath", // 39 SPL_IceWave "SummonDemon", // 40 SPL_SummonDemon "Heal", // 41 SPL_FullHeal // Kreis 6 "Firerain", // 42 SPL_Firerain "BreathOfDeath", // 43 SPL_BreathOfDeath "MassDeath", // 44 SPL_MassDeath "ArmyOfDarkness", // 45 SPL_ArmyOfDarkness "Shrink", // 46 SPL_Shrink // Scrolls "Transform", // 47 SPL_TrfSheep "Transform", // 48 SPL_TrfScavenger "Transform", // 49 SPL_TrfGiantRat "Transform", // 50 SPL_TrfGiantBug "Transform", // 51 SPL_TrfWolf "Transform", // 52 SPL_TrfWaran "Transform", // 53 SPL_TrfSnapper "Transform", // 54 SPL_TrfWarg "Transform", // 55 SPL_TrfFireWaran "Transform", // 56 SPL_TrfLurker "Transform", // 57 SPL_TrfShadowbeast "Transform", // 58 SPL_TrfDragonSnapper "Charm", // 59 SPL_Charm // Kreis 5 "MasterOfDisaster", // 60 SPL_MasterOfDisaster // ??? "Deathbolt", // 61 SPL_Deathbolt "Deathball", // 62 SPL_Deathball "Concussionbolt", // 63 SPL_Concussionbolt "Light", // 64 SPL_Reserved_64 "Light", // 65 SPL_Reserved_65 "Ghost", // 66 SPL_Reserved_66 "Light", // 67 SPL_Reserved_67 "Light", // 68 SPL_Reserved_68 "Soul", // 69 SPL_Reserved_69 // Magick (Wasser) "Thunderstorm", // 70 SPL_Thunderstorm "Whirlwind", // 71 SPL_Whirlwind "Waterfist", // 72 SPL_WaterFist "IceLance", // 73 SPL_IceLance "Sleep", // 74 SPL_Inflate "Geyser", // 75 SPL_Geyser "Firerain", // 76 SPL_Waterwall "Light", // 77 SPL_Reserved_77 "Light", // 78 SPL_Reserved_78 "Light", // 79 SPL_Reserved_79 // Magick (Maya) "Fear", // 80 SPL_Plague "Swarm", // 81 SPL_Swarm "Greententacle", // 82 SPL_GreenTentacle "Firerain", // 83 SPL_Earthquake "SummonGuardian", // 84 SPL_SummonGuardian "Energyball", // 85 SPL_Energyball "SuckEnergy", // 86 SPL_SuckEnergy "Skull", // 87 SPL_Skull "SummonZombie", // 88 SPL_SummonZombie "SummonMud", // 89 SPL_SummonMud // ... "SummonWolf", // 90 Snapper rufen "vLight", // 91 SPL_Reserved_91 "SummonWarg", // 92 SPL_Reserved_92 "Summon3Warg", // 93 SPL_Reserved_93 "SummonShadow", // 94 SPL_Reserved_94 "Amok", // 95 SPL_Reserved_95 "Ghostspell", // 96 SPL_Reserved_96 "SummonDragon", // 97 SPL_Reserved_97 "Earth", // 98 SPL_Reserved_98 "Sleep", // 99 SPL_Reserved_99 "Blutopfer", // 100 SPL_Blutopfer "Altern", // 101 SPL_Altern "Seelenraub", // 102 SPL_Seelenraub "Giftanschlag",// 103 SPL_Giftanschlag "Wahnsinn", // 104 SPL_Wahnsinn "ZornAdanos", "SummonIcewolf", "SummonIcegolem", "Whirlwind", // 90 SPL_fighterWhirl "Energyball", // 91 SPL_redball "Summoner", // 91 SPL_redball "Teleport" }; //////////////////////////////////////////////////////////////////////////////// // // Spells: Animationskürzel (Array) // const string spellFxAniLetters[MAX_SPELL] = { // Paladin-Runen "SLE", // 0 SPL_PalLight "FIB", // 1 SPL_PalLightHeal "FEA", // 2 SPL_PalHolyBolt "HEA", // 3 SPL_PalMediumHeal "XXX", // 4 SPL_PalRepelEvil "SUM", // 5 SPL_PalFullHeal "SUM", // 6 SPL_PalDestroyEvil // Teleport-Runen "XXX", // 7 SPL_PalTeleportSecret "WND", // 8 SPL_TeleportSeaport "TEL", // 9 SPL_TeleportMonastery "SLE", // 10 SPL_TeleportFarm "SLE", // 11 SPL_TeleportXardas "PYR", // 12 SPL_TeleportPassNW "FEA", // 13 SPL_TeleportPassOW "CON", // 14 SPL_TeleportOC "FIB", // 15 SPL_TeleportOWDemonTower "FBT", // 16 SPL_TeleportTaverne "FIB", // 17 SPL_Teleport_3 // Kreis 1 "FEA", // 18 SPL_Light "XXX", // 19 SPL_Firebolt // Kreis 2 "HEA", // 20 SPL_Icebolt // Kreis 1 "HEA", // 21 SPL_LightHeal "HEA", // 22 SPL_SummonGoblinSkeleton // Kreis 2 "HEA", // 23 SPL_InstantFireball // Kreis 1 "HEA", // 24 SPL_Zap // Kreis 2 "LIN", // 25 SPL_SummonWolf "FBT", // 26 SPL_WindFist "FIB", // 27 SPL_Sleep // Kreis 3 "FRZ", // 28 SPL_MediumHeal "FEA", // 29 SPL_LightningFlash "SUM", // 30 SPL_ChargeFireball "SUM", // 31 SPL_SummonSkeleton "WND", // 32 SPL_Fear "XXX", // 33 SPL_IceCube "FIB", // 34 SPL_ChargeZap // Kreis 4 "SLE", // 35 SPL_SummonGolem "XXX", // 36 SPL_DestroyUndead "XXX", // 37 SPL_Pyrokinesis // Kreis 5 "SLE", // 38 SPL_Firestorm "FEA", // 39 SPL_IceWave "SUM", // 40 SPL_SummonDemon "HEA", // 41 SPL_FullHeal // Kreis 6 "FEA", // 42 SPL_Firerain "FIB", // 43 SPL_BreathOfDeath "MSD", // 44 SPL_MassDeath "SUM", // 45 SPL_ArmyOfDarkness "SLE", // 46 SPL_Shrink // Scrolls "TRF", // 47 SPL_TrfSheep "TRF", // 48 SPL_TrfScavenger "TRF", // 49 SPL_TrfGiantRat "TRF", // 50 SPL_TrfGiantBug "TRF", // 51 SPL_TrfWolf "TRF", // 52 SPL_TrfWaran "TRF", // 53 SPL_TrfSnapper "TRF", // 54 SPL_TrfWarg "TRF", // 55 SPL_TrfFireWaran "TRF", // 56 SPL_TrfLurker "TRF", // 57 SPL_TrfShadowbeast "TRF", // 58 SPL_TrfDragonSnapper "FIB", // 59 SPL_Charm // Kreis 5 "FIB", // 60 SPL_MasterOfDisaster // ??? "FBT", // 61 SPL_Deathbolt "FBT", // 62 SPL_Deathball "FBT", // 63 SPL_Concussionbolt "XXX", // 64 SPL_Reserved_64 "XXX", // 65 SPL_Reserved_65 "HEA", // 66 SPL_Reserved_66 "XXX", // 67 SPL_Reserved_67 "XXX", // 68 SPL_Reserved_68 "FBT", // 69 SPL_Reserved_69 // Magick (Wasser) "STM", // 70 SPL_Thunderstorm "WHI", // 71 SPL_Whirlwind "WND", // 72 SPL_WaterFist "FBT", // 73 SPL_IceLance "SLE", // 74 SPL_Inflate "WND", // 75 SPL_Geyser "FEA", // 76 SPL_Waterwall "XXX", // 77 SPL_Reserved_77 "XXX", // 78 SPL_Reserved_78 "XXX", // 79 SPL_Reserved_79 // Magick (Maya) "FBT", // 80 SPL_Plague "FBT", // 81 SPL_Swarm "FRZ", // 82 SPL_GreenTentacle "FEA", // 83 SPL_Earthquake "SUM", // 84 SPL_SummonGuardian "WND", // 85 SPL_Energyball "WND", // 86 SPL_SuckEnergy "WND", // 87 SPL_Skull "SUM", // 88 SPL_SummonZombie "SUM", // 89 SPL_SummonMud // ... "SUM", // 90 SPL_SummonSnapper "SLE", // 91 SPL_Reserved_91 "SUM", // 92 SPL_Reserved_92 "SUM", // 93 SPL_Reserved_93 "SUM", // 94 SPL_Reserved_94 "SUM", // 95 SPL_Reserved_95 "FBT", // 96 SPL_Reserved_96 "SUM", // 97 SPL_Reserved_97 "SUM", // 98 SPL_Reserved_98 "SLE", // 99 SPL_Reserved_99 "WND", //100 SPL_Blutopfer "WND", //101 SPL_Altern "SLE", //102 SPL_Seelenraub "FIB", //103 SPL_Giftanschlag "SLE", //104 SPL_Wahnsinn "FBT", "SUM", "SUM", "WHI", // 90 SPL_fighterWhirl "WND", // 91 SPL_redball "HEA", // 91 SPL_redball "HEA" };
D
/Users/Salgara/Desktop/IOS/CurrencyApp/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RxSwift.build/Objects-normal/x86_64/AnyObserver.o : /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Amb.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Deferred.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Deprecated.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Enumerated.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/Maybe.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Sequence.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/ObservableType+PrimitiveSequence.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Debounce.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Reduce.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Range.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Merge.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Take.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Cancelable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/Completable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/GroupedObservable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/Single.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/AsSingle.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Sample.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Throttle.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/ObservableType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/ConnectableObservableType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/SchedulerType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/ObserverType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Create.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Generate.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/DataStructures/Queue.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Reactive.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Materialize.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/AddRef.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/DataStructures/Bag.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Using.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Debug.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Catch.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Switch.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/StartWith.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Concurrency/Lock.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/RecursiveLock.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Sink.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Optional.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Scan.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/Completable+AndThen.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/Platform.Darwin.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Do.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Map.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Zip.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Skip.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Producer.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Buffer.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Timer.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/DeprecationWarner.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Filter.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Never.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/AnyObserver.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Error.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/Disposables.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Errors.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/ElementAt.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Concat.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Repeat.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Subjects/AsyncSubject.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Subjects/PublishSubject.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Subjects/BehaviorSubject.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Subjects/ReplaySubject.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Event.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/SwiftSupport/SwiftSupport.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/TakeLast.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Multicast.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/First.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Just.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Timeout.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Window.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Rx.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/RxMutableBox.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/Platform.Linux.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/GroupBy.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Delay.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/ToArray.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence+Zip+arity.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Empty.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/Target\ Support\ Files/RxSwift/RxSwift-umbrella.h /Users/Salgara/Desktop/IOS/CurrencyApp/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RxSwift.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/Salgara/Desktop/IOS/CurrencyApp/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RxSwift.build/Objects-normal/x86_64/AnyObserver~partial.swiftmodule : /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Amb.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Deferred.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Deprecated.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Enumerated.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/Maybe.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Sequence.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/ObservableType+PrimitiveSequence.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Debounce.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Reduce.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Range.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Merge.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Take.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Cancelable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/Completable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/GroupedObservable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/Single.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/AsSingle.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Sample.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Throttle.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/ObservableType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/ConnectableObservableType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/SchedulerType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/ObserverType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Create.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Generate.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/DataStructures/Queue.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Reactive.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Materialize.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/AddRef.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/DataStructures/Bag.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Using.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Debug.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Catch.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Switch.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/StartWith.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Concurrency/Lock.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/RecursiveLock.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Sink.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Optional.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Scan.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/Completable+AndThen.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/Platform.Darwin.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Do.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Map.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Zip.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Skip.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Producer.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Buffer.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Timer.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/DeprecationWarner.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Filter.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Never.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/AnyObserver.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Error.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/Disposables.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Errors.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/ElementAt.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Concat.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Repeat.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Subjects/AsyncSubject.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Subjects/PublishSubject.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Subjects/BehaviorSubject.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Subjects/ReplaySubject.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Event.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/SwiftSupport/SwiftSupport.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/TakeLast.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Multicast.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/First.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Just.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Timeout.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Window.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Rx.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/RxMutableBox.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/Platform.Linux.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/GroupBy.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Delay.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/ToArray.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence+Zip+arity.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Empty.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/Target\ Support\ Files/RxSwift/RxSwift-umbrella.h /Users/Salgara/Desktop/IOS/CurrencyApp/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RxSwift.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/Salgara/Desktop/IOS/CurrencyApp/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RxSwift.build/Objects-normal/x86_64/AnyObserver~partial.swiftdoc : /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Amb.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Deferred.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Deprecated.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Enumerated.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/Maybe.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Sequence.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/ObservableType+PrimitiveSequence.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Debounce.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Reduce.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Range.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Merge.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Take.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Cancelable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/Completable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/GroupedObservable.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/Single.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/AsSingle.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Sample.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Throttle.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/ObservableType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/ConnectableObservableType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/SchedulerType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/ObserverType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Create.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Generate.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/DataStructures/Queue.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Reactive.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Materialize.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/AddRef.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/DataStructures/Bag.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Using.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Debug.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Catch.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Switch.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/StartWith.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Concurrency/Lock.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/RecursiveLock.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Sink.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Optional.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Scan.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/Completable+AndThen.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/Platform.Darwin.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Do.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Map.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Zip.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Skip.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Producer.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Buffer.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Timer.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/DeprecationWarner.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Filter.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Never.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/AnyObserver.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Error.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Disposables/Disposables.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Errors.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/ElementAt.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Concat.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Repeat.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Subjects/AsyncSubject.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Subjects/PublishSubject.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Subjects/BehaviorSubject.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Subjects/ReplaySubject.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Event.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/SwiftSupport/SwiftSupport.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/TakeLast.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Multicast.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/First.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Just.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Timeout.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Window.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Rx.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/RxMutableBox.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/Platform/Platform.Linux.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/GroupBy.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Delay.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/ToArray.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence+Zip+arity.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/Empty.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Salgara/Desktop/IOS/CurrencyApp/Pods/Target\ Support\ Files/RxSwift/RxSwift-umbrella.h /Users/Salgara/Desktop/IOS/CurrencyApp/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RxSwift.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
D
/* Copyright (c) 2014 Timur Gafarov Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ module dlib.image.hdri; private { import core.stdc.string; import dlib.image.image; import dlib.image.color; } final class FPImage: SuperImage { public: override @property uint width() { return _width; } override @property uint height() { return _height; } override @property uint bitDepth() { return _bitDepth; } override @property uint channels() { return _channels; } override @property uint pixelSize() { return _pixelSize; } override @property PixelFormat pixelFormat() { return PixelFormat.RGBA_FLOAT; } override @property ref ubyte[] data() { return _data; } override @property SuperImage dup() { auto res = new FPImage(_width, _height); res.data = _data.dup; return res; } override SuperImage createSameFormat(uint w, uint h) { return new FPImage(w, h); } this(uint w, uint h) { _width = w; _height = h; _bitDepth = 32; _channels = 4; _pixelSize = (_bitDepth / 8) * _channels; _data = new ubyte[_width * _height * _pixelSize]; pixelCost = 1.0f / (_width * _height); progress = 0.0f; } override Color4f opIndex(int x, int y) { while(x >= _width) x = _width-1; while(y >= _height) y = _height-1; while(x < 0) x = 0; while(y < 0) y = 0; float r, g, b, a; auto dataptr = data.ptr + (y * _width + x) * _pixelSize; memcpy(&r, dataptr, 4); memcpy(&g, dataptr + 4, 4); memcpy(&b, dataptr + 4 * 2, 4); memcpy(&a, dataptr + 4 * 3, 4); return Color4f(r, g, b, a); } override Color4f opIndexAssign(Color4f c, int x, int y) { while(x >= _width) x = _width-1; while(y >= _height) y = _height-1; while(x < 0) x = 0; while(y < 0) y = 0; auto dataptr = data.ptr + (y * _width + x) * _pixelSize; memcpy(dataptr, &c.arrayof[0], 4); memcpy(dataptr + 4, &c.arrayof[1], 4); memcpy(dataptr + 4 * 2, &c.arrayof[2], 4); memcpy(dataptr + 4 * 3, &c.arrayof[3], 4); return c; } protected: uint _width; uint _height; uint _bitDepth; uint _channels; uint _pixelSize; ubyte[] _data; } SuperImage clamp(SuperImage img, float minv, float maxv) { foreach(x; 0..img.width) foreach(y; 0..img.height) { img[x, y] = img[x, y].clamped(minv, maxv); } return img; }
D
module UnrealScript.Engine.Interface_NavMeshPathObject; import ScriptClasses; import UnrealScript.Helpers; import UnrealScript.Core.UInterface; extern(C++) interface Interface_NavMeshPathObject : UInterface { public extern(D): private static __gshared ScriptClass mStaticClass; @property final static ScriptClass StaticClass() { mixin(MGSCC("Class Engine.Interface_NavMeshPathObject")); } private static __gshared Interface_NavMeshPathObject mDefaultProperties; @property final static Interface_NavMeshPathObject DefaultProperties() { mixin(MGDPC("Interface_NavMeshPathObject", "Interface_NavMeshPathObject Engine.Default__Interface_NavMeshPathObject")); } }
D
/Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Validation.build/Validators/CharacterSetValidator.swift.o : /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validatable.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/ValidatorType.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/ValidationError.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/AndValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/RangeValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/NilIgnoringValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/NilValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/EmailValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/InValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/OrValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/CharacterSetValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/CountValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/NotValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validations.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Exports.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/cpp_magic.h /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIODarwin/include/c_nio_darwin.h /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/c-atomics.h /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/c_nio_linux.h /Users/work/Projects/Hello/.build/checkouts/swift-nio-zlib-support.git--1071467962839356487/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Validation.build/CharacterSetValidator~partial.swiftmodule : /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validatable.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/ValidatorType.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/ValidationError.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/AndValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/RangeValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/NilIgnoringValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/NilValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/EmailValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/InValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/OrValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/CharacterSetValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/CountValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/NotValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validations.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Exports.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/cpp_magic.h /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIODarwin/include/c_nio_darwin.h /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/c-atomics.h /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/c_nio_linux.h /Users/work/Projects/Hello/.build/checkouts/swift-nio-zlib-support.git--1071467962839356487/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Validation.build/CharacterSetValidator~partial.swiftdoc : /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validatable.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/ValidatorType.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/ValidationError.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/AndValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/RangeValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/NilIgnoringValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/NilValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/EmailValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/InValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/OrValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/CharacterSetValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/CountValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validators/NotValidator.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Validations.swift /Users/work/Projects/Hello/.build/checkouts/validation.git--4403154650041669468/Sources/Validation/Exports.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/cpp_magic.h /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIODarwin/include/c_nio_darwin.h /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/c-atomics.h /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/c_nio_linux.h /Users/work/Projects/Hello/.build/checkouts/swift-nio-zlib-support.git--1071467962839356487/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
D
/Users/hyungsukkang/terra/terra-contracts/exchange/target/rls/debug/deps/byte_tools-2c2806cb94b7fb5e.rmeta: /Users/hyungsukkang/.cargo/registry/src/github.com-1ecc6299db9ec823/byte-tools-0.3.1/src/lib.rs /Users/hyungsukkang/terra/terra-contracts/exchange/target/rls/debug/deps/byte_tools-2c2806cb94b7fb5e.d: /Users/hyungsukkang/.cargo/registry/src/github.com-1ecc6299db9ec823/byte-tools-0.3.1/src/lib.rs /Users/hyungsukkang/.cargo/registry/src/github.com-1ecc6299db9ec823/byte-tools-0.3.1/src/lib.rs:
D
module hunt.net.TcpConnection; import hunt.net.AbstractConnection; import hunt.net.Connection; import hunt.net.codec; import hunt.net.TcpSslOptions; import hunt.collection; import hunt.io.TcpStream; import hunt.Exceptions; import hunt.Functions; import hunt.logging; import hunt.util.Common; import hunt.util.DateTime; import core.atomic; import core.time; import std.socket; /** * Represents a socket-like interface to a TCP connection on either the * client or the server side. */ class TcpConnection : AbstractConnection { version(HUNT_METRIC) { private long openTime; private long closeTime; private long lastReadTime; private long lastWrittenTime; private size_t readBytes = 0; private size_t writtenBytes = 0; } protected shared bool _isShutdownOutput = false; protected shared bool _isShutdownInput = false; protected shared bool _isWaitingForClose = false; this(int connectionId, TcpSslOptions options, NetConnectionHandler handler, Codec codec, TcpStream tcp) { super(connectionId, options, tcp, codec, handler); version(HUNT_METRIC) this.openTime = DateTime.currentTimeMillis(); version(HUNT_DEBUG) trace("Initializing a TCP connection..."); } version(HUNT_METRIC) { override protected void onDataReceived(ByteBuffer buffer) { readBytes += buffer.limit(); super.onDataReceived(buffer); } override void write(const ubyte[] data) { writtenBytes += data.length; super.write(data); } alias write = AbstractConnection.write; long getOpenTime() { return openTime; } long getCloseTime() { return closeTime; } long getDuration() { if (closeTime > 0) { return closeTime - openTime; } else { return DateTime.currentTimeMillis - openTime; } } long getLastReadTime() { return lastReadTime; } long getLastWrittenTime() { return lastWrittenTime; } long getLastActiveTime() { import std.algorithm; return max(max(lastReadTime, lastWrittenTime), openTime); } size_t getReadBytes() { return readBytes; } size_t getWrittenBytes() { return writtenBytes; } long getIdleTimeout() { return DateTime.currentTimeMillis - getLastActiveTime(); } void reset() { readBytes = 0; writtenBytes = 0; } override string toString() { import std.conv; return "[connectionId=" ~ _connectionId.to!string() ~ ", openTime=" ~ openTime.to!string() ~ ", closeTime=" ~ closeTime.to!string() ~ ", duration=" ~ getDuration().to!string() ~ ", readBytes=" ~ readBytes.to!string() ~ ", writtenBytes=" ~ writtenBytes.to!string() ~ "]"; } } // override void close() { // // if(cas(&_isClosed, false, true)) { // try { // super.close(); // } catch (AsynchronousCloseException e) { // warningf("The connection %d asynchronously close exception", _connectionId); // } catch (IOException e) { // errorf("The connection %d close exception: %s", _connectionId, e.msg); // } // // finally { // // _eventHandler.notifyConnectionClosed(this); // // } // // } else { // // infof("The connection %d already closed", _connectionId); // // } // } // override void closeNow() { // this.close(); // } override protected void notifyClose() { version(HUNT_METRIC) { closeTime = DateTime.currentTimeMillis(); // version(HUNT_DEBUG) tracef("The connection %d closed: %s", _connectionId, this.toString()); } else { version(HUNT_DEBUG) tracef("The connection %d closed", _connectionId); } super.notifyClose(); } private void shutdownSocketChannel() { shutdownOutput(); shutdownInput(); } void shutdownOutput() { if (_isShutdownOutput) { tracef("The connection %d is already shutdown output", _connectionId); } else { _isShutdownOutput = true; try { _tcp.shutdownOutput(); tracef("The connection %d is shutdown output", _connectionId); } catch (ClosedChannelException e) { warningf("Shutdown output exception. The connection %d is closed", _connectionId); } catch (IOException e) { errorf("The connection %d shutdown output I/O exception. %s", _connectionId, e.message); } } } void shutdownInput() { if (_isShutdownInput) { tracef("The connection %d is already shutdown input", _connectionId); } else { _isShutdownInput = true; try { _tcp.shutdownInput(); tracef("The connection %d is shutdown input", _connectionId); } catch (ClosedChannelException e) { warningf("Shutdown input exception. The connection %d is closed", _connectionId); } catch (IOException e) { errorf("The connection %d shutdown input I/O exception. %s", _connectionId, e.message); } } } bool isShutdownOutput() { return _isShutdownOutput; } bool isShutdownInput() { return _isShutdownInput; } bool isWaitingForClose() { return _isWaitingForClose; } Address getLocalAddress() { return localAddress(); } Address getRemoteAddress() { return remoteAddress(); } Duration getMaxIdleTimeout() { return _options.getIdleTimeout(); } }
D
a country on the island of Cyprus an island in the eastern Mediterranean
D
/* Converted to D from ../include/capi/cef_trace_capi.h by htod */ module cef_trace_capi; // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the name Chromium Embedded // Framework nor the names of its contributors may be used to endorse // or promote products derived from this software without specific prior // written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // --------------------------------------------------------------------------- // // This file was generated by the CEF translator tool and should not edited // by hand. See the translator.README.txt file in the tools directory for // more information. // //C #ifndef CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_ //C #define CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_ //C #pragma once //C #include "include/capi/cef_base_capi.h" import cef_base_capi; //C #include "include/capi/cef_callback_capi.h" import cef_callback_capi; //C #ifdef __cplusplus //C extern "C" { //C #endif /// // Implement this structure to receive notification when tracing has completed. // The functions of this structure will be called on the browser process UI // thread. /// //C typedef struct _cef_end_tracing_callback_t { /// // Base structure. /// //C cef_base_t base; /// // Called after all processes have sent their trace data. |tracing_file| is // the path at which tracing data was written. The client is responsible for // deleting |tracing_file|. /// //C void (CEF_CALLBACK *on_end_tracing_complete)( //C struct _cef_end_tracing_callback_t* self, //C const cef_string_t* tracing_file); //C } cef_end_tracing_callback_t; struct _cef_end_tracing_callback_t { cef_base_t base; void function(_cef_end_tracing_callback_t *self, cef_string_t *tracing_file)on_end_tracing_complete; } extern (C): alias _cef_end_tracing_callback_t cef_end_tracing_callback_t; /// // Start tracing events on all processes. Tracing is initialized asynchronously // and |callback| will be executed on the UI thread after initialization is // complete. // // If CefBeginTracing was called previously, or if a CefEndTracingAsync call is // pending, CefBeginTracing will fail and return false (0). // // |categories| is a comma-delimited list of category wildcards. A category can // have an optional '-' prefix to make it an excluded category. Having both // included and excluded categories in the same list is not supported. // // Example: "test_MyTest*" Example: "test_MyTest*,test_OtherStuff" Example: // "-excluded_category1,-excluded_category2" // // This function must be called on the browser process UI thread. /// //C CEF_EXPORT int cef_begin_tracing(const cef_string_t* categories, //C struct _cef_completion_callback_t* callback); int cef_begin_tracing(cef_string_t *categories, _cef_completion_callback_t *callback); /// // Stop tracing events on all processes. // // This function will fail and return false (0) if a previous call to // CefEndTracingAsync is already pending or if CefBeginTracing was not called. // // |tracing_file| is the path at which tracing data will be written and // |callback| is the callback that will be executed once all processes have sent // their trace data. If |tracing_file| is NULL a new temporary file path will be // used. If |callback| is NULL no trace data will be written. // // This function must be called on the browser process UI thread. /// //C CEF_EXPORT int cef_end_tracing(const cef_string_t* tracing_file, //C cef_end_tracing_callback_t* callback); int cef_end_tracing(cef_string_t *tracing_file, cef_end_tracing_callback_t *callback); /// // Returns the current system trace time or, if none is defined, the current // high-res time. Can be used by clients to synchronize with the time // information in trace events. /// //C CEF_EXPORT int64 cef_now_from_system_trace_time(); int64 cef_now_from_system_trace_time(...); //C #ifdef __cplusplus //C } //C #endif //C #endif // CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_
D
module android.java.android.hardware.Camera_OnZoomChangeListener; public import android.java.android.hardware.Camera_OnZoomChangeListener_d_interface; import arsd.jni : ImportExportImpl; mixin ImportExportImpl!Camera_OnZoomChangeListener; import import1 = android.java.java.lang.Class;
D
/* -------------------- CZ CHANGELOG -------------------- */ /* v1.02: CZ_SkillCheckCondition - přidáno zobrazování skill checků */ instance DIA_Wasili_EXIT(C_Info) { npc = BAU_907_Wasili; nr = 999; condition = DIA_Wasili_EXIT_Condition; information = DIA_Wasili_EXIT_Info; permanent = TRUE; description = Dialog_Ende; }; func int DIA_Wasili_EXIT_Condition() { return TRUE; }; func void DIA_Wasili_EXIT_Info() { AI_StopProcessInfos(self); }; instance DIA_Wasili_HALLO(C_Info) { npc = BAU_907_Wasili; nr = 1; condition = DIA_Wasili_HALLO_Condition; information = DIA_Wasili_HALLO_Info; permanent = FALSE; important = TRUE; }; func int DIA_Wasili_HALLO_Condition() { if(Npc_IsInState(self,ZS_Talk) && (self.aivar[AIV_TalkedToPlayer] == FALSE) && (other.guild == GIL_NONE)) { return TRUE; }; }; func void DIA_Wasili_HALLO_Info() { AI_Output(self,other,"DIA_Wasili_HALLO_01_00"); //Neodvažuj se ani pomyslet na to, že bys tu mohl něco ukrást. Jinak tě vynesou nohama napřed, jasný? }; instance DIA_Wasili_Job(C_Info) { npc = BAU_907_Wasili; nr = 1; condition = DIA_Wasili_Job_Condition; information = DIA_Wasili_Job_Info; permanent = FALSE; description = "Co je tvoje práce?"; }; func int DIA_Wasili_Job_Condition() { return TRUE; }; func void DIA_Wasili_Job_Info() { AI_Output(other,self,"DIA_Wasili_Job_15_00"); //Co je tvoje práce? AI_Output(self,other,"DIA_Wasili_Job_01_01"); //Onar po mně chce, abych celý den dohlížel na jeho věci. AI_Output(self,other,"DIA_Wasili_Job_01_02"); //Dělá si starosti, že něco zmizí. A já taky - na tomhle místě... AI_Output(self,other,"DIA_Wasili_Job_01_03"); //Většina z těch žoldáků, co najal, jsou bývalí vězni z trestanecké kolonie. AI_Output(self,other,"DIA_Wasili_Job_01_04"); //Když se nikdo z nás nekouká, v mžiku odnesou všechno, co není přišroubovaný. }; instance DIA_Wasili_Sammler(C_Info) { npc = BAU_907_Wasili; nr = 4; condition = DIA_Wasili_Sammler_Condition; information = DIA_Wasili_Sammler_Info; permanent = FALSE; description = "Je tady spousta haraburdí."; }; func int DIA_Wasili_Sammler_Condition() { return TRUE; }; func void DIA_Wasili_Sammler_Info() { AI_Output(other,self,"DIA_Wasili_Sammler_15_00"); //Je tady spousta haraburdí. AI_Output(self,other,"DIA_Wasili_Sammler_01_01"); //Jo, a většina z něj je hodně drahá. Onar sbírá cennosti. AI_Output(self,other,"DIA_Wasili_Sammler_01_02"); //Obyčejný člověk jako já si takový luxus nemůže dovolit. Mám raději jiné věci. AI_Output(other,self,"DIA_Wasili_Sammler_15_03"); //A to jako? AI_Output(self,other,"DIA_Wasili_Sammler_01_04"); //Sbírám staré mince. MIS_Wasili_BringOldCoin = LOG_Running; }; instance DIA_Wasili_FirstOldCoin(C_Info) { npc = BAU_907_Wasili; nr = 5; condition = DIA_Wasili_FirstOldCoin_Condition; information = DIA_Wasili_FirstOldCoin_Info; permanent = TRUE; description = "Mám tady pár starých mincí."; }; var int Wasili_BringOldCoin_NoMore; func int DIA_Wasili_FirstOldCoin_Condition() { if((MIS_Wasili_BringOldCoin == LOG_Running) && (WasilisOldCoinOffer == 0) && (Npc_HasItems(other,ItMi_OldCoin) >= 1) && (Wasili_BringOldCoin_NoMore == FALSE)) { return TRUE; }; }; var int WasilisOldCoinOffer; var int FirstOldCoin_angebotenXP_OneTime; var int DIA_Wasili_FirstOldCoin_mehr_OneTime; func void DIA_Wasili_FirstOldCoin_Info() { AI_Output(other,self,"DIA_Wasili_FirstOldCoin_15_00"); //Mám tady pár starých mincí. if(FirstOldCoin_angebotenXP_OneTime == FALSE) { AI_Output(self,other,"DIA_Wasili_FirstOldCoin_01_01"); //Hmm. Ukaž. }; B_GiveInvItems(other,self,ItMi_OldCoin,1); if(FirstOldCoin_angebotenXP_OneTime == FALSE) { AI_Output(self,other,"DIA_Wasili_FirstOldCoin_01_02"); //Hm, jo. To by ti tedy na tržišti moc nevyneslo. }; if(DIA_Wasili_FirstOldCoin_mehr_OneTime == FALSE) { AI_Output(self,other,"DIA_Wasili_FirstOldCoin_01_03"); //Dám ti za ně zlaťák. Přesně tolik, jaká je jejich hodnota. } else { AI_Output(self,other,"DIA_Wasili_FirstOldCoin_01_04"); //Ty moc dobře víš, kolik jsem za ně ochoten zaplatit. Přesně jeden zlaťák za kus, ani o minci více! }; Info_ClearChoices(DIA_Wasili_FirstOldCoin); Info_AddChoice(DIA_Wasili_FirstOldCoin,"Ne, mám dojem, že si je raději nechám.",DIA_Wasili_FirstOldCoin_nein); Info_AddChoice(DIA_Wasili_FirstOldCoin, ConcatStrings(CZ_SkillCheckCondition(CZ_SKILL_RHE, 20, FALSE), "To nestačí. Co takhle dva?"), // "To nestačí. Co takhle dva?", DIA_Wasili_FirstOldCoin_mehr); Info_AddChoice(DIA_Wasili_FirstOldCoin,"Dohodnuto.",DIA_Wasili_FirstOldCoin_ok); if(FirstOldCoin_angebotenXP_OneTime == FALSE) { B_GivePlayerXP(XP_BringOldCoin); FirstOldCoin_angebotenXP_OneTime = TRUE; }; }; func void DIA_Wasili_FirstOldCoin_ok() { AI_Output(other,self,"DIA_Wasili_FirstOldCoin_ok_15_00"); //Dohodnuto. AI_Output(self,other,"DIA_Wasili_FirstOldCoin_ok_01_01"); //Skvěle! if(WasilisOldCoinOffer == 2) { AI_Output(self,other,"DIA_Wasili_FirstOldCoin_ok_01_02"); //Tady jsou dva zlaté. } else { AI_Output(self,other,"DIA_Wasili_FirstOldCoin_ok_01_03"); //Kdybys měl takových mincí víc, víš, kde mě najdeš. WasilisOldCoinOffer = 1; }; CreateInvItems(self,ItMi_Gold,WasilisOldCoinOffer); B_GiveInvItems(self,other,ItMi_Gold,WasilisOldCoinOffer); Info_ClearChoices(DIA_Wasili_FirstOldCoin); }; func void DIA_Wasili_FirstOldCoin_mehr() { AI_Output(other,self,"DIA_Wasili_FirstOldCoin_mehr_15_00"); //To nestačí. Co takhle dva? if(RhetorikSkillValue[1] >= 20) { AI_Output(self,other,"DIA_Wasili_FirstOldCoin_mehr_01_02"); //Arrgh, tak platí. WasilisOldCoinOffer = 2; Info_AddChoice(DIA_Wasili_FirstOldCoin,"Co takhle tři?",DIA_Wasili_FirstOldCoin_ZumTeufel); } else { AI_Output(self,other,"DIA_Wasili_FirstOldCoin_mehr_01_01"); //Táhni... DIA_Wasili_FirstOldCoin_mehr_OneTime = TRUE; B_GiveInvItems(self,other,ItMi_OldCoin,1); AI_StopProcessInfos(self); }; }; func void DIA_Wasili_FirstOldCoin_nein() { AI_Output(other,self,"DIA_Wasili_FirstOldCoin_nein_15_00"); //Ne, mám dojem, že si je raději nechám. AI_Output(self,other,"DIA_Wasili_FirstOldCoin_nein_01_01"); //Nemaj pro tebe žádnou hodnotu. Však ty se vrátíš. B_GiveInvItems(self,other,ItMi_OldCoin,1); WasilisOldCoinOffer = 0; Info_ClearChoices(DIA_Wasili_FirstOldCoin); }; func void DIA_Wasili_FirstOldCoin_ZumTeufel() { AI_Output(other,self,"DIA_Wasili_FirstOldCoin_ZumTeufel_15_00"); //V tom případě by tři nebyly tak špatné... AI_Output(self,other,"DIA_Wasili_FirstOldCoin_ZumTeufel_01_01"); //Táhni do pekel, ty bastarde! AI_StopProcessInfos(self); Wasili_BringOldCoin_NoMore = TRUE; WasilisOldCoinOffer = 0; }; instance DIA_Wasili_BringOldCoin(C_Info) { npc = BAU_907_Wasili; nr = 5; condition = DIA_Wasili_BringOldCoin_Condition; information = DIA_Wasili_BringOldCoin_Info; permanent = TRUE; description = "Máš zájem o další staré mince?"; }; func int DIA_Wasili_BringOldCoin_Condition() { if((WasilisOldCoinOffer > 0) && (Npc_HasItems(other,ItMi_OldCoin) >= 1) && (Wasili_BringOldCoin_NoMore == FALSE)) { return TRUE; }; }; var int OldCoinCounter; func void DIA_Wasili_BringOldCoin_Info() { var int OldCoinCount; var int XP_BringOldCoins; var int OldCoinGeld; AI_Output(other,self,"DIA_Wasili_BringOldCoin_15_00"); //Máš zájem o další staré mince? AI_Output(self,other,"DIA_Wasili_BringOldCoin_01_01"); //Jasně. Máš ještě nějaké? OldCoinCount = Npc_HasItems(other,ItMi_OldCoin); if(OldCoinCount == 1) { AI_Output(other,self,"DIA_Wasili_BringOldCoin_15_02"); //Jednu. B_GivePlayerXP(XP_BringOldCoin); B_GiveInvItems(other,self,ItMi_OldCoin,1); OldCoinCounter = OldCoinCounter + 1; } else { AI_Output(other,self,"DIA_Wasili_BringOldCoin_15_03"); //Pár. B_GiveInvItems(other,self,ItMi_OldCoin,OldCoinCount); XP_BringOldCoins = OldCoinCount * XP_BringOldCoin; OldCoinCounter = OldCoinCounter + OldCoinCount; B_GivePlayerXP(XP_BringOldCoins); }; AI_Output(self,other,"DIA_Wasili_BringOldCoin_01_04"); //Díky! Tady jsou tvoje peníze. Přines mi všechny, co najdeš. OldCoinGeld = OldCoinCount * WasilisOldCoinOffer; CreateInvItems(self,ItMi_Gold,OldCoinGeld); B_GiveInvItems(self,other,ItMi_Gold,OldCoinGeld); Npc_RemoveInvItems(self,ItMi_OldCoin,Npc_HasItems(self,ItMi_OldCoin)); }; instance DIA_Wasili_PERM(C_Info) { npc = BAU_907_Wasili; nr = 900; condition = DIA_Wasili_PERM_Condition; information = DIA_Wasili_PERM_Info; permanent = TRUE; description = "Už se tu někdo pokusil něco ukrást?"; }; func int DIA_Wasili_PERM_Condition() { if(Npc_KnowsInfo(other,DIA_Wasili_Job)) { return TRUE; }; }; func void DIA_Wasili_PERM_Info() { AI_Output(other,self,"DIA_Wasili_PERM_15_00"); //Už se tu někdo pokusil něco ukrást? if(Kapitel <= 2) { if(PETZCOUNTER_Farm_Theft > 0) { AI_Output(self,other,"DIA_Wasili_PERM_01_01"); //Myslíš kromě tebe? }; AI_Output(self,other,"DIA_Wasili_PERM_01_02"); //Párkrát! A vždycky jsem je chytil! }; if(Kapitel == 3) { AI_Output(self,other,"DIA_Wasili_PERM_01_03"); //Před pár dny se v noci jeden ze žoldáků plížil po domě. AI_Output(self,other,"DIA_Wasili_PERM_01_04"); //Měl na sobě černou róbu s kapucí, takže jsem ho nemohl poznat. AI_Output(self,other,"DIA_Wasili_PERM_01_05"); //Ale přinutil jsem ho, aby utekl. }; if(Kapitel == 4) { AI_Output(self,other,"DIA_Wasili_perm_01_06"); //Ne, poslední dobou ne. }; if(Kapitel >= 5) { AI_Output(self,other,"DIA_Wasili_perm_01_07"); //Ti žoldáci vypadají, jakoby byli připraveni opustit tábor. AI_Output(self,other,"DIA_Wasili_perm_01_08"); //Nebyl bych překvapen, pokud by Lee se svými hochy přes noc opustili ostrov. }; }; instance DIA_Wasili_PICKPOCKET(C_Info) { npc = BAU_907_Wasili; nr = 900; condition = DIA_Wasili_PICKPOCKET_Condition; information = DIA_Wasili_PICKPOCKET_Info; permanent = TRUE; description = PICKPOCKET_COMM; }; func int DIA_Wasili_PICKPOCKET_Condition() { return C_Beklauen(55,90); }; func void DIA_Wasili_PICKPOCKET_Info() { Info_ClearChoices(DIA_Wasili_PICKPOCKET); Info_AddChoice(DIA_Wasili_PICKPOCKET,Dialog_Back,DIA_Wasili_PICKPOCKET_BACK); Info_AddChoice(DIA_Wasili_PICKPOCKET,DIALOG_PICKPOCKET,DIA_Wasili_PICKPOCKET_DoIt); }; func void DIA_Wasili_PICKPOCKET_DoIt() { B_Beklauen(); Info_ClearChoices(DIA_Wasili_PICKPOCKET); }; func void DIA_Wasili_PICKPOCKET_BACK() { Info_ClearChoices(DIA_Wasili_PICKPOCKET); };
D
#failif #... .* _*inlib1.* #...
D
/** TCP/UDP connection and server handling. Copyright: © 2012-2014 RejectedSoftware e.K. Authors: Sönke Ludwig License: Subject to the terms of the MIT license, as written in the included LICENSE.txt file. */ module vibe.core.net; public import vibe.core.stream; import vibe.core.driver; import vibe.core.log; import core.sys.posix.netinet.in_; import core.time; import std.exception; import std.functional; import std.string; version(Windows) import std.c.windows.winsock; /** Resolves the given host name/IP address string. Setting use_dns to false will only allow IP address strings but also guarantees that the call will not block. */ NetworkAddress resolveHost(string host, ushort address_family = AF_UNSPEC, bool use_dns = true) { return getEventDriver().resolveHost(host, address_family, use_dns); } /** Starts listening on the specified port. 'connection_callback' will be called for each client that connects to the server socket. Each new connection gets its own fiber. The stream parameter then allows to perform blocking I/O on the client socket. The address parameter can be used to specify the network interface on which the server socket is supposed to listen for connections. By default, all IPv4 and IPv6 interfaces will be used. */ TCPListener[] listenTCP(ushort port, void delegate(TCPConnection stream) connection_callback, TCPListenOptions options = TCPListenOptions.defaults) { TCPListener[] ret; try ret ~= listenTCP(port, connection_callback, "::", options); catch (Exception e) logDiagnostic("Failed to listen on \"::\": %s", e.msg); try ret ~= listenTCP(port, connection_callback, "0.0.0.0", options); catch (Exception e) logDiagnostic("Failed to listen on \"0.0.0.0\": %s", e.msg); enforce(ret.length > 0, format("Failed to listen on all interfaces on port %s", port)); return ret; } /// ditto TCPListener listenTCP(ushort port, void delegate(TCPConnection stream) connection_callback, string address, TCPListenOptions options = TCPListenOptions.defaults) { return getEventDriver().listenTCP(port, connection_callback, address, options); } /** Starts listening on the specified port. This function is the same as listenTCP but takes a function callback instead of a delegate. */ TCPListener[] listenTCP_s(ushort port, void function(TCPConnection stream) connection_callback, TCPListenOptions options = TCPListenOptions.defaults) { return listenTCP(port, toDelegate(connection_callback), options); } /// ditto TCPListener listenTCP_s(ushort port, void function(TCPConnection stream) connection_callback, string address, TCPListenOptions options = TCPListenOptions.defaults) { return listenTCP(port, toDelegate(connection_callback), address, options); } /** Establishes a connection to the given host/port. */ TCPConnection connectTCP(string host, ushort port) { NetworkAddress addr = resolveHost(host); addr.port = port; return connectTCP(addr); } /// ditto TCPConnection connectTCP(NetworkAddress addr) { return getEventDriver().connectTCP(addr); } /** Creates a bound UDP socket suitable for sending and receiving packets. */ UDPConnection listenUDP(ushort port, string bind_address = "0.0.0.0") { return getEventDriver().listenUDP(port, bind_address); } version(VibeLibasyncDriver) { public import libasync.events : NetworkAddress; } else { /** Represents a network/socket address. */ struct NetworkAddress { private union { sockaddr addr; sockaddr_in addr_ip4; sockaddr_in6 addr_ip6; } /** Family (AF_) of the socket address. */ @property ushort family() const pure nothrow { return addr.sa_family; } /// ditto @property void family(ushort val) pure nothrow { addr.sa_family = cast(ubyte)val; } /** The port in host byte order. */ @property ushort port() const pure nothrow { switch (this.family) { default: assert(false, "port() called for invalid address family."); case AF_INET: return ntoh(addr_ip4.sin_port); case AF_INET6: return ntoh(addr_ip6.sin6_port); } } /// ditto @property void port(ushort val) pure nothrow { switch (this.family) { default: assert(false, "port() called for invalid address family."); case AF_INET: addr_ip4.sin_port = hton(val); break; case AF_INET6: addr_ip6.sin6_port = hton(val); break; } } /** A pointer to a sockaddr struct suitable for passing to socket functions. */ @property inout(sockaddr)* sockAddr() inout pure nothrow { return &addr; } /** Size of the sockaddr struct that is returned by sockAddr(). */ @property int sockAddrLen() const pure nothrow { switch (this.family) { default: assert(false, "sockAddrLen() called for invalid address family."); case AF_INET: return addr_ip4.sizeof; case AF_INET6: return addr_ip6.sizeof; } } @property inout(sockaddr_in)* sockAddrInet4() inout pure nothrow in { assert (family == AF_INET); } body { return &addr_ip4; } @property inout(sockaddr_in6)* sockAddrInet6() inout pure nothrow in { assert (family == AF_INET6); } body { return &addr_ip6; } /** Returns a string representation of the IP address */ string toAddressString() const { import std.array : appender; import std.string : format; import std.format : formattedWrite; ubyte[2] _dummy = void; // Workaround for DMD regression in master switch (this.family) { default: assert(false, "toAddressString() called for invalid address family."); case AF_INET: ubyte[4] ip = (cast(ubyte*)&addr_ip4.sin_addr.s_addr)[0 .. 4]; return format("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]); case AF_INET6: ubyte[16] ip = addr_ip6.sin6_addr.s6_addr; auto ret = appender!string(); ret.reserve(40); foreach (i; 0 .. 8) { if (i > 0) ret.put(':'); _dummy[] = ip[i*2 .. i*2+2]; ret.formattedWrite("%x", bigEndianToNative!ushort(_dummy)); } return ret.data; } } /** Returns a full string representation of the address, including the port number. */ string toString() const { auto ret = toAddressString(); switch (this.family) { default: assert(false, "toString() called for invalid address family."); case AF_INET: return ret ~ format(":%s", port); case AF_INET6: return format("[%s]:%s", ret, port); } } unittest { void test(string ip) { auto res = resolveHost(ip, AF_UNSPEC, false).toAddressString(); assert(res == ip, "IP "~ip~" yielded wrong string representation: "~res); } test("1.2.3.4"); test("102:304:506:708:90a:b0c:d0e:f10"); } } } /** Represents a single TCP connection. */ interface TCPConnection : ConnectionStream { /// Used to disable Nagle's algorithm. @property void tcpNoDelay(bool enabled); /// ditto @property bool tcpNoDelay() const; /// Enables TCP keep-alive packets. @property void keepAlive(bool enable); /// ditto @property bool keepAlive() const; /// Controls the read time out after which the connection is closed automatically. @property void readTimeout(Duration duration); /// ditto @property Duration readTimeout() const; /// Returns the IP address of the connected peer. @property string peerAddress() const; /// The local/bind address of the underlying socket. @property NetworkAddress localAddress() const; /// The address of the connected peer. @property NetworkAddress remoteAddress() const; } /** Represents a listening TCP socket. */ interface TCPListener { /// Stops listening and closes the socket. void stopListening(); } /** Represents a bound and possibly 'connected' UDP socket. */ interface UDPConnection { /** Returns the address to which the UDP socket is bound. */ @property string bindAddress() const; /** Determines if the socket is allowed to send to broadcast addresses. */ @property bool canBroadcast() const; /// ditto @property void canBroadcast(bool val); /// The local/bind address of the underlying socket. @property NetworkAddress localAddress() const; /** Stops listening for datagrams and frees all resources. */ void close(); /** Locks the UDP connection to a certain peer. Once connected, the UDPConnection can only communicate with the specified peer. Otherwise communication with any reachable peer is possible. */ void connect(string host, ushort port); /// ditto void connect(NetworkAddress address); /** Sends a single packet. If peer_address is given, the packet is send to that address. Otherwise the packet will be sent to the address specified by a call to connect(). */ void send(in ubyte[] data, in NetworkAddress* peer_address = null); /** Receives a single packet. If a buffer is given, it must be large enough to hold the full packet. The timeout overload will throw an Exception if no data arrives before the specified duration has elapsed. */ ubyte[] recv(ubyte[] buf = null, NetworkAddress* peer_address = null); /// ditto ubyte[] recv(Duration timeout, ubyte[] buf = null, NetworkAddress* peer_address = null); } /** Flags to control the behavior of listenTCP. */ enum TCPListenOptions { /// Don't enable any particular option defaults = 0, /// Causes incoming connections to be distributed across the thread pool distribute = 1<<0, /// Disables automatic closing of the connection when the connection callback exits disableAutoClose = 1<<1, } private pure nothrow { import std.bitmanip; ushort ntoh(ushort val) { version (LittleEndian) return swapEndian(val); else version (BigEndian) return val; else static assert(false, "Unknown endianness."); } ushort hton(ushort val) { version (LittleEndian) return swapEndian(val); else version (BigEndian) return val; else static assert(false, "Unknown endianness."); } }
D
// Written in the D programming language. /** Networking client functionality as provided by $(HTTP _curl.haxx.se/libcurl, libcurl). The libcurl library must be installed on the system in order to use this module. $(SCRIPT inhibitQuickIndex = 1;) $(DIVC quickindex, $(BOOKTABLE , $(TR $(TH Category) $(TH Functions) ) $(TR $(TDNW High level) $(TD $(MYREF download) $(MYREF upload) $(MYREF get) $(MYREF post) $(MYREF put) $(MYREF del) $(MYREF options) $(MYREF trace) $(MYREF connect) $(MYREF byLine) $(MYREF byChunk) $(MYREF byLineAsync) $(MYREF byChunkAsync) ) ) $(TR $(TDNW Low level) $(TD $(MYREF HTTP) $(MYREF FTP) $(MYREF SMTP) ) ) ) ) Note: You may need to link to the $(B curl) library, e.g. by adding $(D "libs": ["curl"]) to your $(B dub.json) file if you are using $(LINK2 http://code.dlang.org, DUB). Windows x86 note: A DMD compatible libcurl static library can be downloaded from the dlang.org $(LINK2 http://downloads.dlang.org/other/index.html, download archive page). Compared to using libcurl directly this module allows simpler client code for common uses, requires no unsafe operations, and integrates better with the rest of the language. Futhermore it provides $(MREF_ALTTEXT range, std,range) access to protocols supported by libcurl both synchronously and asynchronously. A high level and a low level API are available. The high level API is built entirely on top of the low level one. The high level API is for commonly used functionality such as HTTP/FTP get. The $(LREF byLineAsync) and $(LREF byChunkAsync) provides asynchronous $(MREF_ALTTEXT range, std,range) that performs the request in another thread while handling a line/chunk in the current thread. The low level API allows for streaming and other advanced features. $(BOOKTABLE Cheat Sheet, $(TR $(TH Function Name) $(TH Description) ) $(LEADINGROW High level) $(TR $(TDNW $(LREF download)) $(TD $(D download("ftp.digitalmars.com/sieve.ds", "/tmp/downloaded-ftp-file")) downloads file from URL to file system.) ) $(TR $(TDNW $(LREF upload)) $(TD $(D upload("/tmp/downloaded-ftp-file", "ftp.digitalmars.com/sieve.ds");) uploads file from file system to URL.) ) $(TR $(TDNW $(LREF get)) $(TD $(D get("dlang.org")) returns a char[] containing the dlang.org web page.) ) $(TR $(TDNW $(LREF put)) $(TD $(D put("dlang.org", "Hi")) returns a char[] containing the dlang.org web page. after a HTTP PUT of "hi") ) $(TR $(TDNW $(LREF post)) $(TD $(D post("dlang.org", "Hi")) returns a char[] containing the dlang.org web page. after a HTTP POST of "hi") ) $(TR $(TDNW $(LREF byLine)) $(TD $(D byLine("dlang.org")) returns a range of char[] containing the dlang.org web page.) ) $(TR $(TDNW $(LREF byChunk)) $(TD $(D byChunk("dlang.org", 10)) returns a range of ubyte[10] containing the dlang.org web page.) ) $(TR $(TDNW $(LREF byLineAsync)) $(TD $(D byLineAsync("dlang.org")) returns a range of char[] containing the dlang.org web page asynchronously.) ) $(TR $(TDNW $(LREF byChunkAsync)) $(TD $(D byChunkAsync("dlang.org", 10)) returns a range of ubyte[10] containing the dlang.org web page asynchronously.) ) $(LEADINGROW Low level ) $(TR $(TDNW $(LREF HTTP)) $(TD $(D HTTP) struct for advanced usage)) $(TR $(TDNW $(LREF FTP)) $(TD $(D FTP) struct for advanced usage)) $(TR $(TDNW $(LREF SMTP)) $(TD $(D SMTP) struct for advanced usage)) ) Example: --- import std.net.curl, std.stdio; // Return a char[] containing the content specified by a URL auto content = get("dlang.org"); // Post data and return a char[] containing the content specified by a URL auto content = post("mydomain.com/here.cgi", ["name1" : "value1", "name2" : "value2"]); // Get content of file from ftp server auto content = get("ftp.digitalmars.com/sieve.ds"); // Post and print out content line by line. The request is done in another thread. foreach (line; byLineAsync("dlang.org", "Post data")) writeln(line); // Get using a line range and proxy settings auto client = HTTP(); client.proxy = "1.2.3.4"; foreach (line; byLine("dlang.org", client)) writeln(line); --- For more control than the high level functions provide, use the low level API: Example: --- import std.net.curl, std.stdio; // GET with custom data receivers auto http = HTTP("dlang.org"); http.onReceiveHeader = (in char[] key, in char[] value) { writeln(key, ": ", value); }; http.onReceive = (ubyte[] data) { /+ drop +/ return data.length; }; http.perform(); --- First, an instance of the reference-counted HTTP struct is created. Then the custom delegates are set. These will be called whenever the HTTP instance receives a header and a data buffer, respectively. In this simple example, the headers are written to stdout and the data is ignored. If the request should be stopped before it has finished then return something less than data.length from the onReceive callback. See $(LREF onReceiveHeader)/$(LREF onReceive) for more information. Finally the HTTP request is effected by calling perform(), which is synchronous. Source: $(PHOBOSSRC std/net/_curl.d) Copyright: Copyright Jonas Drewsen 2011-2012 License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0). Authors: Jonas Drewsen. Some of the SMTP code contributed by Jimmy Cao. Credits: The functionally is based on $(HTTP _curl.haxx.se/libcurl, libcurl). LibCurl is licensed under an MIT/X derivative license. */ /* Copyright Jonas Drewsen 2011 - 2012. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ module std.net.curl; public import etc.c.curl : CurlOption; import core.time : dur; import etc.c.curl : CURLcode; import std.range.primitives; import std.encoding : EncodingScheme; import std.traits : isSomeChar; import std.typecons : Flag, Yes, No, Tuple; // Curl tests for FreeBSD 32-bit are temporarily disabled. // https://github.com/braddr/d-tester/issues/70 // https://issues.dlang.org/show_bug.cgi?id=18519 version(unittest) version(FreeBSD) version(X86) version = DisableCurlTests; version(DisableCurlTests) {} else: version(unittest) { import std.socket : Socket; private struct TestServer { import std.concurrency : Tid; import std.socket : Socket, TcpSocket; string addr() { return _addr; } void handle(void function(Socket s) dg) { import std.concurrency : send; tid.send(dg); } private: string _addr; Tid tid; static void loop(shared TcpSocket listener) { import std.concurrency : OwnerTerminated, receiveOnly; import std.stdio : stderr; try while (true) { void function(Socket) handler = void; try handler = receiveOnly!(typeof(handler)); catch (OwnerTerminated) return; handler((cast() listener).accept); } catch (Throwable e) { import core.stdc.stdlib : exit, EXIT_FAILURE; stderr.writeln(e); exit(EXIT_FAILURE); // Bugzilla 7018 } } } private TestServer startServer() { import std.concurrency : spawn; import std.socket : INADDR_LOOPBACK, InternetAddress, TcpSocket; auto sock = new TcpSocket; sock.bind(new InternetAddress(INADDR_LOOPBACK, InternetAddress.PORT_ANY)); sock.listen(1); auto addr = sock.localAddress.toString(); auto tid = spawn(&TestServer.loop, cast(shared) sock); return TestServer(addr, tid); } private ref TestServer testServer() { import std.concurrency : initOnce; __gshared TestServer server; return initOnce!server(startServer()); } private struct Request(T) { string hdrs; immutable(T)[] bdy; } private Request!T recvReq(T=char)(Socket s) { import std.algorithm.comparison : min; import std.algorithm.searching : find, canFind; import std.conv : to; import std.regex : ctRegex, matchFirst; ubyte[1024] tmp=void; ubyte[] buf; while (true) { auto nbytes = s.receive(tmp[]); assert(nbytes >= 0); immutable beg = buf.length > 3 ? buf.length - 3 : 0; buf ~= tmp[0 .. nbytes]; auto bdy = buf[beg .. $].find(cast(ubyte[])"\r\n\r\n"); if (bdy.empty) continue; auto hdrs = cast(string) buf[0 .. $ - bdy.length]; bdy.popFrontN(4); // no support for chunked transfer-encoding if (auto m = hdrs.matchFirst(ctRegex!(`Content-Length: ([0-9]+)`, "i"))) { import std.uni : asUpperCase; if (hdrs.asUpperCase.canFind("EXPECT: 100-CONTINUE")) s.send(httpContinue); size_t remain = m.captures[1].to!size_t - bdy.length; while (remain) { nbytes = s.receive(tmp[0 .. min(remain, $)]); assert(nbytes >= 0); buf ~= tmp[0 .. nbytes]; remain -= nbytes; } } else { assert(bdy.empty); } bdy = buf[hdrs.length + 4 .. $]; return typeof(return)(hdrs, cast(immutable(T)[])bdy); } } private string httpOK(string msg) { import std.conv : to; return "HTTP/1.1 200 OK\r\n"~ "Content-Type: text/plain\r\n"~ "Content-Length: "~msg.length.to!string~"\r\n"~ "\r\n"~ msg; } private string httpOK() { return "HTTP/1.1 200 OK\r\n"~ "Content-Length: 0\r\n"~ "\r\n"; } private string httpNotFound() { return "HTTP/1.1 404 Not Found\r\n"~ "Content-Length: 0\r\n"~ "\r\n"; } private enum httpContinue = "HTTP/1.1 100 Continue\r\n\r\n"; } version(StdDdoc) import std.stdio; // Default data timeout for Protocols private enum _defaultDataTimeout = dur!"minutes"(2); /** Macros: CALLBACK_PARAMS = $(TABLE , $(DDOC_PARAM_ROW $(DDOC_PARAM_ID $(DDOC_PARAM dlTotal)) $(DDOC_PARAM_DESC total bytes to download) ) $(DDOC_PARAM_ROW $(DDOC_PARAM_ID $(DDOC_PARAM dlNow)) $(DDOC_PARAM_DESC currently downloaded bytes) ) $(DDOC_PARAM_ROW $(DDOC_PARAM_ID $(DDOC_PARAM ulTotal)) $(DDOC_PARAM_DESC total bytes to upload) ) $(DDOC_PARAM_ROW $(DDOC_PARAM_ID $(DDOC_PARAM ulNow)) $(DDOC_PARAM_DESC currently uploaded bytes) ) ) */ /** Connection type used when the URL should be used to auto detect the protocol. * * This struct is used as placeholder for the connection parameter when calling * the high level API and the connection type (HTTP/FTP) should be guessed by * inspecting the URL parameter. * * The rules for guessing the protocol are: * 1, if URL starts with ftp://, ftps:// or ftp. then FTP connection is assumed. * 2, HTTP connection otherwise. * * Example: * --- * import std.net.curl; * // Two requests below will do the same. * string content; * * // Explicit connection provided * content = get!HTTP("dlang.org"); * * // Guess connection type by looking at the URL * content = get!AutoProtocol("ftp://foo.com/file"); * // and since AutoProtocol is default this is the same as * content = get("ftp://foo.com/file"); * // and will end up detecting FTP from the url and be the same as * content = get!FTP("ftp://foo.com/file"); * --- */ struct AutoProtocol { } // Returns true if the url points to an FTP resource private bool isFTPUrl(const(char)[] url) { import std.algorithm.searching : startsWith; import std.uni : toLower; return startsWith(url.toLower(), "ftp://", "ftps://", "ftp.") != 0; } // Is true if the Conn type is a valid Curl Connection type. private template isCurlConn(Conn) { enum auto isCurlConn = is(Conn : HTTP) || is(Conn : FTP) || is(Conn : AutoProtocol); } /** HTTP/FTP download to local file system. * * Params: * url = resource to download * saveToPath = path to store the downloaded content on local disk * conn = connection to use e.g. FTP or HTTP. The default AutoProtocol will * guess connection type and create a new instance for this call only. * * Example: * ---- * import std.net.curl; * download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file"); * ---- */ void download(Conn = AutoProtocol)(const(char)[] url, string saveToPath, Conn conn = Conn()) if (isCurlConn!Conn) { static if (is(Conn : HTTP) || is(Conn : FTP)) { import std.stdio : File; conn.url = url; auto f = File(saveToPath, "wb"); conn.onReceive = (ubyte[] data) { f.rawWrite(data); return data.length; }; conn.perform(); } else { if (isFTPUrl(url)) return download!FTP(url, saveToPath, FTP()); else return download!HTTP(url, saveToPath, HTTP()); } } @system unittest { import std.algorithm.searching : canFind; static import std.file; foreach (host; [testServer.addr, "http://"~testServer.addr]) { testServer.handle((s) { assert(s.recvReq.hdrs.canFind("GET /")); s.send(httpOK("Hello world")); }); auto fn = std.file.deleteme; scope (exit) std.file.remove(fn); download(host, fn); assert(std.file.readText(fn) == "Hello world"); } } /** Upload file from local files system using the HTTP or FTP protocol. * * Params: * loadFromPath = path load data from local disk. * url = resource to upload to * conn = connection to use e.g. FTP or HTTP. The default AutoProtocol will * guess connection type and create a new instance for this call only. * * Example: * ---- * import std.net.curl; * upload("/tmp/downloaded-ftp-file", "ftp.digitalmars.com/sieve.ds"); * upload("/tmp/downloaded-http-file", "d-lang.appspot.com/testUrl2"); * ---- */ void upload(Conn = AutoProtocol)(string loadFromPath, const(char)[] url, Conn conn = Conn()) if (isCurlConn!Conn) { static if (is(Conn : HTTP)) { conn.url = url; conn.method = HTTP.Method.put; } else static if (is(Conn : FTP)) { conn.url = url; conn.handle.set(CurlOption.upload, 1L); } else { if (isFTPUrl(url)) return upload!FTP(loadFromPath, url, FTP()); else return upload!HTTP(loadFromPath, url, HTTP()); } static if (is(Conn : HTTP) || is(Conn : FTP)) { import std.stdio : File; auto f = File(loadFromPath, "rb"); conn.onSend = buf => f.rawRead(buf).length; immutable sz = f.size; if (sz != ulong.max) conn.contentLength = sz; conn.perform(); } } @system unittest { import std.algorithm.searching : canFind; static import std.file; foreach (host; [testServer.addr, "http://"~testServer.addr]) { auto fn = std.file.deleteme; scope (exit) std.file.remove(fn); std.file.write(fn, "upload data\n"); testServer.handle((s) { auto req = s.recvReq; assert(req.hdrs.canFind("PUT /path")); assert(req.bdy.canFind("upload data")); s.send(httpOK()); }); upload(fn, host ~ "/path"); } } /** HTTP/FTP get content. * * Params: * url = resource to get * conn = connection to use e.g. FTP or HTTP. The default AutoProtocol will * guess connection type and create a new instance for this call only. * * The template parameter $(D T) specifies the type to return. Possible values * are $(D char) and $(D ubyte) to return $(D char[]) or $(D ubyte[]). If asking * for $(D char), content will be converted from the connection character set * (specified in HTTP response headers or FTP connection properties, both ISO-8859-1 * by default) to UTF-8. * * Example: * ---- * import std.net.curl; * auto content = get("d-lang.appspot.com/testUrl2"); * ---- * * Returns: * A T[] range containing the content of the resource pointed to by the URL. * * Throws: * * $(D CurlException) on error. * * See_Also: $(LREF HTTP.Method) */ T[] get(Conn = AutoProtocol, T = char)(const(char)[] url, Conn conn = Conn()) if ( isCurlConn!Conn && (is(T == char) || is(T == ubyte)) ) { static if (is(Conn : HTTP)) { conn.method = HTTP.Method.get; return _basicHTTP!(T)(url, "", conn); } else static if (is(Conn : FTP)) { return _basicFTP!(T)(url, "", conn); } else { if (isFTPUrl(url)) return get!(FTP,T)(url, FTP()); else return get!(HTTP,T)(url, HTTP()); } } @system unittest { import std.algorithm.searching : canFind; foreach (host; [testServer.addr, "http://"~testServer.addr]) { testServer.handle((s) { assert(s.recvReq.hdrs.canFind("GET /path")); s.send(httpOK("GETRESPONSE")); }); auto res = get(host ~ "/path"); assert(res == "GETRESPONSE"); } } /** HTTP post content. * * Params: * url = resource to post to * postDict = data to send as the body of the request. An associative array * of $(D string) is accepted and will be encoded using * www-form-urlencoding * postData = data to send as the body of the request. An array * of an arbitrary type is accepted and will be cast to ubyte[] * before sending it. * conn = HTTP connection to use * T = The template parameter $(D T) specifies the type to return. Possible values * are $(D char) and $(D ubyte) to return $(D char[]) or $(D ubyte[]). If asking * for $(D char), content will be converted from the connection character set * (specified in HTTP response headers or FTP connection properties, both ISO-8859-1 * by default) to UTF-8. * * Examples: * ---- * import std.net.curl; * * auto content1 = post("d-lang.appspot.com/testUrl2", ["name1" : "value1", "name2" : "value2"]); * auto content2 = post("d-lang.appspot.com/testUrl2", [1,2,3,4]); * ---- * * Returns: * A T[] range containing the content of the resource pointed to by the URL. * * See_Also: $(LREF HTTP.Method) */ T[] post(T = char, PostUnit)(const(char)[] url, const(PostUnit)[] postData, HTTP conn = HTTP()) if (is(T == char) || is(T == ubyte)) { conn.method = HTTP.Method.post; return _basicHTTP!(T)(url, postData, conn); } @system unittest { import std.algorithm.searching : canFind; foreach (host; [testServer.addr, "http://"~testServer.addr]) { testServer.handle((s) { auto req = s.recvReq; assert(req.hdrs.canFind("POST /path")); assert(req.bdy.canFind("POSTBODY")); s.send(httpOK("POSTRESPONSE")); }); auto res = post(host ~ "/path", "POSTBODY"); assert(res == "POSTRESPONSE"); } } @system unittest { import std.algorithm.searching : canFind; auto data = new ubyte[](256); foreach (i, ref ub; data) ub = cast(ubyte) i; testServer.handle((s) { auto req = s.recvReq!ubyte; assert(req.bdy.canFind(cast(ubyte[])[0, 1, 2, 3, 4])); assert(req.bdy.canFind(cast(ubyte[])[253, 254, 255])); s.send(httpOK(cast(ubyte[])[17, 27, 35, 41])); }); auto res = post!ubyte(testServer.addr, data); assert(res == cast(ubyte[])[17, 27, 35, 41]); } /// ditto T[] post(T = char)(const(char)[] url, string[string] postDict, HTTP conn = HTTP()) if (is(T == char) || is(T == ubyte)) { import std.uri : urlEncode; return post(url, urlEncode(postDict), conn); } @system unittest { foreach (host; [testServer.addr, "http://" ~ testServer.addr]) { testServer.handle((s) { auto req = s.recvReq!char; s.send(httpOK(req.bdy)); }); auto res = post(host ~ "/path", ["name1" : "value1", "name2" : "value2"]); assert(res == "name1=value1&name2=value2"); } } /** HTTP/FTP put content. * * Params: * url = resource to put * putData = data to send as the body of the request. An array * of an arbitrary type is accepted and will be cast to ubyte[] * before sending it. * conn = connection to use e.g. FTP or HTTP. The default AutoProtocol will * guess connection type and create a new instance for this call only. * * The template parameter $(D T) specifies the type to return. Possible values * are $(D char) and $(D ubyte) to return $(D char[]) or $(D ubyte[]). If asking * for $(D char), content will be converted from the connection character set * (specified in HTTP response headers or FTP connection properties, both ISO-8859-1 * by default) to UTF-8. * * Example: * ---- * import std.net.curl; * auto content = put("d-lang.appspot.com/testUrl2", * "Putting this data"); * ---- * * Returns: * A T[] range containing the content of the resource pointed to by the URL. * * See_Also: $(LREF HTTP.Method) */ T[] put(Conn = AutoProtocol, T = char, PutUnit)(const(char)[] url, const(PutUnit)[] putData, Conn conn = Conn()) if ( isCurlConn!Conn && (is(T == char) || is(T == ubyte)) ) { static if (is(Conn : HTTP)) { conn.method = HTTP.Method.put; return _basicHTTP!(T)(url, putData, conn); } else static if (is(Conn : FTP)) { return _basicFTP!(T)(url, putData, conn); } else { if (isFTPUrl(url)) return put!(FTP,T)(url, putData, FTP()); else return put!(HTTP,T)(url, putData, HTTP()); } } @system unittest { import std.algorithm.searching : canFind; foreach (host; [testServer.addr, "http://"~testServer.addr]) { testServer.handle((s) { auto req = s.recvReq; assert(req.hdrs.canFind("PUT /path")); assert(req.bdy.canFind("PUTBODY")); s.send(httpOK("PUTRESPONSE")); }); auto res = put(host ~ "/path", "PUTBODY"); assert(res == "PUTRESPONSE"); } } /** HTTP/FTP delete content. * * Params: * url = resource to delete * conn = connection to use e.g. FTP or HTTP. The default AutoProtocol will * guess connection type and create a new instance for this call only. * * Example: * ---- * import std.net.curl; * del("d-lang.appspot.com/testUrl2"); * ---- * * See_Also: $(LREF HTTP.Method) */ void del(Conn = AutoProtocol)(const(char)[] url, Conn conn = Conn()) if (isCurlConn!Conn) { static if (is(Conn : HTTP)) { conn.method = HTTP.Method.del; _basicHTTP!char(url, cast(void[]) null, conn); } else static if (is(Conn : FTP)) { import std.algorithm.searching : findSplitAfter; import std.conv : text; import std.exception : enforce; auto trimmed = url.findSplitAfter("ftp://")[1]; auto t = trimmed.findSplitAfter("/"); enum minDomainNameLength = 3; enforce!CurlException(t[0].length > minDomainNameLength, text("Invalid FTP URL for delete ", url)); conn.url = t[0]; enforce!CurlException(!t[1].empty, text("No filename specified to delete for URL ", url)); conn.addCommand("DELE " ~ t[1]); conn.perform(); } else { if (isFTPUrl(url)) return del!FTP(url, FTP()); else return del!HTTP(url, HTTP()); } } @system unittest { import std.algorithm.searching : canFind; foreach (host; [testServer.addr, "http://"~testServer.addr]) { testServer.handle((s) { auto req = s.recvReq; assert(req.hdrs.canFind("DELETE /path")); s.send(httpOK()); }); del(host ~ "/path"); } } /** HTTP options request. * * Params: * url = resource make a option call to * conn = connection to use e.g. FTP or HTTP. The default AutoProtocol will * guess connection type and create a new instance for this call only. * * The template parameter $(D T) specifies the type to return. Possible values * are $(D char) and $(D ubyte) to return $(D char[]) or $(D ubyte[]). * * Example: * ---- * import std.net.curl; * auto http = HTTP(); * options("d-lang.appspot.com/testUrl2", http); * writeln("Allow set to " ~ http.responseHeaders["Allow"]); * ---- * * Returns: * A T[] range containing the options of the resource pointed to by the URL. * * See_Also: $(LREF HTTP.Method) */ T[] options(T = char)(const(char)[] url, HTTP conn = HTTP()) if (is(T == char) || is(T == ubyte)) { conn.method = HTTP.Method.options; return _basicHTTP!(T)(url, null, conn); } @system unittest { import std.algorithm.searching : canFind; testServer.handle((s) { auto req = s.recvReq; assert(req.hdrs.canFind("OPTIONS /path")); s.send(httpOK("OPTIONSRESPONSE")); }); auto res = options(testServer.addr ~ "/path"); assert(res == "OPTIONSRESPONSE"); } /** HTTP trace request. * * Params: * url = resource make a trace call to * conn = connection to use e.g. FTP or HTTP. The default AutoProtocol will * guess connection type and create a new instance for this call only. * * The template parameter $(D T) specifies the type to return. Possible values * are $(D char) and $(D ubyte) to return $(D char[]) or $(D ubyte[]). * * Example: * ---- * import std.net.curl; * trace("d-lang.appspot.com/testUrl1"); * ---- * * Returns: * A T[] range containing the trace info of the resource pointed to by the URL. * * See_Also: $(LREF HTTP.Method) */ T[] trace(T = char)(const(char)[] url, HTTP conn = HTTP()) if (is(T == char) || is(T == ubyte)) { conn.method = HTTP.Method.trace; return _basicHTTP!(T)(url, cast(void[]) null, conn); } @system unittest { import std.algorithm.searching : canFind; testServer.handle((s) { auto req = s.recvReq; assert(req.hdrs.canFind("TRACE /path")); s.send(httpOK("TRACERESPONSE")); }); auto res = trace(testServer.addr ~ "/path"); assert(res == "TRACERESPONSE"); } /** HTTP connect request. * * Params: * url = resource make a connect to * conn = HTTP connection to use * * The template parameter $(D T) specifies the type to return. Possible values * are $(D char) and $(D ubyte) to return $(D char[]) or $(D ubyte[]). * * Example: * ---- * import std.net.curl; * connect("d-lang.appspot.com/testUrl1"); * ---- * * Returns: * A T[] range containing the connect info of the resource pointed to by the URL. * * See_Also: $(LREF HTTP.Method) */ T[] connect(T = char)(const(char)[] url, HTTP conn = HTTP()) if (is(T == char) || is(T == ubyte)) { conn.method = HTTP.Method.connect; return _basicHTTP!(T)(url, cast(void[]) null, conn); } @system unittest { import std.algorithm.searching : canFind; testServer.handle((s) { auto req = s.recvReq; assert(req.hdrs.canFind("CONNECT /path")); s.send(httpOK("CONNECTRESPONSE")); }); auto res = connect(testServer.addr ~ "/path"); assert(res == "CONNECTRESPONSE"); } /** HTTP patch content. * * Params: * url = resource to patch * patchData = data to send as the body of the request. An array * of an arbitrary type is accepted and will be cast to ubyte[] * before sending it. * conn = HTTP connection to use * * The template parameter $(D T) specifies the type to return. Possible values * are $(D char) and $(D ubyte) to return $(D char[]) or $(D ubyte[]). * * Example: * ---- * auto http = HTTP(); * http.addRequestHeader("Content-Type", "application/json"); * auto content = patch("d-lang.appspot.com/testUrl2", `{"title": "Patched Title"}`, http); * ---- * * Returns: * A T[] range containing the content of the resource pointed to by the URL. * * See_Also: $(LREF HTTP.Method) */ T[] patch(T = char, PatchUnit)(const(char)[] url, const(PatchUnit)[] patchData, HTTP conn = HTTP()) if (is(T == char) || is(T == ubyte)) { conn.method = HTTP.Method.patch; return _basicHTTP!(T)(url, patchData, conn); } @system unittest { import std.algorithm.searching : canFind; testServer.handle((s) { auto req = s.recvReq; assert(req.hdrs.canFind("PATCH /path")); assert(req.bdy.canFind("PATCHBODY")); s.send(httpOK("PATCHRESPONSE")); }); auto res = patch(testServer.addr ~ "/path", "PATCHBODY"); assert(res == "PATCHRESPONSE"); } /* * Helper function for the high level interface. * * It performs an HTTP request using the client which must have * been setup correctly before calling this function. */ private auto _basicHTTP(T)(const(char)[] url, const(void)[] sendData, HTTP client) { import std.algorithm.comparison : min; import std.format : format; import std.exception : enforce; import etc.c.curl : CurlSeek, CurlSeekPos; immutable doSend = sendData !is null && (client.method == HTTP.Method.post || client.method == HTTP.Method.put || client.method == HTTP.Method.patch); scope (exit) { client.onReceiveHeader = null; client.onReceiveStatusLine = null; client.onReceive = null; if (doSend) { client.onSend = null; client.handle.onSeek = null; client.contentLength = 0; } } client.url = url; HTTP.StatusLine statusLine; import std.array : appender; auto content = appender!(ubyte[])(); client.onReceive = (ubyte[] data) { content ~= data; return data.length; }; if (doSend) { client.contentLength = sendData.length; auto remainingData = sendData; client.onSend = delegate size_t(void[] buf) { size_t minLen = min(buf.length, remainingData.length); if (minLen == 0) return 0; buf[0 .. minLen] = remainingData[0 .. minLen]; remainingData = remainingData[minLen..$]; return minLen; }; client.handle.onSeek = delegate(long offset, CurlSeekPos mode) { switch (mode) { case CurlSeekPos.set: remainingData = sendData[cast(size_t) offset..$]; return CurlSeek.ok; default: // As of curl 7.18.0, libcurl will not pass // anything other than CurlSeekPos.set. return CurlSeek.cantseek; } }; } client.onReceiveHeader = (in char[] key, in char[] value) { if (key == "content-length") { import std.conv : to; content.reserve(value.to!size_t); } }; client.onReceiveStatusLine = (HTTP.StatusLine l) { statusLine = l; }; client.perform(); enforce(statusLine.code / 100 == 2, new HTTPStatusException(statusLine.code, format("HTTP request returned status code %d (%s)", statusLine.code, statusLine.reason))); return _decodeContent!T(content.data, client.p.charset); } @system unittest { import std.algorithm.searching : canFind; import std.exception : collectException; testServer.handle((s) { auto req = s.recvReq; assert(req.hdrs.canFind("GET /path")); s.send(httpNotFound()); }); auto e = collectException!HTTPStatusException(get(testServer.addr ~ "/path")); assert(e.msg == "HTTP request returned status code 404 (Not Found)"); assert(e.status == 404); } // Bugzilla 14760 - content length must be reset after post @system unittest { import std.algorithm.searching : canFind; testServer.handle((s) { auto req = s.recvReq; assert(req.hdrs.canFind("POST /")); assert(req.bdy.canFind("POSTBODY")); s.send(httpOK("POSTRESPONSE")); req = s.recvReq; assert(req.hdrs.canFind("TRACE /")); assert(req.bdy.empty); s.blocking = false; ubyte[6] buf = void; assert(s.receive(buf[]) < 0); s.send(httpOK("TRACERESPONSE")); }); auto http = HTTP(); auto res = post(testServer.addr, "POSTBODY", http); assert(res == "POSTRESPONSE"); res = trace(testServer.addr, http); assert(res == "TRACERESPONSE"); } @system unittest // charset detection and transcoding to T { testServer.handle((s) { s.send("HTTP/1.1 200 OK\r\n"~ "Content-Length: 4\r\n"~ "Content-Type: text/plain; charset=utf-8\r\n" ~ "\r\n" ~ "äbc"); }); auto client = HTTP(); auto result = _basicHTTP!char(testServer.addr, "", client); assert(result == "äbc"); testServer.handle((s) { s.send("HTTP/1.1 200 OK\r\n"~ "Content-Length: 3\r\n"~ "Content-Type: text/plain; charset=iso-8859-1\r\n" ~ "\r\n" ~ 0xE4 ~ "bc"); }); client = HTTP(); result = _basicHTTP!char(testServer.addr, "", client); assert(result == "äbc"); } /* * Helper function for the high level interface. * * It performs an FTP request using the client which must have * been setup correctly before calling this function. */ private auto _basicFTP(T)(const(char)[] url, const(void)[] sendData, FTP client) { import std.algorithm.comparison : min; scope (exit) { client.onReceive = null; if (!sendData.empty) client.onSend = null; } ubyte[] content; if (client.encoding.empty) client.encoding = "ISO-8859-1"; client.url = url; client.onReceive = (ubyte[] data) { content ~= data; return data.length; }; if (!sendData.empty) { client.handle.set(CurlOption.upload, 1L); client.onSend = delegate size_t(void[] buf) { size_t minLen = min(buf.length, sendData.length); if (minLen == 0) return 0; buf[0 .. minLen] = sendData[0 .. minLen]; sendData = sendData[minLen..$]; return minLen; }; } client.perform(); return _decodeContent!T(content, client.encoding); } /* Used by _basicHTTP() and _basicFTP() to decode ubyte[] to * correct string format */ private auto _decodeContent(T)(ubyte[] content, string encoding) { static if (is(T == ubyte)) { return content; } else { import std.exception : enforce; import std.format : format; // Optimally just return the utf8 encoded content if (encoding == "UTF-8") return cast(char[])(content); // The content has to be re-encoded to utf8 auto scheme = EncodingScheme.create(encoding); enforce!CurlException(scheme !is null, format("Unknown encoding '%s'", encoding)); auto strInfo = decodeString(content, scheme); enforce!CurlException(strInfo[0] != size_t.max, format("Invalid encoding sequence for encoding '%s'", encoding)); return strInfo[1]; } } alias KeepTerminator = Flag!"keepTerminator"; /+ struct ByLineBuffer(Char) { bool linePresent; bool EOF; Char[] buffer; ubyte[] decodeRemainder; bool append(const(ubyte)[] data) { byLineBuffer ~= data; } @property bool linePresent() { return byLinePresent; } Char[] get() { if (!linePresent) { // Decode ubyte[] into Char[] until a Terminator is found. // If not Terminator is found and EOF is false then raise an // exception. } return byLineBuffer; } } ++/ /** HTTP/FTP fetch content as a range of lines. * * A range of lines is returned when the request is complete. If the method or * other request properties is to be customized then set the $(D conn) parameter * with a HTTP/FTP instance that has these properties set. * * Example: * ---- * import std.net.curl, std.stdio; * foreach (line; byLine("dlang.org")) * writeln(line); * ---- * * Params: * url = The url to receive content from * keepTerminator = $(D Yes.keepTerminator) signals that the line terminator should be * returned as part of the lines in the range. * terminator = The character that terminates a line * conn = The connection to use e.g. HTTP or FTP. * * Returns: * A range of Char[] with the content of the resource pointer to by the URL */ auto byLine(Conn = AutoProtocol, Terminator = char, Char = char) (const(char)[] url, KeepTerminator keepTerminator = No.keepTerminator, Terminator terminator = '\n', Conn conn = Conn()) if (isCurlConn!Conn && isSomeChar!Char && isSomeChar!Terminator) { static struct SyncLineInputRange { private Char[] lines; private Char[] current; private bool currentValid; private bool keepTerminator; private Terminator terminator; this(Char[] lines, bool kt, Terminator terminator) { this.lines = lines; this.keepTerminator = kt; this.terminator = terminator; currentValid = true; popFront(); } @property @safe bool empty() { return !currentValid; } @property @safe Char[] front() { import std.exception : enforce; enforce!CurlException(currentValid, "Cannot call front() on empty range"); return current; } void popFront() { import std.algorithm.searching : findSplitAfter, findSplit; import std.exception : enforce; enforce!CurlException(currentValid, "Cannot call popFront() on empty range"); if (lines.empty) { currentValid = false; return; } if (keepTerminator) { auto r = findSplitAfter(lines, [ terminator ]); if (r[0].empty) { current = r[1]; lines = r[0]; } else { current = r[0]; lines = r[1]; } } else { auto r = findSplit(lines, [ terminator ]); current = r[0]; lines = r[2]; } } } auto result = _getForRange!Char(url, conn); return SyncLineInputRange(result, keepTerminator == Yes.keepTerminator, terminator); } @system unittest { import std.algorithm.comparison : equal; foreach (host; [testServer.addr, "http://"~testServer.addr]) { testServer.handle((s) { auto req = s.recvReq; s.send(httpOK("Line1\nLine2\nLine3")); }); assert(byLine(host).equal(["Line1", "Line2", "Line3"])); } } /** HTTP/FTP fetch content as a range of chunks. * * A range of chunks is returned when the request is complete. If the method or * other request properties is to be customized then set the $(D conn) parameter * with a HTTP/FTP instance that has these properties set. * * Example: * ---- * import std.net.curl, std.stdio; * foreach (chunk; byChunk("dlang.org", 100)) * writeln(chunk); // chunk is ubyte[100] * ---- * * Params: * url = The url to receive content from * chunkSize = The size of each chunk * conn = The connection to use e.g. HTTP or FTP. * * Returns: * A range of ubyte[chunkSize] with the content of the resource pointer to by the URL */ auto byChunk(Conn = AutoProtocol) (const(char)[] url, size_t chunkSize = 1024, Conn conn = Conn()) if (isCurlConn!(Conn)) { static struct SyncChunkInputRange { private size_t chunkSize; private ubyte[] _bytes; private size_t offset; this(ubyte[] bytes, size_t chunkSize) { this._bytes = bytes; this.chunkSize = chunkSize; } @property @safe auto empty() { return offset == _bytes.length; } @property ubyte[] front() { size_t nextOffset = offset + chunkSize; if (nextOffset > _bytes.length) nextOffset = _bytes.length; return _bytes[offset .. nextOffset]; } @safe void popFront() { offset += chunkSize; if (offset > _bytes.length) offset = _bytes.length; } } auto result = _getForRange!ubyte(url, conn); return SyncChunkInputRange(result, chunkSize); } @system unittest { import std.algorithm.comparison : equal; foreach (host; [testServer.addr, "http://"~testServer.addr]) { testServer.handle((s) { auto req = s.recvReq; s.send(httpOK(cast(ubyte[])[0, 1, 2, 3, 4, 5])); }); assert(byChunk(host, 2).equal([[0, 1], [2, 3], [4, 5]])); } } private T[] _getForRange(T,Conn)(const(char)[] url, Conn conn) { static if (is(Conn : HTTP)) { conn.method = conn.method == HTTP.Method.undefined ? HTTP.Method.get : conn.method; return _basicHTTP!(T)(url, null, conn); } else static if (is(Conn : FTP)) { return _basicFTP!(T)(url, null, conn); } else { if (isFTPUrl(url)) return get!(FTP,T)(url, FTP()); else return get!(HTTP,T)(url, HTTP()); } } /* Main thread part of the message passing protocol used for all async curl protocols. */ private mixin template WorkerThreadProtocol(Unit, alias units) { import core.time : Duration; @property bool empty() { tryEnsureUnits(); return state == State.done; } @property Unit[] front() { import std.format : format; tryEnsureUnits(); assert(state == State.gotUnits, format("Expected %s but got $s", State.gotUnits, state)); return units; } void popFront() { import std.concurrency : send; import std.format : format; tryEnsureUnits(); assert(state == State.gotUnits, format("Expected %s but got $s", State.gotUnits, state)); state = State.needUnits; // Send to worker thread for buffer reuse workerTid.send(cast(immutable(Unit)[]) units); units = null; } /** Wait for duration or until data is available and return true if data is available */ bool wait(Duration d) { import core.time : dur; import std.datetime.stopwatch : StopWatch; import std.concurrency : receiveTimeout; if (state == State.gotUnits) return true; enum noDur = dur!"hnsecs"(0); StopWatch sw; sw.start(); while (state != State.gotUnits && d > noDur) { final switch (state) { case State.needUnits: receiveTimeout(d, (Tid origin, CurlMessage!(immutable(Unit)[]) _data) { if (origin != workerTid) return false; units = cast(Unit[]) _data.data; state = State.gotUnits; return true; }, (Tid origin, CurlMessage!bool f) { if (origin != workerTid) return false; state = state.done; return true; } ); break; case State.gotUnits: return true; case State.done: return false; } d -= sw.peek(); sw.reset(); } return state == State.gotUnits; } enum State { needUnits, gotUnits, done } State state; void tryEnsureUnits() { import std.concurrency : receive; while (true) { final switch (state) { case State.needUnits: receive( (Tid origin, CurlMessage!(immutable(Unit)[]) _data) { if (origin != workerTid) return false; units = cast(Unit[]) _data.data; state = State.gotUnits; return true; }, (Tid origin, CurlMessage!bool f) { if (origin != workerTid) return false; state = state.done; return true; } ); break; case State.gotUnits: return; case State.done: return; } } } } /** HTTP/FTP fetch content as a range of lines asynchronously. * * A range of lines is returned immediately and the request that fetches the * lines is performed in another thread. If the method or other request * properties is to be customized then set the $(D conn) parameter with a * HTTP/FTP instance that has these properties set. * * If $(D postData) is non-_null the method will be set to $(D post) for HTTP * requests. * * The background thread will buffer up to transmitBuffers number of lines * before it stops receiving data from network. When the main thread reads the * lines from the range it frees up buffers and allows for the background thread * to receive more data from the network. * * If no data is available and the main thread accesses the range it will block * until data becomes available. An exception to this is the $(D wait(Duration)) method on * the $(LREF LineInputRange). This method will wait at maximum for the * specified duration and return true if data is available. * * Example: * ---- * import std.net.curl, std.stdio; * // Get some pages in the background * auto range1 = byLineAsync("www.google.com"); * auto range2 = byLineAsync("www.wikipedia.org"); * foreach (line; byLineAsync("dlang.org")) * writeln(line); * * // Lines already fetched in the background and ready * foreach (line; range1) writeln(line); * foreach (line; range2) writeln(line); * ---- * * ---- * import std.net.curl, std.stdio; * // Get a line in a background thread and wait in * // main thread for 2 seconds for it to arrive. * auto range3 = byLineAsync("dlang.com"); * if (range3.wait(dur!"seconds"(2))) * writeln(range3.front); * else * writeln("No line received after 2 seconds!"); * ---- * * Params: * url = The url to receive content from * postData = Data to HTTP Post * keepTerminator = $(D Yes.keepTerminator) signals that the line terminator should be * returned as part of the lines in the range. * terminator = The character that terminates a line * transmitBuffers = The number of lines buffered asynchronously * conn = The connection to use e.g. HTTP or FTP. * * Returns: * A range of Char[] with the content of the resource pointer to by the * URL. */ auto byLineAsync(Conn = AutoProtocol, Terminator = char, Char = char, PostUnit) (const(char)[] url, const(PostUnit)[] postData, KeepTerminator keepTerminator = No.keepTerminator, Terminator terminator = '\n', size_t transmitBuffers = 10, Conn conn = Conn()) if (isCurlConn!Conn && isSomeChar!Char && isSomeChar!Terminator) { static if (is(Conn : AutoProtocol)) { if (isFTPUrl(url)) return byLineAsync(url, postData, keepTerminator, terminator, transmitBuffers, FTP()); else return byLineAsync(url, postData, keepTerminator, terminator, transmitBuffers, HTTP()); } else { import std.concurrency : OnCrowding, send, setMaxMailboxSize, spawn, thisTid, Tid; // 50 is just an arbitrary number for now setMaxMailboxSize(thisTid, 50, OnCrowding.block); auto tid = spawn(&_async!().spawn!(Conn, Char, Terminator)); tid.send(thisTid); tid.send(terminator); tid.send(keepTerminator == Yes.keepTerminator); _async!().duplicateConnection(url, conn, postData, tid); return _async!().LineInputRange!Char(tid, transmitBuffers, Conn.defaultAsyncStringBufferSize); } } /// ditto auto byLineAsync(Conn = AutoProtocol, Terminator = char, Char = char) (const(char)[] url, KeepTerminator keepTerminator = No.keepTerminator, Terminator terminator = '\n', size_t transmitBuffers = 10, Conn conn = Conn()) { static if (is(Conn : AutoProtocol)) { if (isFTPUrl(url)) return byLineAsync(url, cast(void[]) null, keepTerminator, terminator, transmitBuffers, FTP()); else return byLineAsync(url, cast(void[]) null, keepTerminator, terminator, transmitBuffers, HTTP()); } else { return byLineAsync(url, cast(void[]) null, keepTerminator, terminator, transmitBuffers, conn); } } @system unittest { import std.algorithm.comparison : equal; foreach (host; [testServer.addr, "http://"~testServer.addr]) { testServer.handle((s) { auto req = s.recvReq; s.send(httpOK("Line1\nLine2\nLine3")); }); assert(byLineAsync(host).equal(["Line1", "Line2", "Line3"])); } } /** HTTP/FTP fetch content as a range of chunks asynchronously. * * A range of chunks is returned immediately and the request that fetches the * chunks is performed in another thread. If the method or other request * properties is to be customized then set the $(D conn) parameter with a * HTTP/FTP instance that has these properties set. * * If $(D postData) is non-_null the method will be set to $(D post) for HTTP * requests. * * The background thread will buffer up to transmitBuffers number of chunks * before is stops receiving data from network. When the main thread reads the * chunks from the range it frees up buffers and allows for the background * thread to receive more data from the network. * * If no data is available and the main thread access the range it will block * until data becomes available. An exception to this is the $(D wait(Duration)) * method on the $(LREF ChunkInputRange). This method will wait at maximum for the specified * duration and return true if data is available. * * Example: * ---- * import std.net.curl, std.stdio; * // Get some pages in the background * auto range1 = byChunkAsync("www.google.com", 100); * auto range2 = byChunkAsync("www.wikipedia.org"); * foreach (chunk; byChunkAsync("dlang.org")) * writeln(chunk); // chunk is ubyte[100] * * // Chunks already fetched in the background and ready * foreach (chunk; range1) writeln(chunk); * foreach (chunk; range2) writeln(chunk); * ---- * * ---- * import std.net.curl, std.stdio; * // Get a line in a background thread and wait in * // main thread for 2 seconds for it to arrive. * auto range3 = byChunkAsync("dlang.com", 10); * if (range3.wait(dur!"seconds"(2))) * writeln(range3.front); * else * writeln("No chunk received after 2 seconds!"); * ---- * * Params: * url = The url to receive content from * postData = Data to HTTP Post * chunkSize = The size of the chunks * transmitBuffers = The number of chunks buffered asynchronously * conn = The connection to use e.g. HTTP or FTP. * * Returns: * A range of ubyte[chunkSize] with the content of the resource pointer to by * the URL. */ auto byChunkAsync(Conn = AutoProtocol, PostUnit) (const(char)[] url, const(PostUnit)[] postData, size_t chunkSize = 1024, size_t transmitBuffers = 10, Conn conn = Conn()) if (isCurlConn!(Conn)) { static if (is(Conn : AutoProtocol)) { if (isFTPUrl(url)) return byChunkAsync(url, postData, chunkSize, transmitBuffers, FTP()); else return byChunkAsync(url, postData, chunkSize, transmitBuffers, HTTP()); } else { import std.concurrency : OnCrowding, send, setMaxMailboxSize, spawn, thisTid, Tid; // 50 is just an arbitrary number for now setMaxMailboxSize(thisTid, 50, OnCrowding.block); auto tid = spawn(&_async!().spawn!(Conn, ubyte)); tid.send(thisTid); _async!().duplicateConnection(url, conn, postData, tid); return _async!().ChunkInputRange(tid, transmitBuffers, chunkSize); } } /// ditto auto byChunkAsync(Conn = AutoProtocol) (const(char)[] url, size_t chunkSize = 1024, size_t transmitBuffers = 10, Conn conn = Conn()) if (isCurlConn!(Conn)) { static if (is(Conn : AutoProtocol)) { if (isFTPUrl(url)) return byChunkAsync(url, cast(void[]) null, chunkSize, transmitBuffers, FTP()); else return byChunkAsync(url, cast(void[]) null, chunkSize, transmitBuffers, HTTP()); } else { return byChunkAsync(url, cast(void[]) null, chunkSize, transmitBuffers, conn); } } @system unittest { import std.algorithm.comparison : equal; foreach (host; [testServer.addr, "http://"~testServer.addr]) { testServer.handle((s) { auto req = s.recvReq; s.send(httpOK(cast(ubyte[])[0, 1, 2, 3, 4, 5])); }); assert(byChunkAsync(host, 2).equal([[0, 1], [2, 3], [4, 5]])); } } /* Mixin template for all supported curl protocols. This is the commom functionallity such as timeouts and network interface settings. This should really be in the HTTP/FTP/SMTP structs but the documentation tool does not support a mixin to put its doc strings where a mixin is done. Therefore docs in this template is copied into each of HTTP/FTP/SMTP below. */ private mixin template Protocol() { import etc.c.curl : CurlReadFunc, RawCurlProxy = CurlProxy; import core.time : Duration; import std.socket : InternetAddress; /// Value to return from $(D onSend)/$(D onReceive) delegates in order to /// pause a request alias requestPause = CurlReadFunc.pause; /// Value to return from onSend delegate in order to abort a request alias requestAbort = CurlReadFunc.abort; static uint defaultAsyncStringBufferSize = 100; /** The curl handle used by this connection. */ @property ref Curl handle() return { return p.curl; } /** True if the instance is stopped. A stopped instance is not usable. */ @property bool isStopped() { return p.curl.stopped; } /// Stop and invalidate this instance. void shutdown() { p.curl.shutdown(); } /** Set verbose. This will print request information to stderr. */ @property void verbose(bool on) { p.curl.set(CurlOption.verbose, on ? 1L : 0L); } // Connection settings /// Set timeout for activity on connection. @property void dataTimeout(Duration d) { p.curl.set(CurlOption.low_speed_limit, 1); p.curl.set(CurlOption.low_speed_time, d.total!"seconds"); } /** Set maximum time an operation is allowed to take. This includes dns resolution, connecting, data transfer, etc. */ @property void operationTimeout(Duration d) { p.curl.set(CurlOption.timeout_ms, d.total!"msecs"); } /// Set timeout for connecting. @property void connectTimeout(Duration d) { p.curl.set(CurlOption.connecttimeout_ms, d.total!"msecs"); } // Network settings /** Proxy * See: $(HTTP curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTPROXY, _proxy) */ @property void proxy(const(char)[] host) { p.curl.set(CurlOption.proxy, host); } /** Proxy port * See: $(HTTP curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTPROXYPORT, _proxy_port) */ @property void proxyPort(ushort port) { p.curl.set(CurlOption.proxyport, cast(long) port); } /// Type of proxy alias CurlProxy = RawCurlProxy; /** Proxy type * See: $(HTTP curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTPROXY, _proxy_type) */ @property void proxyType(CurlProxy type) { p.curl.set(CurlOption.proxytype, cast(long) type); } /// DNS lookup timeout. @property void dnsTimeout(Duration d) { p.curl.set(CurlOption.dns_cache_timeout, d.total!"msecs"); } /** * The network interface to use in form of the the IP of the interface. * * Example: * ---- * theprotocol.netInterface = "192.168.1.32"; * theprotocol.netInterface = [ 192, 168, 1, 32 ]; * ---- * * See: $(REF InternetAddress, std,socket) */ @property void netInterface(const(char)[] i) { p.curl.set(CurlOption.intrface, i); } /// ditto @property void netInterface(const(ubyte)[4] i) { import std.format : format; const str = format("%d.%d.%d.%d", i[0], i[1], i[2], i[3]); netInterface = str; } /// ditto @property void netInterface(InternetAddress i) { netInterface = i.toAddrString(); } /** Set the local outgoing port to use. Params: port = the first outgoing port number to try and use */ @property void localPort(ushort port) { p.curl.set(CurlOption.localport, cast(long) port); } /** Set the no proxy flag for the specified host names. Params: test = a list of comma host names that do not require proxy to get reached */ void setNoProxy(string hosts) { p.curl.set(CurlOption.noproxy, hosts); } /** Set the local outgoing port range to use. This can be used together with the localPort property. Params: range = if the first port is occupied then try this many port number forwards */ @property void localPortRange(ushort range) { p.curl.set(CurlOption.localportrange, cast(long) range); } /** Set the tcp no-delay socket option on or off. See: $(HTTP curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTTCPNODELAY, nodelay) */ @property void tcpNoDelay(bool on) { p.curl.set(CurlOption.tcp_nodelay, cast(long) (on ? 1 : 0) ); } /** Sets whether SSL peer certificates should be verified. See: $(HTTP curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTSSLVERIFYPEER, verifypeer) */ @property void verifyPeer(bool on) { p.curl.set(CurlOption.ssl_verifypeer, on ? 1 : 0); } /** Sets whether the host within an SSL certificate should be verified. See: $(HTTP curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTSSLVERIFYHOST, verifypeer) */ @property void verifyHost(bool on) { p.curl.set(CurlOption.ssl_verifyhost, on ? 2 : 0); } // Authentication settings /** Set the user name, password and optionally domain for authentication purposes. Some protocols may need authentication in some cases. Use this function to provide credentials. Params: username = the username password = the password domain = used for NTLM authentication only and is set to the NTLM domain name */ void setAuthentication(const(char)[] username, const(char)[] password, const(char)[] domain = "") { import std.format : format; if (!domain.empty) username = format("%s/%s", domain, username); p.curl.set(CurlOption.userpwd, format("%s:%s", username, password)); } @system unittest { import std.algorithm.searching : canFind; testServer.handle((s) { auto req = s.recvReq; assert(req.hdrs.canFind("GET /")); assert(req.hdrs.canFind("Basic dXNlcjpwYXNz")); s.send(httpOK()); }); auto http = HTTP(testServer.addr); http.onReceive = (ubyte[] data) { return data.length; }; http.setAuthentication("user", "pass"); http.perform(); // Bugzilla 17540 http.setNoProxy("www.example.com"); } /** Set the user name and password for proxy authentication. Params: username = the username password = the password */ void setProxyAuthentication(const(char)[] username, const(char)[] password) { import std.array : replace; import std.format : format; p.curl.set(CurlOption.proxyuserpwd, format("%s:%s", username.replace(":", "%3A"), password.replace(":", "%3A")) ); } /** * The event handler that gets called when data is needed for sending. The * length of the $(D void[]) specifies the maximum number of bytes that can * be sent. * * Returns: * The callback returns the number of elements in the buffer that have been * filled and are ready to send. * The special value $(D .abortRequest) can be returned in order to abort the * current request. * The special value $(D .pauseRequest) can be returned in order to pause the * current request. * * Example: * ---- * import std.net.curl; * string msg = "Hello world"; * auto client = HTTP("dlang.org"); * client.onSend = delegate size_t(void[] data) * { * auto m = cast(void[]) msg; * size_t length = m.length > data.length ? data.length : m.length; * if (length == 0) return 0; * data[0 .. length] = m[0 .. length]; * msg = msg[length..$]; * return length; * }; * client.perform(); * ---- */ @property void onSend(size_t delegate(void[]) callback) { p.curl.clear(CurlOption.postfields); // cannot specify data when using callback p.curl.onSend = callback; } /** * The event handler that receives incoming data. Be sure to copy the * incoming ubyte[] since it is not guaranteed to be valid after the * callback returns. * * Returns: * The callback returns the number of incoming bytes read. If the entire array is * not read the request will abort. * The special value .pauseRequest can be returned in order to pause the * current request. * * Example: * ---- * import std.net.curl, std.stdio; * auto client = HTTP("dlang.org"); * client.onReceive = (ubyte[] data) * { * writeln("Got data", to!(const(char)[])(data)); * return data.length; * }; * client.perform(); * ---- */ @property void onReceive(size_t delegate(ubyte[]) callback) { p.curl.onReceive = callback; } /** * The event handler that gets called to inform of upload/download progress. * * Params: * dlTotal = total bytes to download * dlNow = currently downloaded bytes * ulTotal = total bytes to upload * ulNow = currently uploaded bytes * * Returns: * Return 0 from the callback to signal success, return non-zero to abort * transfer * * Example: * ---- * import std.net.curl, std.stdio; * auto client = HTTP("dlang.org"); * client.onProgress = delegate int(size_t dl, size_t dln, size_t ul, size_t ult) * { * writeln("Progress: downloaded ", dln, " of ", dl); * writeln("Progress: uploaded ", uln, " of ", ul); * }; * client.perform(); * ---- */ @property void onProgress(int delegate(size_t dlTotal, size_t dlNow, size_t ulTotal, size_t ulNow) callback) { p.curl.onProgress = callback; } } /* Decode $(D ubyte[]) array using the provided EncodingScheme up to maxChars Returns: Tuple of ubytes read and the $(D Char[]) characters decoded. Not all ubytes are guaranteed to be read in case of decoding error. */ private Tuple!(size_t,Char[]) decodeString(Char = char)(const(ubyte)[] data, EncodingScheme scheme, size_t maxChars = size_t.max) { import std.encoding : INVALID_SEQUENCE; Char[] res; immutable startLen = data.length; size_t charsDecoded = 0; while (data.length && charsDecoded < maxChars) { immutable dchar dc = scheme.safeDecode(data); if (dc == INVALID_SEQUENCE) { return typeof(return)(size_t.max, cast(Char[]) null); } charsDecoded++; res ~= dc; } return typeof(return)(startLen-data.length, res); } /* Decode $(D ubyte[]) array using the provided $(D EncodingScheme) until a the line terminator specified is found. The basesrc parameter is effectively prepended to src as the first thing. This function is used for decoding as much of the src buffer as possible until either the terminator is found or decoding fails. If it fails as the last data in the src it may mean that the src buffer were missing some bytes in order to represent a correct code point. Upon the next call to this function more bytes have been received from net and the failing bytes should be given as the basesrc parameter. It is done this way to minimize data copying. Returns: true if a terminator was found Not all ubytes are guaranteed to be read in case of decoding error. any decoded chars will be inserted into dst. */ private bool decodeLineInto(Terminator, Char = char)(ref const(ubyte)[] basesrc, ref const(ubyte)[] src, ref Char[] dst, EncodingScheme scheme, Terminator terminator) { import std.algorithm.searching : endsWith; import std.encoding : INVALID_SEQUENCE; import std.exception : enforce; // if there is anything in the basesrc then try to decode that // first. if (basesrc.length != 0) { // Try to ensure 4 entries in the basesrc by copying from src. immutable blen = basesrc.length; immutable len = (basesrc.length + src.length) >= 4 ? 4 : basesrc.length + src.length; basesrc.length = len; immutable dchar dc = scheme.safeDecode(basesrc); if (dc == INVALID_SEQUENCE) { enforce!CurlException(len != 4, "Invalid code sequence"); return false; } dst ~= dc; src = src[len-basesrc.length-blen .. $]; // remove used ubytes from src basesrc.length = 0; } while (src.length) { const lsrc = src; dchar dc = scheme.safeDecode(src); if (dc == INVALID_SEQUENCE) { if (src.empty) { // The invalid sequence was in the end of the src. Maybe there // just need to be more bytes available so these last bytes are // put back to src for later use. src = lsrc; return false; } dc = '?'; } dst ~= dc; if (dst.endsWith(terminator)) return true; } return false; // no terminator found } /** * HTTP client functionality. * * Example: * --- * import std.net.curl, std.stdio; * * // Get with custom data receivers * auto http = HTTP("dlang.org"); * http.onReceiveHeader = * (in char[] key, in char[] value) { writeln(key ~ ": " ~ value); }; * http.onReceive = (ubyte[] data) { /+ drop +/ return data.length; }; * http.perform(); * * // Put with data senders * auto msg = "Hello world"; * http.contentLength = msg.length; * http.onSend = (void[] data) * { * auto m = cast(void[]) msg; * size_t len = m.length > data.length ? data.length : m.length; * if (len == 0) return len; * data[0 .. len] = m[0 .. len]; * msg = msg[len..$]; * return len; * }; * http.perform(); * * // Track progress * http.method = HTTP.Method.get; * http.url = "http://upload.wikimedia.org/wikipedia/commons/" * "5/53/Wikipedia-logo-en-big.png"; * http.onReceive = (ubyte[] data) { return data.length; }; * http.onProgress = (size_t dltotal, size_t dlnow, * size_t ultotal, size_t ulnow) * { * writeln("Progress ", dltotal, ", ", dlnow, ", ", ultotal, ", ", ulnow); * return 0; * }; * http.perform(); * --- * * See_Also: $(LINK2 http://www.ietf.org/rfc/rfc2616.txt, RFC2616) * */ struct HTTP { mixin Protocol; import std.datetime.systime : SysTime; import std.typecons : RefCounted; import etc.c.curl : CurlAuth, CurlInfo, curl_slist, CURLVERSION_NOW, curl_off_t; /// Authentication method equal to $(REF CurlAuth, etc,c,curl) alias AuthMethod = CurlAuth; static private uint defaultMaxRedirects = 10; private struct Impl { ~this() { if (headersOut !is null) Curl.curl.slist_free_all(headersOut); if (curl.handle !is null) // work around RefCounted/emplace bug curl.shutdown(); } Curl curl; curl_slist* headersOut; string[string] headersIn; string charset; /// The status line of the final sub-request in a request. StatusLine status; private void delegate(StatusLine) onReceiveStatusLine; /// The HTTP method to use. Method method = Method.undefined; @system @property void onReceiveHeader(void delegate(in char[] key, in char[] value) callback) { import std.algorithm.searching : startsWith; import std.conv : to; import std.regex : regex, match; import std.uni : toLower; // Wrap incoming callback in order to separate http status line from // http headers. On redirected requests there may be several such // status lines. The last one is the one recorded. auto dg = (in char[] header) { import std.utf : UTFException; try { if (header.empty) { // header delimiter return; } if (header.startsWith("HTTP/")) { headersIn.clear(); const m = match(header, regex(r"^HTTP/(\d+)\.(\d+) (\d+) (.*)$")); if (m.empty) { // Invalid status line } else { status.majorVersion = to!ushort(m.captures[1]); status.minorVersion = to!ushort(m.captures[2]); status.code = to!ushort(m.captures[3]); status.reason = m.captures[4].idup; if (onReceiveStatusLine != null) onReceiveStatusLine(status); } return; } // Normal http header auto m = match(cast(char[]) header, regex("(.*?): (.*)$")); auto fieldName = m.captures[1].toLower().idup; if (fieldName == "content-type") { auto mct = match(cast(char[]) m.captures[2], regex("charset=([^;]*)", "i")); if (!mct.empty && mct.captures.length > 1) charset = mct.captures[1].idup; } if (!m.empty && callback !is null) callback(fieldName, m.captures[2]); headersIn[fieldName] = m.captures[2].idup; } catch (UTFException e) { //munch it - a header should be all ASCII, any "wrong UTF" is broken header } }; curl.onReceiveHeader = dg; } } private RefCounted!Impl p; import etc.c.curl : CurlTimeCond; /** Time condition enumeration as an alias of $(REF CurlTimeCond, etc,c,curl) $(HTTP www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.25, _RFC2616 Section 14.25) */ alias TimeCond = CurlTimeCond; /** Constructor taking the url as parameter. */ static HTTP opCall(const(char)[] url) { HTTP http; http.initialize(); http.url = url; return http; } /// static HTTP opCall() { HTTP http; http.initialize(); return http; } /// HTTP dup() { HTTP copy; copy.initialize(); copy.p.method = p.method; curl_slist* cur = p.headersOut; curl_slist* newlist = null; while (cur) { newlist = Curl.curl.slist_append(newlist, cur.data); cur = cur.next; } copy.p.headersOut = newlist; copy.p.curl.set(CurlOption.httpheader, copy.p.headersOut); copy.p.curl = p.curl.dup(); copy.dataTimeout = _defaultDataTimeout; copy.onReceiveHeader = null; return copy; } private void initialize() { p.curl.initialize(); maxRedirects = HTTP.defaultMaxRedirects; p.charset = "ISO-8859-1"; // Default charset defined in HTTP RFC p.method = Method.undefined; setUserAgent(HTTP.defaultUserAgent); dataTimeout = _defaultDataTimeout; onReceiveHeader = null; verifyPeer = true; verifyHost = true; } /** Perform a http request. After the HTTP client has been setup and possibly assigned callbacks the $(D perform()) method will start performing the request towards the specified server. Params: throwOnError = whether to throw an exception or return a CurlCode on error */ CurlCode perform(ThrowOnError throwOnError = Yes.throwOnError) { p.status.reset(); CurlOption opt; final switch (p.method) { case Method.head: p.curl.set(CurlOption.nobody, 1L); opt = CurlOption.nobody; break; case Method.undefined: case Method.get: p.curl.set(CurlOption.httpget, 1L); opt = CurlOption.httpget; break; case Method.post: p.curl.set(CurlOption.post, 1L); opt = CurlOption.post; break; case Method.put: p.curl.set(CurlOption.upload, 1L); opt = CurlOption.upload; break; case Method.del: p.curl.set(CurlOption.customrequest, "DELETE"); opt = CurlOption.customrequest; break; case Method.options: p.curl.set(CurlOption.customrequest, "OPTIONS"); opt = CurlOption.customrequest; break; case Method.trace: p.curl.set(CurlOption.customrequest, "TRACE"); opt = CurlOption.customrequest; break; case Method.connect: p.curl.set(CurlOption.customrequest, "CONNECT"); opt = CurlOption.customrequest; break; case Method.patch: p.curl.set(CurlOption.customrequest, "PATCH"); opt = CurlOption.customrequest; break; } scope (exit) p.curl.clear(opt); return p.curl.perform(throwOnError); } /// The URL to specify the location of the resource. @property void url(const(char)[] url) { import std.algorithm.searching : startsWith; import std.uni : toLower; if (!startsWith(url.toLower(), "http://", "https://")) url = "http://" ~ url; p.curl.set(CurlOption.url, url); } /// Set the CA certificate bundle file to use for SSL peer verification @property void caInfo(const(char)[] caFile) { p.curl.set(CurlOption.cainfo, caFile); } // This is a workaround for mixed in content not having its // docs mixed in. version (StdDdoc) { static import etc.c.curl; /// Value to return from $(D onSend)/$(D onReceive) delegates in order to /// pause a request alias requestPause = CurlReadFunc.pause; /// Value to return from onSend delegate in order to abort a request alias requestAbort = CurlReadFunc.abort; /** True if the instance is stopped. A stopped instance is not usable. */ @property bool isStopped(); /// Stop and invalidate this instance. void shutdown(); /** Set verbose. This will print request information to stderr. */ @property void verbose(bool on); // Connection settings /// Set timeout for activity on connection. @property void dataTimeout(Duration d); /** Set maximum time an operation is allowed to take. This includes dns resolution, connecting, data transfer, etc. */ @property void operationTimeout(Duration d); /// Set timeout for connecting. @property void connectTimeout(Duration d); // Network settings /** Proxy * See: $(HTTP curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTPROXY, _proxy) */ @property void proxy(const(char)[] host); /** Proxy port * See: $(HTTP curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTPROXYPORT, _proxy_port) */ @property void proxyPort(ushort port); /// Type of proxy alias CurlProxy = etc.c.curl.CurlProxy; /** Proxy type * See: $(HTTP curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTPROXY, _proxy_type) */ @property void proxyType(CurlProxy type); /// DNS lookup timeout. @property void dnsTimeout(Duration d); /** * The network interface to use in form of the the IP of the interface. * * Example: * ---- * theprotocol.netInterface = "192.168.1.32"; * theprotocol.netInterface = [ 192, 168, 1, 32 ]; * ---- * * See: $(REF InternetAddress, std,socket) */ @property void netInterface(const(char)[] i); /// ditto @property void netInterface(const(ubyte)[4] i); /// ditto @property void netInterface(InternetAddress i); /** Set the local outgoing port to use. Params: port = the first outgoing port number to try and use */ @property void localPort(ushort port); /** Set the local outgoing port range to use. This can be used together with the localPort property. Params: range = if the first port is occupied then try this many port number forwards */ @property void localPortRange(ushort range); /** Set the tcp no-delay socket option on or off. See: $(HTTP curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTTCPNODELAY, nodelay) */ @property void tcpNoDelay(bool on); // Authentication settings /** Set the user name, password and optionally domain for authentication purposes. Some protocols may need authentication in some cases. Use this function to provide credentials. Params: username = the username password = the password domain = used for NTLM authentication only and is set to the NTLM domain name */ void setAuthentication(const(char)[] username, const(char)[] password, const(char)[] domain = ""); /** Set the user name and password for proxy authentication. Params: username = the username password = the password */ void setProxyAuthentication(const(char)[] username, const(char)[] password); /** * The event handler that gets called when data is needed for sending. The * length of the $(D void[]) specifies the maximum number of bytes that can * be sent. * * Returns: * The callback returns the number of elements in the buffer that have been * filled and are ready to send. * The special value $(D .abortRequest) can be returned in order to abort the * current request. * The special value $(D .pauseRequest) can be returned in order to pause the * current request. * * Example: * ---- * import std.net.curl; * string msg = "Hello world"; * auto client = HTTP("dlang.org"); * client.onSend = delegate size_t(void[] data) * { * auto m = cast(void[]) msg; * size_t length = m.length > data.length ? data.length : m.length; * if (length == 0) return 0; * data[0 .. length] = m[0 .. length]; * msg = msg[length..$]; * return length; * }; * client.perform(); * ---- */ @property void onSend(size_t delegate(void[]) callback); /** * The event handler that receives incoming data. Be sure to copy the * incoming ubyte[] since it is not guaranteed to be valid after the * callback returns. * * Returns: * The callback returns the incoming bytes read. If not the entire array is * the request will abort. * The special value .pauseRequest can be returned in order to pause the * current request. * * Example: * ---- * import std.net.curl, std.stdio; * auto client = HTTP("dlang.org"); * client.onReceive = (ubyte[] data) * { * writeln("Got data", to!(const(char)[])(data)); * return data.length; * }; * client.perform(); * ---- */ @property void onReceive(size_t delegate(ubyte[]) callback); /** * Register an event handler that gets called to inform of * upload/download progress. * * Callback_parameters: * $(CALLBACK_PARAMS) * * Callback_returns: Return 0 to signal success, return non-zero to * abort transfer. * * Example: * ---- * import std.net.curl, std.stdio; * auto client = HTTP("dlang.org"); * client.onProgress = delegate int(size_t dl, size_t dln, size_t ul, size_t ult) * { * writeln("Progress: downloaded ", dln, " of ", dl); * writeln("Progress: uploaded ", uln, " of ", ul); * }; * client.perform(); * ---- */ @property void onProgress(int delegate(size_t dlTotal, size_t dlNow, size_t ulTotal, size_t ulNow) callback); } /** Clear all outgoing headers. */ void clearRequestHeaders() { if (p.headersOut !is null) Curl.curl.slist_free_all(p.headersOut); p.headersOut = null; p.curl.clear(CurlOption.httpheader); } /** Add a header e.g. "X-CustomField: Something is fishy". * * There is no remove header functionality. Do a $(LREF clearRequestHeaders) * and set the needed headers instead. * * Example: * --- * import std.net.curl; * auto client = HTTP(); * client.addRequestHeader("X-Custom-ABC", "This is the custom value"); * auto content = get("dlang.org", client); * --- */ void addRequestHeader(const(char)[] name, const(char)[] value) { import std.format : format; import std.internal.cstring : tempCString; import std.uni : icmp; if (icmp(name, "User-Agent") == 0) return setUserAgent(value); string nv = format("%s: %s", name, value); p.headersOut = Curl.curl.slist_append(p.headersOut, nv.tempCString().buffPtr); p.curl.set(CurlOption.httpheader, p.headersOut); } /** * The default "User-Agent" value send with a request. * It has the form "Phobos-std.net.curl/$(I PHOBOS_VERSION) (libcurl/$(I CURL_VERSION))" */ static string defaultUserAgent() @property { import std.compiler : version_major, version_minor; import std.format : format, sformat; // http://curl.haxx.se/docs/versions.html enum fmt = "Phobos-std.net.curl/%d.%03d (libcurl/%d.%d.%d)"; enum maxLen = fmt.length - "%d%03d%d%d%d".length + 10 + 10 + 3 + 3 + 3; static char[maxLen] buf = void; static string userAgent; if (!userAgent.length) { auto curlVer = Curl.curl.version_info(CURLVERSION_NOW).version_num; userAgent = cast(immutable) sformat( buf, fmt, version_major, version_minor, curlVer >> 16 & 0xFF, curlVer >> 8 & 0xFF, curlVer & 0xFF); } return userAgent; } /** Set the value of the user agent request header field. * * By default a request has it's "User-Agent" field set to $(LREF * defaultUserAgent) even if $(D setUserAgent) was never called. Pass * an empty string to suppress the "User-Agent" field altogether. */ void setUserAgent(const(char)[] userAgent) { p.curl.set(CurlOption.useragent, userAgent); } /** * Get various timings defined in $(REF CurlInfo, etc, c, curl). * The value is usable only if the return value is equal to $(D etc.c.curl.CurlError.ok). * * Params: * timing = one of the timings defined in $(REF CurlInfo, etc, c, curl). * The values are: * $(D etc.c.curl.CurlInfo.namelookup_time), * $(D etc.c.curl.CurlInfo.connect_time), * $(D etc.c.curl.CurlInfo.pretransfer_time), * $(D etc.c.curl.CurlInfo.starttransfer_time), * $(D etc.c.curl.CurlInfo.redirect_time), * $(D etc.c.curl.CurlInfo.appconnect_time), * $(D etc.c.curl.CurlInfo.total_time). * val = the actual value of the inquired timing. * * Returns: * The return code of the operation. The value stored in val * should be used only if the return value is $(D etc.c.curl.CurlInfo.ok). * * Example: * --- * import std.net.curl; * import etc.c.curl : CurlError, CurlInfo; * * auto client = HTTP("dlang.org"); * client.perform(); * * double val; * CurlCode code; * * code = client.getTiming(CurlInfo.namelookup_time, val); * assert(code == CurlError.ok); * --- */ CurlCode getTiming(CurlInfo timing, ref double val) { return p.curl.getTiming(timing, val); } /** The headers read from a successful response. * */ @property string[string] responseHeaders() { return p.headersIn; } /// HTTP method used. @property void method(Method m) { p.method = m; } /// ditto @property Method method() { return p.method; } /** HTTP status line of last response. One call to perform may result in several requests because of redirection. */ @property StatusLine statusLine() { return p.status; } /// Set the active cookie string e.g. "name1=value1;name2=value2" void setCookie(const(char)[] cookie) { p.curl.set(CurlOption.cookie, cookie); } /// Set a file path to where a cookie jar should be read/stored. void setCookieJar(const(char)[] path) { p.curl.set(CurlOption.cookiefile, path); if (path.length) p.curl.set(CurlOption.cookiejar, path); } /// Flush cookie jar to disk. void flushCookieJar() { p.curl.set(CurlOption.cookielist, "FLUSH"); } /// Clear session cookies. void clearSessionCookies() { p.curl.set(CurlOption.cookielist, "SESS"); } /// Clear all cookies. void clearAllCookies() { p.curl.set(CurlOption.cookielist, "ALL"); } /** Set time condition on the request. Params: cond = $(D CurlTimeCond.{none,ifmodsince,ifunmodsince,lastmod}) timestamp = Timestamp for the condition $(HTTP www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.25, _RFC2616 Section 14.25) */ void setTimeCondition(HTTP.TimeCond cond, SysTime timestamp) { p.curl.set(CurlOption.timecondition, cond); p.curl.set(CurlOption.timevalue, timestamp.toUnixTime()); } /** Specifying data to post when not using the onSend callback. * * The data is NOT copied by the library. Content-Type will default to * application/octet-stream. Data is not converted or encoded by this * method. * * Example: * ---- * import std.net.curl, std.stdio; * auto http = HTTP("http://www.mydomain.com"); * http.onReceive = (ubyte[] data) { writeln(to!(const(char)[])(data)); return data.length; }; * http.postData = [1,2,3,4,5]; * http.perform(); * ---- */ @property void postData(const(void)[] data) { setPostData(data, "application/octet-stream"); } /** Specifying data to post when not using the onSend callback. * * The data is NOT copied by the library. Content-Type will default to * text/plain. Data is not converted or encoded by this method. * * Example: * ---- * import std.net.curl, std.stdio; * auto http = HTTP("http://www.mydomain.com"); * http.onReceive = (ubyte[] data) { writeln(to!(const(char)[])(data)); return data.length; }; * http.postData = "The quick...."; * http.perform(); * ---- */ @property void postData(const(char)[] data) { setPostData(data, "text/plain"); } /** * Specify data to post when not using the onSend callback, with * user-specified Content-Type. * Params: * data = Data to post. * contentType = MIME type of the data, for example, "text/plain" or * "application/octet-stream". See also: * $(LINK2 http://en.wikipedia.org/wiki/Internet_media_type, * Internet media type) on Wikipedia. * ----- * import std.net.curl; * auto http = HTTP("http://onlineform.example.com"); * auto data = "app=login&username=bob&password=s00perS3kret"; * http.setPostData(data, "application/x-www-form-urlencoded"); * http.onReceive = (ubyte[] data) { return data.length; }; * http.perform(); * ----- */ void setPostData(const(void)[] data, string contentType) { // cannot use callback when specifying data directly so it is disabled here. p.curl.clear(CurlOption.readfunction); addRequestHeader("Content-Type", contentType); p.curl.set(CurlOption.postfields, cast(void*) data.ptr); p.curl.set(CurlOption.postfieldsize, data.length); if (method == Method.undefined) method = Method.post; } @system unittest { import std.algorithm.searching : canFind; testServer.handle((s) { auto req = s.recvReq!ubyte; assert(req.hdrs.canFind("POST /path")); assert(req.bdy.canFind(cast(ubyte[])[0, 1, 2, 3, 4])); assert(req.bdy.canFind(cast(ubyte[])[253, 254, 255])); s.send(httpOK(cast(ubyte[])[17, 27, 35, 41])); }); auto data = new ubyte[](256); foreach (i, ref ub; data) ub = cast(ubyte) i; auto http = HTTP(testServer.addr~"/path"); http.postData = data; ubyte[] res; http.onReceive = (data) { res ~= data; return data.length; }; http.perform(); assert(res == cast(ubyte[])[17, 27, 35, 41]); } /** * Set the event handler that receives incoming headers. * * The callback will receive a header field key, value as parameter. The * $(D const(char)[]) arrays are not valid after the delegate has returned. * * Example: * ---- * import std.net.curl, std.stdio; * auto http = HTTP("dlang.org"); * http.onReceive = (ubyte[] data) { writeln(to!(const(char)[])(data)); return data.length; }; * http.onReceiveHeader = (in char[] key, in char[] value) { writeln(key, " = ", value); }; * http.perform(); * ---- */ @property void onReceiveHeader(void delegate(in char[] key, in char[] value) callback) { p.onReceiveHeader = callback; } /** Callback for each received StatusLine. Notice that several callbacks can be done for each call to $(D perform()) due to redirections. See_Also: $(LREF StatusLine) */ @property void onReceiveStatusLine(void delegate(StatusLine) callback) { p.onReceiveStatusLine = callback; } /** The content length in bytes when using request that has content e.g. POST/PUT and not using chunked transfer. Is set as the "Content-Length" header. Set to ulong.max to reset to chunked transfer. */ @property void contentLength(ulong len) { import std.conv : to; CurlOption lenOpt; // Force post if necessary if (p.method != Method.put && p.method != Method.post && p.method != Method.patch) p.method = Method.post; if (p.method == Method.post || p.method == Method.patch) lenOpt = CurlOption.postfieldsize_large; else lenOpt = CurlOption.infilesize_large; if (size_t.max != ulong.max && len == size_t.max) len = ulong.max; // check size_t.max for backwards compat, turn into error if (len == ulong.max) { // HTTP 1.1 supports requests with no length header set. addRequestHeader("Transfer-Encoding", "chunked"); addRequestHeader("Expect", "100-continue"); } else { p.curl.set(lenOpt, to!curl_off_t(len)); } } /** Authentication method as specified in $(LREF AuthMethod). */ @property void authenticationMethod(AuthMethod authMethod) { p.curl.set(CurlOption.httpauth, cast(long) authMethod); } /** Set max allowed redirections using the location header. uint.max for infinite. */ @property void maxRedirects(uint maxRedirs) { if (maxRedirs == uint.max) { // Disable p.curl.set(CurlOption.followlocation, 0); } else { p.curl.set(CurlOption.followlocation, 1); p.curl.set(CurlOption.maxredirs, maxRedirs); } } /** <a name="HTTP.Method"/>The standard HTTP methods : * $(HTTP www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.1, _RFC2616 Section 5.1.1) */ enum Method { undefined, head, /// get, /// post, /// put, /// del, /// options, /// trace, /// connect, /// patch, /// } /** HTTP status line ie. the first line returned in an HTTP response. If authentication or redirections are done then the status will be for the last response received. */ struct StatusLine { ushort majorVersion; /// Major HTTP version ie. 1 in HTTP/1.0. ushort minorVersion; /// Minor HTTP version ie. 0 in HTTP/1.0. ushort code; /// HTTP status line code e.g. 200. string reason; /// HTTP status line reason string. /// Reset this status line @safe void reset() { majorVersion = 0; minorVersion = 0; code = 0; reason = ""; } /// string toString() const { import std.format : format; return format("%s %s (%s.%s)", code, reason, majorVersion, minorVersion); } } } // HTTP @system unittest // charset/Charset/CHARSET/... { import etc.c.curl; static foreach (c; ["charset", "Charset", "CHARSET", "CharSet", "charSet", "ChArSeT", "cHaRsEt"]) {{ testServer.handle((s) { s.send("HTTP/1.1 200 OK\r\n"~ "Content-Length: 0\r\n"~ "Content-Type: text/plain; " ~ c ~ "=foo\r\n" ~ "\r\n"); }); auto http = HTTP(testServer.addr); http.perform(); assert(http.p.charset == "foo"); // Bugzilla 16736 double val; CurlCode code; code = http.getTiming(CurlInfo.total_time, val); assert(code == CurlError.ok); code = http.getTiming(CurlInfo.namelookup_time, val); assert(code == CurlError.ok); code = http.getTiming(CurlInfo.connect_time, val); assert(code == CurlError.ok); code = http.getTiming(CurlInfo.pretransfer_time, val); assert(code == CurlError.ok); code = http.getTiming(CurlInfo.starttransfer_time, val); assert(code == CurlError.ok); code = http.getTiming(CurlInfo.redirect_time, val); assert(code == CurlError.ok); code = http.getTiming(CurlInfo.appconnect_time, val); assert(code == CurlError.ok); }} } /** FTP client functionality. See_Also: $(HTTP tools.ietf.org/html/rfc959, RFC959) */ struct FTP { mixin Protocol; import std.typecons : RefCounted; import etc.c.curl : CurlError, CurlInfo, curl_off_t, curl_slist; private struct Impl { ~this() { if (commands !is null) Curl.curl.slist_free_all(commands); if (curl.handle !is null) // work around RefCounted/emplace bug curl.shutdown(); } curl_slist* commands; Curl curl; string encoding; } private RefCounted!Impl p; /** FTP access to the specified url. */ static FTP opCall(const(char)[] url) { FTP ftp; ftp.initialize(); ftp.url = url; return ftp; } /// static FTP opCall() { FTP ftp; ftp.initialize(); return ftp; } /// FTP dup() { FTP copy = FTP(); copy.initialize(); copy.p.encoding = p.encoding; copy.p.curl = p.curl.dup(); curl_slist* cur = p.commands; curl_slist* newlist = null; while (cur) { newlist = Curl.curl.slist_append(newlist, cur.data); cur = cur.next; } copy.p.commands = newlist; copy.p.curl.set(CurlOption.postquote, copy.p.commands); copy.dataTimeout = _defaultDataTimeout; return copy; } private void initialize() { p.curl.initialize(); p.encoding = "ISO-8859-1"; dataTimeout = _defaultDataTimeout; } /** Performs the ftp request as it has been configured. After a FTP client has been setup and possibly assigned callbacks the $(D perform()) method will start performing the actual communication with the server. Params: throwOnError = whether to throw an exception or return a CurlCode on error */ CurlCode perform(ThrowOnError throwOnError = Yes.throwOnError) { return p.curl.perform(throwOnError); } /// The URL to specify the location of the resource. @property void url(const(char)[] url) { import std.algorithm.searching : startsWith; import std.uni : toLower; if (!startsWith(url.toLower(), "ftp://", "ftps://")) url = "ftp://" ~ url; p.curl.set(CurlOption.url, url); } // This is a workaround for mixed in content not having its // docs mixed in. version (StdDdoc) { static import etc.c.curl; /// Value to return from $(D onSend)/$(D onReceive) delegates in order to /// pause a request alias requestPause = CurlReadFunc.pause; /// Value to return from onSend delegate in order to abort a request alias requestAbort = CurlReadFunc.abort; /** True if the instance is stopped. A stopped instance is not usable. */ @property bool isStopped(); /// Stop and invalidate this instance. void shutdown(); /** Set verbose. This will print request information to stderr. */ @property void verbose(bool on); // Connection settings /// Set timeout for activity on connection. @property void dataTimeout(Duration d); /** Set maximum time an operation is allowed to take. This includes dns resolution, connecting, data transfer, etc. */ @property void operationTimeout(Duration d); /// Set timeout for connecting. @property void connectTimeout(Duration d); // Network settings /** Proxy * See: $(HTTP curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTPROXY, _proxy) */ @property void proxy(const(char)[] host); /** Proxy port * See: $(HTTP curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTPROXYPORT, _proxy_port) */ @property void proxyPort(ushort port); /// Type of proxy alias CurlProxy = etc.c.curl.CurlProxy; /** Proxy type * See: $(HTTP curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTPROXY, _proxy_type) */ @property void proxyType(CurlProxy type); /// DNS lookup timeout. @property void dnsTimeout(Duration d); /** * The network interface to use in form of the the IP of the interface. * * Example: * ---- * theprotocol.netInterface = "192.168.1.32"; * theprotocol.netInterface = [ 192, 168, 1, 32 ]; * ---- * * See: $(REF InternetAddress, std,socket) */ @property void netInterface(const(char)[] i); /// ditto @property void netInterface(const(ubyte)[4] i); /// ditto @property void netInterface(InternetAddress i); /** Set the local outgoing port to use. Params: port = the first outgoing port number to try and use */ @property void localPort(ushort port); /** Set the local outgoing port range to use. This can be used together with the localPort property. Params: range = if the first port is occupied then try this many port number forwards */ @property void localPortRange(ushort range); /** Set the tcp no-delay socket option on or off. See: $(HTTP curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTTCPNODELAY, nodelay) */ @property void tcpNoDelay(bool on); // Authentication settings /** Set the user name, password and optionally domain for authentication purposes. Some protocols may need authentication in some cases. Use this function to provide credentials. Params: username = the username password = the password domain = used for NTLM authentication only and is set to the NTLM domain name */ void setAuthentication(const(char)[] username, const(char)[] password, const(char)[] domain = ""); /** Set the user name and password for proxy authentication. Params: username = the username password = the password */ void setProxyAuthentication(const(char)[] username, const(char)[] password); /** * The event handler that gets called when data is needed for sending. The * length of the $(D void[]) specifies the maximum number of bytes that can * be sent. * * Returns: * The callback returns the number of elements in the buffer that have been * filled and are ready to send. * The special value $(D .abortRequest) can be returned in order to abort the * current request. * The special value $(D .pauseRequest) can be returned in order to pause the * current request. * */ @property void onSend(size_t delegate(void[]) callback); /** * The event handler that receives incoming data. Be sure to copy the * incoming ubyte[] since it is not guaranteed to be valid after the * callback returns. * * Returns: * The callback returns the incoming bytes read. If not the entire array is * the request will abort. * The special value .pauseRequest can be returned in order to pause the * current request. * */ @property void onReceive(size_t delegate(ubyte[]) callback); /** * The event handler that gets called to inform of upload/download progress. * * Callback_parameters: * $(CALLBACK_PARAMS) * * Callback_returns: * Return 0 from the callback to signal success, return non-zero to * abort transfer. */ @property void onProgress(int delegate(size_t dlTotal, size_t dlNow, size_t ulTotal, size_t ulNow) callback); } /** Clear all commands send to ftp server. */ void clearCommands() { if (p.commands !is null) Curl.curl.slist_free_all(p.commands); p.commands = null; p.curl.clear(CurlOption.postquote); } /** Add a command to send to ftp server. * * There is no remove command functionality. Do a $(LREF clearCommands) and * set the needed commands instead. * * Example: * --- * import std.net.curl; * auto client = FTP(); * client.addCommand("RNFR my_file.txt"); * client.addCommand("RNTO my_renamed_file.txt"); * upload("my_file.txt", "ftp.digitalmars.com", client); * --- */ void addCommand(const(char)[] command) { import std.internal.cstring : tempCString; p.commands = Curl.curl.slist_append(p.commands, command.tempCString().buffPtr); p.curl.set(CurlOption.postquote, p.commands); } /// Connection encoding. Defaults to ISO-8859-1. @property void encoding(string name) { p.encoding = name; } /// ditto @property string encoding() { return p.encoding; } /** The content length in bytes of the ftp data. */ @property void contentLength(ulong len) { import std.conv : to; p.curl.set(CurlOption.infilesize_large, to!curl_off_t(len)); } /** * Get various timings defined in $(REF CurlInfo, etc, c, curl). * The value is usable only if the return value is equal to $(D etc.c.curl.CurlError.ok). * * Params: * timing = one of the timings defined in $(REF CurlInfo, etc, c, curl). * The values are: * $(D etc.c.curl.CurlInfo.namelookup_time), * $(D etc.c.curl.CurlInfo.connect_time), * $(D etc.c.curl.CurlInfo.pretransfer_time), * $(D etc.c.curl.CurlInfo.starttransfer_time), * $(D etc.c.curl.CurlInfo.redirect_time), * $(D etc.c.curl.CurlInfo.appconnect_time), * $(D etc.c.curl.CurlInfo.total_time). * val = the actual value of the inquired timing. * * Returns: * The return code of the operation. The value stored in val * should be used only if the return value is $(D etc.c.curl.CurlInfo.ok). * * Example: * --- * import std.net.curl; * import etc.c.curl : CurlError, CurlInfo; * * auto client = FTP(); * client.addCommand("RNFR my_file.txt"); * client.addCommand("RNTO my_renamed_file.txt"); * upload("my_file.txt", "ftp.digitalmars.com", client); * * double val; * CurlCode code; * * code = client.getTiming(CurlInfo.namelookup_time, val); * assert(code == CurlError.ok); * --- */ CurlCode getTiming(CurlInfo timing, ref double val) { return p.curl.getTiming(timing, val); } @system unittest { auto client = FTP(); double val; CurlCode code; code = client.getTiming(CurlInfo.total_time, val); assert(code == CurlError.ok); code = client.getTiming(CurlInfo.namelookup_time, val); assert(code == CurlError.ok); code = client.getTiming(CurlInfo.connect_time, val); assert(code == CurlError.ok); code = client.getTiming(CurlInfo.pretransfer_time, val); assert(code == CurlError.ok); code = client.getTiming(CurlInfo.starttransfer_time, val); assert(code == CurlError.ok); code = client.getTiming(CurlInfo.redirect_time, val); assert(code == CurlError.ok); code = client.getTiming(CurlInfo.appconnect_time, val); assert(code == CurlError.ok); } } /** * Basic SMTP protocol support. * * Example: * --- * import std.net.curl; * * // Send an email with SMTPS * auto smtp = SMTP("smtps://smtp.gmail.com"); * smtp.setAuthentication("from.addr@gmail.com", "password"); * smtp.mailTo = ["<to.addr@gmail.com>"]; * smtp.mailFrom = "<from.addr@gmail.com>"; * smtp.message = "Example Message"; * smtp.perform(); * --- * * See_Also: $(HTTP www.ietf.org/rfc/rfc2821.txt, RFC2821) */ struct SMTP { mixin Protocol; import std.typecons : RefCounted; import etc.c.curl : CurlUseSSL, curl_slist; private struct Impl { ~this() { if (curl.handle !is null) // work around RefCounted/emplace bug curl.shutdown(); } Curl curl; @property void message(string msg) { import std.algorithm.comparison : min; auto _message = msg; /** This delegate reads the message text and copies it. */ curl.onSend = delegate size_t(void[] data) { if (!msg.length) return 0; size_t to_copy = min(data.length, _message.length); data[0 .. to_copy] = (cast(void[])_message)[0 .. to_copy]; _message = _message[to_copy..$]; return to_copy; }; } } private RefCounted!Impl p; /** Sets to the URL of the SMTP server. */ static SMTP opCall(const(char)[] url) { SMTP smtp; smtp.initialize(); smtp.url = url; return smtp; } /// static SMTP opCall() { SMTP smtp; smtp.initialize(); return smtp; } /+ TODO: The other structs have this function. SMTP dup() { SMTP copy = SMTP(); copy.initialize(); copy.p.encoding = p.encoding; copy.p.curl = p.curl.dup(); curl_slist* cur = p.commands; curl_slist* newlist = null; while (cur) { newlist = Curl.curl.slist_append(newlist, cur.data); cur = cur.next; } copy.p.commands = newlist; copy.p.curl.set(CurlOption.postquote, copy.p.commands); copy.dataTimeout = _defaultDataTimeout; return copy; } +/ /** Performs the request as configured. Params: throwOnError = whether to throw an exception or return a CurlCode on error */ CurlCode perform(ThrowOnError throwOnError = Yes.throwOnError) { return p.curl.perform(throwOnError); } /// The URL to specify the location of the resource. @property void url(const(char)[] url) { import std.algorithm.searching : startsWith; import std.exception : enforce; import std.uni : toLower; auto lowered = url.toLower(); if (lowered.startsWith("smtps://")) { p.curl.set(CurlOption.use_ssl, CurlUseSSL.all); } else { enforce!CurlException(lowered.startsWith("smtp://"), "The url must be for the smtp protocol."); } p.curl.set(CurlOption.url, url); } private void initialize() { p.curl.initialize(); p.curl.set(CurlOption.upload, 1L); dataTimeout = _defaultDataTimeout; verifyPeer = true; verifyHost = true; } // This is a workaround for mixed in content not having its // docs mixed in. version (StdDdoc) { static import etc.c.curl; /// Value to return from $(D onSend)/$(D onReceive) delegates in order to /// pause a request alias requestPause = CurlReadFunc.pause; /// Value to return from onSend delegate in order to abort a request alias requestAbort = CurlReadFunc.abort; /** True if the instance is stopped. A stopped instance is not usable. */ @property bool isStopped(); /// Stop and invalidate this instance. void shutdown(); /** Set verbose. This will print request information to stderr. */ @property void verbose(bool on); // Connection settings /// Set timeout for activity on connection. @property void dataTimeout(Duration d); /** Set maximum time an operation is allowed to take. This includes dns resolution, connecting, data transfer, etc. */ @property void operationTimeout(Duration d); /// Set timeout for connecting. @property void connectTimeout(Duration d); // Network settings /** Proxy * See: $(HTTP curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTPROXY, _proxy) */ @property void proxy(const(char)[] host); /** Proxy port * See: $(HTTP curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTPROXYPORT, _proxy_port) */ @property void proxyPort(ushort port); /// Type of proxy alias CurlProxy = etc.c.curl.CurlProxy; /** Proxy type * See: $(HTTP curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTPROXY, _proxy_type) */ @property void proxyType(CurlProxy type); /// DNS lookup timeout. @property void dnsTimeout(Duration d); /** * The network interface to use in form of the the IP of the interface. * * Example: * ---- * theprotocol.netInterface = "192.168.1.32"; * theprotocol.netInterface = [ 192, 168, 1, 32 ]; * ---- * * See: $(REF InternetAddress, std,socket) */ @property void netInterface(const(char)[] i); /// ditto @property void netInterface(const(ubyte)[4] i); /// ditto @property void netInterface(InternetAddress i); /** Set the local outgoing port to use. Params: port = the first outgoing port number to try and use */ @property void localPort(ushort port); /** Set the local outgoing port range to use. This can be used together with the localPort property. Params: range = if the first port is occupied then try this many port number forwards */ @property void localPortRange(ushort range); /** Set the tcp no-delay socket option on or off. See: $(HTTP curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTTCPNODELAY, nodelay) */ @property void tcpNoDelay(bool on); // Authentication settings /** Set the user name, password and optionally domain for authentication purposes. Some protocols may need authentication in some cases. Use this function to provide credentials. Params: username = the username password = the password domain = used for NTLM authentication only and is set to the NTLM domain name */ void setAuthentication(const(char)[] username, const(char)[] password, const(char)[] domain = ""); /** Set the user name and password for proxy authentication. Params: username = the username password = the password */ void setProxyAuthentication(const(char)[] username, const(char)[] password); /** * The event handler that gets called when data is needed for sending. The * length of the $(D void[]) specifies the maximum number of bytes that can * be sent. * * Returns: * The callback returns the number of elements in the buffer that have been * filled and are ready to send. * The special value $(D .abortRequest) can be returned in order to abort the * current request. * The special value $(D .pauseRequest) can be returned in order to pause the * current request. */ @property void onSend(size_t delegate(void[]) callback); /** * The event handler that receives incoming data. Be sure to copy the * incoming ubyte[] since it is not guaranteed to be valid after the * callback returns. * * Returns: * The callback returns the incoming bytes read. If not the entire array is * the request will abort. * The special value .pauseRequest can be returned in order to pause the * current request. */ @property void onReceive(size_t delegate(ubyte[]) callback); /** * The event handler that gets called to inform of upload/download progress. * * Callback_parameters: * $(CALLBACK_PARAMS) * * Callback_returns: * Return 0 from the callback to signal success, return non-zero to * abort transfer. */ @property void onProgress(int delegate(size_t dlTotal, size_t dlNow, size_t ulTotal, size_t ulNow) callback); } /** Setter for the sender's email address. */ @property void mailFrom()(const(char)[] sender) { assert(!sender.empty, "Sender must not be empty"); p.curl.set(CurlOption.mail_from, sender); } /** Setter for the recipient email addresses. */ void mailTo()(const(char)[][] recipients...) { import std.internal.cstring : tempCString; assert(!recipients.empty, "Recipient must not be empty"); curl_slist* recipients_list = null; foreach (recipient; recipients) { recipients_list = Curl.curl.slist_append(recipients_list, recipient.tempCString().buffPtr); } p.curl.set(CurlOption.mail_rcpt, recipients_list); } /** Sets the message body text. */ @property void message(string msg) { p.message = msg; } } @system unittest { import std.net.curl; // Send an email with SMTPS auto smtp = SMTP("smtps://smtp.gmail.com"); smtp.setAuthentication("from.addr@gmail.com", "password"); smtp.mailTo = ["<to.addr@gmail.com>"]; smtp.mailFrom = "<from.addr@gmail.com>"; smtp.message = "Example Message"; //smtp.perform(); } /++ Exception thrown on errors in std.net.curl functions. +/ class CurlException : Exception { /++ Params: msg = The message for the exception. file = The file where the exception occurred. line = The line number where the exception occurred. next = The previous exception in the chain of exceptions, if any. +/ @safe pure nothrow this(string msg, string file = __FILE__, size_t line = __LINE__, Throwable next = null) { super(msg, file, line, next); } } /++ Exception thrown on timeout errors in std.net.curl functions. +/ class CurlTimeoutException : CurlException { /++ Params: msg = The message for the exception. file = The file where the exception occurred. line = The line number where the exception occurred. next = The previous exception in the chain of exceptions, if any. +/ @safe pure nothrow this(string msg, string file = __FILE__, size_t line = __LINE__, Throwable next = null) { super(msg, file, line, next); } } /++ Exception thrown on HTTP request failures, e.g. 404 Not Found. +/ class HTTPStatusException : CurlException { /++ Params: status = The HTTP status code. msg = The message for the exception. file = The file where the exception occurred. line = The line number where the exception occurred. next = The previous exception in the chain of exceptions, if any. +/ @safe pure nothrow this(int status, string msg, string file = __FILE__, size_t line = __LINE__, Throwable next = null) { super(msg, file, line, next); this.status = status; } immutable int status; /// The HTTP status code } /// Equal to $(REF CURLcode, etc,c,curl) alias CurlCode = CURLcode; /// Flag to specify whether or not an exception is thrown on error. alias ThrowOnError = Flag!"throwOnError"; private struct CurlAPI { import etc.c.curl : CurlGlobal; static struct API { import etc.c.curl : curl_version_info, curl_version_info_data, CURL, CURLcode, CURLINFO, CURLoption, CURLversion, curl_slist; extern(C): import core.stdc.config : c_long; CURLcode function(c_long flags) global_init; void function() global_cleanup; curl_version_info_data * function(CURLversion) version_info; CURL* function() easy_init; CURLcode function(CURL *curl, CURLoption option,...) easy_setopt; CURLcode function(CURL *curl) easy_perform; CURLcode function(CURL *curl, CURLINFO info,...) easy_getinfo; CURL* function(CURL *curl) easy_duphandle; char* function(CURLcode) easy_strerror; CURLcode function(CURL *handle, int bitmask) easy_pause; void function(CURL *curl) easy_cleanup; curl_slist* function(curl_slist *, char *) slist_append; void function(curl_slist *) slist_free_all; } __gshared API _api; __gshared void* _handle; static ref API instance() @property { import std.concurrency : initOnce; initOnce!_handle(loadAPI()); return _api; } static void* loadAPI() { import std.exception : enforce; version (Posix) { import core.sys.posix.dlfcn : dlsym, dlopen, dlclose, RTLD_LAZY; alias loadSym = dlsym; } else version (Windows) { import core.sys.windows.windows : GetProcAddress, GetModuleHandleA, LoadLibraryA; alias loadSym = GetProcAddress; } else static assert(0, "unimplemented"); void* handle; version (Posix) handle = dlopen(null, RTLD_LAZY); else version (Windows) handle = GetModuleHandleA(null); assert(handle !is null); // try to load curl from the executable to allow static linking if (loadSym(handle, "curl_global_init") is null) { import std.format : format; version (Posix) dlclose(handle); version (OSX) static immutable names = ["libcurl.4.dylib"]; else version (Posix) { static immutable names = ["libcurl.so", "libcurl.so.4", "libcurl-gnutls.so.4", "libcurl-nss.so.4", "libcurl.so.3"]; } else version (Windows) static immutable names = ["libcurl.dll", "curl.dll"]; foreach (name; names) { version (Posix) handle = dlopen(name.ptr, RTLD_LAZY); else version (Windows) handle = LoadLibraryA(name.ptr); if (handle !is null) break; } enforce!CurlException(handle !is null, "Failed to load curl, tried %(%s, %).".format(names)); } foreach (i, FP; typeof(API.tupleof)) { enum name = __traits(identifier, _api.tupleof[i]); auto p = enforce!CurlException(loadSym(handle, "curl_"~name), "Couldn't load curl_"~name~" from libcurl."); _api.tupleof[i] = cast(FP) p; } enforce!CurlException(!_api.global_init(CurlGlobal.all), "Failed to initialize libcurl"); static extern(C) void cleanup() { if (_handle is null) return; _api.global_cleanup(); version (Posix) { import core.sys.posix.dlfcn : dlclose; dlclose(_handle); } else version (Windows) { import core.sys.windows.windows : FreeLibrary; FreeLibrary(_handle); } else static assert(0, "unimplemented"); _api = API.init; _handle = null; } import core.stdc.stdlib : atexit; atexit(&cleanup); return handle; } } /** Wrapper to provide a better interface to libcurl than using the plain C API. It is recommended to use the $(D HTTP)/$(D FTP) etc. structs instead unless raw access to libcurl is needed. Warning: This struct uses interior pointers for callbacks. Only allocate it on the stack if you never move or copy it. This also means passing by reference when passing Curl to other functions. Otherwise always allocate on the heap. */ struct Curl { import etc.c.curl : CURL, CurlError, CurlPause, CurlSeek, CurlSeekPos, curl_socket_t, CurlSockType, CurlReadFunc, CurlInfo, curlsocktype, curl_off_t, LIBCURL_VERSION_MAJOR, LIBCURL_VERSION_MINOR, LIBCURL_VERSION_PATCH; alias OutData = void[]; alias InData = ubyte[]; private bool _stopped; private static auto ref curl() @property { return CurlAPI.instance; } // A handle should not be used by two threads simultaneously private CURL* handle; // May also return $(D CURL_READFUNC_ABORT) or $(D CURL_READFUNC_PAUSE) private size_t delegate(OutData) _onSend; private size_t delegate(InData) _onReceive; private void delegate(in char[]) _onReceiveHeader; private CurlSeek delegate(long,CurlSeekPos) _onSeek; private int delegate(curl_socket_t,CurlSockType) _onSocketOption; private int delegate(size_t dltotal, size_t dlnow, size_t ultotal, size_t ulnow) _onProgress; alias requestPause = CurlReadFunc.pause; alias requestAbort = CurlReadFunc.abort; /** Initialize the instance by creating a working curl handle. */ void initialize() { import std.exception : enforce; enforce!CurlException(!handle, "Curl instance already initialized"); handle = curl.easy_init(); enforce!CurlException(handle, "Curl instance couldn't be initialized"); _stopped = false; set(CurlOption.nosignal, 1); } /// @property bool stopped() const { return _stopped; } /** Duplicate this handle. The new handle will have all options set as the one it was duplicated from. An exception to this is that all options that cannot be shared across threads are reset thereby making it safe to use the duplicate in a new thread. */ Curl dup() { import std.meta : AliasSeq; Curl copy; copy.handle = curl.easy_duphandle(handle); copy._stopped = false; with (CurlOption) { auto tt = AliasSeq!(file, writefunction, writeheader, headerfunction, infile, readfunction, ioctldata, ioctlfunction, seekdata, seekfunction, sockoptdata, sockoptfunction, opensocketdata, opensocketfunction, progressdata, progressfunction, debugdata, debugfunction, interleavedata, interleavefunction, chunk_data, chunk_bgn_function, chunk_end_function, fnmatch_data, fnmatch_function, cookiejar, postfields); foreach (option; tt) copy.clear(option); } // The options are only supported by libcurl when it has been built // against certain versions of OpenSSL - if your libcurl uses an old // OpenSSL, or uses an entirely different SSL engine, attempting to // clear these normally will raise an exception copy.clearIfSupported(CurlOption.ssl_ctx_function); copy.clearIfSupported(CurlOption.ssh_keydata); // Enable for curl version > 7.21.7 static if (LIBCURL_VERSION_MAJOR >= 7 && LIBCURL_VERSION_MINOR >= 21 && LIBCURL_VERSION_PATCH >= 7) { copy.clear(CurlOption.closesocketdata); copy.clear(CurlOption.closesocketfunction); } copy.set(CurlOption.nosignal, 1); // copy.clear(CurlOption.ssl_ctx_data); Let ssl function be shared // copy.clear(CurlOption.ssh_keyfunction); Let key function be shared /* Allow sharing of conv functions copy.clear(CurlOption.conv_to_network_function); copy.clear(CurlOption.conv_from_network_function); copy.clear(CurlOption.conv_from_utf8_function); */ return copy; } private void _check(CurlCode code) { import std.exception : enforce; enforce!CurlTimeoutException(code != CurlError.operation_timedout, errorString(code)); enforce!CurlException(code == CurlError.ok, errorString(code)); } private string errorString(CurlCode code) { import core.stdc.string : strlen; import std.format : format; auto msgZ = curl.easy_strerror(code); // doing the following (instead of just using std.conv.to!string) avoids 1 allocation return format("%s on handle %s", msgZ[0 .. strlen(msgZ)], handle); } private void throwOnStopped(string message = null) { import std.exception : enforce; auto def = "Curl instance called after being cleaned up"; enforce!CurlException(!stopped, message == null ? def : message); } /** Stop and invalidate this curl instance. Warning: Do not call this from inside a callback handler e.g. $(D onReceive). */ void shutdown() { throwOnStopped(); _stopped = true; curl.easy_cleanup(this.handle); this.handle = null; } /** Pausing and continuing transfers. */ void pause(bool sendingPaused, bool receivingPaused) { throwOnStopped(); _check(curl.easy_pause(this.handle, (sendingPaused ? CurlPause.send_cont : CurlPause.send) | (receivingPaused ? CurlPause.recv_cont : CurlPause.recv))); } /** Set a string curl option. Params: option = A $(REF CurlOption, etc,c,curl) as found in the curl documentation value = The string */ void set(CurlOption option, const(char)[] value) { import std.internal.cstring : tempCString; throwOnStopped(); _check(curl.easy_setopt(this.handle, option, value.tempCString().buffPtr)); } /** Set a long curl option. Params: option = A $(REF CurlOption, etc,c,curl) as found in the curl documentation value = The long */ void set(CurlOption option, long value) { throwOnStopped(); _check(curl.easy_setopt(this.handle, option, value)); } /** Set a void* curl option. Params: option = A $(REF CurlOption, etc,c,curl) as found in the curl documentation value = The pointer */ void set(CurlOption option, void* value) { throwOnStopped(); _check(curl.easy_setopt(this.handle, option, value)); } /** Clear a pointer option. Params: option = A $(REF CurlOption, etc,c,curl) as found in the curl documentation */ void clear(CurlOption option) { throwOnStopped(); _check(curl.easy_setopt(this.handle, option, null)); } /** Clear a pointer option. Does not raise an exception if the underlying libcurl does not support the option. Use sparingly. Params: option = A $(REF CurlOption, etc,c,curl) as found in the curl documentation */ void clearIfSupported(CurlOption option) { throwOnStopped(); auto rval = curl.easy_setopt(this.handle, option, null); if (rval != CurlError.unknown_option && rval != CurlError.not_built_in) _check(rval); } /** perform the curl request by doing the HTTP,FTP etc. as it has been setup beforehand. Params: throwOnError = whether to throw an exception or return a CurlCode on error */ CurlCode perform(ThrowOnError throwOnError = Yes.throwOnError) { throwOnStopped(); CurlCode code = curl.easy_perform(this.handle); if (throwOnError) _check(code); return code; } /** Get the various timings like name lookup time, total time, connect time etc. The timed category is passed through the timing parameter while the timing value is stored at val. The value is usable only if res is equal to $(D etc.c.curl.CurlError.ok). */ CurlCode getTiming(CurlInfo timing, ref double val) { CurlCode code; code = curl.easy_getinfo(handle, timing, &val); return code; } /** * The event handler that receives incoming data. * * Params: * callback = the callback that receives the $(D ubyte[]) data. * Be sure to copy the incoming data and not store * a slice. * * Returns: * The callback returns the incoming bytes read. If not the entire array is * the request will abort. * The special value HTTP.pauseRequest can be returned in order to pause the * current request. * * Example: * ---- * import std.net.curl, std.stdio; * Curl curl; * curl.initialize(); * curl.set(CurlOption.url, "http://dlang.org"); * curl.onReceive = (ubyte[] data) { writeln("Got data", to!(const(char)[])(data)); return data.length;}; * curl.perform(); * ---- */ @property void onReceive(size_t delegate(InData) callback) { _onReceive = (InData id) { throwOnStopped("Receive callback called on cleaned up Curl instance"); return callback(id); }; set(CurlOption.file, cast(void*) &this); set(CurlOption.writefunction, cast(void*) &Curl._receiveCallback); } /** * The event handler that receives incoming headers for protocols * that uses headers. * * Params: * callback = the callback that receives the header string. * Make sure the callback copies the incoming params if * it needs to store it because they are references into * the backend and may very likely change. * * Example: * ---- * import std.net.curl, std.stdio; * Curl curl; * curl.initialize(); * curl.set(CurlOption.url, "http://dlang.org"); * curl.onReceiveHeader = (in char[] header) { writeln(header); }; * curl.perform(); * ---- */ @property void onReceiveHeader(void delegate(in char[]) callback) { _onReceiveHeader = (in char[] od) { throwOnStopped("Receive header callback called on "~ "cleaned up Curl instance"); callback(od); }; set(CurlOption.writeheader, cast(void*) &this); set(CurlOption.headerfunction, cast(void*) &Curl._receiveHeaderCallback); } /** * The event handler that gets called when data is needed for sending. * * Params: * callback = the callback that has a $(D void[]) buffer to be filled * * Returns: * The callback returns the number of elements in the buffer that have been * filled and are ready to send. * The special value $(D Curl.abortRequest) can be returned in * order to abort the current request. * The special value $(D Curl.pauseRequest) can be returned in order to * pause the current request. * * Example: * ---- * import std.net.curl; * Curl curl; * curl.initialize(); * curl.set(CurlOption.url, "http://dlang.org"); * * string msg = "Hello world"; * curl.onSend = (void[] data) * { * auto m = cast(void[]) msg; * size_t length = m.length > data.length ? data.length : m.length; * if (length == 0) return 0; * data[0 .. length] = m[0 .. length]; * msg = msg[length..$]; * return length; * }; * curl.perform(); * ---- */ @property void onSend(size_t delegate(OutData) callback) { _onSend = (OutData od) { throwOnStopped("Send callback called on cleaned up Curl instance"); return callback(od); }; set(CurlOption.infile, cast(void*) &this); set(CurlOption.readfunction, cast(void*) &Curl._sendCallback); } /** * The event handler that gets called when the curl backend needs to seek * the data to be sent. * * Params: * callback = the callback that receives a seek offset and a seek position * $(REF CurlSeekPos, etc,c,curl) * * Returns: * The callback returns the success state of the seeking * $(REF CurlSeek, etc,c,curl) * * Example: * ---- * import std.net.curl; * Curl curl; * curl.initialize(); * curl.set(CurlOption.url, "http://dlang.org"); * curl.onSeek = (long p, CurlSeekPos sp) * { * return CurlSeek.cantseek; * }; * curl.perform(); * ---- */ @property void onSeek(CurlSeek delegate(long, CurlSeekPos) callback) { _onSeek = (long ofs, CurlSeekPos sp) { throwOnStopped("Seek callback called on cleaned up Curl instance"); return callback(ofs, sp); }; set(CurlOption.seekdata, cast(void*) &this); set(CurlOption.seekfunction, cast(void*) &Curl._seekCallback); } /** * The event handler that gets called when the net socket has been created * but a $(D connect()) call has not yet been done. This makes it possible to set * misc. socket options. * * Params: * callback = the callback that receives the socket and socket type * $(REF CurlSockType, etc,c,curl) * * Returns: * Return 0 from the callback to signal success, return 1 to signal error * and make curl close the socket * * Example: * ---- * import std.net.curl; * Curl curl; * curl.initialize(); * curl.set(CurlOption.url, "http://dlang.org"); * curl.onSocketOption = delegate int(curl_socket_t s, CurlSockType t) { /+ do stuff +/ }; * curl.perform(); * ---- */ @property void onSocketOption(int delegate(curl_socket_t, CurlSockType) callback) { _onSocketOption = (curl_socket_t sock, CurlSockType st) { throwOnStopped("Socket option callback called on "~ "cleaned up Curl instance"); return callback(sock, st); }; set(CurlOption.sockoptdata, cast(void*) &this); set(CurlOption.sockoptfunction, cast(void*) &Curl._socketOptionCallback); } /** * The event handler that gets called to inform of upload/download progress. * * Params: * callback = the callback that receives the (total bytes to download, * currently downloaded bytes, total bytes to upload, currently uploaded * bytes). * * Returns: * Return 0 from the callback to signal success, return non-zero to abort * transfer * * Example: * ---- * import std.net.curl; * Curl curl; * curl.initialize(); * curl.set(CurlOption.url, "http://dlang.org"); * curl.onProgress = delegate int(size_t dltotal, size_t dlnow, size_t ultotal, size_t uln) * { * writeln("Progress: downloaded bytes ", dlnow, " of ", dltotal); * writeln("Progress: uploaded bytes ", ulnow, " of ", ultotal); * curl.perform(); * }; * ---- */ @property void onProgress(int delegate(size_t dlTotal, size_t dlNow, size_t ulTotal, size_t ulNow) callback) { _onProgress = (size_t dlt, size_t dln, size_t ult, size_t uln) { throwOnStopped("Progress callback called on cleaned "~ "up Curl instance"); return callback(dlt, dln, ult, uln); }; set(CurlOption.noprogress, 0); set(CurlOption.progressdata, cast(void*) &this); set(CurlOption.progressfunction, cast(void*) &Curl._progressCallback); } // Internal C callbacks to register with libcurl extern (C) private static size_t _receiveCallback(const char* str, size_t size, size_t nmemb, void* ptr) { auto b = cast(Curl*) ptr; if (b._onReceive != null) return b._onReceive(cast(InData)(str[0 .. size*nmemb])); return size*nmemb; } extern (C) private static size_t _receiveHeaderCallback(const char* str, size_t size, size_t nmemb, void* ptr) { import std.string : chomp; auto b = cast(Curl*) ptr; auto s = str[0 .. size*nmemb].chomp(); if (b._onReceiveHeader != null) b._onReceiveHeader(s); return size*nmemb; } extern (C) private static size_t _sendCallback(char *str, size_t size, size_t nmemb, void *ptr) { Curl* b = cast(Curl*) ptr; auto a = cast(void[]) str[0 .. size*nmemb]; if (b._onSend == null) return 0; return b._onSend(a); } extern (C) private static int _seekCallback(void *ptr, curl_off_t offset, int origin) { auto b = cast(Curl*) ptr; if (b._onSeek == null) return CurlSeek.cantseek; // origin: CurlSeekPos.set/current/end // return: CurlSeek.ok/fail/cantseek return b._onSeek(cast(long) offset, cast(CurlSeekPos) origin); } extern (C) private static int _socketOptionCallback(void *ptr, curl_socket_t curlfd, curlsocktype purpose) { auto b = cast(Curl*) ptr; if (b._onSocketOption == null) return 0; // return: 0 ok, 1 fail return b._onSocketOption(curlfd, cast(CurlSockType) purpose); } extern (C) private static int _progressCallback(void *ptr, double dltotal, double dlnow, double ultotal, double ulnow) { auto b = cast(Curl*) ptr; if (b._onProgress == null) return 0; // return: 0 ok, 1 fail return b._onProgress(cast(size_t) dltotal, cast(size_t) dlnow, cast(size_t) ultotal, cast(size_t) ulnow); } } // Internal messages send between threads. // The data is wrapped in this struct in order to ensure that // other std.concurrency.receive calls does not pick up our messages // by accident. private struct CurlMessage(T) { public T data; } private static CurlMessage!T curlMessage(T)(T data) { return CurlMessage!T(data); } // Pool of to be used for reusing buffers private struct Pool(Data) { private struct Entry { Data data; Entry* next; } private Entry* root; private Entry* freeList; @safe @property bool empty() { return root == null; } @safe nothrow void push(Data d) { if (freeList == null) { // Allocate new Entry since there is no one // available in the freeList freeList = new Entry; } freeList.data = d; Entry* oldroot = root; root = freeList; freeList = freeList.next; root.next = oldroot; } @safe Data pop() { import std.exception : enforce; enforce!Exception(root != null, "pop() called on empty pool"); auto d = root.data; auto n = root.next; root.next = freeList; freeList = root; root = n; return d; } } // Lazily-instantiated namespace to avoid importing std.concurrency until needed. private struct _async() { static: // @@@@BUG 15831@@@@ // this should be inside byLineAsync // Range that reads one chunk at a time asynchronously. private struct ChunkInputRange { import std.concurrency : Tid, send; private ubyte[] chunk; mixin WorkerThreadProtocol!(ubyte, chunk); private Tid workerTid; private State running; private this(Tid tid, size_t transmitBuffers, size_t chunkSize) { workerTid = tid; state = State.needUnits; // Send buffers to other thread for it to use. Since no mechanism is in // place for moving ownership a cast to shared is done here and a cast // back to non-shared in the receiving end. foreach (i ; 0 .. transmitBuffers) { ubyte[] arr = new ubyte[](chunkSize); workerTid.send(cast(immutable(ubyte[]))arr); } } } // @@@@BUG 15831@@@@ // this should be inside byLineAsync // Range that reads one line at a time asynchronously. private static struct LineInputRange(Char) { private Char[] line; mixin WorkerThreadProtocol!(Char, line); private Tid workerTid; private State running; private this(Tid tid, size_t transmitBuffers, size_t bufferSize) { import std.concurrency : send; workerTid = tid; state = State.needUnits; // Send buffers to other thread for it to use. Since no mechanism is in // place for moving ownership a cast to shared is done here and casted // back to non-shared in the receiving end. foreach (i ; 0 .. transmitBuffers) { auto arr = new Char[](bufferSize); workerTid.send(cast(immutable(Char[]))arr); } } } import std.concurrency : Tid; // Shared function for reading incoming chunks of data and // sending the to a parent thread private size_t receiveChunks(ubyte[] data, ref ubyte[] outdata, Pool!(ubyte[]) freeBuffers, ref ubyte[] buffer, Tid fromTid, ref bool aborted) { import std.concurrency : receive, send, thisTid; immutable datalen = data.length; // Copy data to fill active buffer while (!data.empty) { // Make sure a buffer is present while ( outdata.empty && freeBuffers.empty) { // Active buffer is invalid and there are no // available buffers in the pool. Wait for buffers // to return from main thread in order to reuse // them. receive((immutable(ubyte)[] buf) { buffer = cast(ubyte[]) buf; outdata = buffer[]; }, (bool flag) { aborted = true; } ); if (aborted) return cast(size_t) 0; } if (outdata.empty) { buffer = freeBuffers.pop(); outdata = buffer[]; } // Copy data auto copyBytes = outdata.length < data.length ? outdata.length : data.length; outdata[0 .. copyBytes] = data[0 .. copyBytes]; outdata = outdata[copyBytes..$]; data = data[copyBytes..$]; if (outdata.empty) fromTid.send(thisTid, curlMessage(cast(immutable(ubyte)[])buffer)); } return datalen; } // ditto private void finalizeChunks(ubyte[] outdata, ref ubyte[] buffer, Tid fromTid) { import std.concurrency : send, thisTid; if (!outdata.empty) { // Resize the last buffer buffer.length = buffer.length - outdata.length; fromTid.send(thisTid, curlMessage(cast(immutable(ubyte)[])buffer)); } } // Shared function for reading incoming lines of data and sending the to a // parent thread private static size_t receiveLines(Terminator, Unit) (const(ubyte)[] data, ref EncodingScheme encodingScheme, bool keepTerminator, Terminator terminator, ref const(ubyte)[] leftOverBytes, ref bool bufferValid, ref Pool!(Unit[]) freeBuffers, ref Unit[] buffer, Tid fromTid, ref bool aborted) { import std.concurrency : prioritySend, receive, send, thisTid; import std.exception : enforce; import std.format : format; import std.traits : isArray; immutable datalen = data.length; // Terminator is specified and buffers should be resized as determined by // the terminator // Copy data to active buffer until terminator is found. // Decode as many lines as possible while (true) { // Make sure a buffer is present while (!bufferValid && freeBuffers.empty) { // Active buffer is invalid and there are no available buffers in // the pool. Wait for buffers to return from main thread in order to // reuse them. receive((immutable(Unit)[] buf) { buffer = cast(Unit[]) buf; buffer.length = 0; buffer.assumeSafeAppend(); bufferValid = true; }, (bool flag) { aborted = true; } ); if (aborted) return cast(size_t) 0; } if (!bufferValid) { buffer = freeBuffers.pop(); bufferValid = true; } // Try to read a line from left over bytes from last onReceive plus the // newly received bytes. try { if (decodeLineInto(leftOverBytes, data, buffer, encodingScheme, terminator)) { if (keepTerminator) { fromTid.send(thisTid, curlMessage(cast(immutable(Unit)[])buffer)); } else { static if (isArray!Terminator) fromTid.send(thisTid, curlMessage(cast(immutable(Unit)[]) buffer[0..$-terminator.length])); else fromTid.send(thisTid, curlMessage(cast(immutable(Unit)[]) buffer[0..$-1])); } bufferValid = false; } else { // Could not decode an entire line. Save // bytes left in data for next call to // onReceive. Can be up to a max of 4 bytes. enforce!CurlException(data.length <= 4, format( "Too many bytes left not decoded %s"~ " > 4. Maybe the charset specified in"~ " headers does not match "~ "the actual content downloaded?", data.length)); leftOverBytes ~= data; break; } } catch (CurlException ex) { prioritySend(fromTid, cast(immutable(CurlException))ex); return cast(size_t) 0; } } return datalen; } // ditto private static void finalizeLines(Unit)(bool bufferValid, Unit[] buffer, Tid fromTid) { import std.concurrency : send, thisTid; if (bufferValid && buffer.length != 0) fromTid.send(thisTid, curlMessage(cast(immutable(Unit)[])buffer[0..$])); } /* Used by byLineAsync/byChunkAsync to duplicate an existing connection * that can be used exclusively in a spawned thread. */ private void duplicateConnection(Conn, PostData) (const(char)[] url, Conn conn, PostData postData, Tid tid) { import std.concurrency : send; import std.exception : enforce; // no move semantic available in std.concurrency ie. must use casting. auto connDup = conn.dup(); connDup.url = url; static if ( is(Conn : HTTP) ) { connDup.p.headersOut = null; connDup.method = conn.method == HTTP.Method.undefined ? HTTP.Method.get : conn.method; if (postData !is null) { if (connDup.method == HTTP.Method.put) { connDup.handle.set(CurlOption.infilesize_large, postData.length); } else { // post connDup.method = HTTP.Method.post; connDup.handle.set(CurlOption.postfieldsize_large, postData.length); } connDup.handle.set(CurlOption.copypostfields, cast(void*) postData.ptr); } tid.send(cast(ulong) connDup.handle.handle); tid.send(connDup.method); } else { enforce!CurlException(postData is null, "Cannot put ftp data using byLineAsync()"); tid.send(cast(ulong) connDup.handle.handle); tid.send(HTTP.Method.undefined); } connDup.p.curl.handle = null; // make sure handle is not freed } // Spawn a thread for handling the reading of incoming data in the // background while the delegate is executing. This will optimize // throughput by allowing simultaneous input (this struct) and // output (e.g. AsyncHTTPLineOutputRange). private static void spawn(Conn, Unit, Terminator = void)() { import std.concurrency : Tid, prioritySend, receiveOnly, send, thisTid; import etc.c.curl : CURL, CurlError; Tid fromTid = receiveOnly!Tid(); // Get buffer to read into Pool!(Unit[]) freeBuffers; // Free list of buffer objects // Number of bytes filled into active buffer Unit[] buffer; bool aborted = false; EncodingScheme encodingScheme; static if ( !is(Terminator == void)) { // Only lines reading will receive a terminator const terminator = receiveOnly!Terminator(); const keepTerminator = receiveOnly!bool(); // max number of bytes to carry over from an onReceive // callback. This is 4 because it is the max code units to // decode a code point in the supported encodings. auto leftOverBytes = new const(ubyte)[4]; leftOverBytes.length = 0; auto bufferValid = false; } else { Unit[] outdata; } // no move semantic available in std.concurrency ie. must use casting. auto connDup = cast(CURL*) receiveOnly!ulong(); auto client = Conn(); client.p.curl.handle = connDup; // receive a method for both ftp and http but just use it for http auto method = receiveOnly!(HTTP.Method)(); client.onReceive = (ubyte[] data) { // If no terminator is specified the chunk size is fixed. static if ( is(Terminator == void) ) return receiveChunks(data, outdata, freeBuffers, buffer, fromTid, aborted); else return receiveLines(data, encodingScheme, keepTerminator, terminator, leftOverBytes, bufferValid, freeBuffers, buffer, fromTid, aborted); }; static if ( is(Conn == HTTP) ) { client.method = method; // register dummy header handler client.onReceiveHeader = (in char[] key, in char[] value) { if (key == "content-type") encodingScheme = EncodingScheme.create(client.p.charset); }; } else { encodingScheme = EncodingScheme.create(client.encoding); } // Start the request CurlCode code; try { code = client.perform(No.throwOnError); } catch (Exception ex) { prioritySend(fromTid, cast(immutable(Exception)) ex); fromTid.send(thisTid, curlMessage(true)); // signal done return; } if (code != CurlError.ok) { if (aborted && (code == CurlError.aborted_by_callback || code == CurlError.write_error)) { fromTid.send(thisTid, curlMessage(true)); // signal done return; } prioritySend(fromTid, cast(immutable(CurlException)) new CurlException(client.p.curl.errorString(code))); fromTid.send(thisTid, curlMessage(true)); // signal done return; } // Send remaining data that is not a full chunk size static if ( is(Terminator == void) ) finalizeChunks(outdata, buffer, fromTid); else finalizeLines(bufferValid, buffer, fromTid); fromTid.send(thisTid, curlMessage(true)); // signal done } }
D
/Users/davalcato/Desktop/iOS/World\ Tracker/Build/Intermediates/World\ Tracker.build/Debug-iphonesimulator/World\ Tracker.build/Objects-normal/x86_64/ViewController.o : /Users/davalcato/Desktop/iOS/World\ Tracker/World\ Tracker/AppDelegate.swift /Users/davalcato/Desktop/iOS/World\ Tracker/World\ Tracker/ViewController.swift /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ModelIO.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/GLKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ARKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SceneKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SpriteKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/ModelIO.framework/Headers/ModelIO.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/GLKit.framework/Headers/GLKit.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/SpriteKit.framework/Headers/SpriteKit.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes /Users/davalcato/Desktop/iOS/World\ Tracker/Build/Intermediates/World\ Tracker.build/Debug-iphonesimulator/World\ Tracker.build/Objects-normal/x86_64/ViewController~partial.swiftmodule : /Users/davalcato/Desktop/iOS/World\ Tracker/World\ Tracker/AppDelegate.swift /Users/davalcato/Desktop/iOS/World\ Tracker/World\ Tracker/ViewController.swift /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ModelIO.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/GLKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ARKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SceneKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SpriteKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/ModelIO.framework/Headers/ModelIO.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/GLKit.framework/Headers/GLKit.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/SpriteKit.framework/Headers/SpriteKit.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes /Users/davalcato/Desktop/iOS/World\ Tracker/Build/Intermediates/World\ Tracker.build/Debug-iphonesimulator/World\ Tracker.build/Objects-normal/x86_64/ViewController~partial.swiftdoc : /Users/davalcato/Desktop/iOS/World\ Tracker/World\ Tracker/AppDelegate.swift /Users/davalcato/Desktop/iOS/World\ Tracker/World\ Tracker/ViewController.swift /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ModelIO.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/GLKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ARKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SceneKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SpriteKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/ModelIO.framework/Headers/ModelIO.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/GLKit.framework/Headers/GLKit.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/SpriteKit.framework/Headers/SpriteKit.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes
D
import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math; void main() { auto it = readln.split.to!(int[]); auto A = it[0]; auto B = it[1]; auto C = it[2]; auto X = it[3]; auto Y = it[4]; int cost; if (A + B > C*2) { if (X > Y) { cost += 2 * Y * C; X -= Y; Y = 0; } else { cost += 2 * X * C; Y -= X; X = 0; } } else { if (X > Y) { cost += A * Y + B * Y; X -= Y; Y = 0; } else { cost += A * X + B * X; Y -= X; X = 0; } } if (X > 0) { if (A > C*2) { cost += 2 * C * X; } else { cost += A * X; } } if (Y > 0) { if (B > C*2) { cost += 2 * C * Y; } else { cost += B * Y; } } writeln(cost); }
D
/Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/DatabaseKit.build/KeyedCache/DictionaryKeyedCache.swift.o : /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Utilities/Deprecated.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/KeyedCache/KeyedCache.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/KeyedCache/DatabaseKeyedCache.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/KeyedCache/DictionaryKeyedCache.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/KeyedCache/MemoryKeyedCache.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/ConnectionPool/DatabaseConnectionPoolCache.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Connection/DatabaseStringFindable.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Connection/DatabaseConnectable.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Database/DatabaseQueryable.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Utilities/URL+DatabaseName.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Database/Database.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Database/ConfiguredDatabase.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Database/DatabaseConfig.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/ConnectionPool/DatabaseConnectionPoolConfig.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/KeyedCache/KeyedCacheSupporting.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Log/LogSupporting.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Log/DatabaseLog.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/ConnectionPool/Container+ConnectionPool.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/ConnectionPool/DatabaseConnectionPool.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Connection/Container+CachedConnection.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Connection/DatabaseConnection.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Connection/Container+NewConnection.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Service/DatabaseKitProvider.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Log/DatabaseLogger.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Database/DatabaseIdentifier.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Log/DatabaseLogHandler.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Log/PrintLogHandler.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Utilities/DatabaseKitError.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Database/Databases.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Utilities/Exports.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio-zlib-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/DatabaseKit.build/KeyedCache/DictionaryKeyedCache~partial.swiftmodule : /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Utilities/Deprecated.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/KeyedCache/KeyedCache.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/KeyedCache/DatabaseKeyedCache.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/KeyedCache/DictionaryKeyedCache.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/KeyedCache/MemoryKeyedCache.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/ConnectionPool/DatabaseConnectionPoolCache.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Connection/DatabaseStringFindable.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Connection/DatabaseConnectable.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Database/DatabaseQueryable.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Utilities/URL+DatabaseName.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Database/Database.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Database/ConfiguredDatabase.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Database/DatabaseConfig.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/ConnectionPool/DatabaseConnectionPoolConfig.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/KeyedCache/KeyedCacheSupporting.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Log/LogSupporting.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Log/DatabaseLog.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/ConnectionPool/Container+ConnectionPool.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/ConnectionPool/DatabaseConnectionPool.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Connection/Container+CachedConnection.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Connection/DatabaseConnection.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Connection/Container+NewConnection.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Service/DatabaseKitProvider.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Log/DatabaseLogger.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Database/DatabaseIdentifier.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Log/DatabaseLogHandler.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Log/PrintLogHandler.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Utilities/DatabaseKitError.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Database/Databases.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Utilities/Exports.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio-zlib-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/DatabaseKit.build/KeyedCache/DictionaryKeyedCache~partial.swiftdoc : /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Utilities/Deprecated.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/KeyedCache/KeyedCache.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/KeyedCache/DatabaseKeyedCache.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/KeyedCache/DictionaryKeyedCache.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/KeyedCache/MemoryKeyedCache.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/ConnectionPool/DatabaseConnectionPoolCache.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Connection/DatabaseStringFindable.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Connection/DatabaseConnectable.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Database/DatabaseQueryable.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Utilities/URL+DatabaseName.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Database/Database.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Database/ConfiguredDatabase.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Database/DatabaseConfig.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/ConnectionPool/DatabaseConnectionPoolConfig.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/KeyedCache/KeyedCacheSupporting.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Log/LogSupporting.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Log/DatabaseLog.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/ConnectionPool/Container+ConnectionPool.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/ConnectionPool/DatabaseConnectionPool.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Connection/Container+CachedConnection.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Connection/DatabaseConnection.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Connection/Container+NewConnection.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Service/DatabaseKitProvider.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Log/DatabaseLogger.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Database/DatabaseIdentifier.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Log/DatabaseLogHandler.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Log/PrintLogHandler.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Utilities/DatabaseKitError.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Database/Databases.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/database-kit/Sources/DatabaseKit/Utilities/Exports.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio-zlib-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
/Users/dali/Desktop/Rust_Project/target/debug/deps/rand_pcg-000405fe429ba2b8.rmeta: /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/rand_pcg-0.1.2/src/lib.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/rand_pcg-0.1.2/src/pcg64.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/rand_pcg-0.1.2/src/pcg128.rs /Users/dali/Desktop/Rust_Project/target/debug/deps/rand_pcg-000405fe429ba2b8.d: /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/rand_pcg-0.1.2/src/lib.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/rand_pcg-0.1.2/src/pcg64.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/rand_pcg-0.1.2/src/pcg128.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/rand_pcg-0.1.2/src/lib.rs: /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/rand_pcg-0.1.2/src/pcg64.rs: /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/rand_pcg-0.1.2/src/pcg128.rs:
D
module ppl.gen.GenerateLoop; import ppl.internal; final class GenerateLoop { GenerateModule gen; LLVMBuilder builder; this(GenerateModule gen) { this.gen = gen; this.builder = gen.builder; } void generate(Loop loop) { auto preBB = gen.createBlock(loop, "loop_init"); auto checkBB = gen.createBlock(loop, "loop_condition"); auto bodyBB = gen.createBlock(loop, "loop_body"); auto contBB = gen.createBlock(loop, "loop_continue"); auto exitBB = gen.createBlock(loop, "loop_exit"); loop.continueBB = contBB; loop.breakBB = exitBB; auto loopStartBB = loop.hasCondExpr ? checkBB : bodyBB; builder.br(preBB); /// pre loop statements gen.moveToBlock(preBB); loop.initStmts().visit!GenerateModule(gen); builder.br(loopStartBB); /// checkBB: evaluate condition gen.moveToBlock(checkBB); if(loop.hasCondExpr) { loop.condExpr.visit!GenerateModule(gen); auto cmp = builder.icmp(LLVMIntPredicate.LLVMIntNE, gen.rhs, loop.condExpr.getType.zeroValue); builder.condBr(cmp, bodyBB, exitBB); } else { builder.br(bodyBB); } /// bodyBB: body gen.moveToBlock(bodyBB); loop.bodyStmts().visit!GenerateModule(gen); builder.br(contBB); /// contBB: post loop statements gen.moveToBlock(contBB); loop.postExprs().visit!GenerateModule(gen); builder.br(loopStartBB); /// exitBB: exit gen.moveToBlock(exitBB); } void generate(Break brk) { builder.br(brk.loop.breakBB); auto bb = gen.createBlock(brk, "after_break"); gen.moveToBlock(bb); } void generate(Continue cont) { builder.br(cont.loop.continueBB); auto bb = gen.createBlock(cont, "after_continue"); gen.moveToBlock(bb); } }
D
/Users/Yowa/WorkSpace/Pokedex/Build/Intermediates/Pokedex.build/Debug/JSON.build/Objects-normal/x86_64/JSON+Parse.o : /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSON+Bytes.swift /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSON+Equatable.swift /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSON+Node.swift /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSON+Parse.swift /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSON+Serialize.swift /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSON.swift /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSONRepresentable.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/Core.framework/Modules/Core.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/libc.framework/Modules/libc.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/Jay.framework/Modules/Jay.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/Node.framework/Modules/Node.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/PathIndexable.framework/Modules/PathIndexable.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/Polymorphic.framework/Modules/Polymorphic.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Intermediates/Pokedex.build/Debug/JSON.build/Objects-normal/x86_64/JSON+Parse~partial.swiftmodule : /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSON+Bytes.swift /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSON+Equatable.swift /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSON+Node.swift /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSON+Parse.swift /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSON+Serialize.swift /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSON.swift /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSONRepresentable.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/Core.framework/Modules/Core.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/libc.framework/Modules/libc.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/Jay.framework/Modules/Jay.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/Node.framework/Modules/Node.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/PathIndexable.framework/Modules/PathIndexable.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/Polymorphic.framework/Modules/Polymorphic.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Intermediates/Pokedex.build/Debug/JSON.build/Objects-normal/x86_64/JSON+Parse~partial.swiftdoc : /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSON+Bytes.swift /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSON+Equatable.swift /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSON+Node.swift /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSON+Parse.swift /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSON+Serialize.swift /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSON.swift /Users/Yowa/WorkSpace/Pokedex/Packages/JSON-1.0.0/Sources/JSON/JSONRepresentable.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/Core.framework/Modules/Core.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/libc.framework/Modules/libc.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/Jay.framework/Modules/Jay.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/Node.framework/Modules/Node.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/PathIndexable.framework/Modules/PathIndexable.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/Polymorphic.framework/Modules/Polymorphic.swiftmodule/x86_64.swiftmodule
D
/Users/apple/Desktop/save/HW9.01/build/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/SessionDelegate.o : /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/AFError.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Alamofire.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/MultipartFormData.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Notifications.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/ParameterEncoding.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Request.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Response.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/ResponseSerialization.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Result.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/ServerTrustPolicy.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/SessionDelegate.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/SessionManager.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/TaskDelegate.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Timeline.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Validation.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/apple/Desktop/save/HW9.01/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/apple/Desktop/save/HW9.01/build/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/apple/Desktop/save/HW9.01/build/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/SessionDelegate~partial.swiftmodule : /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/AFError.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Alamofire.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/MultipartFormData.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Notifications.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/ParameterEncoding.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Request.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Response.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/ResponseSerialization.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Result.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/ServerTrustPolicy.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/SessionDelegate.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/SessionManager.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/TaskDelegate.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Timeline.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Validation.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/apple/Desktop/save/HW9.01/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/apple/Desktop/save/HW9.01/build/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/apple/Desktop/save/HW9.01/build/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/SessionDelegate~partial.swiftdoc : /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/AFError.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Alamofire.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/MultipartFormData.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Notifications.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/ParameterEncoding.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Request.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Response.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/ResponseSerialization.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Result.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/ServerTrustPolicy.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/SessionDelegate.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/SessionManager.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/TaskDelegate.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Timeline.swift /Users/apple/Desktop/save/HW9.01/Pods/Alamofire/Source/Validation.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/apple/Desktop/save/HW9.01/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/apple/Desktop/save/HW9.01/build/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule
D
// Copyright Brian Schott 2015. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) module dfmt.formatter; import dparse.lexer; import dparse.parser; import dparse.rollback_allocator; import dfmt.ast_info; import dfmt.config; import dfmt.indentation; import dfmt.tokens; import dfmt.wrapping; import std.array; import std.algorithm.comparison : among, max; /** * Formats the code contained in `buffer` into `output`. * Params: * source_desc = A description of where `buffer` came from. Usually a file name. * buffer = The raw source code. * output = The output range that will have the formatted code written to it. * formatterConfig = Formatter configuration. * Returns: `true` if the formatting succeeded, `false` of a lexing error. This * function can return `true` if parsing failed. */ bool format(OutputRange)(string source_desc, ubyte[] buffer, OutputRange output, Config* formatterConfig) { LexerConfig config; config.stringBehavior = StringBehavior.source; config.whitespaceBehavior = WhitespaceBehavior.skip; LexerConfig parseConfig; parseConfig.stringBehavior = StringBehavior.source; parseConfig.whitespaceBehavior = WhitespaceBehavior.skip; StringCache cache = StringCache(StringCache.defaultBucketCount); ASTInformation astInformation; RollbackAllocator allocator; auto parseTokens = getTokensForParser(buffer, parseConfig, &cache); auto mod = parseModule(parseTokens, source_desc, &allocator); auto visitor = new FormatVisitor(&astInformation); visitor.visit(mod); astInformation.cleanup(); auto tokenRange = byToken(buffer, config, &cache); auto app = appender!(Token[])(); for (; !tokenRange.empty(); tokenRange.popFront()) app.put(tokenRange.front()); auto tokens = app.data; if (!tokenRange.messages.empty) return false; auto depths = generateDepthInfo(tokens); auto tokenFormatter = TokenFormatter!OutputRange(buffer, tokens, depths, output, &astInformation, formatterConfig); tokenFormatter.format(); return true; } immutable(short[]) generateDepthInfo(const Token[] tokens) pure nothrow @trusted { import std.exception : assumeUnique; short[] retVal = new short[](tokens.length); short depth = 0; foreach (i, ref t; tokens) { switch (t.type) { case tok!"[": depth++; goto case; case tok!"{": case tok!"(": depth++; break; case tok!"]": depth--; goto case; case tok!"}": case tok!")": depth--; break; default: break; } retVal[i] = depth; } return cast(immutable) retVal; } struct TokenFormatter(OutputRange) { /** * Params: * rawSource = ? * tokens = the tokens to format * depths = ? * output = the output range that the code will be formatted to * astInformation = information about the AST used to inform formatting * decisions. * config = ? */ this(const ubyte[] rawSource, const(Token)[] tokens, immutable short[] depths, OutputRange output, ASTInformation* astInformation, Config* config) { this.rawSource = rawSource; this.tokens = tokens; this.depths = depths; this.output = output; this.astInformation = astInformation; this.config = config; this.indents = IndentStack(config); { auto eol = config.end_of_line; if (eol == eol.cr) this.eolString = "\r"; else if (eol == eol.lf) this.eolString = "\n"; else if (eol == eol.crlf) this.eolString = "\r\n"; else if (eol == eol.unspecified) assert(false, "config.end_of_line was unspecified"); } } /// Runs the formatting process void format() { while (hasCurrent) formatStep(); } private: /// Current indentation level int indentLevel; /// Current index into the tokens array size_t index; /// Length of the current line (so far) uint currentLineLength = 0; /// Output to write output to OutputRange output; /// Used for skipping parts of the file with `dfmt off` and `dfmt on` comments const ubyte[] rawSource; /// Tokens being formatted const Token[] tokens; /// Paren depth info immutable short[] depths; /// Information about the AST const ASTInformation* astInformation; /// Token indices where line breaks should be placed size_t[] linebreakHints; /// Current indentation stack for the file IndentStack indents; /// Configuration const Config* config; /// chached end of line string const string eolString; /// Keep track of whether or not an extra newline was just added because of /// an import statement. bool justAddedExtraNewline; /// Current paren depth int parenDepth; /// Current special brace depth. Used for struct initializers and lambdas. int sBraceDepth; /// Current non-indented brace depth. Used for struct initializers and lambdas. int niBraceDepth; /// True if a space should be placed when parenDepth reaches zero bool spaceAfterParens; /// True if we're in an ASM block bool inAsm; /// True if the next "this" should have a space behind it bool thisSpace; /// True if the next "else" should be formatted as a single line bool inlineElse; /// Tracks paren depth on a single line. This information can be used to /// indent array literals inside parens, since arrays are indented only once /// and paren indentation is ignored.line breaks and "[" reset the counter. int parenDepthOnLine; void formatStep() { import std.range : assumeSorted; assert(hasCurrent); if (currentIs(tok!"comment")) { formatComment(); } else if (isStringLiteral(current.type) || isNumberLiteral(current.type) || currentIs(tok!"characterLiteral")) { writeToken(); if (hasCurrent) { immutable t = tokens[index].type; if (t == tok!"identifier" || isStringLiteral(t) || isNumberLiteral(t) || t == tok!"characterLiteral" // a!"b" function() || t == tok!"function" || t == tok!"delegate") write(" "); } } else if (currentIs(tok!"module") || currentIs(tok!"import")) { formatModuleOrImport(); } else if (currentIs(tok!"return")) { writeToken(); if (!currentIs(tok!";") && !currentIs(tok!")") && !currentIs(tok!"{") && !currentIs(tok!"in") && !currentIs(tok!"out") && !currentIs(tok!"do") && (hasCurrent && tokens[index].text != "body")) write(" "); } else if (currentIs(tok!"with")) { if (indents.length == 0 || !indents.topIsOneOf(tok!"switch", tok!"with")) indents.push(tok!"with"); writeToken(); write(" "); if (currentIs(tok!"(")) writeParens(false); if (!currentIs(tok!"switch") && !currentIs(tok!"with") && !currentIs(tok!"{") && !(currentIs(tok!"final") && peekIs(tok!"switch"))) { newline(); } else if (!currentIs(tok!"{")) write(" "); } else if (currentIs(tok!"switch")) { formatSwitch(); } else if (currentIs(tok!"extern") && peekIs(tok!"(")) { writeToken(); write(" "); while (hasCurrent) { if (currentIs(tok!"(")) formatLeftParenOrBracket(); else if (currentIs(tok!")")) { formatRightParen(); break; } else writeToken(); } } else if (((isBlockHeader() || currentIs(tok!"version")) && peekIs(tok!"(")) || (currentIs(tok!"debug") && peekIs(tok!"{"))) { if (!assumeSorted(astInformation.constraintLocations).equalRange(current.index).empty) formatConstraint(); else formatBlockHeader(); } else if ((current.text == "body" || current == tok!"do") && peekBackIsFunctionDeclarationEnding()) { formatKeyword(); } else if (currentIs(tok!"do")) { formatBlockHeader(); } else if (currentIs(tok!"else")) { formatElse(); } else if (currentIs(tok!"asm")) { formatKeyword(); while (hasCurrent && !currentIs(tok!"{")) formatStep(); if (hasCurrent) { int depth = 1; formatStep(); inAsm = true; while (hasCurrent && depth > 0) { if (currentIs(tok!"{")) ++depth; else if (currentIs(tok!"}")) --depth; formatStep(); } inAsm = false; } } else if (currentIs(tok!"this")) { const thisIndex = current.index; formatKeyword(); if (config.dfmt_space_before_function_parameters && (thisSpace || astInformation.constructorDestructorLocations .canFindIndex(thisIndex))) { write(" "); thisSpace = false; } } else if (isKeyword(current.type)) { if (currentIs(tok!"debug")) inlineElse = true; formatKeyword(); } else if (isBasicType(current.type)) { writeToken(); if (currentIs(tok!"identifier") || isKeyword(current.type) || inAsm) write(" "); } else if (isOperator(current.type)) { formatOperator(); } else if (currentIs(tok!"identifier")) { writeToken(); //dfmt off if (hasCurrent && ( currentIs(tok!"identifier") || ( index > 1 && config.dfmt_space_before_function_parameters && ( isBasicType(peekBack(2).type) || peekBack2Is(tok!"identifier") || peekBack2Is(tok!")") || peekBack2Is(tok!"]") ) && currentIs(tok!("(") ) || isBasicType(current.type) || currentIs(tok!"@") || isNumberLiteral(tokens[index].type) || (inAsm && peekBack2Is(tok!";") && currentIs(tok!"[")) ))) //dfmt on { write(" "); } } else if (currentIs(tok!"scriptLine") || currentIs(tok!"specialTokenSequence")) { writeToken(); newline(); } else writeToken(); } void formatConstraint() { import dfmt.editorconfig : OB = OptionalBoolean; with (TemplateConstraintStyle) final switch (config.dfmt_template_constraint_style) { case unspecified: assert(false, "Config was not validated properly"); case conditional_newline: immutable l = currentLineLength + betweenParenLength(tokens[index + 1 .. $]); if (l > config.dfmt_soft_max_line_length) newline(); else if (peekBackIs(tok!")") || peekBackIs(tok!"identifier")) write(" "); break; case always_newline: newline(); break; case conditional_newline_indent: immutable l = currentLineLength + betweenParenLength(tokens[index + 1 .. $]); if (l > config.dfmt_soft_max_line_length) { config.dfmt_single_template_constraint_indent == OB.t ? pushWrapIndent() : pushWrapIndent(tok!"!"); newline(); } else if (peekBackIs(tok!")") || peekBackIs(tok!"identifier")) write(" "); break; case always_newline_indent: { config.dfmt_single_template_constraint_indent == OB.t ? pushWrapIndent() : pushWrapIndent(tok!"!"); newline(); } break; } // if writeToken(); // assume that the parens are present, otherwise the parser would not // have told us there was a constraint here write(" "); writeParens(false); } string commentText(size_t i) { import std.string : strip; assert(tokens[i].type == tok!"comment"); string commentText = tokens[i].text; if (commentText[0 .. 2] == "//") commentText = commentText[2 .. $]; else { if (commentText.length > 3) commentText = commentText[2 .. $ - 2]; else commentText = commentText[2 .. $]; } return commentText.strip(); } void skipFormatting() { size_t dfmtOff = index; size_t dfmtOn = index; foreach (i; dfmtOff + 1 .. tokens.length) { dfmtOn = i; if (tokens[i].type != tok!"comment") continue; immutable string commentText = commentText(i); if (commentText == "dfmt on") break; } write(cast(string) rawSource[tokens[dfmtOff].index .. tokens[dfmtOn].index]); index = dfmtOn; } void formatComment() { if (commentText(index) == "dfmt off") { skipFormatting(); return; } immutable bool currIsSlashSlash = tokens[index].text[0 .. 2] == "//"; immutable prevTokenEndLine = index == 0 ? size_t.max : tokenEndLine(tokens[index - 1]); immutable size_t currTokenLine = tokens[index].line; if (index > 0) { immutable t = tokens[index - 1].type; immutable canAddNewline = currTokenLine - prevTokenEndLine < 1; if (peekBackIsOperator() && !isSeparationToken(t)) pushWrapIndent(t); else if (peekBackIs(tok!",") && prevTokenEndLine == currTokenLine && indents.indentToMostRecent(tok!"enum") == -1) pushWrapIndent(tok!","); if (peekBackIsOperator() && !peekBackIsOneOf(false, tok!"comment", tok!"{", tok!"}", tok!":", tok!";", tok!",", tok!"[", tok!"(") && !canAddNewline && prevTokenEndLine < currTokenLine) write(" "); else if (prevTokenEndLine == currTokenLine || (t == tok!")" && peekIs(tok!"{"))) write(" "); else if (peekBackIsOneOf(false, tok!"else", tok!"identifier")) write(" "); else if (canAddNewline || (peekIs(tok!"{") && t == tok!"}")) newline(); if (peekIs(tok!"(") && (peekBackIs(tok!")") || peekBack2Is(tok!"!"))) pushWrapIndent(tok!"("); } writeToken(); immutable j = justAddedExtraNewline; if (currIsSlashSlash) { newline(); justAddedExtraNewline = j; } else if (hasCurrent) { if (prevTokenEndLine == tokens[index].line) { if (currentIs(tok!"}")) { if (indents.topIs(tok!"{")) indents.pop(); write(" "); } else if (!currentIs(tok!"{")) write(" "); } else if (!currentIs(tok!"{") && !currentIs(tok!"in") && !currentIs(tok!"out")) { if (currentIs(tok!")") && indents.topIs(tok!",")) indents.pop(); else if (peekBack2Is(tok!",") && !indents.topIs(tok!",") && indents.indentToMostRecent(tok!"enum") == -1) pushWrapIndent(tok!","); newline(); } } else newline(); } void formatModuleOrImport() { immutable t = current.type; writeToken(); if (currentIs(tok!"(")) { writeParens(false); return; } write(" "); while (hasCurrent) { if (currentIs(tok!";")) { indents.popWrapIndents(); indentLevel = indents.indentLevel; writeToken(); if (index >= tokens.length) { newline(); break; } if (currentIs(tok!"comment") && current.line == peekBack().line) { break; } else if (currentIs(tok!"{") && config.dfmt_brace_style == BraceStyle.allman) break; else if (t == tok!"import" && !currentIs(tok!"import") && !currentIs(tok!"}") && !((currentIs(tok!"public") || currentIs(tok!"private") || currentIs(tok!"static")) && peekIs(tok!"import")) && !indents.topIsOneOf(tok!"if", tok!"debug", tok!"version")) { simpleNewline(); currentLineLength = 0; justAddedExtraNewline = true; newline(); } else newline(); break; } else if (currentIs(tok!":")) { if (config.dfmt_selective_import_space) write(" "); writeToken(); if (!currentIs(tok!"comment")) write(" "); pushWrapIndent(tok!","); } else if (currentIs(tok!"comment")) { if (peekBack.line != current.line) { // The comment appears on its own line, keep it there. if (!peekBackIs(tok!"comment")) // Comments are already properly separated. newline(); } formatStep(); } else formatStep(); } } void formatLeftParenOrBracket() in { assert(currentIs(tok!"(") || currentIs(tok!"[")); } do { import dfmt.editorconfig : OptionalBoolean; immutable p = current.type; regenLineBreakHintsIfNecessary(index); writeToken(); if (p == tok!"(") { ++parenDepthOnLine; // If the file starts with an open paren, just give up. This isn't // valid D code. if (index < 2) return; if (isBlockHeaderToken(tokens[index - 2].type)) indents.push(tok!")"); else indents.push(p); spaceAfterParens = true; parenDepth++; } // No heuristics apply if we can't look before the opening paren/bracket if (index < 1) return; immutable bool arrayInitializerStart = p == tok!"[" && astInformation.arrayStartLocations.canFindIndex(tokens[index - 1].index); if (arrayInitializerStart && isMultilineAt(index - 1)) { revertParenIndentation(); // Use the close bracket as the indent token to distinguish // the array initialiazer from an array index in the newline // handling code IndentStack.Details detail; detail.wrap = false; detail.temp = false; // wrap and temp are set manually to the values it would actually // receive here because we want to set breakEveryItem for the ] token to know if // we should definitely always new-line after every comma for a big AA detail.breakEveryItem = astInformation.assocArrayStartLocations.canFindIndex( tokens[index - 1].index); detail.preferLongBreaking = true; indents.push(tok!"]", detail); newline(); immutable size_t j = expressionEndIndex(index); linebreakHints = chooseLineBreakTokens(index, tokens[index .. j], depths[index .. j], config, currentLineLength, indentLevel); } else if (p == tok!"[" && config.dfmt_keep_line_breaks == OptionalBoolean.t) { revertParenIndentation(); IndentStack.Details detail; detail.wrap = false; detail.temp = false; detail.breakEveryItem = false; detail.mini = tokens[index].line == tokens[index - 1].line; indents.push(tok!"]", detail); if (!detail.mini) { newline(); } } else if (arrayInitializerStart) { // This is a short (non-breaking) array/AA value IndentStack.Details detail; detail.wrap = false; detail.temp = false; detail.breakEveryItem = astInformation.assocArrayStartLocations.canFindIndex(tokens[index - 1].index); // array of (possibly associative) array, let's put each item on its own line if (!detail.breakEveryItem && currentIs(tok!"[")) detail.breakEveryItem = true; // the '[' is immediately followed by an item instead of a newline here so // we set mini, that the ']' also follows an item immediately without newline. detail.mini = true; indents.push(tok!"]", detail); } else if (p == tok!"[") { // array item access IndentStack.Details detail; detail.wrap = false; detail.temp = true; detail.mini = true; indents.push(tok!"]", detail); } else if (!currentIs(tok!")") && !currentIs(tok!"]") && (linebreakHints.canFindIndex(index - 1) || (linebreakHints.length == 0 && currentLineLength > config.max_line_length))) { newline(); } else if (onNextLine) { newline(); } } void revertParenIndentation() { if (parenDepthOnLine) { foreach (i; 0 .. parenDepthOnLine) { indents.pop(); } indents.popTempIndents(); } parenDepthOnLine = 0; } void formatRightParen() in { assert(currentIs(tok!")")); } do { parenDepthOnLine = max(parenDepthOnLine - 1, 0); parenDepth--; indents.popWrapIndents(); while (indents.topIsOneOf(tok!"!", tok!")")) indents.pop(); if (indents.topIs(tok!"(")) indents.pop(); if (onNextLine) { newline(); } if (parenDepth == 0 && (peekIs(tok!"is") || peekIs(tok!"in") || peekIs(tok!"out") || peekIs(tok!"do") || peekIsBody)) { writeToken(); } else if (peekIsLiteralOrIdent() || peekIsBasicType()) { writeToken(); if (spaceAfterParens || parenDepth > 0) writeSpace(); } else if ((peekIsKeyword() || peekIs(tok!"@")) && spaceAfterParens && !peekIs(tok!"in") && !peekIs(tok!"is") && !peekIs(tok!"if")) { writeToken(); writeSpace(); } else writeToken(); } void formatRightBracket() in { assert(currentIs(tok!"]")); } do { indents.popWrapIndents(); if (indents.topIs(tok!"]")) { if (!indents.topDetails.mini && !indents.topDetails.temp) newline(); else indents.pop(); } writeToken(); if (currentIs(tok!"identifier")) write(" "); } void formatAt() { immutable size_t atIndex = tokens[index].index; writeToken(); if (currentIs(tok!"identifier")) writeToken(); if (currentIs(tok!"(")) { writeParens(false); if (tokens[index].type == tok!"{") return; if (hasCurrent && tokens[index - 1].line < tokens[index].line && astInformation.atAttributeStartLocations.canFindIndex(atIndex)) newline(); else write(" "); } else if (hasCurrent && (currentIs(tok!"@") || isBasicType(tokens[index].type) || currentIs(tok!"invariant") || currentIs(tok!"extern") || currentIs(tok!"identifier")) && !currentIsIndentedTemplateConstraint()) { writeSpace(); } } void formatColon() { import dfmt.editorconfig : OptionalBoolean; import std.algorithm : canFind, any; immutable bool isCase = astInformation.caseEndLocations.canFindIndex(current.index); immutable bool isAttribute = astInformation.attributeDeclarationLines.canFindIndex( current.line); immutable bool isStructInitializer = astInformation.structInfoSortedByEndLocation .canFind!(st => st.startLocation < current.index && current.index < st.endLocation); if (isCase || isAttribute) { writeToken(); if (!currentIs(tok!"{")) { if (isCase && !indents.topIs(tok!"case") && config.dfmt_align_switch_statements == OptionalBoolean.f) indents.push(tok!"case"); else if (isAttribute && !indents.topIs(tok!"@") && config.dfmt_outdent_attributes == OptionalBoolean.f) indents.push(tok!"@"); newline(); } } else if (indents.topIs(tok!"]")) // Associative array { write(config.dfmt_space_before_aa_colon ? " : " : ": "); ++index; } else if (peekBackIs(tok!"identifier") && [tok!"{", tok!"}", tok!";", tok!":", tok!","] .any!((ptrdiff_t token) => peekBack2Is(cast(IdType)token, true)) && (!isBlockHeader(1) || peekIs(tok!"if"))) { writeToken(); if (isStructInitializer) write(" "); else if (!currentIs(tok!"{")) newline(); } else { regenLineBreakHintsIfNecessary(index); if (peekIs(tok!"..")) writeToken(); else if (isBlockHeader(1) && !peekIs(tok!"if")) { writeToken(); if (config.dfmt_compact_labeled_statements) write(" "); else newline(); } else if (linebreakHints.canFindIndex(index)) { pushWrapIndent(); newline(); writeToken(); write(" "); } else { write(" : "); index++; } } } void formatSemicolon() { if (inlineElse && !peekIs(tok!"else")) inlineElse = false; if ((parenDepth > 0 && sBraceDepth == 0) || (sBraceDepth > 0 && niBraceDepth > 0)) { if (currentLineLength > config.dfmt_soft_max_line_length) { writeToken(); pushWrapIndent(tok!";"); newline(); } else { if (!(peekIs(tok!";") || peekIs(tok!")") || peekIs(tok!"}"))) write("; "); else write(";"); index++; } } else { writeToken(); indents.popWrapIndents(); linebreakHints = []; while (indents.topIsOneOf(tok!"enum", tok!"try", tok!"catch", tok!"finally", tok!"debug")) indents.pop(); if (indents.topAre(tok!"static", tok!"else")) { indents.pop(); indents.pop(); } indentLevel = indents.indentLevel; if (config.dfmt_brace_style == BraceStyle.allman) { if (!currentIs(tok!"{")) newline(); } else { if (currentIs(tok!"{")) indents.popTempIndents(); indentLevel = indents.indentLevel; newline(); } } } void formatLeftBrace() { import std.algorithm : map, sum, canFind; auto tIndex = tokens[index].index; if (astInformation.structInitStartLocations.canFindIndex(tIndex)) { sBraceDepth++; immutable bool multiline = isMultilineAt(index); writeToken(); if (multiline) { import std.algorithm.searching : find; auto indentInfo = astInformation.indentInfoSortedByEndLocation .find!((a,b) => a.startLocation == b)(tIndex); assert(indentInfo.length > 0); cast()indentInfo[0].flags |= BraceIndentInfoFlags.tempIndent; cast()indentInfo[0].beginIndentLevel = indents.indentLevel; indents.push(tok!"{"); newline(); } else niBraceDepth++; } else if (astInformation.funLitStartLocations.canFindIndex(tIndex)) { indents.popWrapIndents(); sBraceDepth++; if (peekBackIsOneOf(true, tok!")", tok!"identifier")) write(" "); immutable bool multiline = isMultilineAt(index); writeToken(); if (multiline) { indents.push(tok!"{"); newline(); } else { niBraceDepth++; if (!currentIs(tok!"}")) write(" "); } } else { if (peekBackIsSlashSlash()) { if (peekBack2Is(tok!";")) { indents.popTempIndents(); indentLevel = indents.indentLevel - 1; } writeToken(); } else { if (indents.topIsTemp && indents.indentToMostRecent(tok!"static") == -1) indentLevel = indents.indentLevel - 1; else indentLevel = indents.indentLevel; if (config.dfmt_brace_style == BraceStyle.allman || peekBackIsOneOf(true, tok!"{", tok!"}")) newline(); else if (config.dfmt_brace_style == BraceStyle.knr && astInformation.funBodyLocations.canFindIndex(tIndex) && (peekBackIs(tok!")") || (!peekBackIs(tok!"do") && peekBack().text != "body"))) newline(); else if (!peekBackIsOneOf(true, tok!"{", tok!"}", tok!";")) write(" "); writeToken(); } indents.push(tok!"{"); if (!currentIs(tok!"{")) newline(); linebreakHints = []; } } void formatRightBrace() { void popToBeginIndent(BraceIndentInfo indentInfo) { foreach(i; indentInfo.beginIndentLevel .. indents.indentLevel) { indents.pop(); } indentLevel = indentInfo.beginIndentLevel; } size_t pos; if (astInformation.structInitEndLocations.canFindIndex(tokens[index].index, &pos)) { if (sBraceDepth > 0) sBraceDepth--; if (niBraceDepth > 0) niBraceDepth--; auto indentInfo = astInformation.indentInfoSortedByEndLocation[pos]; if (indentInfo.flags & BraceIndentInfoFlags.tempIndent) { popToBeginIndent(indentInfo); simpleNewline(); indent(); } writeToken(); } else if (astInformation.funLitEndLocations.canFindIndex(tokens[index].index, &pos)) { if (niBraceDepth > 0) { if (!peekBackIsSlashSlash() && !peekBackIs(tok!"{")) write(" "); niBraceDepth--; } if (sBraceDepth > 0) sBraceDepth--; writeToken(); } else { // Silly hack to format enums better. if ((peekBackIsLiteralOrIdent() || peekBackIsOneOf(true, tok!")", tok!",")) && !peekBackIsSlashSlash()) newline(); write("}"); if (index + 1 < tokens.length && astInformation.doubleNewlineLocations.canFindIndex(tokens[index].index) && !peekIs(tok!"}") && !peekIs(tok!"else") && !peekIs(tok!";") && !peekIs(tok!"comment", false)) { simpleNewline(); currentLineLength = 0; justAddedExtraNewline = true; } if (config.dfmt_brace_style.among(BraceStyle.otbs, BraceStyle.knr) && ((peekIs(tok!"else") && !indents.topAre(tok!"static", tok!"if") && !indents.topIs(tok!"foreach") && !indents.topIs(tok!"for") && !indents.topIs(tok!"while") && !indents.topIs(tok!"do")) || peekIs(tok!"catch") || peekIs(tok!"finally"))) { write(" "); index++; } else { if (!peekIs(tok!",") && !peekIs(tok!")") && !peekIs(tok!";") && !peekIs(tok!"{")) { index++; if (indents.topIs(tok!"static")) indents.pop(); newline(); } else index++; } } } void formatSwitch() { while (indents.topIs(tok!"with")) indents.pop(); indents.push(tok!"switch"); writeToken(); // switch write(" "); } void formatBlockHeader() { if (indents.topIs(tok!"!")) indents.pop(); immutable bool a = !currentIs(tok!"version") && !currentIs(tok!"debug"); immutable bool b = a || astInformation.conditionalWithElseLocations.canFindIndex(current.index); immutable bool c = b || astInformation.conditionalStatementLocations.canFindIndex(current.index); immutable bool shouldPushIndent = (c || peekBackIs(tok!"else")) && !(currentIs(tok!"if") && indents.topIsWrap()); if (currentIs(tok!"out") && !peekBackIs(tok!"}")) newline(); if (shouldPushIndent) { if (peekBackIs(tok!"static")) { if (indents.topIs(tok!"else")) indents.pop(); if (!indents.topIs(tok!"static")) indents.push(tok!"static"); } indents.push(current.type); } writeToken(); if (currentIs(tok!"(")) { write(" "); writeParens(false); } if (hasCurrent) { if (currentIs(tok!"switch") || (currentIs(tok!"final") && peekIs(tok!"switch"))) write(" "); else if (currentIs(tok!"comment")) formatStep(); else if (!shouldPushIndent) { if (!currentIs(tok!"{") && !currentIs(tok!";")) write(" "); } else if (hasCurrent && !currentIs(tok!"{") && !currentIs(tok!";") && !currentIs(tok!"in") && !currentIs(tok!"out") && !currentIs(tok!"do") && current.text != "body") { newline(); } else if (currentIs(tok!"{") && indents.topAre(tok!"static", tok!"if")) { // Hacks to format braced vs non-braced static if declarations. indents.pop(); indents.pop(); indents.push(tok!"if"); formatLeftBrace(); } else if (currentIs(tok!"{") && indents.topAre(tok!"static", tok!"foreach")) { indents.pop(); indents.pop(); indents.push(tok!"foreach"); formatLeftBrace(); } else if (currentIs(tok!"{") && indents.topAre(tok!"static", tok!"foreach_reverse")) { indents.pop(); indents.pop(); indents.push(tok!"foreach_reverse"); formatLeftBrace(); } } } void formatElse() { writeToken(); if (inlineElse || currentIs(tok!"if") || currentIs(tok!"version") || (currentIs(tok!"static") && peekIs(tok!"if"))) { if (indents.topIs(tok!"if") || indents.topIs(tok!"version")) indents.pop(); inlineElse = false; write(" "); } else if (currentIs(tok!":")) { writeToken(); newline(); } else if (!currentIs(tok!"{") && !currentIs(tok!"comment")) { //indents.dump(); while (indents.topIsOneOf(tok!"foreach", tok!"for", tok!"while")) indents.pop(); if (indents.topIsOneOf(tok!"if", tok!"version")) indents.pop(); indents.push(tok!"else"); newline(); } else if (currentIs(tok!"{") && indents.topAre(tok!"static", tok!"if")) { indents.pop(); indents.pop(); indents.push(tok!"else"); } } void formatKeyword() { import dfmt.editorconfig : OptionalBoolean; switch (current.type) { case tok!"default": writeToken(); break; case tok!"cast": writeToken(); if (currentIs(tok!"(")) writeParens(config.dfmt_space_after_cast == OptionalBoolean.t); break; case tok!"out": if (!peekBackIsSlashSlash) { if (!peekBackIs(tok!"}") && astInformation.contractLocations.canFindIndex(current.index)) newline(); else if (peekBackIsKeyword) write(" "); } writeToken(); if (!currentIs(tok!"{") && !currentIs(tok!"comment")) write(" "); break; case tok!"try": case tok!"finally": indents.push(current.type); writeToken(); if (!currentIs(tok!"{")) newline(); break; case tok!"identifier": if (current.text == "body") goto case tok!"do"; else goto default; case tok!"do": if (!peekBackIs(tok!"}")) newline(); writeToken(); break; case tok!"in": immutable isContract = astInformation.contractLocations.canFindIndex(current.index); if (!peekBackIsSlashSlash) { if (isContract) { indents.popTempIndents(); newline(); } else if (!peekBackIsOneOf(false, tok!"(", tok!",", tok!"!")) write(" "); } writeToken(); immutable isFunctionLit = astInformation.funLitStartLocations.canFindIndex( current.index); if (isFunctionLit && config.dfmt_brace_style == BraceStyle.allman) newline(); else if (!isContract || currentIs(tok!"(")) write(" "); break; case tok!"is": if (!peekBackIsOneOf(false, tok!"!", tok!"(", tok!",", tok!"}", tok!"=", tok!"&&", tok!"||") && !peekBackIsKeyword()) write(" "); writeToken(); if (!currentIs(tok!"(") && !currentIs(tok!"{") && !currentIs(tok!"comment")) write(" "); break; case tok!"case": writeToken(); if (!currentIs(tok!";")) write(" "); break; case tok!"enum": if (peekIs(tok!")") || peekIs(tok!"==")) { writeToken(); } else { if (peekBackIs(tok!"identifier")) write(" "); indents.push(tok!"enum"); writeToken(); if (!currentIs(tok!":") && !currentIs(tok!"{")) write(" "); } break; case tok!"static": { if (astInformation.staticConstructorDestructorLocations .canFindIndex(current.index)) { thisSpace = true; } } goto default; case tok!"shared": { if (astInformation.sharedStaticConstructorDestructorLocations .canFindIndex(current.index)) { thisSpace = true; } } goto default; case tok!"invariant": writeToken(); if (currentIs(tok!"(")) write(" "); break; default: if (peekBackIs(tok!"identifier")) { writeSpace(); } if (index + 1 < tokens.length) { if (!peekIs(tok!"@") && (peekIsOperator() || peekIs(tok!"out") || peekIs(tok!"in"))) { writeToken(); } else { writeToken(); if (!currentIsIndentedTemplateConstraint()) { writeSpace(); } } } else writeToken(); break; } } bool currentIsIndentedTemplateConstraint() { return hasCurrent && astInformation.constraintLocations.canFindIndex(current.index) && (config.dfmt_template_constraint_style == TemplateConstraintStyle.always_newline || config.dfmt_template_constraint_style == TemplateConstraintStyle.always_newline_indent || currentLineLength >= config.dfmt_soft_max_line_length); } void formatOperator() { import dfmt.editorconfig : OptionalBoolean; import std.algorithm : canFind; switch (current.type) { case tok!"*": if (astInformation.spaceAfterLocations.canFindIndex(current.index)) { writeToken(); if (!currentIs(tok!"*") && !currentIs(tok!")") && !currentIs(tok!"[") && !currentIs(tok!",") && !currentIs(tok!";")) { write(" "); } break; } else if (astInformation.unaryLocations.canFindIndex(current.index)) { writeToken(); break; } regenLineBreakHintsIfNecessary(index); goto binary; case tok!"~": if (peekIs(tok!"this") && peek2Is(tok!"(")) { if (!(index == 0 || peekBackIs(tok!"{", true) || peekBackIs(tok!"}", true) || peekBackIs(tok!";", true))) { write(" "); } writeToken(); break; } goto case; case tok!"&": case tok!"+": case tok!"-": if (astInformation.unaryLocations.canFindIndex(current.index)) { writeToken(); break; } regenLineBreakHintsIfNecessary(index); goto binary; case tok!"[": case tok!"(": formatLeftParenOrBracket(); break; case tok!")": formatRightParen(); break; case tok!"@": formatAt(); break; case tok!"!": if (((peekIs(tok!"is") || peekIs(tok!"in")) && !peekBackIsOperator()) || peekBackIs(tok!")")) write(" "); goto case; case tok!"...": case tok!"++": case tok!"--": case tok!"$": writeToken(); break; case tok!":": formatColon(); break; case tok!"]": formatRightBracket(); break; case tok!";": formatSemicolon(); break; case tok!"{": formatLeftBrace(); break; case tok!"}": formatRightBrace(); break; case tok!".": regenLineBreakHintsIfNecessary(index); immutable bool ufcsWrap = astInformation.ufcsHintLocations.canFindIndex(current.index); if (ufcsWrap || linebreakHints.canFind(index) || onNextLine || (linebreakHints.length == 0 && currentLineLength + nextTokenLength() > config.max_line_length)) { pushWrapIndent(); if (!peekBackIs(tok!"comment")) newline(); if (ufcsWrap || onNextLine) regenLineBreakHints(index); } writeToken(); break; case tok!",": formatComma(); break; case tok!"&&": case tok!"||": case tok!"|": regenLineBreakHintsIfNecessary(index); goto case; case tok!"=": case tok!">=": case tok!">>=": case tok!">>>=": case tok!"|=": case tok!"-=": case tok!"/=": case tok!"*=": case tok!"&=": case tok!"%=": case tok!"+=": case tok!"^^": case tok!"^=": case tok!"^": case tok!"~=": case tok!"<<=": case tok!"<<": case tok!"<=": case tok!"<>=": case tok!"<>": case tok!"<": case tok!"==": case tok!"=>": case tok!">>>": case tok!">>": case tok!">": case tok!"!<=": case tok!"!<>=": case tok!"!<>": case tok!"!<": case tok!"!=": case tok!"!>=": case tok!"!>": case tok!"?": case tok!"/": case tok!"..": case tok!"%": binary: immutable bool isWrapToken = linebreakHints.canFind(index); if (config.dfmt_keep_line_breaks == OptionalBoolean.t && index > 0) { const operatorLine = tokens[index].line; const rightOperandLine = tokens[index + 1].line; if (tokens[index - 1].line < operatorLine) { if (!indents.topIs(tok!"enum")) pushWrapIndent(); if (!peekBackIs(tok!"comment")) newline(); } else { write(" "); } if (rightOperandLine > operatorLine && !indents.topIs(tok!"enum")) { pushWrapIndent(); } writeToken(); if (rightOperandLine > operatorLine) { if (!peekBackIs(tok!"comment")) newline(); } else { write(" "); } } else if (config.dfmt_split_operator_at_line_end) { if (isWrapToken) { if (!indents.topIs(tok!"enum")) pushWrapIndent(); write(" "); writeToken(); newline(); } else { write(" "); writeToken(); if (!currentIs(tok!"comment")) write(" "); } } else { if (isWrapToken) { if (!indents.topIs(tok!"enum")) pushWrapIndent(); newline(); writeToken(); } else { write(" "); writeToken(); } if (!currentIs(tok!"comment")) write(" "); } break; default: writeToken(); break; } } void formatComma() { import dfmt.editorconfig : OptionalBoolean; import std.algorithm : canFind; if (config.dfmt_keep_line_breaks == OptionalBoolean.f) regenLineBreakHintsIfNecessary(index); if (indents.indentToMostRecent(tok!"enum") != -1 && !peekIs(tok!"}") && indents.topIs(tok!"{") && parenDepth == 0) { writeToken(); newline(); } else if (indents.topIs(tok!"]") && indents.topDetails.breakEveryItem && !indents.topDetails.mini) { writeToken(); newline(); regenLineBreakHints(index - 1); } else if (indents.topIs(tok!"]") && indents.topDetails.preferLongBreaking && !currentIs(tok!")") && !currentIs(tok!"]") && !currentIs(tok!"}") && !currentIs(tok!"comment") && index + 1 < tokens.length && isMultilineAt(index + 1, true)) { writeToken(); newline(); regenLineBreakHints(index - 1); } else if (config.dfmt_keep_line_breaks == OptionalBoolean.t) { const commaLine = tokens[index].line; writeToken(); if (!currentIs(tok!")") && !currentIs(tok!"]") && !currentIs(tok!"}") && !currentIs(tok!"comment")) { if (tokens[index].line == commaLine) { write(" "); } else { newline(); } } } else if (!peekIs(tok!"}") && (linebreakHints.canFind(index) || (linebreakHints.length == 0 && currentLineLength > config.max_line_length))) { pushWrapIndent(); writeToken(); newline(); } else { writeToken(); if (!currentIs(tok!")") && !currentIs(tok!"]") && !currentIs(tok!"}") && !currentIs(tok!"comment")) { write(" "); } } regenLineBreakHintsIfNecessary(index - 1); } void regenLineBreakHints(immutable size_t i) { import std.range : assumeSorted; import std.algorithm.comparison : min; import std.algorithm.searching : canFind, countUntil; // The end of the tokens considered by the line break algorithm is // either the expression end index or the next mandatory line break // or a newline inside a string literal, whichever is first. auto r = assumeSorted(astInformation.ufcsHintLocations).upperBound(tokens[i].index); immutable ufcsBreakLocation = r.empty ? size_t.max : tokens[i .. $].countUntil!(t => t.index == r.front) + i; immutable multilineStringLocation = tokens[i .. $] .countUntil!(t => t.text.canFind('\n')); immutable size_t j = min( expressionEndIndex(i), ufcsBreakLocation, multilineStringLocation == -1 ? size_t.max : multilineStringLocation + i + 1); // Use magical negative value for array literals and wrap indents immutable inLvl = (indents.topIsWrap() || indents.topIs(tok!"]")) ? -indentLevel : indentLevel; linebreakHints = chooseLineBreakTokens(i, tokens[i .. j], depths[i .. j], config, currentLineLength, inLvl); } void regenLineBreakHintsIfNecessary(immutable size_t i) { if (linebreakHints.length == 0 || linebreakHints[$ - 1] <= i - 1) regenLineBreakHints(i); } void simpleNewline() { import dfmt.editorconfig : EOL; output.put(eolString); } void newline() { import std.range : assumeSorted; import std.algorithm : max, canFind; import dfmt.editorconfig : OptionalBoolean; parenDepthOnLine = 0; if (currentIs(tok!"comment") && index > 0 && current.line == tokenEndLine(tokens[index - 1])) return; immutable bool hasCurrent = this.hasCurrent; if (niBraceDepth > 0 && !peekBackIsSlashSlash() && hasCurrent && tokens[index].type == tok!"}" && !assumeSorted(astInformation.funLitEndLocations).equalRange( tokens[index].index).empty) { return; } simpleNewline(); if (!justAddedExtraNewline && index > 0 && hasCurrent && tokens[index].line - tokenEndLine(tokens[index - 1]) > 1) { simpleNewline(); } justAddedExtraNewline = false; currentLineLength = 0; if (hasCurrent) { if (currentIs(tok!"else")) { immutable i = indents.indentToMostRecent(tok!"if"); immutable v = indents.indentToMostRecent(tok!"version"); immutable mostRecent = max(i, v); if (mostRecent != -1) indentLevel = mostRecent; } else if (currentIs(tok!"identifier") && peekIs(tok!":")) { if (peekBackIs(tok!"}", true) || peekBackIs(tok!";", true)) indents.popTempIndents(); immutable l = indents.indentToMostRecent(tok!"switch"); if (l != -1 && config.dfmt_align_switch_statements == OptionalBoolean.t) indentLevel = l; else if (astInformation.structInfoSortedByEndLocation .canFind!(st => st.startLocation < current.index && current.index < st.endLocation)) { immutable l2 = indents.indentToMostRecent(tok!"{"); assert(l2 != -1, "Recent '{' is not found despite being in struct initializer"); indentLevel = l2 + 1; } else if ((config.dfmt_compact_labeled_statements == OptionalBoolean.f || !isBlockHeader(2) || peek2Is(tok!"if")) && !indents.topIs(tok!"]")) { immutable l2 = indents.indentToMostRecent(tok!"{"); indentLevel = l2 != -1 ? l2 : indents.indentLevel - 1; } else indentLevel = indents.indentLevel; } else if (currentIs(tok!"case") || currentIs(tok!"default")) { if (peekBackIs(tok!"}", true) || peekBackIs(tok!";", true) /** * The following code is valid and should be indented flatly * case A: * case B: */ || peekBackIs(tok!":", true)) { indents.popTempIndents(); if (indents.topIs(tok!"case")) indents.pop(); } immutable l = indents.indentToMostRecent(tok!"switch"); if (l != -1) indentLevel = config.dfmt_align_switch_statements == OptionalBoolean.t ? l : indents.indentLevel; } else if (currentIs(tok!")")) { if (indents.topIs(tok!"(")) indents.pop(); indentLevel = indents.indentLevel; } else if (currentIs(tok!"{")) { indents.popWrapIndents(); if ((peekBackIsSlashSlash() && peekBack2Is(tok!";")) || indents.topIs(tok!"]")) { indents.popTempIndents(); indentLevel = indents.indentLevel; } } else if (currentIs(tok!"}")) { indents.popTempIndents(); while (indents.topIsOneOf(tok!"case", tok!"@", tok!"static")) indents.pop(); if (indents.topIs(tok!"{")) { indentLevel = indents.indentToMostRecent(tok!"{"); indents.pop(); } if (indents.topIsOneOf(tok!"try", tok!"catch")) { indents.pop(); } else while (sBraceDepth == 0 && indents.topIsTemp() && ((!indents.topIsOneOf(tok!"else", tok!"if", tok!"static", tok!"version")) || !peekIs(tok!"else"))) { indents.pop(); } } else if (currentIs(tok!"]")) { indents.popWrapIndents(); if (indents.topIs(tok!"]")) { indents.pop(); indentLevel = indents.indentLevel; } } else if (astInformation.attributeDeclarationLines.canFindIndex(current.line)) { if (config.dfmt_outdent_attributes == OptionalBoolean.t) { immutable l = indents.indentToMostRecent(tok!"{"); if (l != -1) indentLevel = l; } else { if (indents.topIs(tok!"@")) indents.pop(); indentLevel = indents.indentLevel; } } else if (currentIs(tok!"catch") || currentIs(tok!"finally")) { indentLevel = indents.indentLevel; } else { if (indents.topIsTemp() && (peekBackIsOneOf(true, tok!"}", tok!";") && !indents.topIs(tok!";"))) indents.popTempIndents(); indentLevel = indents.indentLevel; } indent(); } } void write(string str) { currentLineLength += str.length; output.put(str); } void writeToken() { import std.range:retro; import std.algorithm.searching:countUntil; import std.algorithm.iteration:joiner; import std.string:lineSplitter; if (current.text is null) { immutable s = str(current.type); currentLineLength += s.length; output.put(str(current.type)); } else { output.put(current.text.lineSplitter.joiner(eolString)); switch (current.type) { case tok!"stringLiteral": case tok!"wstringLiteral": case tok!"dstringLiteral": immutable o = current.text.retro().countUntil('\n'); if (o == -1) { currentLineLength += current.text.length; } else { currentLineLength = cast(uint) o; } break; default: currentLineLength += current.text.length; break; } } index++; } void writeParens(bool spaceAfter) in { assert(currentIs(tok!"("), str(current.type)); } do { immutable int depth = parenDepth; immutable int startingNiBraceDepth = niBraceDepth; immutable int startingSBraceDepth = sBraceDepth; parenDepth = 0; do { spaceAfterParens = spaceAfter; if (currentIs(tok!";") && niBraceDepth <= startingNiBraceDepth && sBraceDepth <= startingSBraceDepth) { if (currentLineLength >= config.dfmt_soft_max_line_length) { pushWrapIndent(); writeToken(); newline(); } else { writeToken(); if (!currentIs(tok!")") && !currentIs(tok!";")) write(" "); } } else formatStep(); } while (hasCurrent && parenDepth > 0); if (indents.topIs(tok!"!")) indents.pop(); parenDepth = depth; spaceAfterParens = spaceAfter; } void indent() { import dfmt.editorconfig : IndentStyle; if (config.indent_style == IndentStyle.tab) { foreach (i; 0 .. indentLevel) { currentLineLength += config.tab_width; output.put("\t"); } } else { foreach (i; 0 .. indentLevel) foreach (j; 0 .. config.indent_size) { output.put(" "); currentLineLength++; } } } void pushWrapIndent(IdType type = tok!"") { immutable t = type == tok!"" ? tokens[index].type : type; IndentStack.Details detail; detail.wrap = isWrapIndent(t); detail.temp = isTempIndent(t); pushWrapIndent(t, detail); } void pushWrapIndent(IdType type, IndentStack.Details detail) { if (parenDepth == 0) { if (indents.wrapIndents == 0) indents.push(type, detail); } else if (indents.wrapIndents < 1) indents.push(type, detail); } void writeSpace() { if (onNextLine) { newline(); } else { write(" "); } } const pure @safe @nogc: size_t expressionEndIndex(size_t i, bool matchComma = false) nothrow { immutable bool braces = i < tokens.length && tokens[i].type == tok!"{"; immutable bool brackets = i < tokens.length && tokens[i].type == tok!"["; immutable d = depths[i]; while (true) { if (i >= tokens.length) break; if (depths[i] < d) break; if (!braces && !brackets && matchComma && depths[i] == d && tokens[i].type == tok!",") break; if (!braces && !brackets && (tokens[i].type == tok!";" || tokens[i].type == tok!"{")) break; i++; } return i; } /// Returns: true when the expression starting at index goes over the line length limit. /// Uses matching `{}` or `[]` or otherwise takes everything up until a semicolon or opening brace using expressionEndIndex. bool isMultilineAt(size_t i, bool matchComma = false) { import std.algorithm : map, sum, canFind; auto e = expressionEndIndex(i, matchComma); immutable int l = currentLineLength + tokens[i .. e].map!(a => tokenLength(a)).sum(); return l > config.dfmt_soft_max_line_length || tokens[i .. e].canFind!( a => a.type == tok!"comment" || isBlockHeaderToken(a.type))(); } bool peekIsKeyword() nothrow { return index + 1 < tokens.length && isKeyword(tokens[index + 1].type); } bool peekIsBasicType() nothrow { return index + 1 < tokens.length && isBasicType(tokens[index + 1].type); } bool peekIsLabel() nothrow { return peekIs(tok!"identifier") && peek2Is(tok!":"); } int currentTokenLength() { return tokenLength(tokens[index]); } int nextTokenLength() { immutable size_t i = index + 1; if (i >= tokens.length) return INVALID_TOKEN_LENGTH; return tokenLength(tokens[i]); } bool hasCurrent() nothrow const { return index < tokens.length; } ref current() nothrow in { assert(hasCurrent); } do { return tokens[index]; } const(Token) peekBack(uint distance = 1) nothrow { assert(index >= distance, "Trying to peek before the first token"); return tokens[index - distance]; } bool peekBackIsLiteralOrIdent() nothrow { if (index == 0) return false; switch (tokens[index - 1].type) { case tok!"doubleLiteral": case tok!"floatLiteral": case tok!"idoubleLiteral": case tok!"ifloatLiteral": case tok!"intLiteral": case tok!"longLiteral": case tok!"realLiteral": case tok!"irealLiteral": case tok!"uintLiteral": case tok!"ulongLiteral": case tok!"characterLiteral": case tok!"identifier": case tok!"stringLiteral": case tok!"wstringLiteral": case tok!"dstringLiteral": case tok!"true": case tok!"false": return true; default: return false; } } bool peekIsLiteralOrIdent() nothrow { if (index + 1 >= tokens.length) return false; switch (tokens[index + 1].type) { case tok!"doubleLiteral": case tok!"floatLiteral": case tok!"idoubleLiteral": case tok!"ifloatLiteral": case tok!"intLiteral": case tok!"longLiteral": case tok!"realLiteral": case tok!"irealLiteral": case tok!"uintLiteral": case tok!"ulongLiteral": case tok!"characterLiteral": case tok!"identifier": case tok!"stringLiteral": case tok!"wstringLiteral": case tok!"dstringLiteral": return true; default: return false; } } bool peekBackIs(IdType tokenType, bool ignoreComments = false) nothrow { return peekImplementation(tokenType, -1, ignoreComments); } bool peekBackIsKeyword(bool ignoreComments = true) nothrow { if (index == 0) return false; auto i = index - 1; if (ignoreComments) while (tokens[i].type == tok!"comment") { if (i == 0) return false; i--; } return isKeyword(tokens[i].type); } bool peekBackIsOperator() nothrow { return index == 0 ? false : isOperator(tokens[index - 1].type); } bool peekBackIsOneOf(bool ignoreComments, IdType[] tokenTypes...) nothrow { if (index == 0) return false; auto i = index - 1; if (ignoreComments) while (tokens[i].type == tok!"comment") { if (i == 0) return false; i--; } immutable t = tokens[i].type; foreach (tt; tokenTypes) if (tt == t) return true; return false; } bool peekBack2Is(IdType tokenType, bool ignoreComments = false) nothrow { return peekImplementation(tokenType, -2, ignoreComments); } bool peekImplementation(IdType tokenType, int n, bool ignoreComments = true) nothrow { auto i = index + n; if (ignoreComments) while (n != 0 && i < tokens.length && tokens[i].type == tok!"comment") i = n > 0 ? i + 1 : i - 1; return i < tokens.length && tokens[i].type == tokenType; } bool peek2Is(IdType tokenType, bool ignoreComments = true) nothrow { return peekImplementation(tokenType, 2, ignoreComments); } bool peekIsOperator() nothrow { return index + 1 < tokens.length && isOperator(tokens[index + 1].type); } bool peekIs(IdType tokenType, bool ignoreComments = true) nothrow { return peekImplementation(tokenType, 1, ignoreComments); } bool peekIsBody() nothrow { return index + 1 < tokens.length && tokens[index + 1].text == "body"; } bool peekBackIsFunctionDeclarationEnding() nothrow { return peekBackIsOneOf(false, tok!")", tok!"const", tok!"immutable", tok!"inout", tok!"shared", tok!"@", tok!"pure", tok!"nothrow", tok!"return", tok!"scope"); } bool peekBackIsSlashSlash() nothrow { return index > 0 && tokens[index - 1].type == tok!"comment" && tokens[index - 1].text[0 .. 2] == "//"; } bool currentIs(IdType tokenType) nothrow { return hasCurrent && tokens[index].type == tokenType; } bool onNextLine() @nogc nothrow pure @safe { import dfmt.editorconfig : OptionalBoolean; import std.algorithm.searching : count; import std.string : representation; if (config.dfmt_keep_line_breaks == OptionalBoolean.f || index <= 0) { return false; } // To compare whether 2 tokens are on same line, we need the end line // of the first token (tokens[index - 1]) and the start line of the // second one (tokens[index]). If a token takes multiple lines (e.g. a // multi-line string), we can sum the number of the newlines in the // token and tokens[index - 1].line, the start line. const previousTokenEndLineNo = tokens[index - 1].line + tokens[index - 1].text.representation.count('\n'); return previousTokenEndLineNo < tokens[index].line; } /// Bugs: not unicode correct size_t tokenEndLine(const Token t) { import std.algorithm : count; switch (t.type) { case tok!"comment": case tok!"stringLiteral": case tok!"wstringLiteral": case tok!"dstringLiteral": return t.line + t.text.count('\n'); default: return t.line; } } bool isBlockHeaderToken(const IdType t) { return t == tok!"for" || t == tok!"foreach" || t == tok!"foreach_reverse" || t == tok!"while" || t == tok!"if" || t == tok!"in"|| t == tok!"out" || t == tok!"do" || t == tok!"catch" || t == tok!"with" || t == tok!"synchronized" || t == tok!"scope" || t == tok!"debug"; } bool isBlockHeader(int i = 0) nothrow { if (i + index < 0 || i + index >= tokens.length) return false; const t = tokens[i + index].type; bool isExpressionContract; if (i + index + 3 < tokens.length) { isExpressionContract = (t == tok!"in" && peekImplementation(tok!"(", i + 1, true)) || (t == tok!"out" && (peekImplementation(tok!"(", i + 1, true) && (peekImplementation(tok!";", i + 2, true) || (peekImplementation(tok!"identifier", i + 2, true) && peekImplementation(tok!";", i + 3, true))))); } return isBlockHeaderToken(t) && !isExpressionContract; } bool isSeparationToken(IdType t) nothrow { return t == tok!"," || t == tok!";" || t == tok!":" || t == tok!"(" || t == tok!")" || t == tok!"[" || t == tok!"]" || t == tok!"{" || t == tok!"}"; } } bool canFindIndex(const size_t[] items, size_t index, size_t* pos = null) pure @safe @nogc { import std.range : assumeSorted; if (!pos) { return !assumeSorted(items).equalRange(index).empty; } else { auto trisection_result = assumeSorted(items).trisect(index); if (trisection_result[1].length == 1) { *pos = trisection_result[0].length; return true; } else if (trisection_result[1].length == 0) { return false; } else { assert(0, "the constraint of having unique locations has been violated"); } } }
D
# FIXED BoardSupportPackage/src/UltraSonic.obj: C:/Users/Alex\ Perera/Desktop/Senior/GITHUB/BoardSupportPackage/src/UltraSonic.c BoardSupportPackage/src/UltraSonic.obj: C:/Users/Alex\ Perera/Desktop/Senior/GITHUB/BoardSupportPackage/inc/UltraSonic.h BoardSupportPackage/src/UltraSonic.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.8.LTS/include/stdint.h BoardSupportPackage/src/UltraSonic.obj: C:/Users/Alex\ Perera/Desktop/Senior/GITHUB/BoardSupportPackage/DriverLib/gpio.h BoardSupportPackage/src/UltraSonic.obj: C:/ti/ccsv7/ccs_base/arm/include/msp.h BoardSupportPackage/src/UltraSonic.obj: C:/ti/ccsv7/ccs_base/arm/include/msp432p401r.h BoardSupportPackage/src/UltraSonic.obj: C:/ti/ccsv7/ccs_base/arm/include/msp_compatibility.h BoardSupportPackage/src/UltraSonic.obj: C:/ti/ccsv7/ccs_base/arm/include/CMSIS/cmsis_ccs.h BoardSupportPackage/src/UltraSonic.obj: C:/ti/ccsv7/ccs_base/arm/include/msp432p401r_classic.h BoardSupportPackage/src/UltraSonic.obj: C:/ti/ccsv7/ccs_base/arm/include/CMSIS/core_cm4.h BoardSupportPackage/src/UltraSonic.obj: C:/ti/ccsv7/ccs_base/arm/include/CMSIS/cmsis_compiler.h BoardSupportPackage/src/UltraSonic.obj: C:/ti/ccsv7/ccs_base/arm/include/system_msp432p401r.h BoardSupportPackage/src/UltraSonic.obj: C:/Users/Alex\ Perera/Desktop/Senior/GITHUB/BoardSupportPackage/DriverLib/interrupt.h BoardSupportPackage/src/UltraSonic.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.8.LTS/include/stdbool.h C:/Users/Alex\ Perera/Desktop/Senior/GITHUB/BoardSupportPackage/src/UltraSonic.c: C:/Users/Alex\ Perera/Desktop/Senior/GITHUB/BoardSupportPackage/inc/UltraSonic.h: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.8.LTS/include/stdint.h: C:/Users/Alex\ Perera/Desktop/Senior/GITHUB/BoardSupportPackage/DriverLib/gpio.h: C:/ti/ccsv7/ccs_base/arm/include/msp.h: C:/ti/ccsv7/ccs_base/arm/include/msp432p401r.h: C:/ti/ccsv7/ccs_base/arm/include/msp_compatibility.h: C:/ti/ccsv7/ccs_base/arm/include/CMSIS/cmsis_ccs.h: C:/ti/ccsv7/ccs_base/arm/include/msp432p401r_classic.h: C:/ti/ccsv7/ccs_base/arm/include/CMSIS/core_cm4.h: C:/ti/ccsv7/ccs_base/arm/include/CMSIS/cmsis_compiler.h: C:/ti/ccsv7/ccs_base/arm/include/system_msp432p401r.h: C:/Users/Alex\ Perera/Desktop/Senior/GITHUB/BoardSupportPackage/DriverLib/interrupt.h: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.8.LTS/include/stdbool.h:
D
module ogregl.sdl.support; import ogregl.config; static if(USE_SDL) { import std.string : indexOf; import std.conv : to; debug import std.stdio; import ogre.config; import ogre.compat; import ogre.exception; import ogre.general.common; import ogre.general.log; import ogre.rendersystem.rendersystem; import ogre.rendersystem.renderwindow; import derelict.sdl2.sdl; import derelict.opengl3.gl; import ogregl.support; import ogregl.sdl.window; import ogregl.rendersystem; class SDLGLSupport : GLSupport { public: this() { DerelictSDL2.load(); DerelictGL.load(); if (SDL_Init(SDL_INIT_VIDEO) < 0) { throw new Exception("Failed to initialize SDL: " ~ to!string(SDL_GetError())); } } ~this() {} /** * Add any special config values to the system. * Must have a "Full Screen" value that is a bool and a "Video Mode" value * that is a string in the form of wxh */ override void addConfig() { //mDisplayModes = SDL_ListModes(null, SDL_WINDOW_FULLSCREEN | SDL_WINDOW_OPENGL); int disps = SDL_GetNumVideoDisplays(); if (disps < 1) { throw new RenderingApiError("Wait... no displays?", "SDLRenderSystem.initConfigOptions"); } mDisplayModes.length = disps; debug writeln("Display count: ",disps); foreach(disp; 0..disps) { int count = SDL_GetNumDisplayModes(disp); debug writeln("Display mode count: ",disp, ", ", count); if (count < 1 && disp == 0) { throw new RenderingApiError("Unable to load video modes", "SDLRenderSystem.initConfigOptions"); } else if(count < 1) continue; //atleast one works foreach(uint i; 0..count) { SDL_DisplayMode dispmode; SDL_GetDisplayMode(disp, i, &dispmode); mDisplayModes[disp] ~= dispmode; debug writeln(dispmode); } } ConfigOption optFullScreen; ConfigOption optDisplay; ConfigOption optVideoMode; ConfigOption optFSAA; ConfigOption optRTTMode; static if(RTSHADER_SYSTEM_BUILD_CORE_SHADERS) ConfigOption optEnableFixedPipeline; // FS setting possibilities optFullScreen.name = "Full Screen"; optFullScreen.possibleValues.insert("Yes"); optFullScreen.possibleValues.insert("No"); optFullScreen.currentValue = "Yes"; optFullScreen._immutable = false; optDisplay.name = "Display"; foreach(i; 0..disps) optDisplay.possibleValues.insert(std.conv.to!string(cast(char*)SDL_GetDisplayName(i))); //Is a string or just index int? optDisplay.currentValue = std.conv.to!string(cast(char*)SDL_GetDisplayName(0)); optDisplay._immutable = false; // Video mode possibilities optVideoMode.name = "Video Mode"; optVideoMode._immutable = false; //FIXME Multi display support for (size_t i = 0; i < mDisplayModes[0].length; i++) { string tmp = std.conv.text(mDisplayModes[0][i].w, " x ", mDisplayModes[0][i].h, " @ ", mDisplayModes[0][i].refresh_rate); optVideoMode.possibleValues.insert(tmp); // Make the first one default if (i == 0) { optVideoMode.currentValue = tmp; } } //FSAA possibilities optFSAA.name = "FSAA"; optFSAA.possibleValues.insert("0"); optFSAA.possibleValues.insert("2"); optFSAA.possibleValues.insert("4"); optFSAA.possibleValues.insert("6"); optFSAA.currentValue = "0"; optFSAA._immutable = false; optRTTMode.name = "RTT Preferred Mode"; optRTTMode.possibleValues.insert("FBO"); optRTTMode.possibleValues.insert("PBuffer"); optRTTMode.possibleValues.insert("Copy"); optRTTMode.currentValue = "FBO"; optRTTMode._immutable = false; static if (RTSHADER_SYSTEM_BUILD_CORE_SHADERS) { optEnableFixedPipeline.name = "Fixed Pipeline Enabled"; optEnableFixedPipeline.possibleValues.insert( "Yes" ); optEnableFixedPipeline.possibleValues.insert( "No" ); optEnableFixedPipeline.currentValue = "Yes"; optEnableFixedPipeline._immutable = false; } mOptions[optFullScreen.name] = optFullScreen; mOptions[optDisplay.name] = optDisplay; mOptions[optVideoMode.name] = optVideoMode; mOptions[optFSAA.name] = optFSAA; mOptions[optRTTMode.name] = optRTTMode; static if (RTSHADER_SYSTEM_BUILD_CORE_SHADERS) mOptions[optEnableFixedPipeline.name] = optEnableFixedPipeline; } /** * Make sure all the extra options are valid */ override string validateConfig() { return ""; } override RenderWindow createWindow(bool autoCreateWindow, GLRenderSystem renderSystem, string windowTitle) { if (autoCreateWindow) { ConfigOption* opt = "Full Screen" in mOptions; if (opt is null) throw new RenderingApiError("Can't find full screen options!", "SDLGLSupport.createWindow"); bool fullscreen = (opt.currentValue == "Yes"); opt = "Video Mode" in mOptions; if (opt is null) throw new RenderingApiError("Can't find video mode options!", "SDLGLSupport.createWindow"); ptrdiff_t pos = opt.currentValue.indexOf('x'); if (pos == -1) throw new RenderingApiError("Invalid Video Mode provided", "SDLGLSupport.createWindow"); string[] vals = opt.currentValue.split(" "); debug writeln(vals[0], ", ", vals[2]); uint w = to!uint(vals[0]); uint h = to!uint(vals[2]); // Parse FSAA config NameValuePairList winOptions; winOptions["title"] = windowTitle; int fsaa_x_samples = 0; opt = "FSAA" in mOptions; if(opt !is null) { winOptions["FSAA"] = opt.currentValue; } static if (RTSHADER_SYSTEM_BUILD_CORE_SHADERS) { opt = "Fixed Pipeline Enabled" in mOptions; if (opt is null) throw new InvalidParamsError("Can't find Fixed Pipeline enabled options!", "SDLGLSupport.createWindow"); bool enableFixedPipeline = (opt.currentValue == "Yes"); renderSystem.setFixedPipelineEnabled(enableFixedPipeline); } //SDL_VideoInfo* videoInfo = SDL_GetVideoInfo(); //FIXME Iffy call to createRenderWindow. Maybe meant Root.createRenderWindow ? return renderSystem._createRenderWindow(windowTitle, w, h, fullscreen, winOptions); } else { // XXX What is the else? return null; } } /// @copydoc RenderSystem::createRenderWindow override RenderWindow newWindow(string name, uint width, uint height, bool fullScreen, NameValuePairList miscParams = null) { SDLWindow window = new SDLWindow(); window.create(name, width, height, fullScreen, miscParams); return window; } /** * Start anything special */ override void start() { LogManager.getSingleton().logMessage( "******************************\n" "*** Starting SDL Subsystem ***\n" "******************************"); if (SDL_Init(SDL_INIT_VIDEO) < 0) { throw new Exception("Failed to initialize SDL: " ~ to!string(SDL_GetError())); } } /** * Stop anything special */ override void stop() { LogManager.getSingleton().logMessage( "******************************\n" "*** Stopping SDL Subsystem ***\n" "******************************"); //SDL_Quit(); } /** * Get the address of a function */ override void* getProcAddress(string procname) { return SDL_GL_GetProcAddress(CSTR(procname)); } private: // Allowed video modes //SDL_Rect** mDisplayModes; SDL_DisplayMode[][] mDisplayModes; } // class SDLGLSupport }
D
// Written in the D programming language. /** This module contains UI internationalization support implementation. UIString struct provides string container which can be either plain unicode string or id of string resource. Translation strings are being stored in translation files, consisting of simple key=value pair lines: --- STRING_RESOURCE_ID=Translation text 1 ANOTHER_STRING_RESOURCE_ID=Translation text 2 --- Supports fallback to another translation file (e.g. default language). If string resource is not found neither in main nor fallback translation files, UNTRANSLATED: RESOURCE_ID will be returned. String resources must be placed in i18n subdirectory inside one or more resource directories (set using Platform.instance.resourceDirs property on application initialization). File names must be language code with extension .ini (e.g. en.ini, fr.ini, es.ini) If several files for the same language are found in (different directories) their content will be merged. It's useful to merge string resources from DLangUI framework with resources of application. Set interface language using Platform.instance.uiLanguage in UIAppMain during initialization of application settings: --- Platform.instance.uiLanguage = "en"; --- Synopsis: ---- import dlangui.core.i18n; // use global i18n object to get translation for string ID dstring translated = i18n.get("STR_FILE_OPEN"); // as well, you can specify fallback value - to return if translation is not found dstring translated = i18n.get("STR_FILE_OPEN", "Open..."d); // UIString type can hold either string resource id or dstring raw value. UIString text; // assign resource id as string (will remove dstring value if it was here) text = "ID_FILE_EXIT"; // or assign raw value as dstring (will remove id if it was here) text = "some text"d; // assign both resource id and fallback value - to use if string resource is not found text = UIString("ID_FILE_EXIT", "Exit"d); // i18n.get() will automatically be invoked when getting UIString value (e.g. using alias this). dstring translated = text; ---- Copyright: Vadim Lopatin, 2014 License: Boost License 1.0 Authors: Vadim Lopatin, coolreader.org@gmail.com */ module dlangui.core.i18n; import dlangui.core.types; import dlangui.core.logger; import dlangui.core.files; import dlangui.graphics.resources; private import dlangui.core.linestream; private import std.utf; private import std.algorithm; private import std.string; private import std.file; /** Container for UI string - either raw value or string resource ID Set resource id (string) or plain unicode text (dstring) to it, and get dstring. */ struct UIString { /** if not null, use it, otherwise lookup by id */ private dstring _value; /** id to find value in translator */ private string _id; /** create string with i18n resource id */ this(string id) { _id = id; } /** create string with raw value */ this(dstring value) { _value = value; } /** create string with resource id and raw value as fallback for missing translations */ this(string id, dstring fallbackValue) { _id = id; _value = fallbackValue; } /// Returns string resource id @property string id() const { return _id; } /// Sets string resource id @property void id(string ID) { _id = ID; _value = null; } /** Get value (either raw or translated by id) */ @property dstring value() const { if (_id !is null) // translate ID to dstring return i18n.get(_id, _value); // get from resource, use _value as fallback return _value; } /** Set raw value using property */ @property void value(dstring newValue) { _value = newValue; } /** Assign raw value */ ref UIString opAssign(dstring rawValue) { _value = rawValue; _id = null; return this; } /** Assign string resource id */ ref UIString opAssign(string ID) { _id = ID; _value = null; return this; } /// returns true if string is empty: neither resource nor string is assigned bool empty() const { return _value.length == 0 && _id.length == 0; } /** Default conversion to dstring */ alias value this; } /** UIString item collection Based on array. */ struct UIStringCollection { private UIString[] _items; private int _length; /** Returns number of items */ @property int length() const { return _length; } /** Slice */ UIString[] opIndex() { return _items[0 .. _length]; } /** Slice */ UIString[] opSlice() { return _items[0 .. _length]; } /** Slice */ UIString[] opSlice(size_t start, size_t end) { return _items[start .. end]; } /** Read item by index */ UIString opIndex(size_t index) const { return _items[index]; } /** Modify item by index */ UIString opIndexAssign(UIString value, size_t index) { _items[index] = value; return _items[index]; } /** Return unicode string for item by index */ dstring get(size_t index) const { return _items[index].value; } /** Assign UIStringCollection */ void opAssign(ref UIStringCollection items) { clear(); addAll(items); } /** Append UIStringCollection */ void addAll(ref UIStringCollection items) { foreach (UIString item; items) { add(item); } } /** Assign array of string resource IDs */ void opAssign(string[] items) { clear(); addAll(items); } /** Append array of string resource IDs */ void addAll(string[] items) { foreach (string item; items) { add(item); } } /** Assign array of unicode strings */ void opAssign(dstring[] items) { clear(); addAll(items); } /** Append array of unicode strings */ void addAll(dstring[] items) { foreach (dstring item; items) { add(item); } } /** Remove all items */ void clear() { _items.length = 0; _length = 0; } /** Insert resource id item into specified position */ void add(string item, int index = -1) { UIString s; s = item; add(s, index); } /** Insert unicode string item into specified position */ void add(dstring item, int index = -1) { UIString s; s = item; add(s, index); } /** Insert UIString item into specified position */ void add(UIString item, int index = -1) { if (index < 0 || index > _length) index = _length; if (_items.length < _length + 1) { if (_items.length < 8) _items.length = 8; else _items.length = _items.length * 2; } for (size_t i = _length; i > index; i--) { _items[i] = _items[i + 1]; } _items[index] = item; _length++; } /** Remove item with specified index */ void remove(int index) { if (index < 0 || index >= _length) return; foreach(i; index .. _length - 1) _items[i] = _items[i + 1]; _length--; } /** Return index of first item with specified text or -1 if not found. */ int indexOf(dstring str) const { foreach(i; 0 .. _length) { if (_items[i].value.equal(str)) return i; } return -1; } /** Return index of first item with specified string resource id or -1 if not found. */ int indexOf(string strId) const { foreach(i; 0 .. _length) { if (_items[i].id.equal(strId)) return i; } return -1; } /** Return index of first item with specified string or -1 if not found. */ int indexOf(UIString str) const { if (str.id !is null) return indexOf(str.id); return indexOf(str.value); } } /** UI Strings internationalization translator */ synchronized class UIStringTranslator { private UIStringList _main; private UIStringList _fallback; private string[] _resourceDirs; /** Looks for i18n directory inside one of passed dirs, and uses first found as directory to read i18n files from */ void findTranslationsDir(string[] dirs ...) { _resourceDirs.length = 0; foreach(dir; dirs) { string path = appendPath(dir, "i18n/"); if (exists(path) && isDir(path)) { Log.i("Adding i18n dir ", path); _resourceDirs ~= path; } } } /** Convert resource path - append resource dir if necessary */ string[] convertResourcePaths(string filename) { if (filename is null) return null; bool hasPathDelimiters = false; foreach(char ch; filename) if (ch == '/' || ch == '\\') hasPathDelimiters = true; string[] res; if (!hasPathDelimiters) { string fn = EMBEDDED_RESOURCE_PREFIX ~ "std_" ~ filename; string s = cast(string)loadResourceBytes(fn); if (s) res ~= fn; fn = EMBEDDED_RESOURCE_PREFIX ~ filename; s = cast(string)loadResourceBytes(fn); if (s) res ~= fn; foreach (dir; _resourceDirs) { fn = dir ~ filename; if (exists(fn) && isFile(fn)) res ~= fn; } } else { // full path res ~= filename; } return res; } /// create empty translator this() { _main = new shared UIStringList(); _fallback = new shared UIStringList(); } /** Load translation file(s) */ bool load(string mainFilename, string fallbackFilename = null) { _main.clear(); _fallback.clear(); bool res = _main.load(convertResourcePaths(mainFilename)); if (fallbackFilename !is null) { res = _fallback.load(convertResourcePaths(fallbackFilename)) || res; } return res; } /** Translate string ID to string (returns "UNTRANSLATED: id" for missing values) */ dstring get(string id, dstring fallbackValue = null) { if (id is null) return null; dstring s = _main.get(id); if (s !is null) return s; s = _fallback.get(id); if (s !is null) return s; if (fallbackValue.length > 0) return fallbackValue; return "UNTRANSLATED: "d ~ toUTF32(id); } } /** UI string translator */ private shared class UIStringList { private dstring[string] _map; /// remove all items void clear() { _map.destroy(); } /// set item value void set(string id, dstring value) { _map[id] = value; } /// get item value, null if translation is not found for id dstring get(string id) const { if (id in _map) return _map[id]; return null; } /// load strings from stream bool load(dstring[] lines) { int count = 0; foreach (s; lines) { int eqpos = -1; int firstNonspace = -1; int lastNonspace = -1; for (int i = 0; i < s.length; i++) if (s[i] == '=') { eqpos = i; break; } else if (s[i] != ' ' && s[i] != '\t') { if (firstNonspace == -1) firstNonspace = i; lastNonspace = i; } if (eqpos > 0 && firstNonspace != -1) { string id = toUTF8(s[firstNonspace .. lastNonspace + 1]); dstring value = s[eqpos + 1 .. $].dup; set(id, value); count++; } } return count > 0; } /// convert to utf32 and split by lines (detecting line endings) static dstring[] splitLines(string src) { dstring dsrc = toUTF32(src); dstring[] split1 = split(dsrc, "\r\n"); dstring[] split2 = split(dsrc, "\r"); dstring[] split3 = split(dsrc, "\n"); if (split1.length >= split2.length && split1.length >= split3.length) return split1; if (split2.length > split3.length) return split2; return split3; } /// load strings from file (utf8, id=value lines) bool load(string[] filenames) { clear(); bool res = false; foreach(filename; filenames) { try { debug Log.d("Loading string resources from file ", filename); string s = cast(string)loadResourceBytes(filename); if (!s) { Log.e("Cannot load i18n resource from file ", filename); continue; } res = load(splitLines(s)) || res; } catch (Exception e) { Log.e("Cannot read string resources from file ", filename); } } return res; } } /** Global UI translator object */ shared UIStringTranslator i18n; shared static this() { i18n = new shared UIStringTranslator(); }
D
module org.serviio.config.entities; public import org.serviio.config.entities.ConfigEntry;
D
instance DIA_PAL_4_EXIT(C_Info) { nr = 999; condition = DIA_PAL_4_EXIT_Condition; information = DIA_PAL_4_EXIT_Info; permanent = TRUE; description = Dialog_Ende; }; func int DIA_PAL_4_EXIT_Condition() { return TRUE; }; func void DIA_PAL_4_EXIT_Info() { AI_StopProcessInfos(self); }; instance DIA_PAL_4_JOIN(C_Info) { nr = 4; condition = DIA_PAL_4_JOIN_Condition; information = DIA_PAL_4_JOIN_Info; permanent = TRUE; description = "Как мне стать паладином?"; }; func int DIA_PAL_4_JOIN_Condition() { if(other.guild == GIL_NONE) { return TRUE; }; }; func void DIA_PAL_4_JOIN_Info() { AI_Output(other,self,"DIA_PAL_4_JOIN_15_00"); //Как мне стать паладином? AI_Output(self,other,"DIA_PAL_4_JOIN_04_01"); //Если у тебя действительно серьезные намерения, то сначала ты должен поступить в услужение паладинам. AI_Output(self,other,"DIA_PAL_4_JOIN_04_02"); //Иди в казармы и поговори с лордом Андрэ. Попробуй вступить в ополчение. AI_Output(self,other,"DIA_PAL_4_JOIN_04_03"); //Возможно, там у тебя появится шанс проявить себя. }; instance DIA_PAL_4_PEOPLE(C_Info) { nr = 3; condition = DIA_PAL_4_PEOPLE_Condition; information = DIA_PAL_4_PEOPLE_Info; permanent = TRUE; description = "Кто командует здесь?"; }; func int DIA_PAL_4_PEOPLE_Condition() { if(other.guild != GIL_PAL) { return TRUE; }; }; func void DIA_PAL_4_PEOPLE_Info() { AI_Output(other,self,"DIA_PAL_4_PEOPLE_15_00"); //Кто командует здесь? AI_Output(self,other,"DIA_PAL_4_PEOPLE_04_01"); //Лорд Хаген - главнокомандующий всеми войсками на этом острове. Он занимает дом губернатора, пока мы расквартированы здесь. AI_Output(self,other,"DIA_PAL_4_PEOPLE_04_02"); //Но он очень занят. Если тебе что-то нужно, иди в казармы и поговори с лордом Андрэ. }; instance DIA_PAL_4_LOCATION(C_Info) { nr = 2; condition = DIA_PAL_4_LOCATION_Condition; information = DIA_PAL_4_LOCATION_Info; permanent = TRUE; description = "Что вы, паладины, делаете здесь, в Хоринисе?"; }; func int DIA_PAL_4_LOCATION_Condition() { if(Kapitel == 1) { return TRUE; }; }; func void DIA_PAL_4_LOCATION_Info() { AI_Output(other,self,"DIA_PAL_4_LOCATION_15_00"); //Что вы, паладины, делаете здесь, в Хоринисе? AI_Output(self,other,"DIA_PAL_4_LOCATION_04_01"); //Я не уполномочен сообщать тебе это. }; instance DIA_PAL_4_STANDARD(C_Info) { nr = 1; condition = DIA_PAL_4_STANDARD_Condition; information = DIA_PAL_4_STANDARD_Info; permanent = TRUE; description = "Что новенького?"; }; func int DIA_PAL_4_STANDARD_Condition() { return TRUE; }; func void DIA_PAL_4_STANDARD_Info() { AI_Output(other,self,"DIA_PAL_4_STANDARD_15_00"); //Что новенького? if((other.guild == GIL_PAL) || (other.guild == GIL_KDF)) { if(Kapitel <= 4) { if(MIS_OLDWORLD == LOG_SUCCESS) { AI_Output(self,other,"DIA_PAL_4_STANDARD_04_01"); //Теперь, когда мы знаем, что имеем дело с драконами, наш главнокомандующий наверняка вскоре что-то предпримет. } else { AI_Output(self,other,"DIA_PAL_4_STANDARD_04_02"); //У нас все еще нет никаких новостей от нашего отряда в Долине Рудников. Это тревожный знак. }; }; if(Kapitel >= 5) { AI_Output(self,other,"DIA_PAL_4_STANDARD_04_03"); //Слава Инносу! Драконы больше не угрожают нам. Теперь нам осталось только разобраться с орками, чтобы начать спокойно добывать руду. }; } else { AI_Output(self,other,"DIA_PAL_4_STANDARD_04_04"); //У меня нет времени на обсуждение слухов, ходящих в городе. }; }; func void B_AssignAmbientInfos_PAL_4(var C_Npc slf) { dia_pal_4_exit.npc = Hlp_GetInstanceID(slf); dia_pal_4_join.npc = Hlp_GetInstanceID(slf); dia_pal_4_people.npc = Hlp_GetInstanceID(slf); dia_pal_4_location.npc = Hlp_GetInstanceID(slf); dia_pal_4_standard.npc = Hlp_GetInstanceID(slf); };
D