code
stringlengths 3
10M
| language
stringclasses 31
values |
|---|---|
<?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_All_agm-1989727678.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</availablePage>
</pageList>
<sashModel currentSelection="//@sashModel/@windows.0/@children.0">
<windows>
<children xsi:type="di:TabFolder">
<children>
<emfPageIdentifier href="VAR_All_agm-1989727678.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</children>
</children>
</windows>
</sashModel>
</di:SashWindowsMngr>
|
D
|
/Users/marvinevins/Library/Autosave\ Information/weatherApp/DerivedData/weatherApp/Build/Intermediates.noindex/weatherApp.build/Debug-iphonesimulator/weatherApp.build/Objects-normal/x86_64/WeatherLocation.o : /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/SceneDelegate.swift /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/AppDelegate.swift /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/WeatherLocation.swift /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/LocationListViewController.swift /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/APIkeys.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 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.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.5.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/marvinevins/Library/Autosave\ Information/weatherApp/DerivedData/weatherApp/Build/Intermediates.noindex/weatherApp.build/Debug-iphonesimulator/weatherApp.build/Objects-normal/x86_64/WeatherLocation~partial.swiftmodule : /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/SceneDelegate.swift /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/AppDelegate.swift /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/WeatherLocation.swift /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/LocationListViewController.swift /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/APIkeys.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 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.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.5.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/marvinevins/Library/Autosave\ Information/weatherApp/DerivedData/weatherApp/Build/Intermediates.noindex/weatherApp.build/Debug-iphonesimulator/weatherApp.build/Objects-normal/x86_64/WeatherLocation~partial.swiftdoc : /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/SceneDelegate.swift /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/AppDelegate.swift /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/WeatherLocation.swift /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/LocationListViewController.swift /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/APIkeys.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 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.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.5.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/marvinevins/Library/Autosave\ Information/weatherApp/DerivedData/weatherApp/Build/Intermediates.noindex/weatherApp.build/Debug-iphonesimulator/weatherApp.build/Objects-normal/x86_64/WeatherLocation~partial.swiftsourceinfo : /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/SceneDelegate.swift /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/AppDelegate.swift /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/WeatherLocation.swift /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/LocationListViewController.swift /Users/marvinevins/Library/Autosave\ Information/weatherApp/weatherApp/APIkeys.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 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.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.5.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
module android.java.android.app.ActivityManager_MemoryInfo;
public import android.java.android.app.ActivityManager_MemoryInfo_d_interface;
import arsd.jni : ImportExportImpl;
mixin ImportExportImpl!ActivityManager_MemoryInfo;
import import1 = android.java.java.lang.Class;
|
D
|
module android.java.android.graphics.LightingColorFilter;
public import android.java.android.graphics.LightingColorFilter_d_interface;
import arsd.jni : ImportExportImpl;
mixin ImportExportImpl!LightingColorFilter;
import import0 = android.java.java.lang.Class;
|
D
|
module IBM_PIT;
import ibm_pc_com;
import std.stdio;
import simplelogger;
import x86_memory;
import IBM_PIC;
import std.datetime;
import x86_processor;
//the 8253 PIT Emulation module
//To-do: Actually implement the PIT
class PIT
{
this(IBM_PC_COMPATIBLE param)
{
pc=param;
memory=pc.GetCPU().ExposeRam();
currtick=lasttick=MonoTime.currTime().ticks();
pittick=MonoTime.ticksPerSecond()/18;
}
void AcknowledgeInterrupts()
{
if(MonoTime.currTime().ticks()>=lasttick+pittick)
{
pc.GetPIC().IRQ(0);
lasttick=MonoTime.currTime().ticks();
}
currtick=MonoTime.currTime().ticks();
}
private IBM_PC_COMPATIBLE pc;
private MemoryX86 memory;
private PIC pic;
private ulong pittick;
private ulong currtick;
private ulong lasttick;
}
|
D
|
a flag that shows its nationality
a distinguishing emblem
a visual attribute of things that results from the light they emit or transmit or reflect
interest and variety and intensity
the timbre of a musical sound
a race with skin pigmentation different from the white race (especially Blacks)
an outward or token appearance or form that is deliberately misleading
any material used for its color
(physics) the characteristic of quarks that determines their role in the strong interaction
the appearance of objects (or light sources) described in terms of a person's perception of their hue and lightness (or brightness) and saturation
add color to
affect as in thought or feeling
modify or bias
decorate with colors
give a deceptive explanation or excuse for
change color, often in an undesired manner
|
D
|
; Copyright (C) 2008 The Android Open Source Project
;
; 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.
.source T_goto_32_3.java
.class public dot.junit.opcodes.goto_32.d.T_goto_32_3
.super java/lang/Object
.method public <init>()V
.limit regs 1
invoke-direct {v0}, java/lang/Object/<init>()V
return-void
.end method
.method public run(I)I
.limit regs 5
goto/32 Label2
Label2:
return v4
.end method
|
D
|
instance DIA_Matteo_EXIT(C_Info)
{
npc = VLK_416_Matteo;
nr = 999;
condition = DIA_Matteo_EXIT_Condition;
information = DIA_Matteo_EXIT_Info;
permanent = TRUE;
description = Dialog_Ende;
};
func int DIA_Matteo_EXIT_Condition()
{
return TRUE;
};
func void DIA_Matteo_EXIT_Info()
{
B_EquipTrader(self);
AI_StopProcessInfos(self);
};
instance DIA_Matteo_Hallo(C_Info)
{
npc = VLK_416_Matteo;
nr = 1;
condition = DIA_Matteo_Hallo_Condition;
information = DIA_Matteo_Hallo_Info;
permanent = FALSE;
important = TRUE;
};
func int DIA_Matteo_Hallo_Condition()
{
if(Npc_IsInState(self,ZS_Talk) && (other.guild != GIL_PAL))
{
return TRUE;
};
};
func void DIA_Matteo_Hallo_Info()
{
AI_Output(self,other,"DIA_Matteo_Hallo_09_00"); //Чем могу помочь?
};
instance DIA_Matteo_SellWhat(C_Info)
{
npc = VLK_416_Matteo;
nr = 1;
condition = DIA_Matteo_SellWhat_Condition;
information = DIA_Matteo_SellWhat_Info;
permanent = FALSE;
description = "Что ты продаешь?";
};
func int DIA_Matteo_SellWhat_Condition()
{
return TRUE;
};
func void DIA_Matteo_SellWhat_Info()
{
AI_Output(other,self,"DIA_Matteo_SellWhat_15_00"); //Что ты продаешь?
if(Kapitel < 4)
{
AI_Output(self,other,"DIA_Matteo_SellWhat_09_01"); //Я могу предложить все, что может понадобиться в твоих странствиях. Оружие, факелы, провизию... даже доспехи.
AI_Output(self,other,"DIA_Matteo_SellWhat_09_02"); //У меня есть очень хороший экземпляр на складе.
AI_Output(self,other,"DIA_Matteo_SellWhat_09_03"); //Двойные усиленные доспехи из кожи снеппера - совсем новые. Тебе это интересно?
}
else
{
AI_Output(self,other,"DIA_Canthar_TRADE_09_01"); //Выбирай.
};
if(Knows_Matteo == FALSE)
{
Log_CreateTopic(TOPIC_CityTrader,LOG_NOTE);
B_LogEntry(TOPIC_CityTrader,"Лавка Маттео находится у южных ворот города. Он продает снаряжение, оружие и другие товары.");
Knows_Matteo = TRUE;
};
};
instance DIA_Matteo_TRADE(C_Info)
{
npc = VLK_416_Matteo;
nr = 800;
condition = DIA_Matteo_TRADE_Condition;
information = DIA_Matteo_TRADE_Info;
permanent = TRUE;
description = DIALOG_TRADE_v4;
trade = TRUE;
};
func int DIA_Matteo_TRADE_Condition()
{
if(Npc_KnowsInfo(other,DIA_Matteo_SellWhat))
{
return TRUE;
};
};
var int Matteo_TradeNewsPermanent;
func void B_MatteoAboutLothar()
{
AI_Output(self,other,"DIA_Matteo_TRADE_09_01"); //С тех пор, как наемники прикончили Лотара, инспекции паладинов стали значительно более строгими.
AI_Output(self,other,"DIA_Matteo_TRADE_09_02"); //Я надеюсь, все успокоится, когда этого убийцу повесят.
Matteo_TradeNewsPermanent = 1;
};
func void DIA_Matteo_TRADE_Info()
{
AI_Output(other,self,"DIA_Matteo_TRADE_15_00"); //Покажи мне свои товары.
if((Kapitel == 3) && (MIS_RescueBennet != LOG_SUCCESS) && (Matteo_TradeNewsPermanent == 0))
{
B_MatteoAboutLothar();
};
if((Kapitel == 4) && (Matteo_TradeNewsPermanent < 2))
{
AI_Output(self,other,"DIA_Matteo_TRADE_09_04"); //Это хорошо, что ты опять пополняешь свои запасы. Кто знает, будет ли еще существовать этот город на следующей неделе.
Matteo_TradeNewsPermanent = 2;
};
if((Kapitel == 5) && (Matteo_TradeNewsPermanent < 3))
{
AI_Output(self,other,"DIA_Matteo_TRADE_09_03"); //Похоже, паладины действительно серьезно настроены на этот раз. Они даже сократили охрану на своем корабле.
if(Matteo_TradeNewsPermanent != 2)
{
AI_Output(self,other,"DIA_Matteo_TRADE_09_04"); //Это хорошо, что ты опять пополняешь свои запасы. Кто знает, будет ли еще существовать этот город на следующей неделе.
};
Matteo_TradeNewsPermanent = 3;
};
B_GiveTradeInv(self);
if(MIS_Serpentes_MinenAnteil_KDF == LOG_Running)
{
MatteoMinenAnteil = TRUE;
};
if(!Npc_HasItems(self,ItMi_Pan) && !Npc_HasItems(other,ItMi_Pan))
{
CreateInvItems(self,ItMi_Pan,1);
};
Trade_IsActive = TRUE;
};
var int Matteo_LeatherBought;
instance DIA_Matteo_LEATHER(C_Info)
{
npc = VLK_416_Matteo;
nr = 850;
condition = DIA_Matteo_LEATHER_Condition;
information = DIA_Matteo_LEATHER_Info;
permanent = TRUE;
description = B_BuildPriceString("Купить кожаные доспехи. Защита: 25/20/5/0.",VALUE_ITAR_Leather_L);
};
func int DIA_Matteo_LEATHER_Condition()
{
if(Npc_KnowsInfo(other,DIA_Matteo_SellWhat) && (Matteo_LeatherBought == FALSE) && (Kapitel < 4))
{
return TRUE;
};
};
func void DIA_Matteo_LEATHER_Info()
{
AI_Output(other,self,"DIA_Matteo_LEATHER_15_00"); //Хорошо, давай мне эти доспехи.
if(B_GiveInvItems(other,self,ItMi_Gold,VALUE_ITAR_Leather_L))
{
AI_Output(self,other,"DIA_Matteo_LEATHER_09_01"); //Они тебе понравятся. (ухмыляется)
B_GiveArmor(ITAR_Leather_L);
Matteo_LeatherBought = TRUE;
}
else
{
AI_Output(self,other,"DIA_Matteo_LEATHER_09_02"); //Эти доспехи стоят недешево - но они, определенно, стоят своих денег. Так что возвращайся, когда у тебя будет достаточно золота.
};
};
var int Matteo_Confiscated;
instance DIA_Matteo_Paladine(C_Info)
{
npc = VLK_416_Matteo;
nr = 2;
condition = DIA_Matteo_Paladine_Condition;
information = DIA_Matteo_Paladine_Info;
permanent = FALSE;
description = "Что ты знаешь о паладинах?";
};
func int DIA_Matteo_Paladine_Condition()
{
return TRUE;
};
func void DIA_Matteo_Paladine_Info()
{
AI_Output(other,self,"DIA_Matteo_Paladine_15_00"); //Что ты знаешь о паладинах?
if((Kapitel == 3) && (MIS_RescueBennet != LOG_SUCCESS) && (Matteo_TradeNewsPermanent == 0))
{
B_MatteoAboutLothar();
}
else if(other.guild == GIL_PAL)
{
AI_Output(self,other,"DIA_Landstreicher_HALLO_wer_vorsicht_09_02"); //Ничего личного. Ступай с богом. Ты занятой человек, не буду задерживать тебя.
B_EquipTrader(self);
AI_StopProcessInfos(self);
}
else
{
AI_Output(self,other,"DIA_Matteo_Paladine_09_01"); //С тех пор, как эти ублюдки прибыли в город, у меня от них одни проблемы.
AI_Output(self,other,"DIA_Matteo_Paladine_09_02"); //Последний раз, когда я шел в верхний квартал, стражники преградили мне дорогу и начали выяснять, что мне там нужно!
AI_Output(other,self,"DIA_Matteo_Paladine_15_03"); //И?
AI_Output(self,other,"DIA_Matteo_Paladine_09_04"); //Конечно же, они пропустили меня!
AI_Output(self,other,"DIA_Matteo_Paladine_09_05"); //Да у меня уже была лавка в этом городе, когда эти напыщенные болваны еще пешком под стол ходили!
AI_Output(self,other,"DIA_Matteo_Paladine_09_06"); //А вчера эти ублюдки пришли и конфисковали половину моих товаров!
Matteo_Confiscated = TRUE;
};
};
instance DIA_Matteo_Confiscated(C_Info)
{
npc = VLK_416_Matteo;
nr = 2;
condition = DIA_Matteo_Confiscated_Condition;
information = DIA_Matteo_Confiscated_Info;
permanent = FALSE;
description = "Паладины забрали твои товары?";
};
func int DIA_Matteo_Confiscated_Condition()
{
if(Matteo_Confiscated == TRUE)
{
return TRUE;
};
};
func void DIA_Matteo_Confiscated_Info()
{
AI_Output(other,self,"DIA_Matteo_Confiscated_15_00"); //Паладины забрали твои товары?
AI_Output(self,other,"DIA_Matteo_Confiscated_09_01"); //Все, что у меня хранилось на заднем дворе.
AI_Output(self,other,"DIA_Matteo_Confiscated_09_02"); //Они просто поставили стражника перед входом во двор.
if(other.guild != GIL_PAL)
{
AI_Output(self,other,"DIA_Matteo_Confiscated_09_03"); //Мне еще повезло, что они не забрали все. Хотя бы доспехи оставили.
};
};
instance DIA_Matteo_HelpMeToOV(C_Info)
{
npc = VLK_416_Matteo;
nr = 3;
condition = DIA_Matteo_HelpMeToOV_Condition;
information = DIA_Matteo_HelpMeToOV_Info;
permanent = FALSE;
description = "Ты можешь помочь мне попасть в верхний квартал?";
};
func int DIA_Matteo_HelpMeToOV_Condition()
{
if(Npc_KnowsInfo(other,DIA_Matteo_Paladine) && (Player_IsApprentice == APP_NONE))
{
if((other.guild == GIL_NONE) || (other.guild == GIL_NOV))
{
return TRUE;
};
};
};
func void DIA_Matteo_HelpMeToOV_Info()
{
AI_Output(other,self,"DIA_Matteo_HelpMeToOV_15_00"); //Ты можешь помочь мне попасть в верхний квартал?
AI_Output(self,other,"DIA_Matteo_HelpMeToOV_09_01"); //(ошеломленно) Что? А что тебе нужно ТАМ?
AI_Output(other,self,"DIA_Matteo_HelpMeToOV_15_02"); //У меня важное сообщение...
AI_Output(self,other,"DIA_Matteo_HelpMeToOV_09_03"); //Так-так... А ты пытался пойти мимо стражников?
if(Torwache_305.aivar[AIV_TalkedToPlayer] == TRUE)
{
AI_Output(other,self,"DIA_Matteo_HelpMeToOV_15_04"); //(горький смех) Ох, забудь об этом!
AI_Output(self,other,"DIA_Matteo_HelpMeToOV_09_05"); //(смеется) Это так ТИПИЧНО для этих нищих!
}
else
{
AI_Output(other,self,"DIA_Matteo_HelpMeToOV_15_06"); //Я не понимаю, зачем мне даже пытаться.
AI_Output(self,other,"DIA_Matteo_HelpMeToOV_09_07"); //Возможно, ты прав.
};
AI_Output(self,other,"DIA_Matteo_HelpMeToOV_09_08"); //Я не знаю НАСКОЛЬКО важное у тебя сообщение - это меня не касается.
AI_Output(self,other,"DIA_Matteo_HelpMeToOV_09_09"); //Но даже если ты скажешь им, что корабль, набитый орками, пришвартовался в гавани, они не пустят тебя.
AI_Output(self,other,"DIA_Matteo_HelpMeToOV_09_10"); //Потому что у них есть ПРИКАЗ.
};
func void B_Matteo_Preis()
{
AI_Output(self,other,"DIA_Matteo_HelpMeNow_09_01"); //Похоже, это очень важно для тебя.
AI_Output(self,other,"DIA_Matteo_HelpMeNow_09_02"); //(лукаво) Вопрос в том: НАСКОЛЬКО это важно для тебя?
AI_Output(other,self,"DIA_Matteo_HelpMeNow_15_03"); //На что ты намекаешь?
AI_Output(self,other,"DIA_Matteo_HelpMeNow_09_04"); //Я могу помочь тебе - я ведь, все же, один из самых влиятельных людей здесь.
AI_Output(self,other,"DIA_Matteo_HelpMeNow_09_05"); //Но это тебе обойдется в некоторую сумму.
};
instance DIA_Matteo_HelpMeNow(C_Info)
{
npc = VLK_416_Matteo;
nr = 3;
condition = DIA_Matteo_HelpMeNow_Condition;
information = DIA_Matteo_HelpMeNow_Info;
permanent = FALSE;
description = "Так ты можешь помочь мне попасть в верхний квартал?";
};
func int DIA_Matteo_HelpMeNow_Condition()
{
if(Npc_KnowsInfo(other,DIA_Matteo_HelpMeToOV) && (Player_IsApprentice == APP_NONE))
{
if((other.guild == GIL_NONE) || (other.guild == GIL_NOV))
{
return TRUE;
};
};
};
func void DIA_Matteo_HelpMeNow_Info()
{
AI_Output(other,self,"DIA_Matteo_HelpMeNow_15_00"); //Так ты можешь помочь мне попасть в верхний квартал?
B_Matteo_Preis();
};
instance DIA_Matteo_LehrlingLater(C_Info)
{
npc = VLK_416_Matteo;
nr = 3;
condition = DIA_Matteo_LehrlingLater_Condition;
information = DIA_Matteo_LehrlingLater_Info;
permanent = FALSE;
description = "Помоги мне стать учеником одного из мастеров.";
};
func int DIA_Matteo_LehrlingLater_Condition()
{
if(Player_IsApprentice == APP_NONE)
{
if((other.guild != GIL_NONE) && (other.guild != GIL_NOV))
{
return TRUE;
};
};
};
func void DIA_Matteo_LehrlingLater_Info()
{
AI_Output(other,self,"DIA_Matteo_LehrlingLater_15_00"); //Помоги мне стать учеником одного из мастеров.
B_Matteo_Preis();
};
instance DIA_Matteo_PriceOfHelp(C_Info)
{
npc = VLK_416_Matteo;
nr = 3;
condition = DIA_Matteo_PriceOfHelp_Condition;
information = DIA_Matteo_PriceOfHelp_Info;
permanent = FALSE;
description = "Что ты хочешь за свои услуги?";
};
func int DIA_Matteo_PriceOfHelp_Condition()
{
if(Npc_KnowsInfo(other,DIA_Matteo_HelpMeNow) || Npc_KnowsInfo(other,DIA_Matteo_LehrlingLater))
{
return TRUE;
};
};
func void DIA_Matteo_PriceOfHelp_Info()
{
AI_Output(other,self,"DIA_Matteo_PriceOfHelp_15_00"); //Что ты хочешь за свои услуги?
AI_Output(self,other,"DIA_Matteo_PriceOfHelp_09_01"); //100 золотых монет.
Info_ClearChoices(DIA_Matteo_PriceOfHelp);
Info_AddChoice(DIA_Matteo_PriceOfHelp,"Это все чертовски...",DIA_Matteo_PriceOfHelp_Wow);
Info_AddChoice(DIA_Matteo_PriceOfHelp,"Ах ты, шельмец!",DIA_Matteo_PriceOfHelp_Cutthroat);
};
func void B_Matteo_RegDichAb()
{
AI_Output(self,other,"B_Matteo_RegDichAb_09_00"); //Воспринимай это проще! Это не ТВОЕ золото я имею в виду.
AI_Output(other,self,"B_Matteo_RegDichAb_15_01"); //А чье?
AI_Output(self,other,"B_Matteo_RegDichAb_09_02"); //В принципе, это МОЕ золото.
AI_Output(self,other,"B_Matteo_RegDichAb_09_03"); //Гритта, племянница плотника, уже давно не отдает мне долг.
AI_Output(self,other,"B_Matteo_RegDichAb_09_04"); //Но эта маленькая вертихвостка постоянно дефилирует в новых платьях - это означает, что деньги у нее есть.
AI_Output(self,other,"B_Matteo_RegDichAb_09_05"); //Я хочу, чтобы ты выбил из нее этот долг. Но мастер Торбен, плотник - тоже очень влиятельный человек.
AI_Output(self,other,"B_Matteo_RegDichAb_09_06"); //Принеси мне эти деньги, и я помогу тебе.
MIS_Matteo_Gold = LOG_Running;
Log_CreateTopic(TOPIC_Matteo,LOG_MISSION);
Log_SetTopicStatus(TOPIC_Matteo,LOG_Running);
B_LogEntry(TOPIC_Matteo,"Племянница плотника Торбена Гритта должна Маттео 100 золотых монет. Если я верну их ему, он поможет мне попасть в верхний квартал.");
};
func void DIA_Matteo_PriceOfHelp_Cutthroat()
{
AI_Output(other,self,"DIA_Matteo_PriceOfHelp_Cutthroat_15_00"); //Ах ты, шельмец!
B_Matteo_RegDichAb();
Info_ClearChoices(DIA_Matteo_PriceOfHelp);
};
func void DIA_Matteo_PriceOfHelp_Wow()
{
AI_Output(other,self,"DIA_Matteo_PriceOfHelp_Wow_15_00"); //Это все чертовски...
B_Matteo_RegDichAb();
Info_ClearChoices(DIA_Matteo_PriceOfHelp);
};
instance DIA_Matteo_WoGritta(C_Info)
{
npc = VLK_416_Matteo;
nr = 2;
condition = DIA_Matteo_WoGritta_Condition;
information = DIA_Matteo_WoGritta_Info;
permanent = FALSE;
description = "Где мне найти эту Гритту?";
};
func int DIA_Matteo_WoGritta_Condition()
{
if(MIS_Matteo_Gold == LOG_Running)
{
return TRUE;
};
};
func void DIA_Matteo_WoGritta_Info()
{
AI_Output(other,self,"DIA_Matteo_WoGritta_15_00"); //Где мне найти эту Гритту?
AI_Output(self,other,"DIA_Matteo_WoGritta_09_01"); //Как я уже говорил, она племянница плотника. Его дом находится ниже по улице, справа от кузницы.
};
instance DIA_Matteo_GoldRunning(C_Info)
{
npc = VLK_416_Matteo;
nr = 500;
condition = DIA_Matteo_GoldRunning_Condition;
information = DIA_Matteo_GoldRunning_Info;
permanent = TRUE;
description = "Вот твои 100 золотых!";
};
func int DIA_Matteo_GoldRunning_Condition()
{
if(MIS_Matteo_Gold == LOG_Running)
{
if(Npc_KnowsInfo(other,DIA_Gritta_WantsMoney))
{
return TRUE;
};
if(Npc_IsDead(Gritta))
{
return TRUE;
};
};
};
func void DIA_Matteo_GoldRunning_Info()
{
AI_Output(other,self,"DIA_Matteo_GoldRunning_15_00"); //Вот твои 100 золотых!
if(Npc_IsDead(Gritta))
{
AI_Output(self,other,"DIA_Matteo_GoldRunning_09_01"); //На этом золоте кровь Гритты! Я не говорил, что нужно убивать ее!
AI_Output(self,other,"DIA_Matteo_GoldRunning_09_02"); //Я не хочу иметь никакого отношения к этому делу. Ты можешь забыть о нашей сделке! Не хочу даже вспоминать об этом!
MIS_Matteo_Gold = LOG_FAILED;
B_CheckLog();
B_EquipTrader(self);
AI_StopProcessInfos(self);
}
else if(B_GiveInvItems(other,self,ItMi_Gold,100))
{
if(Npc_HasItems(Gritta,ItMi_Gold) < 80)
{
AI_Output(self,other,"DIA_Matteo_GoldRunning_09_03"); //И? Были какие-нибудь проблемы?
AI_Output(other,self,"DIA_Matteo_GoldRunning_15_04"); //Ничего такого, о чем стоило бы говорить.
AI_Output(self,other,"DIA_Matteo_GoldRunning_09_05"); //Хорошо! Ты выполнил свою часть сделки.
}
else
{
AI_Output(self,other,"DIA_Matteo_GoldRunning_09_06"); //Ты хочешь заплатить за нее? Хм, я бы предпочел, чтобы ты выколотил эти деньги из нее!
AI_Output(self,other,"DIA_Matteo_GoldRunning_09_07"); //Но все же - 100 золотых есть 100 золотых.
AI_Output(self,other,"DIA_Matteo_GoldRunning_09_08"); //Ты выполнил свою часть сделки.
};
MIS_Matteo_Gold = LOG_SUCCESS;
B_GivePlayerXP(XP_Matteo_Gold);
}
else
{
AI_Output(self,other,"DIA_Matteo_GoldRunning_09_09"); //У тебя проблемы со счетом? Я не вижу 100 золотых монет.
};
};
instance DIA_Matteo_Zustimmung(C_Info)
{
npc = VLK_416_Matteo;
nr = 4;
condition = DIA_Matteo_Zustimmung_Condition;
information = DIA_Matteo_Zustimmung_Info;
permanent = TRUE;
description = "Помоги мне стать учеником одного из мастеров!";
};
var int DIA_Matteo_Zustimmung_perm;
func int DIA_Matteo_Zustimmung_Condition()
{
if(Npc_KnowsInfo(other,DIA_Matteo_HowCanYouHelp) && ((MIS_Matteo_Gold == LOG_Running) || (MIS_Matteo_Gold == LOG_SUCCESS)) && (Player_IsApprentice == APP_NONE) && (DIA_Matteo_Zustimmung_perm == FALSE))
{
return TRUE;
};
};
func void DIA_Matteo_Zustimmung_Info()
{
AI_Output(other,self,"DIA_Matteo_Zustimmung_15_00"); //Помоги мне стать учеником одного из мастеров!
if(MIS_Matteo_Gold == LOG_SUCCESS)
{
AI_Output(self,other,"DIA_Matteo_Zustimmung_09_01"); //Не волнуйся, я выполню свои обещания.
AI_Output(self,other,"DIA_Matteo_Zustimmung_09_02"); //Другие мастера услышат от меня о тебе только хорошее.
B_GivePlayerXP(XP_Zustimmung);
B_LogEntry(TOPIC_Lehrling,"Маттео даст мне свое одобрение, если я захочу стать учеником другого мастера.");
DIA_Matteo_Zustimmung_perm = TRUE;
}
else
{
AI_Output(self,other,"DIA_Matteo_Zustimmung_09_03"); //Всему своя очередь. Сначала выполни свою часть сделки и принеси мне золото!
};
};
instance DIA_Matteo_HowCanYouHelp(C_Info)
{
npc = VLK_416_Matteo;
nr = 4;
condition = DIA_Matteo_HowCanYouHelp_Condition;
information = DIA_Matteo_HowCanYouHelp_Info;
permanent = FALSE;
description = "Как ИМЕННО ты собираешься помочь мне?";
};
func int DIA_Matteo_HowCanYouHelp_Condition()
{
if((Npc_KnowsInfo(other,DIA_Matteo_HelpMeNow) || Npc_KnowsInfo(other,DIA_Matteo_LehrlingLater)) && (Player_IsApprentice == APP_NONE) && (MIS_Matteo_Gold != LOG_FAILED))
{
return TRUE;
};
};
func void DIA_Matteo_HowCanYouHelp_Info()
{
AI_Output(other,self,"DIA_Matteo_HowCanYouHelp_15_00"); //Как ИМЕННО ты собираешься помочь мне?
AI_Output(self,other,"DIA_Matteo_HowCanYouHelp_09_01"); //Это просто. Я использую свое влияние, чтобы убедить других здешних мастеров взять тебя в ученики.
if((other.guild == GIL_NONE) || (other.guild == GIL_NOV))
{
AI_Output(self,other,"DIA_Matteo_HowCanYouHelp_09_02"); //Став учеником, ты автоматически станешь гражданином города и сможешь попасть в верхний квартал. Помимо этого, ты сможешь что-нибудь заработать.
};
Log_CreateTopic(TOPIC_Lehrling,LOG_MISSION);
Log_SetTopicStatus(TOPIC_Lehrling,LOG_Running);
B_LogEntry(TOPIC_Lehrling,"Маттео может помочь мне стать учеником одного из мастеров.");
};
instance DIA_Matteo_WoAlsLehrling(C_Info)
{
npc = VLK_416_Matteo;
nr = 4;
condition = DIA_Matteo_WoAlsLehrling_Condition;
information = DIA_Matteo_WoAlsLehrling_Info;
permanent = FALSE;
description = "А к кому я могу поступить в ученики?";
};
func int DIA_Matteo_WoAlsLehrling_Condition()
{
if(Npc_KnowsInfo(other,DIA_Matteo_HowCanYouHelp) && (Player_IsApprentice == APP_NONE))
{
return TRUE;
};
};
func void DIA_Matteo_WoAlsLehrling_Info()
{
AI_Output(other,self,"DIA_Matteo_WoAlsLehrling_15_00"); //А к кому я могу поступить в ученики?
AI_Output(self,other,"DIA_Matteo_WoAlsLehrling_09_01"); //К любому мастеру на этой улице.
AI_Output(self,other,"DIA_Matteo_WoAlsLehrling_09_02"); //Это может быть кузнец Гарад, мастер-лучник Боспер, плотник Торбен или алхимик Константино.
AI_Output(self,other,"DIA_Matteo_WoAlsLehrling_09_03"); //Один из них обязательно возьмет тебя.
AI_Output(self,other,"DIA_Matteo_WoAlsLehrling_09_04"); //Но важно, чтобы с этим были согласны другие мастера. Таков обычай Хориниса.
Log_CreateTopic(TOPIC_Lehrling,LOG_MISSION);
Log_SetTopicStatus(TOPIC_Lehrling,LOG_Running);
B_LogEntry(TOPIC_Lehrling,"Я могу стать учеником мастера-лучника Боспера, кузнеца Гарада, плотника Торбена или алхимика Константино.");
Log_AddEntry(TOPIC_Lehrling,"Прежде чем я стану учеником, я должен получить одобрение других мастеров.");
};
instance DIA_Matteo_WieZustimmung(C_Info)
{
npc = VLK_416_Matteo;
nr = 5;
condition = DIA_Matteo_WieZustimmung_Condition;
information = DIA_Matteo_WieZustimmung_Info;
permanent = FALSE;
description = "Как мне получить одобрение других мастеров?";
};
func int DIA_Matteo_WieZustimmung_Condition()
{
if((Npc_KnowsInfo(other,DIA_Matteo_WoAlsLehrling) || Npc_KnowsInfo(other,DIA_Matteo_WarumNichtBeiDir)) && (Player_IsApprentice == APP_NONE))
{
return TRUE;
};
};
func void DIA_Matteo_WieZustimmung_Info()
{
AI_Output(other,self,"DIA_Matteo_WieZustimmung_15_00"); //Как мне получить одобрение других мастеров?
AI_Output(self,other,"DIA_Matteo_WieZustimmung_09_01"); //Ты просто должен убедить их. Иди и поговори с ними.
AI_Output(self,other,"DIA_Matteo_WieZustimmung_09_02"); //Но, а если хотя бы двое из них будут против тебя, тебе не поступить в ученики! Так что постарайся понравиться им!
B_LogEntry(TOPIC_Lehrling,"Я смогу получить одобрение мастеров, только если я проявлю себя с лучшей стороны перед ними.");
};
instance DIA_Matteo_WarumNichtBeiDir(C_Info)
{
npc = VLK_416_Matteo;
nr = 6;
condition = DIA_Matteo_WarumNichtBeiDir_Condition;
information = DIA_Matteo_WarumNichtBeiDir_Info;
permanent = FALSE;
description = "А почему ТЫ не возьмешь меня в ученики?";
};
func int DIA_Matteo_WarumNichtBeiDir_Condition()
{
if(Npc_KnowsInfo(other,DIA_Matteo_HowCanYouHelp) && (Player_IsApprentice == APP_NONE))
{
return TRUE;
};
};
func void DIA_Matteo_WarumNichtBeiDir_Info()
{
AI_Output(other,self,"DIA_Matteo_WarumNichtBeiDir_15_00"); //А почему ТЫ не возьмешь меня в ученики?
if(MIS_Matteo_Gold != LOG_FAILED)
{
AI_Output(self,other,"DIA_Matteo_WarumNichtBeiDir_09_01"); //Я бы взял - но другие мастера не согласятся.
AI_Output(self,other,"DIA_Matteo_WarumNichtBeiDir_09_02"); //Я только недавно взял еще одного ученика.
}
else
{
B_Say(self,other,"$NOTNOW");
B_EquipTrader(self);
AI_StopProcessInfos(self);
};
};
instance DIA_Matteo_OtherWay(C_Info)
{
npc = VLK_416_Matteo;
nr = 6;
condition = DIA_Matteo_OtherWay_Condition;
information = DIA_Matteo_OtherWay_Info;
permanent = FALSE;
description = "А есть другой способ попасть в верхний квартал?";
};
func int DIA_Matteo_OtherWay_Condition()
{
if((Npc_KnowsInfo(other,DIA_Matteo_HowCanYouHelp) || (MIS_Matteo_Gold == LOG_FAILED)) && (Mil_305_schonmalreingelassen == FALSE) && (Player_IsApprentice == APP_NONE))
{
if((other.guild == GIL_NONE) || (other.guild == GIL_NOV))
{
return TRUE;
};
};
};
func void DIA_Matteo_OtherWay_Info()
{
AI_Output(other,self,"DIA_Matteo_OtherWay_15_00"); //А есть другой способ попасть в верхний квартал?
if(MIS_Matteo_Gold != LOG_FAILED)
{
AI_Output(self,other,"DIA_Matteo_OtherWay_09_01"); //Возможно... Если я что-нибудь придумаю, я дам тебе знать.
}
else
{
AI_Output(self,other,"DIA_Matteo_GoldRunning_09_02"); //Я не хочу иметь никакого отношения к этому делу. Ты можешь забыть о нашей сделке! Не хочу даже вспоминать об этом!
B_EquipTrader(self);
AI_StopProcessInfos(self);
};
};
instance DIA_Matteo_Minenanteil(C_Info)
{
npc = VLK_416_Matteo;
nr = 3;
condition = DIA_Matteo_Minenanteil_Condition;
information = DIA_Matteo_Minenanteil_Info;
description = "Я вижу, у тебя среди других товаров есть и акции горнодобывающей компании.";
};
func int DIA_Matteo_Minenanteil_Condition()
{
if((other.guild == GIL_KDF) && (MIS_Serpentes_MinenAnteil_KDF == LOG_Running) && (MatteoMinenAnteil == TRUE))
{
return TRUE;
};
};
func void DIA_Matteo_Minenanteil_Info()
{
AI_Output(other,self,"DIA_Matteo_Minenanteil_15_00"); //Я вижу, у тебя среди других товаров есть и акции горнодобывающей компании. Кто продал их тебе?
AI_Output(self,other,"DIA_Matteo_Minenanteil_09_01"); //(нервно) Акции? Ох. И откуда они взялись? Понятия не имею, где я взял их. Клянусь, ваша честь.
B_GivePlayerXP(XP_Ambient);
};
|
D
|
module game.graphics.bulletDebug;
import
ws.math,
ws.gl.gl,
ws.gl.batch,
ws.gl.shader,
ws.physics.bullet.cbullet,
game.graphics.draw,
game.graphics.drawable;
extern(C) static void lineCallback(void* userdata, btScalar* from, btScalar* to, btScalar* color){
auto drawer = cast(BulletDebugDrawer)userdata;
drawer.shader.use(
"matMVP", drawer.mvp,
"offset", Vector!4(from[0], from[1], from[2], 1),
"color", Vector!4(color[0], color[1], color[2], 1),
"scale", Vector!4(to[0]-from[0], to[1]-from[1], to[2]-from[2], 1)
);
drawer.batch.draw();
}
class BulletDebugDrawer: Drawable {
this(BulletWorld* world){
this.world = world;
drawer = createDebugDrawer(world, cast(void*)this, &lineCallback);
mvp = new Matrix!(4,4);
batch = new Batch;
batch.begin(2, gl.lines);
batch.add([0,0,0]);
batch.add([1,1,1]);
batch.finish();
shader = Shader.load("3d_line", [gl.attributeVertex: "vertex"]);
}
void draw(ModelMatrix matrix){
//mvp = matrix.getModelviewProjection();
debugDrawWorld(world);
}
Matrix!(4,4) mvp;
Shader shader;
Batch batch;
BulletWorld* world;
ws.physics.bullet.cbullet.DebugDrawer* drawer;
}
|
D
|
// **********************************************
// B_GiveTradeInventory
// --------------------
// Verteiler. Aufruf aller B_GiveTradeInv-Befehle
// **********************************************
func void B_GiveTradeInv (var C_NPC slf)
{
//******************************************************************
// Hier muss jeder Händler eingetragen werden!!!!!!!
//******************************************************************
//MOD
var C_NPC Trd_Myxir_MT; Trd_Myxir_MT = Hlp_GetNpc (Mod_515_KDS_Myxir_MT);
var C_NPC Trd_Scar_MT; Trd_Scar_MT = Hlp_GetNpc (Mod_518_SMK_Scar_MT);
var C_NPC Trd_Erol_NW; Trd_Erol_NW = Hlp_GetNpc (Mod_521_NONE_Erol_NW);
var C_NPC Trd_Matteo_NW; Trd_Matteo_NW = Hlp_GetNpc (Mod_529_NONE_Matteo_NW);
var C_NPC Trd_Bosper_NW; Trd_Bosper_NW = Hlp_GetNpc (Mod_531_NONE_Bosper_NW);
var C_NPC Trd_Constantino_NW; Trd_Constantino_NW = Hlp_GetNpc (Mod_532_NONE_Constantino_NW);
var C_NPC Trd_Elena_NW; Trd_Elena_NW = Hlp_GetNpc (Mod_783_BAU_Elena_NW);
var C_NPC Trd_Thekla_NW; Trd_Thekla_NW = Hlp_GetNpc (Mod_799_BAU_Thekla_NW);
Var C_NPC Trd_Gorax_NW; Trd_Gorax_NW = Hlp_GetNpc (Mod_917_KDF_Gorax_NW);
var C_NPC Trd_Salandril_NW; Trd_Salandril_NW = Hlp_GetNpc (Mod_751_NONE_Salandril_NW);
var C_NPC Trd_Brahim_NW; Trd_Brahim_NW = Hlp_GetNpc (Mod_565_NONE_Brahim_NW);
var C_NPC Trd_Cronos_NW; Trd_Cronos_NW = Hlp_GetNpc (Mod_758_KDW_Cronos_NW);
var C_NPC Trd_Cronos_AW; Trd_Cronos_AW = Hlp_GetNpc (Mod_9001_KDW_Cronos_AW);
var C_NPC Trd_Baltram_NW; Trd_Baltram_NW = Hlp_GetNpc (Mod_561_NONE_Baltram_NW);
var C_NPC Trd_Bennet_NW; Trd_Bennet_NW = Hlp_GetNpc (Mod_562_NONE_Bennet_NW);
var C_NPC Trd_Brian_NW; Trd_Brian_NW = Hlp_GetNpc (Mod_566_NONE_Brian_NW);
var C_NPC Trd_Coragon_NW; Trd_Coragon_NW = Hlp_GetNpc (Mod_570_NONE_Coragon_NW);
var C_NPC Trd_Fenia_NW; Trd_Fenia_NW = Hlp_GetNpc (Mod_575_NONE_Fenia_NW);
var C_NPC Trd_Gaertner_NW; Trd_Gaertner_NW = Hlp_GetNpc (Mod_1035_VLK_Gaertner_NW);
var C_NPC Trd_Hakon_NW; Trd_Hakon_NW = Hlp_GetNpc (Mod_581_NONE_Hakon_NW);
var C_NPC Trd_Halvor_NW; Trd_Halvor_NW = Hlp_GetNpc (Mod_582_NONE_Halvor_NW);
var C_NPC Trd_Ignaz_NW; Trd_Ignaz_NW = Hlp_GetNpc (Mod_584_NONE_Ignaz_NW);
var C_NPC Trd_Isgaroth_NW; Trd_Isgaroth_NW = Hlp_GetNpc (Mod_920_KDF_Isgaroth_NW);
var C_NPC Trd_Jora_NW; Trd_Jora_NW = Hlp_GetNpc (Mod_589_NONE_Jora_NW);
var C_NPC Trd_Kardif_NW; Trd_Kardif_NW = Hlp_GetNpc (Mod_590_NONE_Kardif_NW);
var C_NPC Trd_Lutero_NW; Trd_Lutero_NW = Hlp_GetNpc (Mod_594_NONE_Lutero_NW);
var C_NPC Trd_Orlan_NW; Trd_Orlan_NW = Hlp_GetNpc (Mod_776_NONE_Orlan_NW);
var C_NPC Trd_Sagitta_NW; Trd_Sagitta_NW = Hlp_GetNpc (Mod_773_NONE_Sagitta_NW);
var C_NPC Trd_Rosi_NW; Trd_Rosi_NW = Hlp_GetNpc (Mod_772_BAU_Rosi_NW);
var C_NPC Trd_Liselotte_NW; Trd_Liselotte_NW = Hlp_GetNpc (Mod_546_NONE_Liselotte_NW);
var C_NPC Trd_Zuris_NW; Trd_Zuris_NW = Hlp_GetNpc (Mod_757_NONE_Zuris_NW);
var C_NPC Trd_Skip_AW; Trd_Skip_AW = Hlp_GetNpc (Mod_775_PIR_Skip_AW);
var C_NPC Trd_Garett_AW; Trd_Garett_AW = Hlp_GetNpc (Mod_933_PIR_Garett_AW);
var C_NPC Trd_Skip_DI; Trd_Skip_DI = Hlp_GetNpc (Mod_1540_PIR_Skip_DI);
var C_NPC Trd_Garett_DI; Trd_Garett_DI = Hlp_GetNpc (Mod_1543_PIR_Garett_DI);
var C_NPC Trd_Cipher_MT; Trd_Cipher_MT = Hlp_GetNpc (Mod_781_SLD_Cipher_MT);
var C_NPC Trd_Miguel_MT; Trd_Miguel_MT = Hlp_GetNpc (Mod_958_BDT_Miguel_MT);
var C_NPC Trd_Fisk_MT; Trd_Fisk_MT = Hlp_GetNpc (Mod_950_STT_Fisk_MT);
var C_NPC Trd_Fortuno_MT; Trd_Fortuno_MT = Hlp_GetNpc (Mod_951_PSINOV_Fortuno_MT);
var C_NPC Trd_Samuel_AW; Trd_Samuel_AW = Hlp_GetNpc (Mod_940_PIR_Samuel_AW);
var C_NPC Trd_Thofeistos_MT; Trd_Thofeistos_MT = Hlp_GetNpc (Mod_7220_SLD_Thofeistos_MT);
var C_NPC Trd_Borka_NW; Trd_Borka_NW = Hlp_GetNpc (Mod_563_NONE_Borka_NW);
var C_NPC Trd_Darrion_MT; Trd_Darrion_MT = Hlp_GetNpc (Mod_2014_PSINOV_Darrion_MT);
var C_NPC Trd_Lebensmittelhaendler_REL; Trd_Lebensmittelhaendler_REL = Hlp_GetNpc (Mod_7338_OUT_Lebensmittelhaendler_REL);
var C_NPC Trd_Caine_MT; Trd_Caine_MT = Hlp_GetNpc (Mod_1116_PSINOV_Caine_MT);
var C_NPC Trd_Snaf_MT; Trd_Snaf_MT = Hlp_GetNpc (Mod_965_STT_Snaf_MT);
var C_NPC Trd_Anna_REL; Trd_Anna_REL = Hlp_GetNpc (Mod_7376_OUT_Anna_REL);
var C_NPC Trd_Hans_REL; Trd_Hans_REL = Hlp_GetNpc (Mod_7377_OUT_Hans_REL);
var C_NPC Trd_Daniel_REL; Trd_Daniel_REL = Hlp_GetNpc (Mod_7378_OUT_Daniel_REL);
var C_NPC Trd_Erika_REL; Trd_Erika_REL = Hlp_GetNpc (Mod_7381_OUT_Erika_REL);
var C_NPC Trd_Peter_REL; Trd_Peter_REL = Hlp_GetNpc (Mod_7386_OUT_Peter_REL);
var C_NPC Trd_Martin_NW; Trd_Martin_NW = Hlp_GetNpc (Mod_596_MIL_Martin_NW);
var C_NPC Trd_Ursula_REL; Trd_Ursula_REL = Hlp_GetNpc (Mod_7423_OUT_Ursula_REL);
var C_NPC Trd_Wulfgar_JL; Trd_Wulfgar_JL = Hlp_GetNpc (Mod_7436_JG_Wulfgar_MT);
var C_NPC Trd_Woron_JL; Trd_Woron_JL = Hlp_GetNpc (Mod_7521_JG_Woron_JL);
var C_NPC Trd_Hungar_JL; Trd_Hungar_JL = Hlp_GetNpc (Mod_7522_JG_Hungar_JL);
var C_NPC Trd_Silas_MT; Trd_Silas_MT = Hlp_GetNpc (Mod_1291_SLD_Silas_MT);
var C_NPC Trd_Rupert_NW; Trd_Rupert_NW = Hlp_GetNpc (Mod_750_NONE_Rupert_NW);
var C_NPC Trd_Bernd_MT; Trd_Bernd_MT = Hlp_GetNpc (Mod_1012_KGD_Bernd_MT);
var C_NPC Trd_Brauer_REL; Trd_Brauer_REL = Hlp_GetNpc (Mod_7578_OUT_Brauer_REL);
var C_NPC Trd_Sagitta_IR; Trd_Sagitta_IR = Hlp_GetNpc (Mod_7459_NONE_Sagitta_IR);
var C_NPC Trd_Sharky_MT; Trd_Sharky_MT = Hlp_GetNpc (Mod_1293_SLD_Sharky_MT);
var C_NPC Trd_Alfans_EIS; Trd_Alfans_EIS = Hlp_GetNpc (Mod_7644_OUT_Alfans_EIS);
var C_NPC Trd_Aabid_NW; Trd_Aabid_NW = Hlp_GetNpc (Mod_7105_ASS_Aabid_NW);
var C_NPC Trd_Maysara_NW; Trd_Maysara_NW = Hlp_GetNpc (Mod_7122_ASS_Maysara_NW);
var C_NPC Trd_Mufid_NW; Trd_Mufid_NW = Hlp_GetNpc (Mod_7149_ASS_Mufid_NW);
var C_NPC Trd_Harlok_REL; Trd_Harlok_REL = Hlp_GetNpc (Mod_2015_PSINOV_Harlok_REL);
var C_NPC Trd_Morpheus_REL; Trd_Morpheus_REL = Hlp_GetNpc (Mod_7581_OUT_Morpheus_REL);
var C_NPC Trd_Anor_MT; Trd_Anor_MT = Hlp_GetNpc (Mod_1628_VMG_Anor_MT);
var C_NPC Trd_Hermy_MT; Trd_Hermy_MT = Hlp_GetNpc (Mod_4020_VMG_Hermy_MT);
var C_NPC Trd_Genn_TUG; Trd_Genn_TUG = Hlp_GetNpc (Mod_1959_VMG_Genn_TUG);
var C_NPC Trd_Gestath_EIS; Trd_Gestath_EIS = Hlp_GetNpc (Mod_974_OUT_Gestath_EIS);
var C_NPC Trd_Schmuggler_NW; Trd_Schmuggler_NW = Hlp_GetNpc (Mod_7783_OUT_Schmuggler_NW);
var C_NPC Trd_Anglar_EIS; Trd_Anglar_EIS = Hlp_GetNpc (Mod_7792_OUT_Anglar_EIS);
var C_NPC Trd_Eduard_MT; Trd_Eduard_MT = Hlp_GetNpc (Mod_1027_SMK_Eduard_MT);
var C_NPC Trd_Alberto_OM; Trd_Alberto_OM = Hlp_GetNpc (Mod_7800_SMK_Alberto_OM);
//********************************************************************
// Hier auch!!!
//********************************************************************
B_ClearRuneInv (slf);
if (slf.aivar[AIV_ChapterInv] <= Kapitel)
{
//MOD
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Myxir_MT) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Myxir_MT (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Scar_MT) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Scar_MT (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Erol_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Erol_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Matteo_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Matteo_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Bosper_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Bosper_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Constantino_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Constantino_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Elena_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Elena_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Thekla_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Thekla_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Gorax_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Gorax_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Salandril_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Salandril_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Brahim_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Brahim_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Cronos_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Cronos_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Cronos_AW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Cronos_AW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Baltram_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Baltram_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Bennet_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Bennet_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Brian_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Brian_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Coragon_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Coragon_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Fenia_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Fenia_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Gaertner_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Gaertner_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Hakon_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Hakon_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Halvor_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Halvor_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Ignaz_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Ignaz_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Isgaroth_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Isgaroth_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Jora_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Jora_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Kardif_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Kardif_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Lutero_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Lutero_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Orlan_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Orlan_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Sagitta_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Sagitta_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Rosi_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Rosi_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Skip_AW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Skip_AW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Garett_AW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Garett_AW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Skip_DI) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Skip_DI (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Garett_DI) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Garett_DI (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Liselotte_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Liselotte_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Zuris_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Zuris_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Cipher_MT) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Cipher_MT (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Miguel_MT) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Miguel_MT (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Fisk_MT) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Fisk_MT (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Fortuno_MT) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Fortuno_MT (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Samuel_AW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Samuel_AW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Thofeistos_MT) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Thofeistos_MT (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Borka_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Borka_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Darrion_MT) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Darrion_MT (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Lebensmittelhaendler_REL) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Lebensmittelhaendler_REL (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Caine_MT) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Caine_MT (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Snaf_MT) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Snaf_MT (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Anna_REL) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Anna_REL (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Hans_REL) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Hans_REL (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Daniel_REL) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Daniel_REL (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Erika_REL) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Erika_REL (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Peter_REL) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Peter_REL (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Martin_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Martin_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Ursula_REL) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Ursula_REL (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Wulfgar_JL) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Wulfgar_JL (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Woron_JL) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Woron_JL (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Hungar_JL) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Hungar_JL (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Silas_MT) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Silas_MT (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Rupert_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Rupert_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Bernd_MT) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Bernd_MT (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Brauer_REL) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Brauer_REL (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Sagitta_IR) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Sagitta_IR (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Sharky_MT) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Sharky_MT (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Alfans_EIS) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Alfans_EIS (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Aabid_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Aabid_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Maysara_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Maysara_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Mufid_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Mufid_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Harlok_REL) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Harlok_REL (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Morpheus_REL) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Morpheus_REL (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Anor_MT) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Anor_MT (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Hermy_MT) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Hermy_MT (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Genn_TUG) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Genn_TUG (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Gestath_EIS) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Gestath_EIS (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Schmuggler_NW) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Schmuggler_NW (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Anglar_EIS) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Anglar_EIS (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Eduard_MT) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Eduard_MT (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Alberto_OM) {B_ClearJunkTradeInv (slf); B_GiveTradeInv_Mod_Alberto_OM (slf);};
slf.aivar[AIV_ChapterInv] = (Kapitel +1);
};
////////////////////////////////////////////////////////////////////////////////////////////////////
// Handelsware Clearen und Ambientstuff in die Tasche, wenn Trader Unconscious oder Dead
////////////////////////////////////////////////////////////////////////////////////////////////////
if (Npc_IsInState (slf, ZS_Dead))
|| (Npc_IsInState (slf, ZS_Unconscious ))
{
//MOD
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Myxir_MT) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Scar_MT) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Erol_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Matteo_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Bosper_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Constantino_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Elena_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Thekla_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Gorax_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Salandril_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Brahim_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Cronos_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Cronos_AW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Baltram_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Bennet_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Brian_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Coragon_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Fenia_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Gaertner_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Hakon_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Halvor_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Ignaz_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Isgaroth_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Jora_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Kardif_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Lutero_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Orlan_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Sagitta_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Rosi_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Liselotte_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Zuris_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Skip_AW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Garett_AW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Skip_DI) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Garett_DI) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Cipher_MT) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Miguel_MT) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Fisk_MT) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Fortuno_MT) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Samuel_AW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Thofeistos_MT) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Borka_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Darrion_MT) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Lebensmittelhaendler_REL) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Caine_MT) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Snaf_MT) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Anna_REL) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Hans_REL) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Daniel_REL) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Erika_REL) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Peter_REL) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Martin_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Ursula_REL) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Wulfgar_JL) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Woron_JL) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Hungar_JL) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Silas_MT) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Rupert_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Bernd_MT) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Brauer_REL) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Sagitta_IR) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Sharky_MT) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Alfans_EIS) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Aabid_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Maysara_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Mufid_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Harlok_REL) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Morpheus_REL) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Anor_MT) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Hermy_MT) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Genn_TUG) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Gestath_EIS) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Schmuggler_NW) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Anglar_EIS) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Eduard_MT) {B_ClearDeadTrader (slf);};
if Hlp_GetInstanceID (slf) == Hlp_GetInstanceID (Trd_Alberto_OM) {B_ClearDeadTrader (slf);};
};
};
|
D
|
/Users/justinlew/Documents/iOS_dev/mealify.io/DerivedData/mealify/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Charts.build/Objects-normal/x86_64/ScatterChartData.o : /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Filters/DataApproximator+N.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/CombinedChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Jobs/ViewPortJob.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Jobs/AnimatedViewPortJob.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Jobs/MoveViewJob.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Jobs/AnimatedMoveViewJob.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Jobs/ZoomViewJob.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Jobs/AnimatedZoomViewJob.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/Legend.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/MarkerImage.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/Range.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/ChartLimitLine.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/ChartDataRendererBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/AxisRendererBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/AxisBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/ComponentBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/ChartViewBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/BarLineChartViewBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/PieRadarChartViewBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntryBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Animation/ChartAnimationEasing.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/Fill.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/Platform.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/Description.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/ChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/CombinedChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/BubbleChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/BarLineScatterCandleBubbleChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/CandleChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/LineChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/BarChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/ScatterChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/IMarker.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/ViewPortHandler.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/Transformer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Renderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/LegendRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/IShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/XShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/CircleShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/TriangleShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/SquareShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/ChevronDownShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/ChevronUpShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/CrossShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/LineScatterCandleRadarRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/LineRadarRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/XAxisRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/YAxisRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/CombinedChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/PieChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/BubbleChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/LineChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/CandleStickChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/BarChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/HorizontalBarChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/RadarChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/ScatterChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/IHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/CombinedHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/PieHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/BarHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/HorizontalBarHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/RadarHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/PieRadarHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/ChartHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/IValueFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/IAxisValueFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/DefaultAxisValueFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/IndexAxisValueFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/DefaultValueFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/IFillFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/DefaultFillFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Animation/Animator.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Filters/DataApproximator.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/ChartColorTemplates.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/XAxis.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/YAxis.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/ChartUtils.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/ChartBaseDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IPieChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IBubbleChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IBarLineScatterCandleBubbleChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/ICandleChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/ILineChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IBarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IRadarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineScatterCandleRadarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/ILineScatterCandleRadarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/ILineRadarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IScatterChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/Highlight.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/TransformerHorizontalBarChart.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/XAxisRendererRadarChart.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/YAxisRendererRadarChart.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/MarkerView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/CombinedChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/PieChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/BubbleChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/LineChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/CandleStickChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/BarChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/HorizontalBarChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/RadarChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/ScatterChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntry.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataEntry.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataEntry.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataEntry.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataEntry.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataEntry.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/LegendEntry.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/justinlew/Documents/iOS_dev/mealify.io/Pods/Target\ Support\ Files/Charts/Charts-umbrella.h /Users/justinlew/Documents/iOS_dev/mealify.io/DerivedData/mealify/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Charts.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
/Users/justinlew/Documents/iOS_dev/mealify.io/DerivedData/mealify/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Charts.build/Objects-normal/x86_64/ScatterChartData~partial.swiftmodule : /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Filters/DataApproximator+N.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/CombinedChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Jobs/ViewPortJob.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Jobs/AnimatedViewPortJob.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Jobs/MoveViewJob.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Jobs/AnimatedMoveViewJob.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Jobs/ZoomViewJob.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Jobs/AnimatedZoomViewJob.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/Legend.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/MarkerImage.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/Range.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/ChartLimitLine.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/ChartDataRendererBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/AxisRendererBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/AxisBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/ComponentBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/ChartViewBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/BarLineChartViewBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/PieRadarChartViewBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntryBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Animation/ChartAnimationEasing.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/Fill.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/Platform.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/Description.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/ChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/CombinedChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/BubbleChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/BarLineScatterCandleBubbleChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/CandleChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/LineChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/BarChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/ScatterChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/IMarker.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/ViewPortHandler.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/Transformer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Renderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/LegendRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/IShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/XShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/CircleShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/TriangleShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/SquareShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/ChevronDownShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/ChevronUpShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/CrossShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/LineScatterCandleRadarRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/LineRadarRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/XAxisRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/YAxisRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/CombinedChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/PieChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/BubbleChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/LineChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/CandleStickChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/BarChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/HorizontalBarChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/RadarChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/ScatterChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/IHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/CombinedHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/PieHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/BarHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/HorizontalBarHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/RadarHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/PieRadarHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/ChartHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/IValueFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/IAxisValueFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/DefaultAxisValueFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/IndexAxisValueFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/DefaultValueFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/IFillFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/DefaultFillFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Animation/Animator.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Filters/DataApproximator.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/ChartColorTemplates.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/XAxis.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/YAxis.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/ChartUtils.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/ChartBaseDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IPieChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IBubbleChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IBarLineScatterCandleBubbleChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/ICandleChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/ILineChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IBarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IRadarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineScatterCandleRadarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/ILineScatterCandleRadarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/ILineRadarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IScatterChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/Highlight.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/TransformerHorizontalBarChart.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/XAxisRendererRadarChart.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/YAxisRendererRadarChart.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/MarkerView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/CombinedChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/PieChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/BubbleChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/LineChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/CandleStickChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/BarChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/HorizontalBarChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/RadarChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/ScatterChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntry.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataEntry.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataEntry.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataEntry.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataEntry.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataEntry.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/LegendEntry.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/justinlew/Documents/iOS_dev/mealify.io/Pods/Target\ Support\ Files/Charts/Charts-umbrella.h /Users/justinlew/Documents/iOS_dev/mealify.io/DerivedData/mealify/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Charts.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
/Users/justinlew/Documents/iOS_dev/mealify.io/DerivedData/mealify/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Charts.build/Objects-normal/x86_64/ScatterChartData~partial.swiftdoc : /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Filters/DataApproximator+N.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/CombinedChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartData.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Jobs/ViewPortJob.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Jobs/AnimatedViewPortJob.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Jobs/MoveViewJob.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Jobs/AnimatedMoveViewJob.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Jobs/ZoomViewJob.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Jobs/AnimatedZoomViewJob.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/Legend.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/MarkerImage.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/Range.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/ChartLimitLine.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/ChartDataRendererBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/AxisRendererBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/AxisBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/ComponentBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/ChartViewBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/BarLineChartViewBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/PieRadarChartViewBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntryBase.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Animation/ChartAnimationEasing.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/Fill.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/Platform.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/Description.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/ChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/CombinedChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/BubbleChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/BarLineScatterCandleBubbleChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/CandleChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/LineChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/BarChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Interfaces/ScatterChartDataProvider.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/IMarker.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/ViewPortHandler.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/Transformer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Renderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/LegendRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/IShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/XShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/CircleShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/TriangleShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/SquareShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/ChevronDownShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/ChevronUpShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/Scatter/CrossShapeRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/LineScatterCandleRadarRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/LineRadarRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/XAxisRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/YAxisRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/CombinedChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/PieChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/BubbleChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/LineChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/CandleStickChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/BarChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/HorizontalBarChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/RadarChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/ScatterChartRenderer.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/IHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/CombinedHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/PieHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/BarHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/HorizontalBarHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/RadarHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/PieRadarHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/ChartHighlighter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/IValueFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/IAxisValueFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/DefaultAxisValueFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/IndexAxisValueFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/DefaultValueFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/IFillFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Formatters/DefaultFillFormatter.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Animation/Animator.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Filters/DataApproximator.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/ChartColorTemplates.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/XAxis.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/YAxis.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/ChartUtils.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/ChartBaseDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IPieChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IBubbleChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IBarLineScatterCandleBubbleChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/ICandleChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/ILineChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IBarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IRadarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineScatterCandleRadarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/ILineScatterCandleRadarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/ILineRadarChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Interfaces/IScatterChartDataSet.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Highlight/Highlight.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Utils/TransformerHorizontalBarChart.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/XAxisRendererRadarChart.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Renderers/YAxisRendererRadarChart.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/MarkerView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/CombinedChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/PieChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/BubbleChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/LineChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/CandleStickChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/BarChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/HorizontalBarChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/RadarChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Charts/ScatterChartView.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntry.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataEntry.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataEntry.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataEntry.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataEntry.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataEntry.swift /Users/justinlew/Documents/iOS_dev/mealify.io/Pods/Charts/Source/Charts/Components/LegendEntry.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/justinlew/Documents/iOS_dev/mealify.io/Pods/Target\ Support\ Files/Charts/Charts-umbrella.h /Users/justinlew/Documents/iOS_dev/mealify.io/DerivedData/mealify/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Charts.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
|
D
|
/Users/troy/testing/vpn.test/rust/rustvpntool/target/debug/build/indexmap-5b20820e5d448fb9/build_script_build-5b20820e5d448fb9: /Users/troy/.cargo/registry/src/github.com-1ecc6299db9ec823/indexmap-1.9.3/build.rs
/Users/troy/testing/vpn.test/rust/rustvpntool/target/debug/build/indexmap-5b20820e5d448fb9/build_script_build-5b20820e5d448fb9.d: /Users/troy/.cargo/registry/src/github.com-1ecc6299db9ec823/indexmap-1.9.3/build.rs
/Users/troy/.cargo/registry/src/github.com-1ecc6299db9ec823/indexmap-1.9.3/build.rs:
|
D
|
/+
Copyright (c) 2005-2007 J Duncan, Eric Anderton
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the
Software is 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 Software.
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 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 SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
+/
/**
Windows PE-COFF Object class (.obj file)
Authors: J Duncan, Eric Anderton
License: BSD Derivative (see source for details)
Copyright: 2005, 2006 J Duncan, Eric Anderton
*/
module ddl.coff.COFFObject;
import ddl.ExportSymbol;
import ddl.FileBuffer;
import ddl.Utils;
import ddl.coff.COFFReader;
import ddl.coff.COFFBinary;
import ddl.coff.COFFWrite;
import ddl.coff.COFF;
import std.string;
import std.c.string;
class COFFObject : COFFBinary
{
COFFHeader header;
char[] linkerDirectives; // link directives
uint[uint] externalSymbolMap;
public this()
{
}
public void load(FileBuffer buffer)
{
COFFReader reader = new COFFReader(buffer);
parseCOFFHeader(reader);
}
// parse a coff object file
protected void parseCOFFHeader(COFFReader reader)
{
// read coff header
reader.get(header);
COFFHeader hrd = header;
// increment past optional header
reader.setPosition(reader.getPosition() + header.SizeOfOptionalHeader);
// verbose print header
if( verbose ) writeCOFF( header );
// check machine type
if( header.machine == 0 )
{
// object is an import library
// if( verbose ) writefln( "\tCOFF object is an import library" );
throw new Exception("COFF object is an import library");
//! implement this
// if( !parseImportObject( file ) )
// throw new Exception( "COFF Object failed to parse import sections\n");
}
else if( header.machine != COFF_MACHINE_I386 )
{
// report failure
throw new Exception( "COFF object is not for IA32 Platform" );
}
// parse normal object sections
parseSections( reader );
// parse COFF symbols
//parseCOFFSymbols( reader );
// process relocations to fixups
foreach( COFFSection sect; sections )
{
foreach( COFFRelocationRecord rel; sect.relocs )
{
assert( rel.symbolTableIndex in this.symbols );
// find symbol
COFFSymbol sym = this.symbols[rel.symbolTableIndex];
// debug (DDL) writef( "adding fixup: 0x%08x - %s ", rel.virtualAddress, sym.toString );
// generate fixup
Fixup fix;
fix.destOffset = rel.virtualAddress;
fix.destSectionIndex = sect.index;
// sym.header = *rec;
// sym.index = i;
// sym.type = rec.type;
// sym.sectionNumber = rec.;
// sym.offset = rec.value;
// sym.value = rec.value;
// sym.storageClass = rec.storageClass;
// sym.numberOfAuxSymbols = rec.numberOfAuxSymbols;
// check symbol type
switch( sym.storageClass )
{
case COFF_SYM_CLASS_EXTERNAL: // The Value field indicates the size if the section number is COFF_SYM_UNDEFINED (0). If the section number is not 0, then the Value field specifies the offset within the section.
if( sym.sectionNumber == 0 )
{
// The Value field indicates the size
fix.isExternStyleFixup = true;
fix.targetIndex = externalSymbolMap[rel.symbolTableIndex];
// writef( "- external index: %d - external: %s - ", fix.targetIndex, externs[fix.targetIndex].toString );
}
else
{
// Value field specifies the offset within the section.
fix.isExternStyleFixup = false;
fix.targetIndex = rel.symbolTableIndex;
// writef( "- segment index: %d - ", fix.targetIndex );
}
break;
case COFF_SYM_CLASS_STATIC: // The Value field specifies the offset of the symbol within the section. If the Value is 0, then the symbol represents a section name.
// The Value field specifies the offset of the symbol within the section
// writef( "- static offset: %d - ", sym.value );
fix.targetIndex = sym.index;
fix.isExternStyleFixup = false;
break;
// case COFF_SYM_CLASS_FUNCTION:
// break; // Used by Microsoft tools for symbol records that define the extent of a function: begin function (named .bf), end function (.ef), and lines in function (.lf). For .lf records, Value gives the number of source lines in the function. For .ef records, Value gives the size of function code.
// case COFF_SYM_CLASS_FILE:
// break; // Used by Microsoft tools, as well as traditional COFF format, for the source-file symbol record. The symbol is followed by auxiliary records that name the file.
default:
assert( false );
throw new Exception( "COFF fixup class not supported" );
break;
}
// check type
switch( rel.type )
{
case IMAGE_REL_I386_DIR32: // The targets 32-bit virtual address.
fix.isSegmentRelative = false; // is this a segment relative fixup (true=add address of segment, false=use actual address)
// writefln( "fixup type: target" );
break;
case IMAGE_REL_I386_REL32: // The 32-bit relative displacement to the target. This supports the x86 relative branch and call instructions.
fix.isSegmentRelative = true; // is this a segment relative fixup (true=add address of segment, false=use actual address)
// writefln( "fixup type: 32-bit relative" );
break;
// case IMAGE_REL_I386_DIR32NB: // The targets 32-bit relative virtual address.
// writefln( "fixup type: relative target" );
// break;
// case IMAGE_REL_I386_SECTION: // The 16-bit-section index of the section containing the target. This is used to support debugging information.
// writefln( "fixup type: section index" );
// break;
// case IMAGE_REL_I386_SECREL: // The 32-bit offset of the target from the beginning of its section. This is used to support debugging information as well as static thread local storage.
// writefln( "fixup type: 32-bit offset" );
// break;
default:
assert( false );
throw new Exception( format( "invalid relocation type: %d", rel.type ) );
}
// rel.virtualAddress;
// rel.type;
// fix.destSectionIndex = 0;
// fix.destOffset = 0;
// fix.targetIndex = 0; // external reference
// fix.isSegmentRelative = false; // is this a segment relative fixup (true=add address of segment, false=use actual address)
// fix.isExternStyleFixup = false; // true if this uses an external index as a target, false if it is a segment index
fixups ~= fix;
// uint virtualAddress; // Address of the item to which relocation is applied: this is the offset from the beginning of the section, plus the value of the section's RVA/Offset field (see Section 4, "Section Table."). For example, if the first byte of the section has an address of 0x10, the third byte has an address of 0x12.
// uint symbolTableIndex; // A zero-based index into the symbol table. This symbol gives the address to be used for the relocation. If the specified symbol has section storage class, then the symbol's address is the address with the first section of the same name.
// ushort type; // A value indicating what kind of relocation should be performed. Valid relocation types depend on machine type. See Section 5.2.1, "Type Indicators."
}
}
}
<<<<<<< .mine
// read section headers & sections
void parseSections(COFFReader reader)
{
// read section header table
COFFSectionHeader[] sectionHeaders;
sectionHeaders.length = header.NumberOfSections;
for( uint i; i < header.NumberOfSections; i++ )
{
COFFSectionHeader sectionHeader;
reader.get( sectionHeader );
sectionHeaders ~= sectionHeader;
}
// read and process the sections
foreach( i, s; sectionHeaders )
{
// create new section data
COFFSection sect = new COFFSection;
sect.index = i;
sect.header = s;
// get section name
if( s.Name[0] != '\\' )
{
// pad extra space in case name is exactly 8 characters
sect.name = strip( copyStringz( s.Name ) );
}
else
{
// name is in string table
assert( false );
// implement
// char[] sNum = s.Name[1..8];
// sNum.length = 1;
// char[] sNum;
// sNum.length = 1;
// memcpy( sNum.ptr, s.Name[1..8].ptr, 1 );
}
// handle grouped selections
int n = find( sect.name, "$" );
if( n != -1 )
sect.group = sect.name[0..n];
else
sect.group = sect.name;
// get group
Group* g = sect.group in groups;
if( g )
{
// add to group
g.sections ~= sect;
}
else
{
// create group
Group group;
group.name = sect.group;
group.sections ~= sect;
groups[group.name] = group;
}
// read section data
if( ( sect.data.length = sect.header.SizeOfRawData ) != 0 )
{
reader.setPosition( sect.header.PointerToRawData );
reader.get( sect.data ); //, sect.header.SizeOfRawData, 0 );
// memcpy( sect.data.ptr, cur.data.ptr + sect.header.PointerToRawData, sect.header.SizeOfRawData );
}
// 0 pad virtual sections
if( s.SizeOfRawData < s.VirtualSize )
{
sect.data.length = s.VirtualSize;
// memset( sect.data.ptr + s.SizeOfRawData, 0, s.VirtualSize - s.SizeOfRawData );
}
// grab relocations
if( s.PointerToRelocations && s.NumberOfRelocations )
{
sect.relocs.length = s.NumberOfRelocations;
reader.setPosition( s.PointerToRelocations );
reader.get( sect.relocs ); // sect.data.ptr, s.NumberOfRelocations * COFFRelocationRecord.sizeof, 0 );
// memcpy( sect.relocs.ptr, cur.data.ptr + s.PointerToRelocations, s.NumberOfRelocations * COFFRelocationRecord.sizeof );
}
// grab line numbers
if( s.PointerToLineNumbers && s.NumberOfLineNumbers )
{
sect.lines.length = s.NumberOfLineNumbers;
reader.setPosition( s.PointerToLineNumbers );
reader.get( sect.lines ); //.ptr, s.NumberOfLineNumbers * COFFLineRecord.sizeof, 0 );
// memcpy( sect.lines.ptr, cur.data.ptr + s.PointerToLineNumbers, s.NumberOfLineNumbers * COFFLineRecord.sizeof );
}
// parse special sections
switch( sect.group )
{
// executable data
case ".text":
sect.description = "executable data";
// if( !parseTEXT( sect ) )
// throw new Exception( "unable to parse section: " ~ sect.name );
break;
// debug (DDL) data
case ".debug":
sect.description = "debug (DDL) data";
// if( !parseDEBUG(sect) )
// throw new Exception( "unable to parse section: " ~ sect.name );
break;
// initialized data
case ".data":
sect.description = "initialized data";
// if( !parseDATA(sect) )
// throw new Exception( "unable to parse section: " ~ sect.name );
break;
// read-only initialized data
case ".rdata":
sect.description = "read-only initialized data";
break;
// exception data
case ".pdata":
case ".xdata":
sect.description = "exception data";
break;
// uninitialized data
case ".bss":
sect.description = "uninitialized data";
// if( !parseBSS(sect) )
// throw new Exception( "unable to parse section: " ~ sect.name );
break;
// thread local storage
case ".tls":
sect.description = "thread local storage";
break;
// resources
case ".rsrc":
sect.description = "resources";
break;
// import tables
case ".idata":
sect.description = "import tables";
// if( !parseIDATA(sect) )
// throw new Exception( "unable to parse section: " ~ sect.name );
break;
// image only
// export tables
case ".edata":
sect.description = "export tables";
break;
// relocation data
case ".reloc":
sect.description = "relocation data";
break;
// object only
// linker directives
case ".drectve":
sect.description = "linker directives";
// if( !parseDRECTVE(sect) )
// return false;
break;
default:
// writefln( "unknown COFF section: '" ~ sect.name ~ "'" );
break;
}
// add section to list
sections ~= sect;
// increment header
// s++;
// writefln( "ReadSectionHeaders(): Section header %d (%d Bytes) loaded",i,inVal);
}
// if( verbose ) writefln("");
// if( verbose ) writeSections();
}
//Parse sections
// .drectve a "directive" section has the IMAGE_SCN_LNK_INFO flag set in the section header and the name .drectve
// The linker removes a .drectve section after processing the information, so the section does not appear in the image file being linked. Note that a section marked with IMAGE_SCN_LNK_INFO that is not named .drectve is ignored and discarded by the linker.
bool parseDRECTVE( COFFSection sect )
{
// verify flags
if( (sect.flags & COFF_SECTION_LNK_INFO) == 0 )
{
//writefln( "section named .drectve did not have COFF_SECTION_LNK_INFO flags, skipping" );
return true;
}
// grab linker directives
if( sect.data.length )
{
if( (linkerDirectives.length = cast(ubyte) sect.data[0]) != 0 )
memcpy( linkerDirectives.ptr, §.data[1], linkerDirectives.length );
//writefln( "\t\tlinker directives: %s", linkerDirectives );
}
return true;
}
// // .idata section
// bool parseIDATA( COFFSection sect )
// {
// return true;
// }
//
// // .text section
// bool parseTEXT( COFFSection sect )
// {
//
// return true;
// }
//
// // .debug (DDL) section
// bool parseDEBUG( COFFSection sect )
// {
// return true;
// }
//
// // .data section
// bool parseDATA( COFFSection sect )
// {
// return true;
// }
//
// // .bss section
// bool parseBSS( COFFSection sect )
// {
// return true;
// }
//
=======
// read section headers & sections
void parseSections(COFFReader reader)
{
// read section header table
COFFSectionHeader[] sectionHeaders;
sectionHeaders.length = header.NumberOfSections;
for( uint i; i < header.NumberOfSections; i++ )
{
COFFSectionHeader sectionHeader;
reader.get( sectionHeader );
sectionHeaders ~= sectionHeader;
}
// read and process the sections
foreach( i, s; sectionHeaders )
{
// create new section data
COFFSection sect = new COFFSection;
sect.index = i;
sect.header = s;
// get section name
if( s.Name[0] != '\\' )
{
// pad extra space in case name is exactly 8 characters
sect.name = strip( copyStringz( s.Name ) );
}
else
{
// name is in string table
assert( false );
// implement
// char[] sNum = s.Name[1..8];
// sNum.length = 1;
// char[] sNum;
// sNum.length = 1;
// memcpy( sNum.ptr, s.Name[1..8].ptr, 1 );
}
// handle grouped selections
int n = find( sect.name, "$" );
if( n != -1 )
sect.group = sect.name[0..n];
else
sect.group = sect.name;
// get group
Group* g = sect.group in groups;
if( g )
{
// add to group
g.sections ~= sect;
}
else
{
// create group
Group group;
group.name = sect.group;
group.sections ~= sect;
groups[group.name] = group;
}
// read section data
if( ( sect.data.length = sect.header.SizeOfRawData ) != 0 )
{
reader.setPosition( sect.header.PointerToRawData );
reader.get( sect.data ); //, sect.header.SizeOfRawData, 0 );
// memcpy( sect.data.ptr, cur.data.ptr + sect.header.PointerToRawData, sect.header.SizeOfRawData );
}
// 0 pad virtual sections
if( s.SizeOfRawData < s.VirtualSize )
{
sect.data.length = s.VirtualSize;
// memset( sect.data.ptr + s.SizeOfRawData, 0, s.VirtualSize - s.SizeOfRawData );
}
// grab relocations
if( s.PointerToRelocations && s.NumberOfRelocations )
{
sect.relocs.length = s.NumberOfRelocations;
reader.setPosition( s.PointerToRelocations );
reader.get( sect.relocs ); // sect.data.ptr, s.NumberOfRelocations * COFFRelocationRecord.sizeof, 0 );
// memcpy( sect.relocs.ptr, cur.data.ptr + s.PointerToRelocations, s.NumberOfRelocations * COFFRelocationRecord.sizeof );
}
// grab line numbers
if( s.PointerToLineNumbers && s.NumberOfLineNumbers )
{
sect.lines.length = s.NumberOfLineNumbers;
reader.setPosition( s.PointerToLineNumbers );
reader.get( sect.lines ); //.ptr, s.NumberOfLineNumbers * COFFLineRecord.sizeof, 0 );
// memcpy( sect.lines.ptr, cur.data.ptr + s.PointerToLineNumbers, s.NumberOfLineNumbers * COFFLineRecord.sizeof );
}
// parse special sections
switch( sect.group )
{
// executable data
case ".text":
sect.description = "executable data";
// if( !parseTEXT( sect ) )
// throw new Exception( "unable to parse section: " ~ sect.name );
break;
// debug (DDL) data
case ".debug":
sect.description = "debug (DDL) data";
// if( !parseDEBUG(sect) )
// throw new Exception( "unable to parse section: " ~ sect.name );
break;
// initialized data
case ".data":
sect.description = "initialized data";
// if( !parseDATA(sect) )
// throw new Exception( "unable to parse section: " ~ sect.name );
break;
// read-only initialized data
case ".rdata":
sect.description = "read-only initialized data";
break;
// exception data
case ".pdata":
case ".xdata":
sect.description = "exception data";
break;
// uninitialized data
case ".bss":
sect.description = "uninitialized data";
// if( !parseBSS(sect) )
// throw new Exception( "unable to parse section: " ~ sect.name );
break;
// thread local storage
case ".tls":
sect.description = "thread local storage";
break;
// resources
case ".rsrc":
sect.description = "resources";
break;
// import tables
case ".idata":
sect.description = "import tables";
// if( !parseIDATA(sect) )
// throw new Exception( "unable to parse section: " ~ sect.name );
break;
// image only
// export tables
case ".edata":
sect.description = "export tables";
break;
// relocation data
case ".reloc":
sect.description = "relocation data";
break;
// object only
// linker directives
case ".drectve":
sect.description = "linker directives";
// if( !parseDRECTVE(sect) )
// return false;
break;
default:
// writefln( "unknown COFF section: '" ~ sect.name ~ "'" );
break;
}
// add section to list
sections ~= sect;
// increment header
// s++;
// writefln( "ReadSectionHeaders(): Section header %d (%d Bytes) loaded",i,inVal);
}
// if( verbose ) writefln("");
// if( verbose ) writeSections();
}
//Parse sections
// .drectve a "directive" section has the IMAGE_SCN_LNK_INFO flag set in the section header and the name .drectve
// The linker removes a .drectve section after processing the information, so the section does not appear in the image file being linked. Note that a section marked with IMAGE_SCN_LNK_INFO that is not named .drectve is ignored and discarded by the linker.
bit parseDRECTVE( COFFSection sect )
{
// verify flags
if( (sect.flags & COFF_SECTION_LNK_INFO) == 0 )
{
//writefln( "section named .drectve did not have COFF_SECTION_LNK_INFO flags, skipping" );
return true;
}
// grab linker directives
if( sect.data.length )
{
if( (linkerDirectives.length = cast(ubyte) sect.data[0]) != 0 )
memcpy( linkerDirectives.ptr, §.data[1], linkerDirectives.length );
//writefln( "\t\tlinker directives: %s", linkerDirectives );
}
return true;
}
// // .idata section
// bit parseIDATA( COFFSection sect )
// {
// return true;
// }
//
// // .text section
// bit parseTEXT( COFFSection sect )
// {
//
// return true;
// }
//
// // .debug (DDL) section
// bit parseDEBUG( COFFSection sect )
// {
// return true;
// }
//
// // .data section
// bit parseDATA( COFFSection sect )
// {
// return true;
// }
//
// // .bss section
// bit parseBSS( COFFSection sect )
// {
// return true;
// }
//
>>>>>>> .r278
protected
}
/+
REFERENCE IMPLEMENTATION
module ddl.coff.COFFObject;
private import ddl.ExportSymbol;
private import ddl.FileBuffer;
private import ddl.Utils;
private import ddl.coff.COFFBinary;
private import ddl.coff.cursor;
private import std.string;
private import std.path;
private import std.stdio;
private import std.stream;
private import std.date;
private import std.conv;
private import std.c.time;
// coff object class
class COFFObject : COFFBinary
{
// structs used to store final data
char[] linkerDirectives; // link directives
uint[uint] externalSymbolMap;
this(FileBuffer file)
{
super();
// parse data
parse(file);
// resolve internal addresses
resolveInternals();
// resolve fixups
resolveFixups( this.fixups );
}
// properties
bool isResolved() { return resolved; }
public char[] toString()
{
return format( "module: %s", name );
char[] output = format( "module: %s\nfile: %s\n", name, filename );
// return COFFBinary.toString();
/*
foreach(uint idx,Segment seg; segments)
{
output ~= std.string.format("SEG %d [",idx);
foreach( ubyte bite; seg.data )
output ~= std.string.format("%0.2X",bite);
output ~= "]\n";
}
foreach(ExternalSymbol ext; externs){
output ~= std.string.format("EXT: %s ",ext.name);
output ~= std.string.format("[%d]:%d = %0.8X",ext.segmentIndex,ext.offset,ext.address);
if(!ext.isResolved){
output ~= " unresolved\n";
}
else output ~= "\n";
}
foreach(PublicSymbol pub; publics){
output ~= std.string.format("PUB: %s [%d]:%d\n",pub.name,pub.segmentIndex,pub.offset);
}
output ~= "--all fixups--\n";
foreach(Fixup fix; fixups){
if(fix.isExternStyleFixup){
output ~= std.string.format("Extern FIXUP: [%d]:%d = %s\n",fix.destSectionIndex,fix.destOffset,this.externs[fix.targetIndex].name);
}
else{
output ~= std.string.format("Segment FIXUP: [%d]:%d = %d\n",fix.destSectionIndex,fix.destOffset,fix.targetIndex);
}
}
output ~= "--unresolved fixups--\n";
foreach(Fixup fix; unresolvedFixups){
if(fix.isExternStyleFixup){
output ~= std.string.format("Extern FIXUP: [%d]:%d = %s\n",fix.destSectionIndex,fix.destOffset,this.externs[fix.targetIndex].name);
}
else{
output ~= std.string.format("Segment FIXUP: [%d]:%d = %d\n",fix.destSectionIndex,fix.destOffset,fix.targetIndex);
}
}
*/
return output;
}
// parse a coff object file
protected void parse(FileBuffer buffer)
{
// copy coff header
coff = new COFFHeader;
memcpy( coff, cur.ptr, COFFHeader.sizeof );
cur.position += COFFHeader.sizeof; // increment past header
cur.position += coff.SizeOfOptionalHeader; // increment past optional header
if( verbose ) writeCOFF( coff ); // verbose print header
// check machine type
if( coff.machine == 0 )
{
// object is an import library
// if( verbose ) writefln( "\tCOFF object is an import library" );
assert( false ); //! implement this
// if( !parseImportObject( file ) )
throw new Exception( "COFF Object failed to parse import sections\n");
}
else if( coff.machine != COFF_MACHINE_I386 )
{
// report failure
throw new Exception( "COFF object file is not for IA32 Platform" );
}
// parse normal object sections
parseSections( reader );
// parse COFF symbols
parseCOFFSymbols( reader );
// process relocations to fixups
foreach( COFFSection sect; this.sections )
{
foreach( COFFRelocationRecord rel; sect.relocs )
{
assert( rel.symbolTableIndex in this.symbols );
// find symbol
COFFSymbol sym = this.symbols[rel.symbolTableIndex];
debug (DDL) writef( "adding fixup: 0x%08x - %s ", rel.virtualAddress, sym.toString );
// generate fixup
Fixup fix;
fix.destOffset = rel.virtualAddress;
fix.destSectionIndex = sect.index;
// sym.header = *rec;
// sym.index = i;
// sym.type = rec.type;
// sym.sectionNumber = rec.;
// sym.offset = rec.value;
// sym.value = rec.value;
// sym.storageClass = rec.storageClass;
// sym.numberOfAuxSymbols = rec.numberOfAuxSymbols;
// check symbol type
switch( sym.storageClass )
{
case COFF_SYM_CLASS_EXTERNAL: // The Value field indicates the size if the section number is COFF_SYM_UNDEFINED (0). If the section number is not 0, then the Value field specifies the offset within the section.
if( sym.sectionNumber == 0 )
{
// The Value field indicates the size
fix.isExternStyleFixup = true;
fix.targetIndex = externalSymbolMap[rel.symbolTableIndex];
writef( "- external index: %d - external: %s - ", fix.targetIndex, externs[fix.targetIndex].toString );
}
else
{
// Value field specifies the offset within the section.
fix.isExternStyleFixup = false;
fix.targetIndex = rel.symbolTableIndex;
writef( "- segment index: %d - ", fix.targetIndex );
}
break;
case COFF_SYM_CLASS_STATIC: // The Value field specifies the offset of the symbol within the section. If the Value is 0, then the symbol represents a section name.
// The Value field specifies the offset of the symbol within the section
writef( "- static offset: %d - ", sym.value );
fix.targetIndex = sym.index;
fix.isExternStyleFixup = false;
break;
// case COFF_SYM_CLASS_FUNCTION:
// break; // Used by Microsoft tools for symbol records that define the extent of a function: begin function (named .bf), end function (.ef), and lines in function (.lf). For .lf records, Value gives the number of source lines in the function. For .ef records, Value gives the size of function code.
// case COFF_SYM_CLASS_FILE:
// break; // Used by Microsoft tools, as well as traditional COFF format, for the source-file symbol record. The symbol is followed by auxiliary records that name the file.
default:
assert( false );
throw new Exception( "COFF fixup class not supported" );
break;
}
// check type
switch( rel.type )
{
case IMAGE_REL_I386_DIR32: // The targets 32-bit virtual address.
fix.isSegmentRelative = false; // is this a segment relative fixup (true=add address of segment, false=use actual address)
writefln( "fixup type: target" );
break;
case IMAGE_REL_I386_REL32: // The 32-bit relative displacement to the target. This supports the x86 relative branch and call instructions.
fix.isSegmentRelative = true; // is this a segment relative fixup (true=add address of segment, false=use actual address)
writefln( "fixup type: 32-bit relative" );
break;
// case IMAGE_REL_I386_DIR32NB: // The targets 32-bit relative virtual address.
// writefln( "fixup type: relative target" );
// break;
// case IMAGE_REL_I386_SECTION: // The 16-bit-section index of the section containing the target. This is used to support debugging information.
// writefln( "fixup type: section index" );
// break;
// case IMAGE_REL_I386_SECREL: // The 32-bit offset of the target from the beginning of its section. This is used to support debugging information as well as static thread local storage.
// writefln( "fixup type: 32-bit offset" );
// break;
default:
assert( false );
throw new Exception( format( "invalid relocation type: %d", rel.type ) );
}
// rel.virtualAddress;
// rel.type;
// fix.destSectionIndex = 0;
// fix.destOffset = 0;
// fix.targetIndex = 0; // external reference
// fix.isSegmentRelative = false; // is this a segment relative fixup (true=add address of segment, false=use actual address)
// fix.isExternStyleFixup = false; // true if this uses an external index as a target, false if it is a segment index
fixups ~= fix;
// uint virtualAddress; // Address of the item to which relocation is applied: this is the offset from the beginning of the section, plus the value of the section's RVA/Offset field (see Section 4, "Section Table."). For example, if the first byte of the section has an address of 0x10, the third byte has an address of 0x12.
// uint symbolTableIndex; // A zero-based index into the symbol table. This symbol gives the address to be used for the relocation. If the specified symbol has section storage class, then the symbol's address is the address with the first section of the same name.
// ushort type; // A value indicating what kind of relocation should be performed. Valid relocation types depend on machine type. See Section 5.2.1, "Type Indicators."
}
}
}
/+
// resolve internal symbols
protected void resolveInternals()
{
// create addresses for all of the public symbols
debug (DDL) printf("resolve internals\n" );
foreach(inout PublicSymbol pub; this.publics)
{
debug (DDL) printf("resolve: %.*s segindex: %d offset: %d\n",pub.name,pub.section,pub.offset);
if( pub.section == 0 )
{
pub.address = cast(void*)pub.offset; //HACK: treat as absolute address
debug (DDL) printf("fixed: %.*s == 0\n",pub.name);
}
else
{
//if(pub.segmentIndex == 0) continue; //HACK: workaround for __nullext being located at 0:0
//TODO: refactor using .getData(uint ofs) to provide a point for group-based addressing
// pub.address = this.sections[pub.section].getData(this.segments,pub.offset);
assert( this.sections[pub.section-1] !is null );
pub.address = this.sections[pub.section-1].getData(pub.offset);
assert( pub.address );
//pub.address = &this.segments[pub.segmentIndex].data[pub.offset];
}
}
// go through all the external records, and resolve them to PublicSymbols and Dependencies
for( uint extIdx=1; extIdx<this.externs.length; extIdx++ )
{
ExternalSymbol* ext = &(this.externs[extIdx]);
if(!ext.isResolved)
{
// find the external in the publics
if( ext.name in this.publics )
{
PublicSymbol* pub = &(this.publics[ext.name]);
ext.address = pub.address;
}
else
{
this.dependencies[ext.name] = extIdx;
}
}
}
}
+/
public void resolveFixups()
{
// perform another fixup pass
Fixup[] tempFixups = this.unresolvedFixups;
this.unresolvedFixups.length = 0;
resolveFixups(tempFixups);
}
// process fixups and attempt to resolve all of the resolved symbols
// - unresolved fixups are added to unresolvedFixups
protected void resolveFixups(Fixup[] fixupSet)
{
writefln("resolve fixups (%d)", fixupSet.length );
for(uint fixIdx=0; fixIdx<fixupSet.length; fixIdx++)
{
Fixup* fix = &(fixupSet[fixIdx]);
uint fixupValue;
debug (DDL) writef("fixup %d - ", fixIdx );
if( fix.isExternStyleFixup )
{
// fixup is external
ExternalSymbol* target = &(this.externs[fix.targetIndex]);
debug (DDL) writef("extern %d (%s)", fix.targetIndex, target.name );
// verify symbol target is resolved
if( !target.isResolved )
{
writefln(" - symbol unresolved" );
// cannot fix this up yet, so save it for later
unresolvedFixups ~= *fix;
continue;
}
// set address value
fixupValue = cast(uint)target.address;
writefln( "fixup: %s @ 0x08%x",target.name, fixupValue );
}
else
{
// fixup is internal symbol
COFFSymbol* sym = &(this.symbols[fix.targetIndex]);
debug (DDL) writef("symbol %d (%s)",fix.targetIndex, sym.name );
if( !sym.isResolved )
{
writefln(" - symbol unresolved" );
// cannot fix this up yet, so save it for later
unresolvedFixups ~= *fix;
continue;
}
// Segment* seg = &(this.segments[fix.targetIndex]);
// fixupValue = cast(uint)(seg.data.ptr);
fixupValue = cast(uint)sym.address;
writefln("fixup: %s @ 0x08%x", sym.name, fixupValue);
}
// get destination address
uint* dest = cast(uint*)(this.sections[fix.destSectionIndex].data.ptr + fix.destOffset);
if( !fix.isSegmentRelative )
{
// self relative fixup
uint value = fixupValue - cast(uint)dest - 4; // relative fixup, offset by width of field
writefln("[self relative] %d dest %0.8X (at %0.8X) to %0.8X",fix.destSectionIndex,*dest,dest,value^0xffffffff);
*dest = value;
}
else
{
writefln("[segment] %d dest %0.8X to %0.8X",fix.destSectionIndex,*dest,fixupValue);
*dest += fixupValue;
}
}
}
// read coff symbols header
void parseCOFFSymbols(COFFReader reader )
{
// verify coff header
assert( coff );
assert( COFFSymbolRecord.sizeof == 18 );
assert( COFFAuxSymbolFunction.sizeof == 18 );
// get symbol table
if( coff.PointerToSymbolTable && coff.NumberOfSymbols )
{
symbolTable.length = coff.NumberOfSymbols;
memcpy( symbolTable.ptr, cur.data.ptr + coff.PointerToSymbolTable, coff.NumberOfSymbols * COFFSymbolRecord.sizeof );
}
// get string table
stringTable.length = *cast(uint*)(cur.data.ptr + coff.PointerToSymbolTable + coff.NumberOfSymbols * COFFSymbolRecord.sizeof);
assert( stringTable.length >= 4 );
memcpy( stringTable.ptr, cur.data.ptr + coff.PointerToSymbolTable + coff.NumberOfSymbols * COFFSymbolRecord.sizeof, stringTable.length );
// process symbol table
if( verbose ) writefln("\n\tCOFF SYMBOL TABLE" );
COFFSymbolRecord* rec = symbolTable.ptr;
for( uint i = 0; i < symbolTable.length; i++ )
{
// setup aux data ptr
char* aux = (cast(char*)rec) + COFFSymbolRecord.sizeof;
// create symbol
COFFSymbol sym;
// sym.header = *rec;
sym.index = i;
sym.type = rec.type;
sym.sectionNumber = rec.sectionNumber;
sym.offset = rec.value;
sym.value = rec.value;
sym.storageClass = rec.storageClass;
sym.numberOfAuxSymbols = rec.numberOfAuxSymbols;
// grab symbol name
if( rec.zeros == 0 )
{
// name is a stringtable offset
if( rec.offset )
sym.name = findString( rec.offset );
}
else
{
// copy stringz
sym.name = copyStringz( rec.name );
}
// save aux symbols
// if( ( sym.auxSymbols.length = rec.numberOfAuxSymbols ) != 0 )
// {
// memcpy( sym.auxSymbols.ptr, symbolTable.ptr + i * COFFSymbolRecord.sizeof, rec.numberOfAuxSymbols * COFFSymbolRecord.sizeof );
// }
// print out symbol
if( verbose )
{
writefln("\n\t\tSYMBOL %d: %S", i, sym.name );
writefln( "\t\t\ttype: ", sym.type );
writefln( "\t\t\tvalue: ", sym.value );
writefln( "\t\t\tlocation: %d:%d (0x%x)", sym.sectionNumber, sym.offset, cast(uint) sym.address );
writefln( "\t\t\taux syms: %d", sym.numberOfAuxSymbols );
}
// resolve address
if( (sym.sectionNumber > 0) && (sym.sectionNumber <= sections.length) )
{
COFFSection sect = this.sections[sym.sectionNumber-1];
assert( sect.data.ptr );
assert( sect.data.length > sym.offset );
sym.address = sect.data.ptr + sym.offset;
if( verbose ) writefln( "\t\t\tsection: ", sect.name );
}
else if( cast(short)sym.sectionNumber == COFF_SYMBOL_UNDEFINED )
{
if( verbose ) writefln( "\t\t\tsection: undefined" );
}
else if( cast(short)sym.sectionNumber == COFF_SYMBOL_ABSOLUTE )
{
if( verbose ) writefln( "\t\t\tabsolute symbol" );
}
else if( cast(short)sym.sectionNumber == COFF_SYMBOL_DEBUG )
{
if( verbose ) writefln( "\t\t\tdebug (DDL) symbol" );
}
else
{
if( verbose ) writefln( "\t\t\tsection: invalid (%d)", sym.sectionNumber );
}
// print storage class
if( verbose )
{
writef("\t\t\tstorage: ");
switch( sym.storageClass )
{
// microsoft used storage classes:
case COFF_SYM_CLASS_EXTERNAL: writefln("External" ); break; // The Value field indicates the size if the section number is COFF_SYM_UNDEFINED (0). If the section number is not 0, then the Value field specifies the offset within the section.
case COFF_SYM_CLASS_STATIC: writefln("Static" ); break; // The Value field specifies the offset of the symbol within the section. If the Value is 0, then the symbol represents a section name.
case COFF_SYM_CLASS_FUNCTION: writefln("Function"); break; // Used by Microsoft tools for symbol records that define the extent of a function: begin function (named .bf), end function (.ef), and lines in function (.lf). For .lf records, Value gives the number of source lines in the function. For .ef records, Value gives the size of function code.
case COFF_SYM_CLASS_FILE: writefln("Source file"); break; // Used by Microsoft tools, as well as traditional COFF format, for the source-file symbol record. The symbol is followed by auxiliary records that name the file.
// standard COFF storage classes:
case COFF_SYM_CLASS_END_OF_FUNCTION: writefln("end of function"); break;
case COFF_SYM_CLASS_NULL: writefln("No storage class assigned."); break;
case COFF_SYM_CLASS_AUTOMATIC: writefln("Automatic (stack) variable. "); break; //
case COFF_SYM_CLASS_REGISTER: writefln("Register variable"); break; //. The Value field specifies register number."); break;
case COFF_SYM_CLASS_EXTERNAL_DEF: writefln("Symbol is defined externally"); break; //."); break;
case COFF_SYM_CLASS_LABEL: writefln("Code label"); break; //. The Value field specifies the offset of the symbol within the section."); break;
case COFF_SYM_CLASS_UNDEFINED_LABEL: writefln("undefined ref to a code label "); break; //."); break;
case COFF_SYM_CLASS_MEMBER_OF_STRUCT: writefln("Structure member"); break; //. The Value field specifies nth member."); break;
case COFF_SYM_CLASS_ARGUMENT: writefln("parameter of a function"); break; //. The Value field specifies nth argument."); break;
case COFF_SYM_CLASS_STRUCT_TAG: writefln("Structure tag-name entry"); break; //."); break;
case COFF_SYM_CLASS_MEMBER_OF_UNION: writefln("Union member"); break; //. The Value field specifies nth member."); break;
case COFF_SYM_CLASS_UNION_TAG: writefln("Union tag-name entry"); break; //."); break;
case COFF_SYM_CLASS_TYPE_DEFINITION: writefln("Typedef entry"); break; //."); break;
case COFF_SYM_CLASS_UNDEFINED_STATIC: writefln("Static data declaration"); break; //."); break;
case COFF_SYM_CLASS_ENUM_TAG: writefln("Enumerated type tagname entry"); break; //."); break;
case COFF_SYM_CLASS_MEMBER_OF_ENUM: writefln("Member of enumeration"); break; //. Value specifies nth member."); break;
case COFF_SYM_CLASS_REGISTER_PARAM: writefln("Register parameter."); break;
case COFF_SYM_CLASS_BIT_FIELD: writefln("Bit-field reference"); break; //. Value specifies nth bit in the bit field."); break;
case COFF_SYM_CLASS_BLOCK: writefln("beginning or end of block"); break; //A .bb (beginning of block) or .eb (end of block) record"); break; //. Value is the relocatable address of the code location."); break;
case COFF_SYM_CLASS_END_OF_STRUCT: writefln("End of structure entry"); break; //."); break;
case COFF_SYM_CLASS_SECTION: writefln("Definition of a section"); break; // (Microsoft tools use STATIC storage class instead)."); break;
case COFF_SYM_CLASS_WEAK_EXTERNAL: writefln("Weak external"); break; //. "); break;
default: writefln("unknown - ", sym.storageClass ); break;
}
}
// process special symbols
// function definition
// type - Microsoft tools set this field to 0x20 (function) or 0x0 (not a function). See Section 5.4.3, "Type Representation," for more information.
if( sym.isFunction )
{
// public function
if( (sym.storageClass == COFF_SYM_CLASS_EXTERNAL) && (sym.sectionNumber > 0) )
{
COFFAuxSymbolFunction func;
if( rec.numberOfAuxSymbols )
memcpy( &func, aux, COFFAuxSymbolFunction.sizeof );
// create public symbol
assert( (sym.name in publics) is null );
PublicSymbol pub;
pub.name = sym.name;
pub.section = sym.sectionNumber;
pub.offset = sym.offset;
pub.address = sym.address;
publics[pub.name] = pub;
// debug (DDL) print
if( verbose ) writefln( "\t\t\texternal function: '%s' tag: %d, size: %d, line: %d, next: %d", copyStringz( sym.name ), func.TagIndex, func.TotalSize, func.PointerToLinenumber, func.PointerToNextFunction );
}
// external function
else if( (sym.storageClass == COFF_SYM_CLASS_EXTERNAL) && (sym.sectionNumber == 0) && (sym.offset == 0) )
{
// create external symbol
ExternalSymbol ext;
externalSymbolMap[sym.index] = externs.length;
ext.name = sym.name;
ext.section = sym.sectionNumber;
ext.offset = sym.offset;
ext.address = sym.address;
if( sym.numberOfAuxSymbols )
{
ext.tagIndex = *cast(uint*)aux;
ext.style = *cast(uint*)(aux+uint.sizeof);
writefln( "\t\t\tweak external: 0x%04x flags: 0x%04x (@ 0x%x)", ext.tagIndex, ext.style, ext.offset );
}
// if( ext.style == IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY )
// {
// }
// else if( ext.style == IMAGE_WEAK_EXTERN_SEARCH_LIBRARY )
// {
// }
// else if( ext.style == IMAGE_WEAK_EXTERN_SEARCH_ALIAS )
// {
// }
externs ~= ext;
}
}
else // not a function
{
// filename - source code
if( sym.storageClass == COFF_SYM_CLASS_FILE )
{
assert( sym.name == ".file" );
assert( sym.numberOfAuxSymbols );
char[] sourceFile;
sourceFile.length = sym.numberOfAuxSymbols * COFFSymbolRecord.sizeof;
memcpy( sourceFile.ptr, aux, sourceFile.length );
// debug (DDL) print
if( verbose ) writefln( "\t\t\tfilename: %s", copyStringz( sourceFile ) );
}
// function begin, end, or lines
else if( sym.storageClass == COFF_SYM_CLASS_FUNCTION )
{
// get type
int nType = -1;
switch( sym.name )
{
case ".bf": nType = COFF_SYMBOL_FUNCTION_BEGIN; break;
case ".ef": nType = COFF_SYMBOL_FUNCTION_END; break;
case ".lf": nType = COFF_SYMBOL_FUNCTION_LINES; break;
default: assert(false); writefln( "unknown function symbol: ", sym.name );
break;
}
if( (nType == COFF_SYMBOL_FUNCTION_BEGIN) || (nType == COFF_SYMBOL_FUNCTION_END) )
{
COFFAuxSymbolBEFunction func;
assert( sym.numberOfAuxSymbols );
memcpy( &func, aux, COFFAuxSymbolBEFunction.sizeof );
if( verbose )
{
if( nType == COFF_SYMBOL_FUNCTION_BEGIN )
writefln( "\t\t\tbegin function" );
else
writefln( "\t\t\tend function: (%d bytes)", sym.value );
}
}
else if( nType == COFF_SYMBOL_FUNCTION_LINES )
{
if( verbose ) writefln( "\t\t\tfunction lines: ", sym.value );
}
}
else
{
if( verbose ) writefln( "\t\t\tunknown symbol: ", sym.name );
}
}
// add symbol
symbols[i] = sym;
// move record past extended symbols
i += sym.numberOfAuxSymbols;
rec += sym.numberOfAuxSymbols + 1;
}
// print symbol table
if( 0 ) debug
{
writefln("\tCOFF SYMBOL TABLE: ", symbolTable.length );
foreach( int nSymbol, COFFSymbolRecord sym; symbolTable )
{
char[] symName;// = copyStringz(sym.name);
// grab symbol name
if( sym.zeros == 0 )
{
// name is index into longnames string table
int nameIndex = sym.offset;
symName = "name #: " ~ std.conv.toString(nameIndex);
}
else
{
symName = copyStringz( sym.name );
}
writefln("\t\tSYMBOL %d : %S", nSymbol, symName );
}
}
/*
char* dataPtr = data.ptr + coff.PointerToSymbolTable;
symbols.length = 0;
COFFSymbolRecord rec;
for( uint i = 0; i < coff.NumberOfSymbols; i++ )
{
// insert symbol
// symbols.length = symbols.length + 1;
// copy symbol record
memcpy( &rec, dataPtr, COFFSymbolRecord.sizeof );
// advance data pointer
dataPtr += COFFSymbolRecord.sizeof;
// grab aux symbol records
// for( uint j = 0; j <
dataPtr += rec.numberOfAuxSymbols * COFFSymbolRecord.sizeof;
i += rec.numberOfAuxSymbols;
// add symbol record
symbols ~= rec;
}
}
// print debug (DDL) output
debug
{
// debug (DDL) print symbols
writefln("\tCOFF SYMBOL TABLE: ", symbols.length );
foreach( int nSymbol, COFFSymbolRecord sym; symbols )
{
char[] symName;// = copyStringz(sym.name);
// grab symbol name
if( sym.zeros == 0 )
{
// name is index into longnames string table
int nameIndex = sym.offset;
symName = "name #: " ~ std.conv.toString(nameIndex);
// verify index
// assert( nameIndex < longnames.length );
// if( nameIndex >= longnames.length )
// {
// // invalid longname index
// symName = "bad longname offset: " ~ std.string.toString(nameIndex);
// return false;
// }
// else
// {
// // convert longname
// symName = std.string.toString( cast(char*) longnames.ptr+nameIndex );
// }
}
else
{
symName = copyStringz(sym.name);
}
writefln("\t\tSYMBOL %d : %S", nSymbol, symName );
writefln("\t\t\t\tvalue: 0x%08x", sym.value );
writefln("\t\t\t\tsection: ", sym.sectionNumber );
writefln("\t\t\t\ttype: ", sym.type );
writefln("\t\t\t\tstorage class: ", sym.storageClass );
writefln("\t\t\t\taux symbol number: ", sym.numberOfAuxSymbols );
}
}
*/
// if( coff.machine == 0 )
// {
// return true;
// object is an import library
// }
// verify machine type of object file
// if( coff.machine != COFF_MACHINE_I386 )
// {
// writefln( "readCOFFHeader: File is not for IA32 Platform!\n" );
// return false;
// }
// read optional header
if( coff.SizeOfOptionalHeader )
{
// char[] optHeader;
// optHeader.length = coff.SizeOfOptionalHeader;
// stream.readExact( cast(char*)optHeader.ptr, coff.SizeOfOptionalHeader );
}
}
// read section headers & sections
void parseSections(COFFReader reader)
{
// grab section header table from data
COFFSectionHeader[] sectionTable;
sectionHeaders.length = header.NumberOfSections;
memcpy( sectionTable.ptr, cur.ptr, COFFSectionHeader.sizeof * sectionTable.length );
cur.position += COFFSectionHeader.sizeof * sectionTable.length;
// read and process all section headers
foreach( uint i, COFFSectionHeader s; sectionTable )
{
// create new section data
COFFSection sect = new COFFSection;
sect.index = i;
sect.header = s;
// sect.VirtualSize = s.VirtualSize;
// sect.VirtualAddress = s.VirtualAddress;
// sect.SizeOfRawData = s.SizeOfRawData;
// sect.PointerToRawData = s.PointerToRawData;
// sect.Characteristics = s.Characteristics;
// get section name
if( s.Name[0] != '\\' )
{
// pad extra space in case name is exactly 8 characters
sect.name = strip( copyStringz( s.Name ) );
}
else
{
// name is in string table
assert( false ); // implement
// char[] sNum = s.Name[1..8];
// sNum.length = 1;
// char[] sNum;
// sNum.length = 1;
// memcpy( sNum.ptr, s.Name[1..8].ptr, 1 );
}
// handle grouped selections
int n = find( sect.name, "$" );
if( n != -1 )
sect.group = sect.name[0..n];
else
sect.group = sect.name;
// get group
Group* g = sect.group in groups;
if( g )
{
// add to group
g.sections ~= sect;
}
else
{
// create group
Group group;
group.name = sect.group;
group.sections ~= sect;
groups[group.name] = group;
}
// copy section data
if( ( sect.data.length = sect.header.SizeOfRawData ) != 0 )
{
memcpy( sect.data.ptr, cur.data.ptr + sect.header.PointerToRawData, sect.header.SizeOfRawData );
}
// 0 pad virtual sections
if( s.SizeOfRawData < s.VirtualSize )
{
sect.data.length = s.VirtualSize;
memset( sect.data.ptr + s.SizeOfRawData, 0, s.VirtualSize - s.SizeOfRawData );
}
// grab relocations
if( s.PointerToRelocations && s.NumberOfRelocations )
{
sect.relocs.length = s.NumberOfRelocations;
memcpy( sect.relocs.ptr, cur.data.ptr + s.PointerToRelocations, s.NumberOfRelocations * COFFRelocationRecord.sizeof );
}
// grab line numbers
if( s.PointerToLineNumbers && s.NumberOfLineNumbers )
{
sect.lines.length = s.NumberOfLineNumbers;
memcpy( sect.lines.ptr, cur.data.ptr + s.PointerToLineNumbers, s.NumberOfLineNumbers * COFFLineRecord.sizeof );
}
// parse special sections
switch( sect.group )
{
// executable data
case ".text":
sect.description = "executable data";
// if( !parseTEXT( sect ) )
// throw new Exception( "unable to parse section: " ~ sect.name );
break;
// debug (DDL) data
case ".debug":
sect.description = "debug (DDL) data";
// if( !parseDEBUG(sect) )
// throw new Exception( "unable to parse section: " ~ sect.name );
break;
// initialized data
case ".data":
sect.description = "initialized data";
// if( !parseDATA(sect) )
// throw new Exception( "unable to parse section: " ~ sect.name );
break;
// read-only initialized data
case ".rdata":
sect.description = "read-only initialized data";
break;
// exception data
case ".pdata":
case ".xdata":
sect.description = "exception data";
break;
// uninitialized data
case ".bss":
sect.description = "uninitialized data";
// if( !parseBSS(sect) )
// throw new Exception( "unable to parse section: " ~ sect.name );
break;
// thread local storage
case ".tls":
sect.description = "thread local storage";
break;
// resources
case ".rsrc":
sect.description = "resources";
break;
// import tables
case ".idata":
sect.description = "import tables";
// if( !parseIDATA(sect) )
// throw new Exception( "unable to parse section: " ~ sect.name );
break;
// image only
// export tables
case ".edata":
sect.description = "export tables";
break;
// relocation data
case ".reloc":
sect.description = "relocation data";
break;
// object only
// linker directives
case ".drectve":
sect.description = "linker directives";
// if( !parseDRECTVE(sect) )
// return false;
break;
default:
writefln( "unknown COFF section: '" ~ sect.name ~ "'" );
break;
}
// add section to list
sections ~= sect;
// increment header
// s++;
// writefln( "ReadSectionHeaders(): Section header %d (%d Bytes) loaded",i,inVal);
}
if( verbose ) writefln("");
if( verbose ) writeSections();
}
//Parse sections
// .drectve a "directive" section has the IMAGE_SCN_LNK_INFO flag set in the section header and the name .drectve
// The linker removes a .drectve section after processing the information, so the section does not appear in the image file being linked. Note that a section marked with IMAGE_SCN_LNK_INFO that is not named .drectve is ignored and discarded by the linker.
bool parseDRECTVE( COFFSection sect )
{
// verify flags
if( (sect.flags & COFF_SECTION_LNK_INFO) == 0 )
{
writefln( "section named .drectve did not have COFF_SECTION_LNK_INFO flags, skipping" );
return true;
}
// grab linker directives
if( sect.data.length )
{
if( (linkerDirectives.length = cast(ubyte) sect.data[0]) != 0 )
memcpy( linkerDirectives.ptr, §.data[1], linkerDirectives.length );
writefln( "\t\tlinker directives: %s", linkerDirectives );
}
return true;
}
// .idata section
bool parseIDATA( COFFSection sect )
{
return true;
}
// .text section
bool parseTEXT( COFFSection sect )
{
return true;
}
// .debug (DDL) section
bool parseDEBUG( COFFSection sect )
{
return true;
}
// .data section
bool parseDATA( COFFSection sect )
{
return true;
}
// .bss section
bool parseBSS( COFFSection sect )
{
return true;
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// coff parsing helpers
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
COFFHeader* parseCOFFHeader( File file )
{
COFFHeader* coff = new COFFHeader;
if( file.readBlock( coff, COFFHeader.sizeof ) != COFFHeader.sizeof )
{
delete coff;
writefln( "PE module failed to read coff header");
return null;
}
// check machine code
// if( coff.machine != 0x14C )
// writefln( "warning: file is not for IA32 Platform!\n" );
return coff;
}
+/
|
D
|
// PERMUTE_ARGS:
/**************************************************
5996 ICE(expression.c)
**************************************************/
template T5996(T)
{
auto bug5996() {
if (anyOldGarbage) {}
return 2;
}
}
static assert(!is(typeof(T5996!(int).bug5996())));
/**************************************************
8532 segfault(mtype.c) - type inference + pure
**************************************************/
auto segfault8532(Y, R ...)(R r, Y val) pure
{ return segfault8532(r, val); }
static assert(!is(typeof( segfault8532(1,2,3))));
/**************************************************
8801 ICE assigning to __ctfe
**************************************************/
static assert(!is(typeof( { bool __ctfe= true; })));
static assert(!is(typeof( { __ctfe |= true; })));
/**************************************************
5932 ICE(s2ir.c)
6675 ICE(glue.c)
**************************************************/
void bug3932(T)() {
static assert( 0 );
func5932( 7 );
}
void func5932(T)( T val ) {
void onStandardMsg() {
foreach( t; T ) { }
}
}
static assert(!is(typeof(
{
bug3932!(int)();
}()
)));
/**************************************************
6650 ICE(glue.c) or wrong-code
**************************************************/
auto bug6650(X)(X y)
{
X q;
q = "abc";
return y;
}
static assert(!is(typeof(bug6650!(int)(6))));
static assert(!is(typeof(bug6650!(int)(18))));
/**************************************************
6661 Templates instantiated only through is(typeof()) shouldn't cause errors
**************************************************/
template bug6661(Q)
{
int qutz(Q y)
{
Q q = "abc";
return 67;
}
static assert(qutz(13).sizeof!=299);
const Q blaz = 6;
}
static assert(is(typeof(bug6661!(int).blaz)));
/**************************************************
6599 ICE(constfold.c) or segfault
**************************************************/
string bug6599extraTest(string x) { return x ~ "abc"; }
template Bug6599(X)
{
class Orbit
{
Repository repository = Repository();
}
struct Repository
{
string fileProtocol = "file://";
string blah = bug6599extraTest("abc");
string source = fileProtocol ~ "/usr/local/orbit/repository";
}
}
static assert(!is(typeof(Bug6599!int)));
/**************************************************
8422 TypeTuple of tuples can't be read at compile time
**************************************************/
template TypeTuple8422(TList...)
{
alias TList TypeTuple8422;
}
struct S8422 { int x; }
void test8422()
{
enum a = S8422(1);
enum b = S8422(2);
enum c = [1,2,3];
foreach(t; TypeTuple8422!(b, a)) {
enum u = t;
}
foreach(t; TypeTuple8422!(c)) {
enum v = t;
}
}
/**************************************************
6096 ICE(el.c) with -O
**************************************************/
cdouble c6096;
int bug6096()
{
if (c6096) return 0;
return 1;
}
/**************************************************
7681 Segfault
**************************************************/
static assert( !is(typeof( (){
undefined ~= delegate(){}; return 7;
}())));
/**************************************************
7751 Segfault
**************************************************/
static assert( !is(typeof( (){
bar[]r; r ~= [];
return 7;
}())));
/**************************************************
7639 Segfault
**************************************************/
static assert( !is(typeof( (){
enum foo =
[
str : "functions",
];
})));
/**************************************************
5796
**************************************************/
template A(B) {
pragma(msg, "missing ;")
enum X = 0;
}
static assert(!is(typeof(A!(int))));
/**************************************************
6720
**************************************************/
void bug6720() { }
//static assert(!is(typeof(
//cast(bool)bug6720()
//)));
/**************************************************
1099
**************************************************/
template Mix1099(int a) {
alias typeof(this) ThisType;
static assert (ThisType.init.tupleof.length == 2);
}
struct Foo1099 {
mixin Mix1099!(0);
int foo;
mixin Mix1099!(1);
int bar;
mixin Mix1099!(2);
}
/**************************************************
8788 - super() and return
**************************************************/
class B8788 {
this ( ) { }
}
class C8788(int test) : B8788
{
this ( int y )
{ // TESTS WHICH SHOULD PASS
static if (test == 1) {
if (y == 3) {
super();
return;
}
super();
return;
} else static if (test == 2) {
if (y == 3) {
super();
return;
}
super();
} else static if (test == 3) {
if (y > 3) {
if (y == 7) {
super();
return;
}
super();
return;
}
super();
} else static if (test == 4) {
if (y > 3) {
if (y == 7) {
super();
return;
}
else if (y> 5)
super();
else super();
return;
}
super();
}
// TESTS WHICH SHOULD FAIL
else static if (test == 5) {
if (y == 3) {
super();
return;
}
return; // no super
} else static if (test == 6) {
if (y > 3) {
if (y == 7) {
super();
return;
}
super();
}
super(); // two calls
} else static if (test == 7) {
if (y == 3) {
return; // no super
}
super();
} else static if (test == 8) {
if (y > 3) {
if (y == 7) {
return; // no super
}
super();
return;
}
super();
} else static if (test == 9) {
if (y > 3) {
if (y == 7) {
super();
return;
}
else if (y> 5)
super();
else return; // no super
return;
}
super();
}
}
}
static assert( is(typeof( { new C8788!(1)(0); } )));
static assert( is(typeof( { new C8788!(2)(0); } )));
static assert( is(typeof( { new C8788!(3)(0); } )));
static assert( is(typeof( { new C8788!(4)(0); } )));
static assert(!is(typeof( { new C8788!(5)(0); } )));
static assert(!is(typeof( { new C8788!(6)(0); } )));
static assert(!is(typeof( { new C8788!(7)(0); } )));
static assert(!is(typeof( { new C8788!(8)(0); } )));
static assert(!is(typeof( { new C8788!(9)(0); } )));
/**************************************************
4967, 7058
**************************************************/
enum Bug7058 bug7058 = { 1.5f, 2};
static assert(bug7058.z == 99);
struct Bug7058
{
float x = 0;
float y = 0;
float z = 99;
}
/***************************************************/
template test8163(T...)
{
struct Point
{
T fields;
}
enum N = 2; // N>=2 triggers the bug
extern Point[N] bar();
void foo()
{
Point[N] _ = bar();
}
}
alias test8163!(long) _l;
alias test8163!(double) _d;
alias test8163!(float, float) _ff;
alias test8163!(int, int) _ii;
alias test8163!(int, float) _if;
alias test8163!(ushort, ushort, ushort, ushort) _SSSS;
alias test8163!(ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte) _BBBBBBBB;
alias test8163!(ubyte, ubyte, ushort, float) _BBSf;
|
D
|
/Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/KituraNet.build/FastCGI/FastCGIServerResponse.swift.o : /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/FastCGI/FastCGI.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTP/HTTP.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ServerResponse.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/FastCGI/FastCGIServerResponse.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTP/HTTPServerResponse.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ClientResponse.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/FastCGI/FastCGIRecordCreate.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/Server/ServerDelegate.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTP/KeepAliveState.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/Server/ServerState.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ListenerGroup.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ConnectionUpgrader.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/IncomingSocketManager.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/IncomingSocketHandler.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/Server/ServerLifecycleListener.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HeadersContainer.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTPParser/URLParser.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTPParser/HTTPParser.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/FastCGI/FastCGIRecordParser.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/Server/Server.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/FastCGI/FastCGIServer.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTP/HTTPServer.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/Error.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTP/IncomingHTTPSocketProcessor.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/IncomingSocketProcessor.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/IncomingSocketProcessorCreator.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/Server/ServerMonitor.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/SPIUtils.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTPParser/ParseResults.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTPParser/HTTPParserStatus.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ServerRequest.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/FastCGI/FastCGIServerRequest.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTP/HTTPServerRequest.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ClientRequest.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/BufferList.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ConnectionUpgradeFactory.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/LoggerAPI.swiftmodule /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/SSLService.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 /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/Socket.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/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/CHTTPParser/include/CHTTPParser.h /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/CHTTPParser/include/http_parser.h /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/CHTTPParser/include/utils.h /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/agentcore.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/hcapiplugin.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/memplugin.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/mqttplugin.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/cpuplugin.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/envplugin.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/paho.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/CHTTPParser.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/CCurl/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/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/KituraNet.build/FastCGI/FastCGIServerResponse~partial.swiftmodule : /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/FastCGI/FastCGI.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTP/HTTP.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ServerResponse.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/FastCGI/FastCGIServerResponse.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTP/HTTPServerResponse.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ClientResponse.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/FastCGI/FastCGIRecordCreate.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/Server/ServerDelegate.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTP/KeepAliveState.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/Server/ServerState.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ListenerGroup.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ConnectionUpgrader.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/IncomingSocketManager.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/IncomingSocketHandler.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/Server/ServerLifecycleListener.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HeadersContainer.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTPParser/URLParser.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTPParser/HTTPParser.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/FastCGI/FastCGIRecordParser.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/Server/Server.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/FastCGI/FastCGIServer.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTP/HTTPServer.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/Error.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTP/IncomingHTTPSocketProcessor.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/IncomingSocketProcessor.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/IncomingSocketProcessorCreator.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/Server/ServerMonitor.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/SPIUtils.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTPParser/ParseResults.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTPParser/HTTPParserStatus.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ServerRequest.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/FastCGI/FastCGIServerRequest.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTP/HTTPServerRequest.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ClientRequest.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/BufferList.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ConnectionUpgradeFactory.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/LoggerAPI.swiftmodule /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/SSLService.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 /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/Socket.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/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/CHTTPParser/include/CHTTPParser.h /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/CHTTPParser/include/http_parser.h /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/CHTTPParser/include/utils.h /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/agentcore.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/hcapiplugin.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/memplugin.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/mqttplugin.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/cpuplugin.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/envplugin.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/paho.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/CHTTPParser.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/CCurl/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/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/KituraNet.build/FastCGI/FastCGIServerResponse~partial.swiftdoc : /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/FastCGI/FastCGI.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTP/HTTP.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ServerResponse.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/FastCGI/FastCGIServerResponse.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTP/HTTPServerResponse.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ClientResponse.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/FastCGI/FastCGIRecordCreate.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/Server/ServerDelegate.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTP/KeepAliveState.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/Server/ServerState.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ListenerGroup.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ConnectionUpgrader.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/IncomingSocketManager.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/IncomingSocketHandler.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/Server/ServerLifecycleListener.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HeadersContainer.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTPParser/URLParser.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTPParser/HTTPParser.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/FastCGI/FastCGIRecordParser.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/Server/Server.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/FastCGI/FastCGIServer.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTP/HTTPServer.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/Error.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTP/IncomingHTTPSocketProcessor.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/IncomingSocketProcessor.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/IncomingSocketProcessorCreator.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/Server/ServerMonitor.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/SPIUtils.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTPParser/ParseResults.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTPParser/HTTPParserStatus.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ServerRequest.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/FastCGI/FastCGIServerRequest.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/HTTP/HTTPServerRequest.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ClientRequest.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/BufferList.swift /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/KituraNet/ConnectionUpgradeFactory.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/LoggerAPI.swiftmodule /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/SSLService.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 /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/Socket.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/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/CHTTPParser/include/CHTTPParser.h /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/CHTTPParser/include/http_parser.h /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/CHTTPParser/include/utils.h /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/agentcore.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/hcapiplugin.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/memplugin.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/mqttplugin.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/cpuplugin.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/envplugin.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/paho.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/x86_64-apple-macosx/debug/CHTTPParser.build/module.modulemap /Users/patbutler/Developer/Server/Kitura/EmojiJournalServer/.build/checkouts/Kitura-net.git-4378304010554470451/Sources/CCurl/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
|
module com.skinconsortium.d.commons.ConfigFile;
import tango.text.xml.Document;
import tango.text.xml.DocPrinter;
import tango.io.FilePath;
import tango.io.File;
debug import tango.io.Stdout;
//import tango.sys.Environment;
import tango.io.FileSystem;
/**
* ConfigFile
*
* Creates and handlex a config.xml file within the exe directory.
*
* @author mpdeimos
*/
public class ConfigFile
{
private static const char[] configFilename = "config.xml";
private static Document!(char) doc;
private static File file;
/** static constructor - loads/creates the xml document */
static this()
{
FilePath fp = new FilePath(FileSystem.toAbsolute(configFilename));
bool existed = fp.exists;
if (!existed)
{
fp.createFile;
}
file = new File(fp.toString());
doc = new Document!(char);
doc.header;
if (!existed)
{
auto print = new DocPrinter!(char);
file.write(cast(void[])print(doc));
}
doc.parse(cast(char[])file.read());
doc.header;
}
/** static destructor - saves the file on program termination */
static ~this()
{
auto print = new DocPrinter!(char);
file.write(cast(void[])print(doc));
}
static char[] getValue(char[] name, char[] defaultReturn = "")
{
foreach (node;doc.query["DCommonsConfig"][name])
{
return node.value;
}
return defaultReturn;
}
/+static char[] getValue(char[] name, Object defaultReturn = null)
{
foreach (node;doc.query["DCommonsConfig"][name])
{
return node.value;
}
return defaultReturn.toString();
}+/
static int getValue(char[] name, int defaultReturn)
{
char[] val = getValue(name, tango.text.convert.Integer.toString(defaultReturn));
return tango.text.convert.Integer.toInt!(char)(val);
}
static bool getValue(char[] name, bool defaultReturn)
{
int ret = getValue(name, defaultReturn ? 1 : 0);
return ret != 0;
}
static void setValue(char[] name, char[] value)
{
if (!doc.query["DCommonsConfig"].count)
doc.root.element(null, "DCommonsConfig");
foreach(node;doc.query["DCommonsConfig"])
{
auto q = node.query[name];
foreach(node2;q)
node2.detach;
node.element(null, name, value);
}
}
static void setValue(char[] name, int value)
{
setValue(name, tango.text.convert.Integer.toString(value));
}
static void setValue(char[] name, bool value)
{
setValue(name, tango.text.convert.Integer.toString(value != 0 ? 1 : 0));
}
/+static void setValue(char[] name, Object value)
{
setValue(name, value.toString());
}+/
}
|
D
|
module xdc.metadata;
/** `__VENDOR__` value */
enum Vendor = "XDC";
/** Semver version of XDC; $(D [major, minor, patch]) */
immutable Version = [0L, 1L, 0L];
|
D
|
var int Coragon_ItemsGiven_Chapter_1;
var int Coragon_ItemsGiven_Chapter_2;
var int Coragon_ItemsGiven_Chapter_3;
var int Coragon_ItemsGiven_Chapter_4;
var int Coragon_ItemsGiven_Chapter_5;
func void B_GiveTradeInv_Coragon(var C_Npc slf)
{
if((Kapitel >= 1) && (Coragon_ItemsGiven_Chapter_1 == FALSE))
{
CreateInvItems(slf,ItMi_Gold,50);
CreateInvItems(slf,ItFo_Water,2);
CreateInvItems(slf,ItFo_Wine,6);
CreateInvItems(slf,ItFo_Booze,3);
CreateInvItems(slf,ItFo_Beer,5);
CreateInvItems(slf,ItFo_Apple,5);
CreateInvItems(slf,ItFo_Stew,5);
Coragon_ItemsGiven_Chapter_1 = TRUE;
};
if((Kapitel >= 2) && (Coragon_ItemsGiven_Chapter_2 == FALSE))
{
CreateInvItems(slf,ItMi_Gold,50);
CreateInvItems(slf,ItFo_Water,2);
CreateInvItems(slf,ItFo_Wine,4);
CreateInvItems(slf,ItFo_Booze,3);
CreateInvItems(slf,ItFo_Beer,5);
CreateInvItems(slf,ItFo_Cheese,5);
CreateInvItems(slf,ItFo_Bacon,5);
CreateInvItems(slf,ItFo_Sausage,5);
CreateInvItems(slf,ItFo_Honey,5);
Coragon_ItemsGiven_Chapter_2 = TRUE;
};
if((Kapitel >= 3) && (Coragon_ItemsGiven_Chapter_3 == FALSE))
{
CreateInvItems(slf,ItMi_Gold,50);
CreateInvItems(slf,ItFo_Water,3);
CreateInvItems(slf,ItFo_Wine,4);
CreateInvItems(slf,ItFo_Booze,5);
CreateInvItems(slf,ItFo_Beer,6);
CreateInvItems(slf,ItFo_Bacon,5);
CreateInvItems(slf,ItFo_Sausage,5);
CreateInvItems(slf,ItFo_Honey,5);
Coragon_ItemsGiven_Chapter_3 = TRUE;
};
if((Kapitel >= 4) && (Coragon_ItemsGiven_Chapter_4 == FALSE))
{
CreateInvItems(slf,ItMi_Gold,150);
CreateInvItems(slf,ItFo_Water,4);
CreateInvItems(slf,ItFo_Wine,7);
CreateInvItems(slf,ItFo_Booze,4);
CreateInvItems(slf,ItFo_Beer,6);
CreateInvItems(slf,ItFo_Apple,5);
CreateInvItems(slf,ItFo_Stew,5);
Coragon_ItemsGiven_Chapter_4 = TRUE;
};
if((Kapitel >= 5) && (Coragon_ItemsGiven_Chapter_5 == FALSE))
{
CreateInvItems(slf,ItMi_Gold,150);
CreateInvItems(slf,ItFo_Water,5);
CreateInvItems(slf,ItFo_Wine,5);
CreateInvItems(slf,ItFo_Booze,4);
CreateInvItems(slf,ItFo_Beer,5);
CreateInvItems(slf,ItFo_Apple,5);
CreateInvItems(slf,ItFo_Stew,5);
CreateInvItems(slf,ItFo_Bacon,5);
CreateInvItems(slf,ItFo_Sausage,5);
CreateInvItems(slf,ItFo_Honey,5);
Coragon_ItemsGiven_Chapter_5 = TRUE;
};
};
|
D
|
module voxelman.input.plugininfo;
enum id = "voxelman.input";
enum semver = "0.5.0";
enum deps = [];
enum clientdeps = [];
enum serverdeps = [];
import pluginlib.pluginregistry;
void register(ref PluginRegistry registry)
{
import voxelman.input.plugin;
pluginRegistry.regClientPlugin(new InputPlugin);
}
|
D
|
import std.stdio;
import std.algorithm;
int[] fib(int n){
int[] fibs;
fibs ~= 0;
fibs ~= 1;
for(int i=2; i<n; i++){
fibs ~= (fibs[i-1]+fibs[i-2]);
}
return fibs;
}
void main(string[] args){
auto series = fib(34);
auto even = filter!(a => a % 2 == 0)(series);
auto sum = reduce!((a,b) => a+b)(0,even);
writeln(sum);
}
|
D
|
import std.stdio;
import std.array;
import std.conv;
void main(){
string[5163] a = ["MARY","PATRICIA","LINDA","BARBARA","ELIZABETH","JENNIFER","MARIA","SUSAN","MARGARET","DOROTHY","LISA","NANCY","KAREN","BETTY","HELEN","SANDRA","DONNA","CAROL","RUTH","SHARON","MICHELLE","LAURA","SARAH","KIMBERLY","DEBORAH","JESSICA","SHIRLEY","CYNTHIA","ANGELA","MELISSA","BRENDA","AMY","ANNA","REBECCA","VIRGINIA","KATHLEEN","PAMELA","MARTHA","DEBRA","AMANDA","STEPHANIE","CAROLYN","CHRISTINE","MARIE","JANET","CATHERINE","FRANCES","ANN","JOYCE","DIANE","ALICE","JULIE","HEATHER","TERESA","DORIS","GLORIA","EVELYN","JEAN","CHERYL","MILDRED","KATHERINE","JOAN","ASHLEY","JUDITH","ROSE","JANICE","KELLY","NICOLE","JUDY","CHRISTINA","KATHY","THERESA","BEVERLY","DENISE","TAMMY","IRENE","JANE","LORI","RACHEL","MARILYN","ANDREA","KATHRYN","LOUISE","SARA","ANNE","JACQUELINE","WANDA","BONNIE","JULIA","RUBY","LOIS","TINA","PHYLLIS","NORMA","PAULA","DIANA","ANNIE","LILLIAN","EMILY","ROBIN","PEGGY","CRYSTAL","GLADYS","RITA","DAWN","CONNIE","FLORENCE","TRACY","EDNA","TIFFANY","CARMEN","ROSA","CINDY","GRACE","WENDY","VICTORIA","EDITH","KIM","SHERRY","SYLVIA","JOSEPHINE","THELMA","SHANNON","SHEILA","ETHEL","ELLEN","ELAINE","MARJORIE","CARRIE","CHARLOTTE","MONICA","ESTHER","PAULINE","EMMA","JUANITA","ANITA","RHONDA","HAZEL","AMBER","EVA","DEBBIE","APRIL","LESLIE","CLARA","LUCILLE","JAMIE","JOANNE","ELEANOR","VALERIE","DANIELLE","MEGAN","ALICIA","SUZANNE","MICHELE","GAIL","BERTHA","DARLENE","VERONICA","JILL","ERIN","GERALDINE","LAUREN","CATHY","JOANN","LORRAINE","LYNN","SALLY","REGINA","ERICA","BEATRICE","DOLORES","BERNICE","AUDREY","YVONNE","ANNETTE","JUNE","SAMANTHA","MARION","DANA","STACY","ANA","RENEE","IDA","VIVIAN","ROBERTA","HOLLY","BRITTANY","MELANIE","LORETTA","YOLANDA","JEANETTE","LAURIE","KATIE","KRISTEN","VANESSA","ALMA","SUE","ELSIE","BETH","JEANNE","VICKI","CARLA","TARA","ROSEMARY","EILEEN","TERRI","GERTRUDE","LUCY","TONYA","ELLA","STACEY","WILMA","GINA","KRISTIN","JESSIE","NATALIE","AGNES","VERA","WILLIE","CHARLENE","BESSIE","DELORES","MELINDA","PEARL","ARLENE","MAUREEN","COLLEEN","ALLISON","TAMARA","JOY","GEORGIA","CONSTANCE","LILLIE","CLAUDIA","JACKIE","MARCIA","TANYA","NELLIE","MINNIE","MARLENE","HEIDI","GLENDA","LYDIA","VIOLA","COURTNEY","MARIAN","STELLA","CAROLINE","DORA","JO","VICKIE","MATTIE","TERRY","MAXINE","IRMA","MABEL","MARSHA","MYRTLE","LENA","CHRISTY","DEANNA","PATSY","HILDA","GWENDOLYN","JENNIE","NORA","MARGIE","NINA","CASSANDRA","LEAH","PENNY","KAY","PRISCILLA","NAOMI","CAROLE","BRANDY","OLGA","BILLIE","DIANNE","TRACEY","LEONA","JENNY","FELICIA","SONIA","MIRIAM","VELMA","BECKY","BOBBIE","VIOLET","KRISTINA","TONI","MISTY","MAE","SHELLY","DAISY","RAMONA","SHERRI","ERIKA","KATRINA","CLAIRE","LINDSEY","LINDSAY","GENEVA","GUADALUPE","BELINDA","MARGARITA","SHERYL","CORA","FAYE","ADA","NATASHA","SABRINA","ISABEL","MARGUERITE","HATTIE","HARRIET","MOLLY","CECILIA","KRISTI","BRANDI","BLANCHE","SANDY","ROSIE","JOANNA","IRIS","EUNICE","ANGIE","INEZ","LYNDA","MADELINE","AMELIA","ALBERTA","GENEVIEVE","MONIQUE","JODI","JANIE","MAGGIE","KAYLA","SONYA","JAN","LEE","KRISTINE","CANDACE","FANNIE","MARYANN","OPAL","ALISON","YVETTE","MELODY","LUZ","SUSIE","OLIVIA","FLORA","SHELLEY","KRISTY","MAMIE","LULA","LOLA","VERNA","BEULAH","ANTOINETTE","CANDICE","JUANA","JEANNETTE","PAM","KELLI","HANNAH","WHITNEY","BRIDGET","KARLA","CELIA","LATOYA","PATTY","SHELIA","GAYLE","DELLA","VICKY","LYNNE","SHERI","MARIANNE","KARA","JACQUELYN","ERMA","BLANCA","MYRA","LETICIA","PAT","KRISTA","ROXANNE","ANGELICA","JOHNNIE","ROBYN","FRANCIS","ADRIENNE","ROSALIE","ALEXANDRA","BROOKE","BETHANY","SADIE","BERNADETTE","TRACI","JODY","KENDRA","JASMINE","NICHOLE","RACHAEL","CHELSEA","MABLE","ERNESTINE","MURIEL","MARCELLA","ELENA","KRYSTAL","ANGELINA","NADINE","KARI","ESTELLE","DIANNA","PAULETTE","LORA","MONA","DOREEN","ROSEMARIE","ANGEL","DESIREE","ANTONIA","HOPE","GINGER","JANIS","BETSY","CHRISTIE","FREDA","MERCEDES","MEREDITH","LYNETTE","TERI","CRISTINA","EULA","LEIGH","MEGHAN","SOPHIA","ELOISE","ROCHELLE","GRETCHEN","CECELIA","RAQUEL","HENRIETTA","ALYSSA","JANA","KELLEY","GWEN","KERRY","JENNA","TRICIA","LAVERNE","OLIVE","ALEXIS","TASHA","SILVIA","ELVIRA","CASEY","DELIA","SOPHIE","KATE","PATTI","LORENA","KELLIE","SONJA","LILA","LANA","DARLA","MAY","MINDY","ESSIE","MANDY","LORENE","ELSA","JOSEFINA","JEANNIE","MIRANDA","DIXIE","LUCIA","MARTA","FAITH","LELA","JOHANNA","SHARI","CAMILLE","TAMI","SHAWNA","ELISA","EBONY","MELBA","ORA","NETTIE","TABITHA","OLLIE","JAIME","WINIFRED","KRISTIE","MARINA","ALISHA","AIMEE","RENA","MYRNA","MARLA","TAMMIE","LATASHA","BONITA","PATRICE","RONDA","SHERRIE","ADDIE","FRANCINE","DELORIS","STACIE","ADRIANA","CHERI","SHELBY","ABIGAIL","CELESTE","JEWEL","CARA","ADELE","REBEKAH","LUCINDA","DORTHY","CHRIS","EFFIE","TRINA","REBA","SHAWN","SALLIE","AURORA","LENORA","ETTA","LOTTIE","KERRI","TRISHA","NIKKI","ESTELLA","FRANCISCA","JOSIE","TRACIE","MARISSA","KARIN","BRITTNEY","JANELLE","LOURDES","LAUREL","HELENE","FERN","ELVA","CORINNE","KELSEY","INA","BETTIE","ELISABETH","AIDA","CAITLIN","INGRID","IVA","EUGENIA","CHRISTA","GOLDIE","CASSIE","MAUDE","JENIFER","THERESE","FRANKIE","DENA","LORNA","JANETTE","LATONYA","CANDY","MORGAN","CONSUELO","TAMIKA","ROSETTA","DEBORA","CHERIE","POLLY","DINA","JEWELL","FAY","JILLIAN","DOROTHEA","NELL","TRUDY","ESPERANZA","PATRICA","KIMBERLEY","SHANNA","HELENA","CAROLINA","CLEO","STEFANIE","ROSARIO","OLA","JANINE","MOLLIE","LUPE","ALISA","LOU","MARIBEL","SUSANNE","BETTE","SUSANA","ELISE","CECILE","ISABELLE","LESLEY","JOCELYN","PAIGE","JONI","RACHELLE","LEOLA","DAPHNE","ALTA","ESTER","PETRA","GRACIELA","IMOGENE","JOLENE","KEISHA","LACEY","GLENNA","GABRIELA","KERI","URSULA","LIZZIE","KIRSTEN","SHANA","ADELINE","MAYRA","JAYNE","JACLYN","GRACIE","SONDRA","CARMELA","MARISA","ROSALIND","CHARITY","TONIA","BEATRIZ","MARISOL","CLARICE","JEANINE","SHEENA","ANGELINE","FRIEDA","LILY","ROBBIE","SHAUNA","MILLIE","CLAUDETTE","CATHLEEN","ANGELIA","GABRIELLE","AUTUMN","KATHARINE","SUMMER","JODIE","STACI","LEA","CHRISTI","JIMMIE","JUSTINE","ELMA","LUELLA","MARGRET","DOMINIQUE","SOCORRO","RENE","MARTINA","MARGO","MAVIS","CALLIE","BOBBI","MARITZA","LUCILE","LEANNE","JEANNINE","DEANA","AILEEN","LORIE","LADONNA","WILLA","MANUELA","GALE","SELMA","DOLLY","SYBIL","ABBY","LARA","DALE","IVY","DEE","WINNIE","MARCY","LUISA","JERI","MAGDALENA","OFELIA","MEAGAN","AUDRA","MATILDA","LEILA","CORNELIA","BIANCA","SIMONE","BETTYE","RANDI","VIRGIE","LATISHA","BARBRA","GEORGINA","ELIZA","LEANN","BRIDGETTE","RHODA","HALEY","ADELA","NOLA","BERNADINE","FLOSSIE","ILA","GRETA","RUTHIE","NELDA","MINERVA","LILLY","TERRIE","LETHA","HILARY","ESTELA","VALARIE","BRIANNA","ROSALYN","EARLINE","CATALINA","AVA","MIA","CLARISSA","LIDIA","CORRINE","ALEXANDRIA","CONCEPCION","TIA","SHARRON","RAE","DONA","ERICKA","JAMI","ELNORA","CHANDRA","LENORE","NEVA","MARYLOU","MELISA","TABATHA","SERENA","AVIS","ALLIE","SOFIA","JEANIE","ODESSA","NANNIE","HARRIETT","LORAINE","PENELOPE","MILAGROS","EMILIA","BENITA","ALLYSON","ASHLEE","TANIA","TOMMIE","ESMERALDA","KARINA","EVE","PEARLIE","ZELMA","MALINDA","NOREEN","TAMEKA","SAUNDRA","HILLARY","AMIE","ALTHEA","ROSALINDA","JORDAN","LILIA","ALANA","GAY","CLARE","ALEJANDRA","ELINOR","MICHAEL","LORRIE","JERRI","DARCY","EARNESTINE","CARMELLA","TAYLOR","NOEMI","MARCIE","LIZA","ANNABELLE","LOUISA","EARLENE","MALLORY","CARLENE","NITA","SELENA","TANISHA","KATY","JULIANNE","JOHN","LAKISHA","EDWINA","MARICELA","MARGERY","KENYA","DOLLIE","ROXIE","ROSLYN","KATHRINE","NANETTE","CHARMAINE","LAVONNE","ILENE","KRIS","TAMMI","SUZETTE","CORINE","KAYE","JERRY","MERLE","CHRYSTAL","LINA","DEANNE","LILIAN","JULIANA","ALINE","LUANN","KASEY","MARYANNE","EVANGELINE","COLETTE","MELVA","LAWANDA","YESENIA","NADIA","MADGE","KATHIE","EDDIE","OPHELIA","VALERIA","NONA","MITZI","MARI","GEORGETTE","CLAUDINE","FRAN","ALISSA","ROSEANN","LAKEISHA","SUSANNA","REVA","DEIDRE","CHASITY","SHEREE","CARLY","JAMES","ELVIA","ALYCE","DEIRDRE","GENA","BRIANA","ARACELI","KATELYN","ROSANNE","WENDI","TESSA","BERTA","MARVA","IMELDA","MARIETTA","MARCI","LEONOR","ARLINE","SASHA","MADELYN","JANNA","JULIETTE","DEENA","AURELIA","JOSEFA","AUGUSTA","LILIANA","YOUNG","CHRISTIAN","LESSIE","AMALIA","SAVANNAH","ANASTASIA","VILMA","NATALIA","ROSELLA","LYNNETTE","CORINA","ALFREDA","LEANNA","CAREY","AMPARO","COLEEN","TAMRA","AISHA","WILDA","KARYN","CHERRY","QUEEN","MAURA","MAI","EVANGELINA","ROSANNA","HALLIE","ERNA","ENID","MARIANA","LACY","JULIET","JACKLYN","FREIDA","MADELEINE","MARA","HESTER","CATHRYN","LELIA","CASANDRA","BRIDGETT","ANGELITA","JANNIE","DIONNE","ANNMARIE","KATINA","BERYL","PHOEBE","MILLICENT","KATHERYN","DIANN","CARISSA","MARYELLEN","LIZ","LAURI","HELGA","GILDA","ADRIAN","RHEA","MARQUITA","HOLLIE","TISHA","TAMERA","ANGELIQUE","FRANCESCA","BRITNEY","KAITLIN","LOLITA","FLORINE","ROWENA","REYNA","TWILA","FANNY","JANELL","INES","CONCETTA","BERTIE","ALBA","BRIGITTE","ALYSON","VONDA","PANSY","ELBA","NOELLE","LETITIA","KITTY","DEANN","BRANDIE","LOUELLA","LETA","FELECIA","SHARLENE","LESA","BEVERLEY","ROBERT","ISABELLA","HERMINIA","TERRA","CELINA","TORI","OCTAVIA","JADE","DENICE","GERMAINE","SIERRA","MICHELL","CORTNEY","NELLY","DORETHA","SYDNEY","DEIDRA","MONIKA","LASHONDA","JUDI","CHELSEY","ANTIONETTE","MARGOT","BOBBY","ADELAIDE","NAN","LEEANN","ELISHA","DESSIE","LIBBY","KATHI","GAYLA","LATANYA","MINA","MELLISA","KIMBERLEE","JASMIN","RENAE","ZELDA","ELDA","MA","JUSTINA","GUSSIE","EMILIE","CAMILLA","ABBIE","ROCIO","KAITLYN","JESSE","EDYTHE","ASHLEIGH","SELINA","LAKESHA","GERI","ALLENE","PAMALA","MICHAELA","DAYNA","CARYN","ROSALIA","SUN","JACQULINE","REBECA","MARYBETH","KRYSTLE","IOLA","DOTTIE","BENNIE","BELLE","AUBREY","GRISELDA","ERNESTINA","ELIDA","ADRIANNE","DEMETRIA","DELMA","CHONG","JAQUELINE","DESTINY","ARLEEN","VIRGINA","RETHA","FATIMA","TILLIE","ELEANORE","CARI","TREVA","BIRDIE","WILHELMINA","ROSALEE","MAURINE","LATRICE","YONG","JENA","TARYN","ELIA","DEBBY","MAUDIE","JEANNA","DELILAH","CATRINA","SHONDA","HORTENCIA","THEODORA","TERESITA","ROBBIN","DANETTE","MARYJANE","FREDDIE","DELPHINE","BRIANNE","NILDA","DANNA","CINDI","BESS","IONA","HANNA","ARIEL","WINONA","VIDA","ROSITA","MARIANNA","WILLIAM","RACHEAL","GUILLERMINA","ELOISA","CELESTINE","CAREN","MALISSA","LONA","CHANTEL","SHELLIE","MARISELA","LEORA","AGATHA","SOLEDAD","MIGDALIA","IVETTE","CHRISTEN","ATHENA","JANEL","CHLOE","VEDA","PATTIE","TESSIE","TERA","MARILYNN","LUCRETIA","KARRIE","DINAH","DANIELA","ALECIA","ADELINA","VERNICE","SHIELA","PORTIA","MERRY","LASHAWN","DEVON","DARA","TAWANA","OMA","VERDA","CHRISTIN","ALENE","ZELLA","SANDI","RAFAELA","MAYA","KIRA","CANDIDA","ALVINA","SUZAN","SHAYLA","LYN","LETTIE","ALVA","SAMATHA","ORALIA","MATILDE","MADONNA","LARISSA","VESTA","RENITA","INDIA","DELOIS","SHANDA","PHILLIS","LORRI","ERLINDA","CRUZ","CATHRINE","BARB","ZOE","ISABELL","IONE","GISELA","CHARLIE","VALENCIA","ROXANNA","MAYME","KISHA","ELLIE","MELLISSA","DORRIS","DALIA","BELLA","ANNETTA","ZOILA","RETA","REINA","LAURETTA","KYLIE","CHRISTAL","PILAR","CHARLA","ELISSA","TIFFANI","TANA","PAULINA","LEOTA","BREANNA","JAYME","CARMEL","VERNELL","TOMASA","MANDI","DOMINGA","SANTA","MELODIE","LURA","ALEXA","TAMELA","RYAN","MIRNA","KERRIE","VENUS","NOEL","FELICITA","CRISTY","CARMELITA","BERNIECE","ANNEMARIE","TIARA","ROSEANNE","MISSY","CORI","ROXANA","PRICILLA","KRISTAL","JUNG","ELYSE","HAYDEE","ALETHA","BETTINA","MARGE","GILLIAN","FILOMENA","CHARLES","ZENAIDA","HARRIETTE","CARIDAD","VADA","UNA","ARETHA","PEARLINE","MARJORY","MARCELA","FLOR","EVETTE","ELOUISE","ALINA","TRINIDAD","DAVID","DAMARIS","CATHARINE","CARROLL","BELVA","NAKIA","MARLENA","LUANNE","LORINE","KARON","DORENE","DANITA","BRENNA","TATIANA","SAMMIE","LOUANN","LOREN","JULIANNA","ANDRIA","PHILOMENA","LUCILA","LEONORA","DOVIE","ROMONA","MIMI","JACQUELIN","GAYE","TONJA","MISTI","JOE","GENE","CHASTITY","STACIA","ROXANN","MICAELA","NIKITA","MEI","VELDA","MARLYS","JOHNNA","AURA","LAVERN","IVONNE","HAYLEY","NICKI","MAJORIE","HERLINDA","GEORGE","ALPHA","YADIRA","PERLA","GREGORIA","DANIEL","ANTONETTE","SHELLI","MOZELLE","MARIAH","JOELLE","CORDELIA","JOSETTE","CHIQUITA","TRISTA","LOUIS","LAQUITA","GEORGIANA","CANDI","SHANON","LONNIE","HILDEGARD","CECIL","VALENTINA","STEPHANY","MAGDA","KAROL","GERRY","GABRIELLA","TIANA","ROMA","RICHELLE","RAY","PRINCESS","OLETA","JACQUE","IDELLA","ALAINA","SUZANNA","JOVITA","BLAIR","TOSHA","RAVEN","NEREIDA","MARLYN","KYLA","JOSEPH","DELFINA","TENA","STEPHENIE","SABINA","NATHALIE","MARCELLE","GERTIE","DARLEEN","THEA","SHARONDA","SHANTEL","BELEN","VENESSA","ROSALINA","ONA","GENOVEVA","COREY","CLEMENTINE","ROSALBA","RENATE","RENATA","MI","IVORY","GEORGIANNA","FLOY","DORCAS","ARIANA","TYRA","THEDA","MARIAM","JULI","JESICA","DONNIE","VIKKI","VERLA","ROSELYN","MELVINA","JANNETTE","GINNY","DEBRAH","CORRIE","ASIA","VIOLETA","MYRTIS","LATRICIA","COLLETTE","CHARLEEN","ANISSA","VIVIANA","TWYLA","PRECIOUS","NEDRA","LATONIA","LAN","HELLEN","FABIOLA","ANNAMARIE","ADELL","SHARYN","CHANTAL","NIKI","MAUD","LIZETTE","LINDY","KIA","KESHA","JEANA","DANELLE","CHARLINE","CHANEL","CARROL","VALORIE","LIA","DORTHA","CRISTAL","SUNNY","LEONE","LEILANI","GERRI","DEBI","ANDRA","KESHIA","IMA","EULALIA","EASTER","DULCE","NATIVIDAD","LINNIE","KAMI","GEORGIE","CATINA","BROOK","ALDA","WINNIFRED","SHARLA","RUTHANN","MEAGHAN","MAGDALENE","LISSETTE","ADELAIDA","VENITA","TRENA","SHIRLENE","SHAMEKA","ELIZEBETH","DIAN","SHANTA","MICKEY","LATOSHA","CARLOTTA","WINDY","SOON","ROSINA","MARIANN","LEISA","JONNIE","DAWNA","CATHIE","BILLY","ASTRID","SIDNEY","LAUREEN","JANEEN","HOLLI","FAWN","VICKEY","TERESSA","SHANTE","RUBYE","MARCELINA","CHANDA","CARY","TERESE","SCARLETT","MARTY","MARNIE","LULU","LISETTE","JENIFFER","ELENOR","DORINDA","DONITA","CARMAN","BERNITA","ALTAGRACIA","ALETA","ADRIANNA","ZORAIDA","RONNIE","NICOLA","LYNDSEY","KENDALL","JANINA","CHRISSY","AMI","STARLA","PHYLIS","PHUONG","KYRA","CHARISSE","BLANCH","SANJUANITA","RONA","NANCI","MARILEE","MARANDA","CORY","BRIGETTE","SANJUANA","MARITA","KASSANDRA","JOYCELYN","IRA","FELIPA","CHELSIE","BONNY","MIREYA","LORENZA","KYONG","ILEANA","CANDELARIA","TONY","TOBY","SHERIE","OK","MARK","LUCIE","LEATRICE","LAKESHIA","GERDA","EDIE","BAMBI","MARYLIN","LAVON","HORTENSE","GARNET","EVIE","TRESSA","SHAYNA","LAVINA","KYUNG","JEANETTA","SHERRILL","SHARA","PHYLISS","MITTIE","ANABEL","ALESIA","THUY","TAWANDA","RICHARD","JOANIE","TIFFANIE","LASHANDA","KARISSA","ENRIQUETA","DARIA","DANIELLA","CORINNA","ALANNA","ABBEY","ROXANE","ROSEANNA","MAGNOLIA","LIDA","KYLE","JOELLEN","ERA","CORAL","CARLEEN","TRESA","PEGGIE","NOVELLA","NILA","MAYBELLE","JENELLE","CARINA","NOVA","MELINA","MARQUERITE","MARGARETTE","JOSEPHINA","EVONNE","DEVIN","CINTHIA","ALBINA","TOYA","TAWNYA","SHERITA","SANTOS","MYRIAM","LIZABETH","LISE","KEELY","JENNI","GISELLE","CHERYLE","ARDITH","ARDIS","ALESHA","ADRIANE","SHAINA","LINNEA","KAROLYN","HONG","FLORIDA","FELISHA","DORI","DARCI","ARTIE","ARMIDA","ZOLA","XIOMARA","VERGIE","SHAMIKA","NENA","NANNETTE","MAXIE","LOVIE","JEANE","JAIMIE","INGE","FARRAH","ELAINA","CAITLYN","STARR","FELICITAS","CHERLY","CARYL","YOLONDA","YASMIN","TEENA","PRUDENCE","PENNIE","NYDIA","MACKENZIE","ORPHA","MARVEL","LIZBETH","LAURETTE","JERRIE","HERMELINDA","CAROLEE","TIERRA","MIRIAN","META","MELONY","KORI","JENNETTE","JAMILA","ENA","ANH","YOSHIKO","SUSANNAH","SALINA","RHIANNON","JOLEEN","CRISTINE","ASHTON","ARACELY","TOMEKA","SHALONDA","MARTI","LACIE","KALA","JADA","ILSE","HAILEY","BRITTANI","ZONA","SYBLE","SHERRYL","RANDY","NIDIA","MARLO","KANDICE","KANDI","DEB","DEAN","AMERICA","ALYCIA","TOMMY","RONNA","NORENE","MERCY","JOSE","INGEBORG","GIOVANNA","GEMMA","CHRISTEL","AUDRY","ZORA","VITA","VAN","TRISH","STEPHAINE","SHIRLEE","SHANIKA","MELONIE","MAZIE","JAZMIN","INGA","HOA","HETTIE","GERALYN","FONDA","ESTRELLA","ADELLA","SU","SARITA","RINA","MILISSA","MARIBETH","GOLDA","EVON","ETHELYN","ENEDINA","CHERISE","CHANA","VELVA","TAWANNA","SADE","MIRTA","LI","KARIE","JACINTA","ELNA","DAVINA","CIERRA","ASHLIE","ALBERTHA","TANESHA","STEPHANI","NELLE","MINDI","LU","LORINDA","LARUE","FLORENE","DEMETRA","DEDRA","CIARA","CHANTELLE","ASHLY","SUZY","ROSALVA","NOELIA","LYDA","LEATHA","KRYSTYNA","KRISTAN","KARRI","DARLINE","DARCIE","CINDA","CHEYENNE","CHERRIE","AWILDA","ALMEDA","ROLANDA","LANETTE","JERILYN","GISELE","EVALYN","CYNDI","CLETA","CARIN","ZINA","ZENA","VELIA","TANIKA","PAUL","CHARISSA","THOMAS","TALIA","MARGARETE","LAVONDA","KAYLEE","KATHLENE","JONNA","IRENA","ILONA","IDALIA","CANDIS","CANDANCE","BRANDEE","ANITRA","ALIDA","SIGRID","NICOLETTE","MARYJO","LINETTE","HEDWIG","CHRISTIANA","CASSIDY","ALEXIA","TRESSIE","MODESTA","LUPITA","LITA","GLADIS","EVELIA","DAVIDA","CHERRI","CECILY","ASHELY","ANNABEL","AGUSTINA","WANITA","SHIRLY","ROSAURA","HULDA","EUN","BAILEY","YETTA","VERONA","THOMASINA","SIBYL","SHANNAN","MECHELLE","LUE","LEANDRA","LANI","KYLEE","KANDY","JOLYNN","FERNE","EBONI","CORENE","ALYSIA","ZULA","NADA","MOIRA","LYNDSAY","LORRETTA","JUAN","JAMMIE","HORTENSIA","GAYNELL","CAMERON","ADRIA","VINA","VICENTA","TANGELA","STEPHINE","NORINE","NELLA","LIANA","LESLEE","KIMBERELY","ILIANA","GLORY","FELICA","EMOGENE","ELFRIEDE","EDEN","EARTHA","CARMA","BEA","OCIE","MARRY","LENNIE","KIARA","JACALYN","CARLOTA","ARIELLE","YU","STAR","OTILIA","KIRSTIN","KACEY","JOHNETTA","JOEY","JOETTA","JERALDINE","JAUNITA","ELANA","DORTHEA","CAMI","AMADA","ADELIA","VERNITA","TAMAR","SIOBHAN","RENEA","RASHIDA","OUIDA","ODELL","NILSA","MERYL","KRISTYN","JULIETA","DANICA","BREANNE","AUREA","ANGLEA","SHERRON","ODETTE","MALIA","LORELEI","LIN","LEESA","KENNA","KATHLYN","FIONA","CHARLETTE","SUZIE","SHANTELL","SABRA","RACQUEL","MYONG","MIRA","MARTINE","LUCIENNE","LAVADA","JULIANN","JOHNIE","ELVERA","DELPHIA","CLAIR","CHRISTIANE","CHAROLETTE","CARRI","AUGUSTINE","ASHA","ANGELLA","PAOLA","NINFA","LEDA","LAI","EDA","SUNSHINE","STEFANI","SHANELL","PALMA","MACHELLE","LISSA","KECIA","KATHRYNE","KARLENE","JULISSA","JETTIE","JENNIFFER","HUI","CORRINA","CHRISTOPHER","CAROLANN","ALENA","TESS","ROSARIA","MYRTICE","MARYLEE","LIANE","KENYATTA","JUDIE","JANEY","IN","ELMIRA","ELDORA","DENNA","CRISTI","CATHI","ZAIDA","VONNIE","VIVA","VERNIE","ROSALINE","MARIELA","LUCIANA","LESLI","KARAN","FELICE","DENEEN","ADINA","WYNONA","TARSHA","SHERON","SHASTA","SHANITA","SHANI","SHANDRA","RANDA","PINKIE","PARIS","NELIDA","MARILOU","LYLA","LAURENE","LACI","JOI","JANENE","DOROTHA","DANIELE","DANI","CAROLYNN","CARLYN","BERENICE","AYESHA","ANNELIESE","ALETHEA","THERSA","TAMIKO","RUFINA","OLIVA","MOZELL","MARYLYN","MADISON","KRISTIAN","KATHYRN","KASANDRA","KANDACE","JANAE","GABRIEL","DOMENICA","DEBBRA","DANNIELLE","CHUN","BUFFY","BARBIE","ARCELIA","AJA","ZENOBIA","SHAREN","SHAREE","PATRICK","PAGE","MY","LAVINIA","KUM","KACIE","JACKELINE","HUONG","FELISA","EMELIA","ELEANORA","CYTHIA","CRISTIN","CLYDE","CLARIBEL","CARON","ANASTACIA","ZULMA","ZANDRA","YOKO","TENISHA","SUSANN","SHERILYN","SHAY","SHAWANDA","SABINE","ROMANA","MATHILDA","LINSEY","KEIKO","JOANA","ISELA","GRETTA","GEORGETTA","EUGENIE","DUSTY","DESIRAE","DELORA","CORAZON","ANTONINA","ANIKA","WILLENE","TRACEE","TAMATHA","REGAN","NICHELLE","MICKIE","MAEGAN","LUANA","LANITA","KELSIE","EDELMIRA","BREE","AFTON","TEODORA","TAMIE","SHENA","MEG","LINH","KELI","KACI","DANYELLE","BRITT","ARLETTE","ALBERTINE","ADELLE","TIFFINY","STORMY","SIMONA","NUMBERS","NICOLASA","NICHOL","NIA","NAKISHA","MEE","MAIRA","LOREEN","KIZZY","JOHNNY","JAY","FALLON","CHRISTENE","BOBBYE","ANTHONY","YING","VINCENZA","TANJA","RUBIE","RONI","QUEENIE","MARGARETT","KIMBERLI","IRMGARD","IDELL","HILMA","EVELINA","ESTA","EMILEE","DENNISE","DANIA","CARL","CARIE","ANTONIO","WAI","SANG","RISA","RIKKI","PARTICIA","MUI","MASAKO","MARIO","LUVENIA","LOREE","LONI","LIEN","KEVIN","GIGI","FLORENCIA","DORIAN","DENITA","DALLAS","CHI","BILLYE","ALEXANDER","TOMIKA","SHARITA","RANA","NIKOLE","NEOMA","MARGARITE","MADALYN","LUCINA","LAILA","KALI","JENETTE","GABRIELE","EVELYNE","ELENORA","CLEMENTINA","ALEJANDRINA","ZULEMA","VIOLETTE","VANNESSA","THRESA","RETTA","PIA","PATIENCE","NOELLA","NICKIE","JONELL","DELTA","CHUNG","CHAYA","CAMELIA","BETHEL","ANYA","ANDREW","THANH","SUZANN","SPRING","SHU","MILA","LILLA","LAVERNA","KEESHA","KATTIE","GIA","GEORGENE","EVELINE","ESTELL","ELIZBETH","VIVIENNE","VALLIE","TRUDIE","STEPHANE","MICHEL","MAGALY","MADIE","KENYETTA","KARREN","JANETTA","HERMINE","HARMONY","DRUCILLA","DEBBI","CELESTINA","CANDIE","BRITNI","BECKIE","AMINA","ZITA","YUN","YOLANDE","VIVIEN","VERNETTA","TRUDI","SOMMER","PEARLE","PATRINA","OSSIE","NICOLLE","LOYCE","LETTY","LARISA","KATHARINA","JOSELYN","JONELLE","JENELL","IESHA","HEIDE","FLORINDA","FLORENTINA","FLO","ELODIA","DORINE","BRUNILDA","BRIGID","ASHLI","ARDELLA","TWANA","THU","TARAH","SUNG","SHEA","SHAVON","SHANE","SERINA","RAYNA","RAMONITA","NGA","MARGURITE","LUCRECIA","KOURTNEY","KATI","JESUS","JESENIA","DIAMOND","CRISTA","AYANA","ALICA","ALIA","VINNIE","SUELLEN","ROMELIA","RACHELL","PIPER","OLYMPIA","MICHIKO","KATHALEEN","JOLIE","JESSI","JANESSA","HANA","HA","ELEASE","CARLETTA","BRITANY","SHONA","SALOME","ROSAMOND","REGENA","RAINA","NGOC","NELIA","LOUVENIA","LESIA","LATRINA","LATICIA","LARHONDA","JINA","JACKI","HOLLIS","HOLLEY","EMMY","DEEANN","CORETTA","ARNETTA","VELVET","THALIA","SHANICE","NETA","MIKKI","MICKI","LONNA","LEANA","LASHUNDA","KILEY","JOYE","JACQULYN","IGNACIA","HYUN","HIROKO","HENRY","HENRIETTE","ELAYNE","DELINDA","DARNELL","DAHLIA","COREEN","CONSUELA","CONCHITA","CELINE","BABETTE","AYANNA","ANETTE","ALBERTINA","SKYE","SHAWNEE","SHANEKA","QUIANA","PAMELIA","MIN","MERRI","MERLENE","MARGIT","KIESHA","KIERA","KAYLENE","JODEE","JENISE","ERLENE","EMMIE","ELSE","DARYL","DALILA","DAISEY","CODY","CASIE","BELIA","BABARA","VERSIE","VANESA","SHELBA","SHAWNDA","SAM","NORMAN","NIKIA","NAOMA","MARNA","MARGERET","MADALINE","LAWANA","KINDRA","JUTTA","JAZMINE","JANETT","HANNELORE","GLENDORA","GERTRUD","GARNETT","FREEDA","FREDERICA","FLORANCE","FLAVIA","DENNIS","CARLINE","BEVERLEE","ANJANETTE","VALDA","TRINITY","TAMALA","STEVIE","SHONNA","SHA","SARINA","ONEIDA","MICAH","MERILYN","MARLEEN","LURLINE","LENNA","KATHERIN","JIN","JENI","HAE","GRACIA","GLADY","FARAH","ERIC","ENOLA","EMA","DOMINQUE","DEVONA","DELANA","CECILA","CAPRICE","ALYSHA","ALI","ALETHIA","VENA","THERESIA","TAWNY","SONG","SHAKIRA","SAMARA","SACHIKO","RACHELE","PAMELLA","NICKY","MARNI","MARIEL","MAREN","MALISA","LIGIA","LERA","LATORIA","LARAE","KIMBER","KATHERN","KAREY","JENNEFER","JANETH","HALINA","FREDIA","DELISA","DEBROAH","CIERA","CHIN","ANGELIKA","ANDREE","ALTHA","YEN","VIVAN","TERRESA","TANNA","SUK","SUDIE","SOO","SIGNE","SALENA","RONNI","REBBECCA","MYRTIE","MCKENZIE","MALIKA","MAIDA","LOAN","LEONARDA","KAYLEIGH","FRANCE","ETHYL","ELLYN","DAYLE","CAMMIE","BRITTNI","BIRGIT","AVELINA","ASUNCION","ARIANNA","AKIKO","VENICE","TYESHA","TONIE","TIESHA","TAKISHA","STEFFANIE","SINDY","SANTANA","MEGHANN","MANDA","MACIE","LADY","KELLYE","KELLEE","JOSLYN","JASON","INGER","INDIRA","GLINDA","GLENNIS","FERNANDA","FAUSTINA","ENEIDA","ELICIA","DOT","DIGNA","DELL","ARLETTA","ANDRE","WILLIA","TAMMARA","TABETHA","SHERRELL","SARI","REFUGIO","REBBECA","PAULETTA","NIEVES","NATOSHA","NAKITA","MAMMIE","KENISHA","KAZUKO","KASSIE","GARY","EARLEAN","DAPHINE","CORLISS","CLOTILDE","CAROLYNE","BERNETTA","AUGUSTINA","AUDREA","ANNIS","ANNABELL","YAN","TENNILLE","TAMICA","SELENE","SEAN","ROSANA","REGENIA","QIANA","MARKITA","MACY","LEEANNE","LAURINE","KYM","JESSENIA","JANITA","GEORGINE","GENIE","EMIKO","ELVIE","DEANDRA","DAGMAR","CORIE","COLLEN","CHERISH","ROMAINE","PORSHA","PEARLENE","MICHELINE","MERNA","MARGORIE","MARGARETTA","LORE","KENNETH","JENINE","HERMINA","FREDERICKA","ELKE","DRUSILLA","DORATHY","DIONE","DESIRE","CELENA","BRIGIDA","ANGELES","ALLEGRA","THEO","TAMEKIA","SYNTHIA","STEPHEN","SOOK","SLYVIA","ROSANN","REATHA","RAYE","MARQUETTA","MARGART","LING","LAYLA","KYMBERLY","KIANA","KAYLEEN","KATLYN","KARMEN","JOELLA","IRINA","EMELDA","ELENI","DETRA","CLEMMIE","CHERYLL","CHANTELL","CATHEY","ARNITA","ARLA","ANGLE","ANGELIC","ALYSE","ZOFIA","THOMASINE","TENNIE","SON","SHERLY","SHERLEY","SHARYL","REMEDIOS","PETRINA","NICKOLE","MYUNG","MYRLE","MOZELLA","LOUANNE","LISHA","LATIA","LANE","KRYSTA","JULIENNE","JOEL","JEANENE","JACQUALINE","ISAURA","GWENDA","EARLEEN","DONALD","CLEOPATRA","CARLIE","AUDIE","ANTONIETTA","ALISE","ALEX","VERDELL","VAL","TYLER","TOMOKO","THAO","TALISHA","STEVEN","SO","SHEMIKA","SHAUN","SCARLET","SAVANNA","SANTINA","ROSIA","RAEANN","ODILIA","NANA","MINNA","MAGAN","LYNELLE","LE","KARMA","JOEANN","IVANA","INELL","ILANA","HYE","HONEY","HEE","GUDRUN","FRANK","DREAMA","CRISSY","CHANTE","CARMELINA","ARVILLA","ARTHUR","ANNAMAE","ALVERA","ALEIDA","AARON","YEE","YANIRA","VANDA","TIANNA","TAM","STEFANIA","SHIRA","PERRY","NICOL","NANCIE","MONSERRATE","MINH","MELYNDA","MELANY","MATTHEW","LOVELLA","LAURE","KIRBY","KACY","JACQUELYNN","HYON","GERTHA","FRANCISCO","ELIANA","CHRISTENA","CHRISTEEN","CHARISE","CATERINA","CARLEY","CANDYCE","ARLENA","AMMIE","YANG","WILLETTE","VANITA","TUYET","TINY","SYREETA","SILVA","SCOTT","RONALD","PENNEY","NYLA","MICHAL","MAURICE","MARYAM","MARYA","MAGEN","LUDIE","LOMA","LIVIA","LANELL","KIMBERLIE","JULEE","DONETTA","DIEDRA","DENISHA","DEANE","DAWNE","CLARINE","CHERRYL","BRONWYN","BRANDON","ALLA","VALERY","TONDA","SUEANN","SORAYA","SHOSHANA","SHELA","SHARLEEN","SHANELLE","NERISSA","MICHEAL","MERIDITH","MELLIE","MAYE","MAPLE","MAGARET","LUIS","LILI","LEONILA","LEONIE","LEEANNA","LAVONIA","LAVERA","KRISTEL","KATHEY","KATHE","JUSTIN","JULIAN","JIMMY","JANN","ILDA","HILDRED","HILDEGARDE","GENIA","FUMIKO","EVELIN","ERMELINDA","ELLY","DUNG","DOLORIS","DIONNA","DANAE","BERNEICE","ANNICE","ALIX","VERENA","VERDIE","TRISTAN","SHAWNNA","SHAWANA","SHAUNNA","ROZELLA","RANDEE","RANAE","MILAGRO","LYNELL","LUISE","LOUIE","LOIDA","LISBETH","KARLEEN","JUNITA","JONA","ISIS","HYACINTH","HEDY","GWENN","ETHELENE","ERLINE","EDWARD","DONYA","DOMONIQUE","DELICIA","DANNETTE","CICELY","BRANDA","BLYTHE","BETHANN","ASHLYN","ANNALEE","ALLINE","YUKO","VELLA","TRANG","TOWANDA","TESHA","SHERLYN","NARCISA","MIGUELINA","MERI","MAYBELL","MARLANA","MARGUERITA","MADLYN","LUNA","LORY","LORIANN","LIBERTY","LEONORE","LEIGHANN","LAURICE","LATESHA","LARONDA","KATRICE","KASIE","KARL","KALEY","JADWIGA","GLENNIE","GEARLDINE","FRANCINA","EPIFANIA","DYAN","DORIE","DIEDRE","DENESE","DEMETRICE","DELENA","DARBY","CRISTIE","CLEORA","CATARINA","CARISA","BERNIE","BARBERA","ALMETA","TRULA","TEREASA","SOLANGE","SHEILAH","SHAVONNE","SANORA","ROCHELL","MATHILDE","MARGARETA","MAIA","LYNSEY","LAWANNA","LAUNA","KENA","KEENA","KATIA","JAMEY","GLYNDA","GAYLENE","ELVINA","ELANOR","DANUTA","DANIKA","CRISTEN","CORDIE","COLETTA","CLARITA","CARMON","BRYNN","AZUCENA","AUNDREA","ANGELE","YI","WALTER","VERLIE","VERLENE","TAMESHA","SILVANA","SEBRINA","SAMIRA","REDA","RAYLENE","PENNI","PANDORA","NORAH","NOMA","MIREILLE","MELISSIA","MARYALICE","LARAINE","KIMBERY","KARYL","KARINE","KAM","JOLANDA","JOHANA","JESUSA","JALEESA","JAE","JACQUELYNE","IRISH","ILUMINADA","HILARIA","HANH","GENNIE","FRANCIE","FLORETTA","EXIE","EDDA","DREMA","DELPHA","BEV","BARBAR","ASSUNTA","ARDELL","ANNALISA","ALISIA","YUKIKO","YOLANDO","WONDA","WEI","WALTRAUD","VETA","TEQUILA","TEMEKA","TAMEIKA","SHIRLEEN","SHENITA","PIEDAD","OZELLA","MIRTHA","MARILU","KIMIKO","JULIANE","JENICE","JEN","JANAY","JACQUILINE","HILDE","FE","FAE","EVAN","EUGENE","ELOIS","ECHO","DEVORAH","CHAU","BRINDA","BETSEY","ARMINDA","ARACELIS","APRYL","ANNETT","ALISHIA","VEOLA","USHA","TOSHIKO","THEOLA","TASHIA","TALITHA","SHERY","RUDY","RENETTA","REIKO","RASHEEDA","OMEGA","OBDULIA","MIKA","MELAINE","MEGGAN","MARTIN","MARLEN","MARGET","MARCELINE","MANA","MAGDALEN","LIBRADA","LEZLIE","LEXIE","LATASHIA","LASANDRA","KELLE","ISIDRA","ISA","INOCENCIA","GWYN","FRANCOISE","ERMINIA","ERINN","DIMPLE","DEVORA","CRISELDA","ARMANDA","ARIE","ARIANE","ANGELO","ANGELENA","ALLEN","ALIZA","ADRIENE","ADALINE","XOCHITL","TWANNA","TRAN","TOMIKO","TAMISHA","TAISHA","SUSY","SIU","RUTHA","ROXY","RHONA","RAYMOND","OTHA","NORIKO","NATASHIA","MERRIE","MELVIN","MARINDA","MARIKO","MARGERT","LORIS","LIZZETTE","LEISHA","KAILA","KA","JOANNIE","JERRICA","JENE","JANNET","JANEE","JACINDA","HERTA","ELENORE","DORETTA","DELAINE","DANIELL","CLAUDIE","CHINA","BRITTA","APOLONIA","AMBERLY","ALEASE","YURI","YUK","WEN","WANETA","UTE","TOMI","SHARRI","SANDIE","ROSELLE","REYNALDA","RAGUEL","PHYLICIA","PATRIA","OLIMPIA","ODELIA","MITZIE","MITCHELL","MISS","MINDA","MIGNON","MICA","MENDY","MARIVEL","MAILE","LYNETTA","LAVETTE","LAURYN","LATRISHA","LAKIESHA","KIERSTEN","KARY","JOSPHINE","JOLYN","JETTA","JANISE","JACQUIE","IVELISSE","GLYNIS","GIANNA","GAYNELLE","EMERALD","DEMETRIUS","DANYELL","DANILLE","DACIA","CORALEE","CHER","CEOLA","BRETT","BELL","ARIANNE","ALESHIA","YUNG","WILLIEMAE","TROY","TRINH","THORA","TAI","SVETLANA","SHERIKA","SHEMEKA","SHAUNDA","ROSELINE","RICKI","MELDA","MALLIE","LAVONNA","LATINA","LARRY","LAQUANDA","LALA","LACHELLE","KLARA","KANDIS","JOHNA","JEANMARIE","JAYE","HANG","GRAYCE","GERTUDE","EMERITA","EBONIE","CLORINDA","CHING","CHERY","CAROLA","BREANN","BLOSSOM","BERNARDINE","BECKI","ARLETHA","ARGELIA","ARA","ALITA","YULANDA","YON","YESSENIA","TOBI","TASIA","SYLVIE","SHIRL","SHIRELY","SHERIDAN","SHELLA","SHANTELLE","SACHA","ROYCE","REBECKA","REAGAN","PROVIDENCIA","PAULENE","MISHA","MIKI","MARLINE","MARICA","LORITA","LATOYIA","LASONYA","KERSTIN","KENDA","KEITHA","KATHRIN","JAYMIE","JACK","GRICELDA","GINETTE","ERYN","ELINA","ELFRIEDA","DANYEL","CHEREE","CHANELLE","BARRIE","AVERY","AURORE","ANNAMARIA","ALLEEN","AILENE","AIDE","YASMINE","VASHTI","VALENTINE","TREASA","TORY","TIFFANEY","SHERYLL","SHARIE","SHANAE","SAU","RAISA","PA","NEDA","MITSUKO","MIRELLA","MILDA","MARYANNA","MARAGRET","MABELLE","LUETTA","LORINA","LETISHA","LATARSHA","LANELLE","LAJUANA","KRISSY","KARLY","KARENA","JON","JESSIKA","JERICA","JEANELLE","JANUARY","JALISA","JACELYN","IZOLA","IVEY","GREGORY","EUNA","ETHA","DREW","DOMITILA","DOMINICA","DAINA","CREOLA","CARLI","CAMIE","BUNNY","BRITTNY","ASHANTI","ANISHA","ALEEN","ADAH","YASUKO","WINTER","VIKI","VALRIE","TONA","TINISHA","THI","TERISA","TATUM","TANEKA","SIMONNE","SHALANDA","SERITA","RESSIE","REFUGIA","PAZ","OLENE","NA","MERRILL","MARGHERITA","MANDIE","MAN","MAIRE","LYNDIA","LUCI","LORRIANE","LORETA","LEONIA","LAVONA","LASHAWNDA","LAKIA","KYOKO","KRYSTINA","KRYSTEN","KENIA","KELSI","JUDE","JEANICE","ISOBEL","GEORGIANN","GENNY","FELICIDAD","EILENE","DEON","DELOISE","DEEDEE","DANNIE","CONCEPTION","CLORA","CHERILYN","CHANG","CALANDRA","BERRY","ARMANDINA","ANISA","ULA","TIMOTHY","TIERA","THERESSA","STEPHANIA","SIMA","SHYLA","SHONTA","SHERA","SHAQUITA","SHALA","SAMMY","ROSSANA","NOHEMI","NERY","MORIAH","MELITA","MELIDA","MELANI","MARYLYNN","MARISHA","MARIETTE","MALORIE","MADELENE","LUDIVINA","LORIA","LORETTE","LORALEE","LIANNE","LEON","LAVENIA","LAURINDA","LASHON","KIT","KIMI","KEILA","KATELYNN","KAI","JONE","JOANE","JI","JAYNA","JANELLA","JA","HUE","HERTHA","FRANCENE","ELINORE","DESPINA","DELSIE","DEEDRA","CLEMENCIA","CARRY","CAROLIN","CARLOS","BULAH","BRITTANIE","BOK","BLONDELL","BIBI","BEAULAH","BEATA","ANNITA","AGRIPINA","VIRGEN","VALENE","UN","TWANDA","TOMMYE","TOI","TARRA","TARI","TAMMERA","SHAKIA","SADYE","RUTHANNE","ROCHEL","RIVKA","PURA","NENITA","NATISHA","MING","MERRILEE","MELODEE","MARVIS","LUCILLA","LEENA","LAVETA","LARITA","LANIE","KEREN","ILEEN","GEORGEANN","GENNA","GENESIS","FRIDA","EWA","EUFEMIA","EMELY","ELA","EDYTH","DEONNA","DEADRA","DARLENA","CHANELL","CHAN","CATHERN","CASSONDRA","CASSAUNDRA","BERNARDA","BERNA","ARLINDA","ANAMARIA","ALBERT","WESLEY","VERTIE","VALERI","TORRI","TATYANA","STASIA","SHERISE","SHERILL","SEASON","SCOTTIE","SANDA","RUTHE","ROSY","ROBERTO","ROBBI","RANEE","QUYEN","PEARLY","PALMIRA","ONITA","NISHA","NIESHA","NIDA","NEVADA","NAM","MERLYN","MAYOLA","MARYLOUISE","MARYLAND","MARX","MARTH","MARGENE","MADELAINE","LONDA","LEONTINE","LEOMA","LEIA","LAWRENCE","LAURALEE","LANORA","LAKITA","KIYOKO","KETURAH","KATELIN","KAREEN","JONIE","JOHNETTE","JENEE","JEANETT","IZETTA","HIEDI","HEIKE","HASSIE","HAROLD","GIUSEPPINA","GEORGANN","FIDELA","FERNANDE","ELWANDA","ELLAMAE","ELIZ","DUSTI","DOTTY","CYNDY","CORALIE","CELESTA","ARGENTINA","ALVERTA","XENIA","WAVA","VANETTA","TORRIE","TASHINA","TANDY","TAMBRA","TAMA","STEPANIE","SHILA","SHAUNTA","SHARAN","SHANIQUA","SHAE","SETSUKO","SERAFINA","SANDEE","ROSAMARIA","PRISCILA","OLINDA","NADENE","MUOI","MICHELINA","MERCEDEZ","MARYROSE","MARIN","MARCENE","MAO","MAGALI","MAFALDA","LOGAN","LINN","LANNIE","KAYCE","KAROLINE","KAMILAH","KAMALA","JUSTA","JOLINE","JENNINE","JACQUETTA","IRAIDA","GERALD","GEORGEANNA","FRANCHESCA","FAIRY","EMELINE","ELANE","EHTEL","EARLIE","DULCIE","DALENE","CRIS","CLASSIE","CHERE","CHARIS","CAROYLN","CARMINA","CARITA","BRIAN","BETHANIE","AYAKO","ARICA","AN","ALYSA","ALESSANDRA","AKILAH","ADRIEN","ZETTA","YOULANDA","YELENA","YAHAIRA","XUAN","WENDOLYN","VICTOR","TIJUANA","TERRELL","TERINA","TERESIA","SUZI","SUNDAY","SHERELL","SHAVONDA","SHAUNTE","SHARDA","SHAKITA","SENA","RYANN","RUBI","RIVA","REGINIA","REA","RACHAL","PARTHENIA","PAMULA","MONNIE","MONET","MICHAELE","MELIA","MARINE","MALKA","MAISHA","LISANDRA","LEO","LEKISHA","LEAN","LAURENCE","LAKENDRA","KRYSTIN","KORTNEY","KIZZIE","KITTIE","KERA","KENDAL","KEMBERLY","KANISHA","JULENE","JULE","JOSHUA","JOHANNE","JEFFREY","JAMEE","HAN","HALLEY","GIDGET","GALINA","FREDRICKA","FLETA","FATIMAH","EUSEBIA","ELZA","ELEONORE","DORTHEY","DORIA","DONELLA","DINORAH","DELORSE","CLARETHA","CHRISTINIA","CHARLYN","BONG","BELKIS","AZZIE","ANDERA","AIKO","ADENA","YER","YAJAIRA","WAN","VANIA","ULRIKE","TOSHIA","TIFANY","STEFANY","SHIZUE","SHENIKA","SHAWANNA","SHAROLYN","SHARILYN","SHAQUANA","SHANTAY","SEE","ROZANNE","ROSELEE","RICKIE","REMONA","REANNA","RAELENE","QUINN","PHUNG","PETRONILA","NATACHA","NANCEY","MYRL","MIYOKO","MIESHA","MERIDETH","MARVELLA","MARQUITTA","MARHTA","MARCHELLE","LIZETH","LIBBIE","LAHOMA","LADAWN","KINA","KATHELEEN","KATHARYN","KARISA","KALEIGH","JUNIE","JULIEANN","JOHNSIE","JANEAN","JAIMEE","JACKQUELINE","HISAKO","HERMA","HELAINE","GWYNETH","GLENN","GITA","EUSTOLIA","EMELINA","ELIN","EDRIS","DONNETTE","DONNETTA","DIERDRE","DENAE","DARCEL","CLAUDE","CLARISA","CINDERELLA","CHIA","CHARLESETTA","CHARITA","CELSA","CASSY","CASSI","CARLEE","BRUNA","BRITTANEY","BRANDE","BILLI","BAO","ANTONETTA","ANGLA","ANGELYN","ANALISA","ALANE","WENONA","WENDIE","VERONIQUE","VANNESA","TOBIE","TEMPIE","SUMIKO","SULEMA","SPARKLE","SOMER","SHEBA","SHAYNE","SHARICE","SHANEL","SHALON","SAGE","ROY","ROSIO","ROSELIA","RENAY","REMA","REENA","PORSCHE","PING","PEG","OZIE","ORETHA","ORALEE","ODA","NU","NGAN","NAKESHA","MILLY","MARYBELLE","MARLIN","MARIS","MARGRETT","MARAGARET","MANIE","LURLENE","LILLIA","LIESELOTTE","LAVELLE","LASHAUNDA","LAKEESHA","KEITH","KAYCEE","KALYN","JOYA","JOETTE","JENAE","JANIECE","ILLA","GRISEL","GLAYDS","GENEVIE","GALA","FREDDA","FRED","ELMER","ELEONOR","DEBERA","DEANDREA","DAN","CORRINNE","CORDIA","CONTESSA","COLENE","CLEOTILDE","CHARLOTT","CHANTAY","CECILLE","BEATRIS","AZALEE","ARLEAN","ARDATH","ANJELICA","ANJA","ALFREDIA","ALEISHA","ADAM","ZADA","YUONNE","XIAO","WILLODEAN","WHITLEY","VENNIE","VANNA","TYISHA","TOVA","TORIE","TONISHA","TILDA","TIEN","TEMPLE","SIRENA","SHERRIL","SHANTI","SHAN","SENAIDA","SAMELLA","ROBBYN","RENDA","REITA","PHEBE","PAULITA","NOBUKO","NGUYET","NEOMI","MOON","MIKAELA","MELANIA","MAXIMINA","MARG","MAISIE","LYNNA","LILLI","LAYNE","LASHAUN","LAKENYA","LAEL","KIRSTIE","KATHLINE","KASHA","KARLYN","KARIMA","JOVAN","JOSEFINE","JENNELL","JACQUI","JACKELYN","HYO","HIEN","GRAZYNA","FLORRIE","FLORIA","ELEONORA","DWANA","DORLA","DONG","DELMY","DEJA","DEDE","DANN","CRYSTA","CLELIA","CLARIS","CLARENCE","CHIEKO","CHERLYN","CHERELLE","CHARMAIN","CHARA","CAMMY","BEE","ARNETTE","ARDELLE","ANNIKA","AMIEE","AMEE","ALLENA","YVONE","YUKI","YOSHIE","YEVETTE","YAEL","WILLETTA","VONCILE","VENETTA","TULA","TONETTE","TIMIKA","TEMIKA","TELMA","TEISHA","TAREN","TA","STACEE","SHIN","SHAWNTA","SATURNINA","RICARDA","POK","PASTY","ONIE","NUBIA","MORA","MIKE","MARIELLE","MARIELLA","MARIANELA","MARDELL","MANY","LUANNA","LOISE","LISABETH","LINDSY","LILLIANA","LILLIAM","LELAH","LEIGHA","LEANORA","LANG","KRISTEEN","KHALILAH","KEELEY","KANDRA","JUNKO","JOAQUINA","JERLENE","JANI","JAMIKA","JAME","HSIU","HERMILA","GOLDEN","GENEVIVE","EVIA","EUGENA","EMMALINE","ELFREDA","ELENE","DONETTE","DELCIE","DEEANNA","DARCEY","CUC","CLARINDA","CIRA","CHAE","CELINDA","CATHERYN","CATHERIN","CASIMIRA","CARMELIA","CAMELLIA","BREANA","BOBETTE","BERNARDINA","BEBE","BASILIA","ARLYNE","AMAL","ALAYNA","ZONIA","ZENIA","YURIKO","YAEKO","WYNELL","WILLOW","WILLENA","VERNIA","TU","TRAVIS","TORA","TERRILYN","TERICA","TENESHA","TAWNA","TAJUANA","TAINA","STEPHNIE","SONA","SOL","SINA","SHONDRA","SHIZUKO","SHERLENE","SHERICE","SHARIKA","ROSSIE","ROSENA","RORY","RIMA","RIA","RHEBA","RENNA","PETER","NATALYA","NANCEE","MELODI","MEDA","MAXIMA","MATHA","MARKETTA","MARICRUZ","MARCELENE","MALVINA","LUBA","LOUETTA","LEIDA","LECIA","LAURAN","LASHAWNA","LAINE","KHADIJAH","KATERINE","KASI","KALLIE","JULIETTA","JESUSITA","JESTINE","JESSIA","JEREMY","JEFFIE","JANYCE","ISADORA","GEORGIANNE","FIDELIA","EVITA","EURA","EULAH","ESTEFANA","ELSY","ELIZABET","ELADIA","DODIE","DION","DIA","DENISSE","DELORAS","DELILA","DAYSI","DAKOTA","CURTIS","CRYSTLE","CONCHA","COLBY","CLARETTA","CHU","CHRISTIA","CHARLSIE","CHARLENA","CARYLON","BETTYANN","ASLEY","ASHLEA","AMIRA","AI","AGUEDA","AGNUS","YUETTE","VINITA","VICTORINA","TYNISHA","TREENA","TOCCARA","TISH","THOMASENA","TEGAN","SOILA","SHILOH","SHENNA","SHARMAINE","SHANTAE","SHANDI","SEPTEMBER","SARAN","SARAI","SANA","SAMUEL","SALLEY","ROSETTE","ROLANDE","REGINE","OTELIA","OSCAR","OLEVIA","NICHOLLE","NECOLE","NAIDA","MYRTA","MYESHA","MITSUE","MINTA","MERTIE","MARGY","MAHALIA","MADALENE","LOVE","LOURA","LOREAN","LEWIS","LESHA","LEONIDA","LENITA","LAVONE","LASHELL","LASHANDRA","LAMONICA","KIMBRA","KATHERINA","KARRY","KANESHA","JULIO","JONG","JENEVA","JAQUELYN","HWA","GILMA","GHISLAINE","GERTRUDIS","FRANSISCA","FERMINA","ETTIE","ETSUKO","ELLIS","ELLAN","ELIDIA","EDRA","DORETHEA","DOREATHA","DENYSE","DENNY","DEETTA","DAINE","CYRSTAL","CORRIN","CAYLA","CARLITA","CAMILA","BURMA","BULA","BUENA","BLAKE","BARABARA","AVRIL","AUSTIN","ALAINE","ZANA","WILHEMINA","WANETTA","VIRGIL","VI","VERONIKA","VERNON","VERLINE","VASILIKI","TONITA","TISA","TEOFILA","TAYNA","TAUNYA","TANDRA","TAKAKO","SUNNI","SUANNE","SIXTA","SHARELL","SEEMA","RUSSELL","ROSENDA","ROBENA","RAYMONDE","PEI","PAMILA","OZELL","NEIDA","NEELY","MISTIE","MICHA","MERISSA","MAURITA","MARYLN","MARYETTA","MARSHALL","MARCELL","MALENA","MAKEDA","MADDIE","LOVETTA","LOURIE","LORRINE","LORILEE","LESTER","LAURENA","LASHAY","LARRAINE","LAREE","LACRESHA","KRISTLE","KRISHNA","KEVA","KEIRA","KAROLE","JOIE","JINNY","JEANNETTA","JAMA","HEIDY","GILBERTE","GEMA","FAVIOLA","EVELYNN","ENDA","ELLI","ELLENA","DIVINA","DAGNY","COLLENE","CODI","CINDIE","CHASSIDY","CHASIDY","CATRICE","CATHERINA","CASSEY","CAROLL","CARLENA","CANDRA","CALISTA","BRYANNA","BRITTENY","BEULA","BARI","AUDRIE","AUDRIA","ARDELIA","ANNELLE","ANGILA","ALONA","ALLYN","DOUGLAS","ROGER","JONATHAN","RALPH","NICHOLAS","BENJAMIN","BRUCE","HARRY","WAYNE","STEVE","HOWARD","ERNEST","PHILLIP","TODD","CRAIG","ALAN","PHILIP","EARL","DANNY","BRYAN","STANLEY","LEONARD","NATHAN","MANUEL","RODNEY","MARVIN","VINCENT","JEFFERY","JEFF","CHAD","JACOB","ALFRED","BRADLEY","HERBERT","FREDERICK","EDWIN","DON","RICKY","RANDALL","BARRY","BERNARD","LEROY","MARCUS","THEODORE","CLIFFORD","MIGUEL","JIM","TOM","CALVIN","BILL","LLOYD","DEREK","WARREN","DARRELL","JEROME","FLOYD","ALVIN","TIM","GORDON","GREG","JORGE","DUSTIN","PEDRO","DERRICK","ZACHARY","HERMAN","GLEN","HECTOR","RICARDO","RICK","BRENT","RAMON","GILBERT","MARC","REGINALD","RUBEN","NATHANIEL","RAFAEL","EDGAR","MILTON","RAUL","BEN","CHESTER","DUANE","FRANKLIN","BRAD","RON","ROLAND","ARNOLD","HARVEY","JARED","ERIK","DARRYL","NEIL","JAVIER","FERNANDO","CLINTON","TED","MATHEW","TYRONE","DARREN","LANCE","KURT","ALLAN","NELSON","GUY","CLAYTON","HUGH","MAX","DWAYNE","DWIGHT","ARMANDO","FELIX","EVERETT","IAN","WALLACE","KEN","BOB","ALFREDO","ALBERTO","DAVE","IVAN","BYRON","ISAAC","MORRIS","CLIFTON","WILLARD","ROSS","ANDY","SALVADOR","KIRK","SERGIO","SETH","KENT","TERRANCE","EDUARDO","TERRENCE","ENRIQUE","WADE","STUART","FREDRICK","ARTURO","ALEJANDRO","NICK","LUTHER","WENDELL","JEREMIAH","JULIUS","OTIS","TREVOR","OLIVER","LUKE","HOMER","GERARD","DOUG","KENNY","HUBERT","LYLE","MATT","ALFONSO","ORLANDO","REX","CARLTON","ERNESTO","NEAL","PABLO","LORENZO","OMAR","WILBUR","GRANT","HORACE","RODERICK","ABRAHAM","WILLIS","RICKEY","ANDRES","CESAR","JOHNATHAN","MALCOLM","RUDOLPH","DAMON","KELVIN","PRESTON","ALTON","ARCHIE","MARCO","WM","PETE","RANDOLPH","GARRY","GEOFFREY","JONATHON","FELIPE","GERARDO","ED","DOMINIC","DELBERT","COLIN","GUILLERMO","EARNEST","LUCAS","BENNY","SPENCER","RODOLFO","MYRON","EDMUND","GARRETT","SALVATORE","CEDRIC","LOWELL","GREGG","SHERMAN","WILSON","SYLVESTER","ROOSEVELT","ISRAEL","JERMAINE","FORREST","WILBERT","LELAND","SIMON","CLARK","IRVING","BRYANT","OWEN","RUFUS","WOODROW","KRISTOPHER","MACK","LEVI","MARCOS","GUSTAVO","JAKE","LIONEL","GILBERTO","CLINT","NICOLAS","ISMAEL","ORVILLE","ERVIN","DEWEY","AL","WILFRED","JOSH","HUGO","IGNACIO","CALEB","TOMAS","SHELDON","ERICK","STEWART","DOYLE","DARREL","ROGELIO","TERENCE","SANTIAGO","ALONZO","ELIAS","BERT","ELBERT","RAMIRO","CONRAD","NOAH","GRADY","PHIL","CORNELIUS","LAMAR","ROLANDO","CLAY","PERCY","DEXTER","BRADFORD","DARIN","AMOS","MOSES","IRVIN","SAUL","ROMAN","RANDAL","TIMMY","DARRIN","WINSTON","BRENDAN","ABEL","DOMINICK","BOYD","EMILIO","ELIJAH","DOMINGO","EMMETT","MARLON","EMANUEL","JERALD","EDMOND","EMIL","DEWAYNE","WILL","OTTO","TEDDY","REYNALDO","BRET","JESS","TRENT","HUMBERTO","EMMANUEL","STEPHAN","VICENTE","LAMONT","GARLAND","MILES","EFRAIN","HEATH","RODGER","HARLEY","ETHAN","ELDON","ROCKY","PIERRE","JUNIOR","FREDDY","ELI","BRYCE","ANTOINE","STERLING","CHASE","GROVER","ELTON","CLEVELAND","DYLAN","CHUCK","DAMIAN","REUBEN","STAN","AUGUST","LEONARDO","JASPER","RUSSEL","ERWIN","BENITO","HANS","MONTE","BLAINE","ERNIE","CURT","QUENTIN","AGUSTIN","MURRAY","JAMAL","ADOLFO","HARRISON","TYSON","BURTON","BRADY","ELLIOTT","WILFREDO","BART","JARROD","VANCE","DENIS","DAMIEN","JOAQUIN","HARLAN","DESMOND","ELLIOT","DARWIN","GREGORIO","BUDDY","XAVIER","KERMIT","ROSCOE","ESTEBAN","ANTON","SOLOMON","SCOTTY","NORBERT","ELVIN","WILLIAMS","NOLAN","ROD","QUINTON","HAL","BRAIN","ROB","ELWOOD","KENDRICK","DARIUS","MOISES","FIDEL","THADDEUS","CLIFF","MARCEL","JACKSON","RAPHAEL","BRYON","ARMAND","ALVARO","JEFFRY","DANE","JOESPH","THURMAN","NED","RUSTY","MONTY","FABIAN","REGGIE","MASON","GRAHAM","ISAIAH","VAUGHN","GUS","LOYD","DIEGO","ADOLPH","NORRIS","MILLARD","ROCCO","GONZALO","DERICK","RODRIGO","WILEY","RIGOBERTO","ALPHONSO","TY","NOE","VERN","REED","JEFFERSON","ELVIS","BERNARDO","MAURICIO","HIRAM","DONOVAN","BASIL","RILEY","NICKOLAS","MAYNARD","SCOT","VINCE","QUINCY","EDDY","SEBASTIAN","FEDERICO","ULYSSES","HERIBERTO","DONNELL","COLE","DAVIS","GAVIN","EMERY","WARD","ROMEO","JAYSON","DANTE","CLEMENT","COY","MAXWELL","JARVIS","BRUNO","ISSAC","DUDLEY","BROCK","SANFORD","CARMELO","BARNEY","NESTOR","STEFAN","DONNY","ART","LINWOOD","BEAU","WELDON","GALEN","ISIDRO","TRUMAN","DELMAR","JOHNATHON","SILAS","FREDERIC","DICK","IRWIN","MERLIN","CHARLEY","MARCELINO","HARRIS","CARLO","TRENTON","KURTIS","HUNTER","AURELIO","WINFRED","VITO","COLLIN","DENVER","CARTER","LEONEL","EMORY","PASQUALE","MOHAMMAD","MARIANO","DANIAL","LANDON","DIRK","BRANDEN","ADAN","BUFORD","GERMAN","WILMER","EMERSON","ZACHERY","FLETCHER","JACQUES","ERROL","DALTON","MONROE","JOSUE","EDWARDO","BOOKER","WILFORD","SONNY","SHELTON","CARSON","THERON","RAYMUNDO","DAREN","HOUSTON","ROBBY","LINCOLN","GENARO","BENNETT","OCTAVIO","CORNELL","HUNG","ARRON","ANTONY","HERSCHEL","GIOVANNI","GARTH","CYRUS","CYRIL","RONNY","LON","FREEMAN","DUNCAN","KENNITH","CARMINE","ERICH","CHADWICK","WILBURN","RUSS","REID","MYLES","ANDERSON","MORTON","JONAS","FOREST","MITCHEL","MERVIN","ZANE","RICH","JAMEL","LAZARO","ALPHONSE","RANDELL","MAJOR","JARRETT","BROOKS","ABDUL","LUCIANO","SEYMOUR","EUGENIO","MOHAMMED","VALENTIN","CHANCE","ARNULFO","LUCIEN","FERDINAND","THAD","EZRA","ALDO","RUBIN","ROYAL","MITCH","EARLE","ABE","WYATT","MARQUIS","LANNY","KAREEM","JAMAR","BORIS","ISIAH","EMILE","ELMO","ARON","LEOPOLDO","EVERETTE","JOSEF","ELOY","RODRICK","REINALDO","LUCIO","JERROD","WESTON","HERSHEL","BARTON","PARKER","LEMUEL","BURT","JULES","GIL","ELISEO","AHMAD","NIGEL","EFREN","ANTWAN","ALDEN","MARGARITO","COLEMAN","DINO","OSVALDO","LES","DEANDRE","NORMAND","KIETH","TREY","NORBERTO","NAPOLEON","JEROLD","FRITZ","ROSENDO","MILFORD","CHRISTOPER","ALFONZO","LYMAN","JOSIAH","BRANT","WILTON","RICO","JAMAAL","DEWITT","BRENTON","OLIN","FOSTER","FAUSTINO","CLAUDIO","JUDSON","GINO","EDGARDO","ALEC","TANNER","JARRED","DONN","TAD","PRINCE","PORFIRIO","ODIS","LENARD","CHAUNCEY","TOD","MEL","MARCELO","KORY","AUGUSTUS","KEVEN","HILARIO","BUD","SAL","ORVAL","MAURO","ZACHARIAH","OLEN","ANIBAL","MILO","JED","DILLON","AMADO","NEWTON","LENNY","RICHIE","HORACIO","BRICE","MOHAMED","DELMER","DARIO","REYES","MAC","JONAH","JERROLD","ROBT","HANK","RUPERT","ROLLAND","KENTON","DAMION","ANTONE","WALDO","FREDRIC","BRADLY","KIP","BURL","WALKER","TYREE","JEFFEREY","AHMED","WILLY","STANFORD","OREN","NOBLE","MOSHE","MIKEL","ENOCH","BRENDON","QUINTIN","JAMISON","FLORENCIO","DARRICK","TOBIAS","HASSAN","GIUSEPPE","DEMARCUS","CLETUS","TYRELL","LYNDON","KEENAN","WERNER","GERALDO","COLUMBUS","CHET","BERTRAM","MARKUS","HUEY","HILTON","DWAIN","DONTE","TYRON","OMER","ISAIAS","HIPOLITO","FERMIN","ADALBERTO","BO","BARRETT","TEODORO","MCKINLEY","MAXIMO","GARFIELD","RALEIGH","LAWERENCE","ABRAM","RASHAD","KING","EMMITT","DARON","SAMUAL","MIQUEL","EUSEBIO","DOMENIC","DARRON","BUSTER","WILBER","RENATO","JC","HOYT","HAYWOOD","EZEKIEL","CHAS","FLORENTINO","ELROY","CLEMENTE","ARDEN","NEVILLE","EDISON","DESHAWN","NATHANIAL","JORDON","DANILO","CLAUD","SHERWOOD","RAYMON","RAYFORD","CRISTOBAL","AMBROSE","TITUS","HYMAN","FELTON","EZEQUIEL","ERASMO","STANTON","LONNY","LEN","IKE","MILAN","LINO","JAROD","HERB","ANDREAS","WALTON","RHETT","PALMER","DOUGLASS","CORDELL","OSWALDO","ELLSWORTH","VIRGILIO","TONEY","NATHANAEL","DEL","BENEDICT","MOSE","JOHNSON","ISREAL","GARRET","FAUSTO","ASA","ARLEN","ZACK","WARNER","MODESTO","FRANCESCO","MANUAL","GAYLORD","GASTON","FILIBERTO","DEANGELO","MICHALE","GRANVILLE","WES","MALIK","ZACKARY","TUAN","ELDRIDGE","CRISTOPHER","CORTEZ","ANTIONE","MALCOM","LONG","KOREY","JOSPEH","COLTON","WAYLON","VON","HOSEA","SHAD","SANTO","RUDOLF","ROLF","REY","RENALDO","MARCELLUS","LUCIUS","KRISTOFER","BOYCE","BENTON","HAYDEN","HARLAND","ARNOLDO","RUEBEN","LEANDRO","KRAIG","JERRELL","JEROMY","HOBERT","CEDRICK","ARLIE","WINFORD","WALLY","LUIGI","KENETH","JACINTO","GRAIG","FRANKLYN","EDMUNDO","SID","PORTER","LEIF","JERAMY","BUCK","WILLIAN","VINCENZO","SHON","LYNWOOD","JERE","HAI","ELDEN","DORSEY","DARELL","BRODERICK","ALONSO"].sort;
int[5163] b;
for(uint i; i < a.length; i++){
foreach(elem; a[i]){
b[i] += elem.to!(int)() - 64;
}
b[i] = b[i] * (i + 1);
}
int c;
foreach(elem; b){
c += elem;
}
writeln(c);
}
|
D
|
/Users/kimhyewon/Documents/Server/tennis/build/tennis.build/Debug/Routing.build/Objects-normal/x86_64/RouteCollection.o : /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/Branch.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/ParametersContainer.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/RouteBuilder+RouteCollection.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/RouteBuilder+RouteGroup.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/RouteBuilder.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/RouteCollection.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/RouteGroup+RouteBuilder.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/RouteGroup.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/Router.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/kimhyewon/Documents/Server/tennis/build/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/kimhyewon/Documents/Server/tennis/build/Debug/libc.framework/Modules/libc.swiftmodule/x86_64.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/Debug/Node.framework/Modules/Node.swiftmodule/x86_64.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/Debug/PathIndexable.framework/Modules/PathIndexable.swiftmodule/x86_64.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/Debug/Polymorphic.framework/Modules/Polymorphic.swiftmodule/x86_64.swiftmodule
/Users/kimhyewon/Documents/Server/tennis/build/tennis.build/Debug/Routing.build/Objects-normal/x86_64/RouteCollection~partial.swiftmodule : /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/Branch.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/ParametersContainer.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/RouteBuilder+RouteCollection.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/RouteBuilder+RouteGroup.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/RouteBuilder.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/RouteCollection.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/RouteGroup+RouteBuilder.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/RouteGroup.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/Router.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/kimhyewon/Documents/Server/tennis/build/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/kimhyewon/Documents/Server/tennis/build/Debug/libc.framework/Modules/libc.swiftmodule/x86_64.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/Debug/Node.framework/Modules/Node.swiftmodule/x86_64.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/Debug/PathIndexable.framework/Modules/PathIndexable.swiftmodule/x86_64.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/Debug/Polymorphic.framework/Modules/Polymorphic.swiftmodule/x86_64.swiftmodule
/Users/kimhyewon/Documents/Server/tennis/build/tennis.build/Debug/Routing.build/Objects-normal/x86_64/RouteCollection~partial.swiftdoc : /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/Branch.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/ParametersContainer.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/RouteBuilder+RouteCollection.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/RouteBuilder+RouteGroup.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/RouteBuilder.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/RouteCollection.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/RouteGroup+RouteBuilder.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/RouteGroup.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Routing-1.0.1/Sources/Routing/Router.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/kimhyewon/Documents/Server/tennis/build/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/kimhyewon/Documents/Server/tennis/build/Debug/libc.framework/Modules/libc.swiftmodule/x86_64.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/Debug/Node.framework/Modules/Node.swiftmodule/x86_64.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/Debug/PathIndexable.framework/Modules/PathIndexable.swiftmodule/x86_64.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/Debug/Polymorphic.framework/Modules/Polymorphic.swiftmodule/x86_64.swiftmodule
|
D
|
/**
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1985-1998 by Symantec
* Copyright (c) 2000-2017 by Digital Mars, All Rights Reserved
* Authors: $(LINK2 http://www.digitalmars.com, Walter Bright)
* License: Distributed under the Boost Software License, Version 1.0.
* http://www.boost.org/LICENSE_1_0.txt
* Source: https://github.com/dlang/dmd/blob/master/src/ddmd/backend/code_x86.c
*/
module ddmd.backend.code_x86;
import ddmd.backend.cdef;
import ddmd.backend.code;
/* Register definitions */
enum
{
AX = 0,
CX = 1,
DX = 2,
BX = 3,
SP = 4,
BP = 5,
SI = 6,
DI = 7,
// #defining R12-R15 interfere with setjmps' _JUMP_BUFFER members
R8 = 8,
R9 = 9,
R10 = 10,
R11 = 11,
R12 = 12,
R13 = 13,
R14 = 14,
R15 = 15,
XMM0 = 16,
XMM1 = 17,
XMM2 = 18,
XMM3 = 19,
XMM4 = 20,
XMM5 = 21,
XMM6 = 22,
XMM7 = 23,
/* There are also XMM8..XMM14 */
XMM15 = 31,
}
enum PICREG = BX;
enum ES = 24;
enum NUMGENREGS = 16;
// fishy naming as it covers XMM7 but not XMM15
// currently only used as a replacement for mES in cgcod.c
enum NUMREGS = 25;
enum PSW = 25;
enum STACK = 26; // top of stack
enum ST0 = 27; // 8087 top of stack register
enum ST01 = 28; // top two 8087 registers; for complex types
enum NOREG = 29; // no register
enum
{
AL = 0,
CL = 1,
DL = 2,
BL = 3,
AH = 4,
CH = 5,
DH = 6,
BH = 7,
}
enum
{
mAX = 1,
mCX = 2,
mDX = 4,
mBX = 8,
mSP = 0x10,
mBP = 0x20,
mSI = 0x40,
mDI = 0x80,
mR8 = (1 << R8),
mR9 = (1 << R9),
mR10 = (1 << R10),
mR11 = (1 << R11),
mR12 = (1 << R12),
mR13 = (1 << R13),
mR14 = (1 << R14),
mR15 = (1 << R15),
mXMM0 = (1 << XMM0),
mXMM1 = (1 << XMM1),
mXMM2 = (1 << XMM2),
mXMM3 = (1 << XMM3),
mXMM4 = (1 << XMM4),
mXMM5 = (1 << XMM5),
mXMM6 = (1 << XMM6),
mXMM7 = (1 << XMM7),
XMMREGS = (mXMM0 |mXMM1 |mXMM2 |mXMM3 |mXMM4 |mXMM5 |mXMM6 |mXMM7),
mES = (1 << ES), // 0x1000000
mPSW = (1 << PSW), // 0x2000000
mSTACK = (1 << STACK), // 0x4000000
mST0 = (1 << ST0), // 0x20000000
mST01 = (1 << ST01), // 0x40000000
}
// Flags for getlvalue (must fit in regm_t)
enum RMload = (1 << 30);
enum RMstore = (1 << 31);
extern (C++) extern __gshared regm_t ALLREGS;
extern (C++) extern __gshared regm_t BYTEREGS;
alias code_flags_t = uint;
enum
{
CFes = 1, // generate an ES: segment override for this instr
CFjmp16 = 2, // need 16 bit jump offset (long branch)
CFtarg = 4, // this code is the target of a jump
CFseg = 8, // get segment of immediate value
CFoff = 0x10, // get offset of immediate value
CFss = 0x20, // generate an SS: segment override (not with
// CFes at the same time, though!)
CFpsw = 0x40, // we need the flags result after this instruction
CFopsize = 0x80, // prefix with operand size
CFaddrsize = 0x100, // prefix with address size
CFds = 0x200, // need DS override (not with ES, SS, or CS )
CFcs = 0x400, // need CS override
CFfs = 0x800, // need FS override
CFgs = CFcs | CFfs, // need GS override
CFwait = 0x1000, // If I32 it indicates when to output a WAIT
CFselfrel = 0x2000, // if self-relative
CFunambig = 0x4000, // indicates cannot be accessed by other addressing
// modes
CFtarg2 = 0x8000, // like CFtarg, but we can't optimize this away
CFvolatile = 0x10000, // volatile reference, do not schedule
CFclassinit = 0x20000, // class init code
CFoffset64 = 0x40000, // offset is 64 bits
CFpc32 = 0x80000, // I64: PC relative 32 bit fixup
CFvex = 0x100000, // vex prefix
CFvex3 = 0x200000, // 3 byte vex prefix
CFjmp5 = 0x400000, // always a 5 byte jmp
CFswitch = 0x800000, // kludge for switch table fixups
CFindirect = 0x1000000, // OSX32: indirect fixups
/* These are for CFpc32 fixups, they're the negative of the offset of the fixup
* from the program counter
*/
CFREL = 0x7000000,
CFSEG = CFes | CFss | CFds | CFcs | CFfs | CFgs,
CFPREFIX = CFSEG | CFopsize | CFaddrsize,
}
struct code
{
code *next;
code_flags_t Iflags;
union
{
uint Iop;
struct Svex
{
align(1):
ubyte op;
// [R X B m-mmmm] [W vvvv L pp]
ushort _pp;
@property ushort pp() const { return _pp & 3; }
@property void pp(ushort v) { _pp = (_pp & ~3) | (v & 3); }
@property ushort l() const { return (_pp >> 2) & 1; }
@property void l(ushort v) { _pp = cast(ushort)((_pp & ~4) | ((v & 1) << 2)); }
@property ushort vvvv() const { return (_pp >> 3) & 0x0F; }
@property void vvvv(ushort v) { _pp = cast(ushort)((_pp & ~0x78) | ((v & 0x0F) << 3)); }
@property ushort w() const { return (_pp >> 7) & 1; }
@property void w(ushort v) { _pp = cast(ushort)((_pp & ~0x80) | ((v & 1) << 7)); }
@property ushort mmmm() const { return (_pp >> 8) & 0x1F; }
@property void mmmm(ushort v) { _pp = cast(ushort)((_pp & ~0x1F00) | ((v & 0x1F) << 8)); }
@property ushort b() const { return (_pp >> 13) & 1; }
@property void b(ushort v) { _pp = cast(ushort)((_pp & ~0x2000) | ((v & 1) << 13)); }
@property ushort x() const { return (_pp >> 14) & 1; }
@property void x(ushort v) { _pp = cast(ushort)((_pp & ~0x4000) | ((v & 1) << 14)); }
@property ushort r() const { return (_pp >> 15) & 1; }
@property void r(ushort v) { _pp = cast(ushort)((_pp & ~0x8000) | (v << 15)); }
ubyte pfx; // always 0xC4
}
Svex Ivex;
}
/* The _EA is the "effective address" for the instruction, and consists of the modregrm byte,
* the sib byte, and the REX prefix byte. The 16 bit code generator just used the modregrm,
* the 32 bit x86 added the sib, and the 64 bit one added the rex.
*/
union
{
uint Iea;
struct
{
ubyte Irm; // reg/mode
ubyte Isib; // SIB byte
ubyte Irex; // REX prefix
}
}
/* IFL1 and IEV1 are the first operand, which usually winds up being the offset to the Effective
* Address. IFL1 is the tag saying which variant type is in IEV1. IFL2 and IEV2 is the second
* operand, usually for immediate instructions.
*/
ubyte IFL1,IFL2; // FLavors of 1st, 2nd operands
evc IEV1; // 1st operand, if any
evc IEV2; // 2nd operand, if any
bool isJumpOP() { return Iop == JMP || Iop == JMPS; }
}
/*******************
* Some instructions.
*/
enum
{
SEGES = 0x26,
SEGCS = 0x2E,
SEGSS = 0x36,
SEGDS = 0x3E,
SEGFS = 0x64,
SEGGS = 0x65,
CALL = 0xE8,
JMP = 0xE9, // Intra-Segment Direct
JMPS = 0xEB, // JMP SHORT
JCXZ = 0xE3,
LOOP = 0xE2,
LES = 0xC4,
LEA = 0x8D,
LOCK = 0xF0,
STO = 0x89,
LOD = 0x8B,
JO = 0x70,
JNO = 0x71,
JC = 0x72,
JB = 0x72,
JNC = 0x73,
JAE = 0x73,
JE = 0x74,
JNE = 0x75,
JBE = 0x76,
JA = 0x77,
JS = 0x78,
JNS = 0x79,
JP = 0x7A,
JNP = 0x7B,
JL = 0x7C,
JGE = 0x7D,
JLE = 0x7E,
JG = 0x7F,
// NOP is used as a placeholder in the linked list of instructions, no
// actual code will be generated for it.
NOP = SEGCS, // don't use 0x90 because the
// Windows stuff wants to output 0x90's
ASM = SEGSS, // string of asm bytes
ESCAPE = SEGDS, // marker that special information is here
// (Iop2 is the type of special information)
}
enum ESCAPEmask = 0xFF; // code.Iop & ESCAPEmask ==> actual Iop
enum
{
ESClinnum = (1 << 8), // line number information
ESCctor = (2 << 8), // object is constructed
ESCdtor = (3 << 8), // object is destructed
ESCmark = (4 << 8), // mark eh stack
ESCrelease = (5 << 8), // release eh stack
ESCoffset = (6 << 8), // set code offset for eh
ESCadjesp = (7 << 8), // adjust ESP by IEV2.Vint
ESCmark2 = (8 << 8), // mark eh stack
ESCrelease2 = (9 << 8), // release eh stack
ESCframeptr = (10 << 8), // replace with load of frame pointer
ESCdctor = (11 << 8), // D object is constructed
ESCddtor = (12 << 8), // D object is destructed
ESCadjfpu = (13 << 8), // adjust fpustackused by IEV2.Vint
ESCfixesp = (14 << 8), // reset ESP to end of local frame
}
/*********************************
* Macros to ease generating code
* modregrm: generate mod reg r/m field
* modregxrm: reg could be R8..R15
* modregrmx: rm could be R8..R15
* modregxrmx: reg or rm could be R8..R15
* NEWREG: change reg field of x to r
* genorreg: OR t,f
*/
/+
#define modregrm(m,r,rm) (((m)<<6)|((r)<<3)|(rm))
#define modregxrm(m,r,rm) ((((r)&8)<<15)|modregrm((m),(r)&7,rm))
#define modregrmx(m,r,rm) ((((rm)&8)<<13)|modregrm((m),r,(rm)&7))
#define modregxrmx(m,r,rm) ((((r)&8)<<15)|(((rm)&8)<<13)|modregrm((m),(r)&7,(rm)&7))
#define NEWREXR(x,r) ((x)=((x)&~REX_R)|(((r)&8)>>1))
#define NEWREG(x,r) ((x)=((x)&~(7<<3))|((r)<<3))
#define code_newreg(c,r) (NEWREG((c)->Irm,(r)&7),NEWREXR((c)->Irex,(r)))
#define genorreg(c,t,f) genregs((c),0x09,(f),(t))
+/
enum
{
REX = 0x40, // REX prefix byte, OR'd with the following bits:
REX_W = 8, // 0 = default operand size, 1 = 64 bit operand size
REX_R = 4, // high bit of reg field of modregrm
REX_X = 2, // high bit of sib index reg
REX_B = 1, // high bit of rm field, sib base reg, or opcode reg
}
uint VEX2_B1(code.Svex ivex)
{
return
ivex.r << 7 |
ivex.vvvv << 3 |
ivex.l << 2 |
ivex.pp;
}
uint VEX3_B1(code.Svex ivex)
{
return
ivex.r << 7 |
ivex.x << 6 |
ivex.b << 5 |
ivex.mmmm;
}
uint VEX3_B2(code.Svex ivex)
{
return
ivex.w << 7 |
ivex.vvvv << 3 |
ivex.l << 2 |
ivex.pp;
}
|
D
|
// Written in the D programming language.
/**
This module implements the formatting functionality for strings and
I/O. It's comparable to C99's `vsprintf()` and uses a similar
_format encoding scheme.
For an introductory look at $(B std._format)'s capabilities and how to use
this module see the dedicated
$(LINK2 http://wiki.dlang.org/Defining_custom_print_format_specifiers, DWiki article).
This module centers around two functions:
$(BOOKTABLE ,
$(TR $(TH Function Name) $(TH Description)
)
$(TR $(TD $(LREF formattedRead))
$(TD Reads values according to the format string from an InputRange.
))
$(TR $(TD $(LREF formattedWrite))
$(TD Formats its arguments according to the format string and puts them
to an OutputRange.
))
)
Please see the documentation of function $(LREF formattedWrite) for a
description of the format string.
Two functions have been added for convenience:
$(BOOKTABLE ,
$(TR $(TH Function Name) $(TH Description)
)
$(TR $(TD $(LREF format))
$(TD Returns a GC-allocated string with the formatting result.
))
$(TR $(TD $(LREF sformat))
$(TD Puts the formatting result into a preallocated array.
))
)
These two functions are publicly imported by $(MREF std, string)
to be easily available.
The functions $(LREF formatValue) and $(LREF unformatValue) are
used for the plumbing.
Copyright: Copyright The D Language Foundation 2000-2013.
License: $(HTTP boost.org/LICENSE_1_0.txt, Boost License 1.0).
Authors: $(HTTP walterbright.com, Walter Bright), $(HTTP erdani.com,
Andrei Alexandrescu), and Kenji Hara
Source: $(PHOBOSSRC std/format.d)
*/
module std.format;
//debug=format; // uncomment to turn on debugging printf's
import core.vararg;
import std.exception;
import std.meta;
import std.range.primitives;
import std.traits;
/**
Signals a mismatch between a format and its corresponding argument.
*/
class FormatException : Exception
{
@safe @nogc pure nothrow
this()
{
super("format error");
}
@safe @nogc pure nothrow
this(string msg, string fn = __FILE__, size_t ln = __LINE__, Throwable next = null)
{
super(msg, fn, ln, next);
}
}
///
@safe unittest
{
import std.exception : assertThrown;
assertThrown!FormatException(format("%d", "foo"));
}
private alias enforceFmt = enforce!FormatException;
/**********************************************************************
Interprets variadic argument list `args`, formats them according
to `fmt`, and sends the resulting characters to `w`. The
encoding of the output is the same as `Char`. The type `Writer`
must satisfy $(D $(REF isOutputRange, std,range,primitives)!(Writer, Char)).
The variadic arguments are normally consumed in order. POSIX-style
$(HTTP opengroup.org/onlinepubs/009695399/functions/printf.html,
positional parameter syntax) is also supported. Each argument is
formatted into a sequence of chars according to the format
specification, and the characters are passed to `w`. As many
arguments as specified in the format string are consumed and
formatted. If there are fewer arguments than format specifiers, a
`FormatException` is thrown. If there are more remaining arguments
than needed by the format specification, they are ignored but only
if at least one argument was formatted.
The format string supports the formatting of array and nested array elements
via the grouping format specifiers $(B %() and $(B %)). Each
matching pair of $(B %() and $(B %)) corresponds with a single array
argument. The enclosed sub-format string is applied to individual array
elements. The trailing portion of the sub-format string following the
conversion specifier for the array element is interpreted as the array
delimiter, and is therefore omitted following the last array element. The
$(B %|) specifier may be used to explicitly indicate the start of the
delimiter, so that the preceding portion of the string will be included
following the last array element. (See below for explicit examples.)
Params:
w = Output is sent to this writer. Typical output writers include
$(REF Appender!string, std,array) and $(REF LockingTextWriter, std,stdio).
fmt = Format string.
args = Variadic argument list.
Returns: Formatted number of arguments.
Throws: Mismatched arguments and formats result in a $(D
FormatException) being thrown.
Format_String: <a name="format-string">$(I Format strings)</a>
consist of characters interspersed with $(I format
specifications). Characters are simply copied to the output (such
as putc) after any necessary conversion to the corresponding UTF-8
sequence.
The format string has the following grammar:
$(PRE
$(I FormatString):
$(I FormatStringItem)*
$(I FormatStringItem):
$(B '%%')
$(B '%') $(I Position) $(I Flags) $(I Width) $(I Separator) $(I Precision) $(I FormatChar)
$(B '%$(LPAREN)') $(I FormatString) $(B '%$(RPAREN)')
$(B '%-$(LPAREN)') $(I FormatString) $(B '%$(RPAREN)')
$(I OtherCharacterExceptPercent)
$(I Position):
$(I empty)
$(I Integer) $(B '$')
$(I Flags):
$(I empty)
$(B '-') $(I Flags)
$(B '+') $(I Flags)
$(B '#') $(I Flags)
$(B '0') $(I Flags)
$(B ' ') $(I Flags)
$(I Width):
$(I empty)
$(I Integer)
$(B '*')
$(I Separator):
$(I empty)
$(B ',')
$(B ',') $(B '?')
$(B ',') $(B '*') $(B '?')
$(B ',') $(I Integer) $(B '?')
$(B ',') $(B '*')
$(B ',') $(I Integer)
$(I Precision):
$(I empty)
$(B '.')
$(B '.') $(I Integer)
$(B '.*')
$(I Integer):
$(I Digit)
$(I Digit) $(I Integer)
$(I Digit):
$(B '0')|$(B '1')|$(B '2')|$(B '3')|$(B '4')|$(B '5')|$(B '6')|$(B '7')|$(B '8')|$(B '9')
$(I FormatChar):
$(B 's')|$(B 'c')|$(B 'b')|$(B 'd')|$(B 'o')|$(B 'x')|$(B 'X')|$(B 'e')|$(B 'E')|$(B 'f')|$(B 'F')|$(B 'g')|$(B 'G')|$(B 'a')|$(B 'A')|$(B '|')
)
$(BOOKTABLE Flags affect formatting depending on the specifier as
follows., $(TR $(TH Flag) $(TH Types affected) $(TH Semantics))
$(TR $(TD $(B '-')) $(TD numeric, bool, null, char, string, enum, pointer) $(TD Left justify the result in
the field. It overrides any $(B 0) flag.))
$(TR $(TD $(B '+')) $(TD numeric) $(TD Prefix positive numbers in
a signed conversion with a $(B +). It overrides any $(I space)
flag.))
$(TR $(TD $(B '#')) $(TD integral ($(B 'o'))) $(TD Add to
precision as necessary so that the first digit of the octal
formatting is a '0', even if both the argument and the $(I
Precision) are zero.))
$(TR $(TD $(B '#')) $(TD integral ($(B 'x'), $(B 'X'))) $(TD If
non-zero, prefix result with $(B 0x) ($(B 0X)).))
$(TR $(TD $(B '#')) $(TD floating) $(TD Always insert the decimal
point and print trailing zeros.))
$(TR $(TD $(B '0')) $(TD numeric) $(TD Use leading
zeros to pad rather than spaces (except for the floating point
values `nan` and `infinity`). Ignore if there's a $(I
Precision).))
$(TR $(TD $(B ' ')) $(TD numeric) $(TD Prefix positive
numbers in a signed conversion with a space.)))
$(DL
$(DT $(I Width))
$(DD
Only used for numeric, bool, null, char, string, enum and pointer types.
Specifies the minimum field width.
If the width is a $(B *), an additional argument of type $(B int),
preceding the actual argument, is taken as the width.
If the width is negative, it is as if the $(B -) was given
as a $(I Flags) character.)
$(DT $(I Precision))
$(DD Gives the precision for numeric conversions.
If the precision is a $(B *), an additional argument of type $(B int),
preceding the actual argument, is taken as the precision.
If it is negative, it is as if there was no $(I Precision) specifier.)
$(DT $(I Separator))
$(DD Inserts the separator symbols ',' every $(I X) digits, from right
to left, into numeric values to increase readability.
The fractional part of floating point values inserts the separator
from left to right.
Entering an integer after the ',' allows to specify $(I X).
If a '*' is placed after the ',' then $(I X) is specified by an
additional parameter to the format function.
Adding a '?' after the ',' or $(I X) specifier allows to specify
the separator character as an additional parameter.
)
$(DT $(I FormatChar))
$(DD
$(DL
$(DT $(B 's'))
$(DD The corresponding argument is formatted in a manner consistent
with its type:
$(DL
$(DT $(B bool))
$(DD The result is `"true"` or `"false"`.)
$(DT integral types)
$(DD The $(B %d) format is used.)
$(DT floating point types)
$(DD The $(B %g) format is used.)
$(DT string types)
$(DD The result is the string converted to UTF-8.
A $(I Precision) specifies the maximum number of characters
to use in the result.)
$(DT structs)
$(DD If the struct defines a $(B toString()) method the result is
the string returned from this function. Otherwise the result is
StructName(field<sub>0</sub>, field<sub>1</sub>, ...) where
field<sub>n</sub> is the nth element formatted with the default
format.)
$(DT classes derived from $(B Object))
$(DD The result is the string returned from the class instance's
$(B .toString()) method.
A $(I Precision) specifies the maximum number of characters
to use in the result.)
$(DT unions)
$(DD If the union defines a $(B toString()) method the result is
the string returned from this function. Otherwise the result is
the name of the union, without its contents.)
$(DT non-string static and dynamic arrays)
$(DD The result is [s<sub>0</sub>, s<sub>1</sub>, ...]
where s<sub>n</sub> is the nth element
formatted with the default format.)
$(DT associative arrays)
$(DD The result is the equivalent of what the initializer
would look like for the contents of the associative array,
e.g.: ["red" : 10, "blue" : 20].)
))
$(DT $(B 'c'))
$(DD The corresponding argument must be a character type.)
$(DT $(B 'b','d','o','x','X'))
$(DD The corresponding argument must be an integral type
and is formatted as an integer. If the argument is a signed type
and the $(I FormatChar) is $(B d) it is converted to
a signed string of characters, otherwise it is treated as
unsigned. An argument of type $(B bool) is formatted as '1'
or '0'. The base used is binary for $(B b), octal for $(B o),
decimal
for $(B d), and hexadecimal for $(B x) or $(B X).
$(B x) formats using lower case letters, $(B X) uppercase.
If there are fewer resulting digits than the $(I Precision),
leading zeros are used as necessary.
If the $(I Precision) is 0 and the number is 0, no digits
result.)
$(DT $(B 'e','E'))
$(DD A floating point number is formatted as one digit before
the decimal point, $(I Precision) digits after, the $(I FormatChar),
±, followed by at least a two digit exponent:
$(I d.dddddd)e$(I ±dd).
If there is no $(I Precision), six
digits are generated after the decimal point.
If the $(I Precision) is 0, no decimal point is generated.)
$(DT $(B 'f','F'))
$(DD A floating point number is formatted in decimal notation.
The $(I Precision) specifies the number of digits generated
after the decimal point. It defaults to six. At least one digit
is generated before the decimal point. If the $(I Precision)
is zero, no decimal point is generated.)
$(DT $(B 'g','G'))
$(DD A floating point number is formatted in either $(B e) or
$(B f) format for $(B g); $(B E) or $(B F) format for
$(B G).
The $(B f) format is used if the exponent for an $(B e) format
is greater than -5 and less than the $(I Precision).
The $(I Precision) specifies the number of significant
digits, and defaults to six.
Trailing zeros are elided after the decimal point, if the fractional
part is zero then no decimal point is generated.)
$(DT $(B 'a','A'))
$(DD A floating point number is formatted in hexadecimal
exponential notation 0x$(I h.hhhhhh)p$(I ±d).
There is one hexadecimal digit before the decimal point, and as
many after as specified by the $(I Precision).
If the $(I Precision) is zero, no decimal point is generated.
If there is no $(I Precision), as many hexadecimal digits as
necessary to exactly represent the mantissa are generated.
The exponent is written in as few digits as possible,
but at least one, is in decimal, and represents a power of 2 as in
$(I h.hhhhhh)*2<sup>$(I ±d)</sup>.
The exponent for zero is zero.
The hexadecimal digits, x and p are in upper case if the
$(I FormatChar) is upper case.)
))
)
Floating point NaN's are formatted as $(B nan) if the
$(I FormatChar) is lower case, or $(B NAN) if upper.
Floating point infinities are formatted as $(B inf) or
$(B infinity) if the
$(I FormatChar) is lower case, or $(B INF) or $(B INFINITY) if upper.
The positional and non-positional styles can be mixed in the same
format string. (POSIX leaves this behavior undefined.) The internal
counter for non-positional parameters tracks the next parameter after
the largest positional parameter already used.
Example using array and nested array formatting:
-------------------------
import std.stdio;
void main()
{
writefln("My items are %(%s %).", [1,2,3]);
writefln("My items are %(%s, %).", [1,2,3]);
}
-------------------------
The output is:
$(CONSOLE
My items are 1 2 3.
My items are 1, 2, 3.
)
The trailing end of the sub-format string following the specifier for each
item is interpreted as the array delimiter, and is therefore omitted
following the last array item. The $(B %|) delimiter specifier may be used
to indicate where the delimiter begins, so that the portion of the format
string prior to it will be retained in the last array element:
-------------------------
import std.stdio;
void main()
{
writefln("My items are %(-%s-%|, %).", [1,2,3]);
}
-------------------------
which gives the output:
$(CONSOLE
My items are -1-, -2-, -3-.
)
These compound format specifiers may be nested in the case of a nested
array argument:
-------------------------
import std.stdio;
void main() {
auto mat = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9]];
writefln("%(%(%d %)\n%)", mat);
writeln();
writefln("[%(%(%d %)\n %)]", mat);
writeln();
writefln("[%([%(%d %)]%|\n %)]", mat);
writeln();
}
-------------------------
The output is:
$(CONSOLE
1 2 3
4 5 6
7 8 9
[1 2 3
4 5 6
7 8 9]
[[1 2 3]
[4 5 6]
[7 8 9]]
)
Inside a compound format specifier, strings and characters are escaped
automatically. To avoid this behavior, add $(B '-') flag to
`"%$(LPAREN)"`.
-------------------------
import std.stdio;
void main()
{
writefln("My friends are %s.", ["John", "Nancy"]);
writefln("My friends are %(%s, %).", ["John", "Nancy"]);
writefln("My friends are %-(%s, %).", ["John", "Nancy"]);
}
-------------------------
which gives the output:
$(CONSOLE
My friends are ["John", "Nancy"].
My friends are "John", "Nancy".
My friends are John, Nancy.
)
*/
uint formattedWrite(alias fmt, Writer, A...)(auto ref Writer w, A args)
if (isSomeString!(typeof(fmt)))
{
alias e = checkFormatException!(fmt, A);
static assert(!e, e.msg);
return .formattedWrite(w, fmt, args);
}
/// The format string can be checked at compile-time (see $(LREF format) for details):
@safe pure unittest
{
import std.array : appender;
auto writer = appender!string();
writer.formattedWrite!"%s is the ultimate %s."(42, "answer");
assert(writer.data == "42 is the ultimate answer.");
// Clear the writer
writer = appender!string();
formattedWrite(writer, "Date: %2$s %1$s", "October", 5);
assert(writer.data == "Date: 5 October");
}
/// ditto
uint formattedWrite(Writer, Char, A...)(auto ref Writer w, const scope Char[] fmt, A args)
{
import std.conv : text;
auto spec = FormatSpec!Char(fmt);
// Are we already done with formats? Then just dump each parameter in turn
uint currentArg = 0;
while (spec.writeUpToNextSpec(w))
{
if (currentArg == A.length && !spec.indexStart)
{
// leftover spec?
enforceFmt(fmt.length == 0,
text("Orphan format specifier: %", spec.spec));
break;
}
if (spec.width == spec.DYNAMIC)
{
auto width = getNthInt!"integer width"(currentArg, args);
if (width < 0)
{
spec.flDash = true;
width = -width;
}
spec.width = width;
++currentArg;
}
else if (spec.width < 0)
{
// means: get width as a positional parameter
auto index = cast(uint) -spec.width;
assert(index > 0, "The index must be greater than zero");
auto width = getNthInt!"integer width"(index - 1, args);
if (currentArg < index) currentArg = index;
if (width < 0)
{
spec.flDash = true;
width = -width;
}
spec.width = width;
}
if (spec.precision == spec.DYNAMIC)
{
auto precision = getNthInt!"integer precision"(currentArg, args);
if (precision >= 0) spec.precision = precision;
// else negative precision is same as no precision
else spec.precision = spec.UNSPECIFIED;
++currentArg;
}
else if (spec.precision < 0)
{
// means: get precision as a positional parameter
auto index = cast(uint) -spec.precision;
assert(index > 0, "The precision must be greater than zero");
auto precision = getNthInt!"integer precision"(index- 1, args);
if (currentArg < index) currentArg = index;
if (precision >= 0) spec.precision = precision;
// else negative precision is same as no precision
else spec.precision = spec.UNSPECIFIED;
}
if (spec.separators == spec.DYNAMIC)
{
auto separators = getNthInt!"separator digit width"(currentArg, args);
spec.separators = separators;
++currentArg;
}
if (spec.separatorCharPos == spec.DYNAMIC)
{
auto separatorChar =
getNth!("separator character", isSomeChar, dchar)(currentArg, args);
spec.separatorChar = separatorChar;
++currentArg;
}
if (currentArg == A.length && !spec.indexStart)
{
// leftover spec?
enforceFmt(fmt.length == 0,
text("Orphan format specifier: %", spec.spec));
break;
}
// Format an argument
// This switch uses a static foreach to generate a jump table.
// Currently `spec.indexStart` use the special value '0' to signal
// we should use the current argument. An enhancement would be to
// always store the index.
size_t index = currentArg;
if (spec.indexStart != 0)
index = spec.indexStart - 1;
else
++currentArg;
SWITCH: switch (index)
{
foreach (i, Tunused; A)
{
case i:
formatValue(w, args[i], spec);
if (currentArg < spec.indexEnd)
currentArg = spec.indexEnd;
// A little know feature of format is to format a range
// of arguments, e.g. `%1:3$` will format the first 3
// arguments. Since they have to be consecutive we can
// just use explicit fallthrough to cover that case.
if (i + 1 < spec.indexEnd)
{
// You cannot goto case if the next case is the default
static if (i + 1 < A.length)
goto case;
else
goto default;
}
else
break SWITCH;
}
default:
throw new FormatException(
text("Positional specifier %", spec.indexStart, '$', spec.spec,
" index exceeds ", A.length));
}
}
return currentArg;
}
///
@safe unittest
{
assert(format("%,d", 1000) == "1,000");
assert(format("%,f", 1234567.891011) == "1,234,567.891011");
assert(format("%,?d", '?', 1000) == "1?000");
assert(format("%,1d", 1000) == "1,0,0,0", format("%,1d", 1000));
assert(format("%,*d", 4, -12345) == "-1,2345");
assert(format("%,*?d", 4, '_', -12345) == "-1_2345");
assert(format("%,6?d", '_', -12345678) == "-12_345678");
assert(format("%12,3.3f", 1234.5678) == " 1,234.568", "'" ~
format("%12,3.3f", 1234.5678) ~ "'");
}
@safe pure unittest
{
import std.array;
auto w = appender!string();
formattedWrite(w, "%s %d", "@safe/pure", 42);
assert(w.data == "@safe/pure 42");
}
@safe pure unittest
{
char[20] buf;
auto w = buf[];
formattedWrite(w, "%s %d", "@safe/pure", 42);
assert(buf[0 .. $ - w.length] == "@safe/pure 42");
}
/**
Reads characters from $(REF_ALTTEXT input range, isInputRange, std,range,primitives)
`r`, converts them according to `fmt`, and writes them to `args`.
Params:
r = The range to read from.
fmt = The format of the data to read.
args = The drain of the data read.
Returns:
On success, the function returns the number of variables filled. This count
can match the expected number of readings or fewer, even zero, if a
matching failure happens.
Throws:
A `FormatException` if `S.length == 0` and `fmt` has format specifiers.
*/
uint formattedRead(alias fmt, R, S...)(auto ref R r, auto ref S args)
if (isSomeString!(typeof(fmt)))
{
alias e = checkFormatException!(fmt, S);
static assert(!e, e.msg);
return .formattedRead(r, fmt, args);
}
/// ditto
uint formattedRead(R, Char, S...)(auto ref R r, const(Char)[] fmt, auto ref S args)
{
import std.typecons : isTuple;
auto spec = FormatSpec!Char(fmt);
static if (!S.length)
{
spec.readUpToNextSpec(r);
enforceFmt(spec.trailing.empty, "Trailing characters in formattedRead format string");
return 0;
}
else
{
enum hasPointer = isPointer!(typeof(args[0]));
// The function below accounts for '*' == fields meant to be
// read and skipped
void skipUnstoredFields()
{
for (;;)
{
spec.readUpToNextSpec(r);
if (spec.width != spec.DYNAMIC) break;
// must skip this field
skipData(r, spec);
}
}
skipUnstoredFields();
if (r.empty)
{
// Input is empty, nothing to read
return 0;
}
static if (hasPointer)
alias A = typeof(*args[0]);
else
alias A = typeof(args[0]);
static if (isTuple!A)
{
foreach (i, T; A.Types)
{
static if (hasPointer)
(*args[0])[i] = unformatValue!(T)(r, spec);
else
args[0][i] = unformatValue!(T)(r, spec);
skipUnstoredFields();
}
}
else
{
static if (hasPointer)
*args[0] = unformatValue!(A)(r, spec);
else
args[0] = unformatValue!(A)(r, spec);
}
return 1 + formattedRead(r, spec.trailing, args[1 .. $]);
}
}
/// The format string can be checked at compile-time (see $(LREF format) for details):
@safe pure unittest
{
string s = "hello!124:34.5";
string a;
int b;
double c;
s.formattedRead!"%s!%s:%s"(a, b, c);
assert(a == "hello" && b == 124 && c == 34.5);
}
@safe unittest
{
import std.math;
string s = " 1.2 3.4 ";
double x, y, z;
assert(formattedRead(s, " %s %s %s ", x, y, z) == 2);
assert(s.empty);
assert(approxEqual(x, 1.2));
assert(approxEqual(y, 3.4));
assert(isNaN(z));
}
// for backwards compatibility
@system pure unittest
{
string s = "hello!124:34.5";
string a;
int b;
double c;
formattedRead(s, "%s!%s:%s", &a, &b, &c);
assert(a == "hello" && b == 124 && c == 34.5);
// mix pointers and auto-ref
s = "world!200:42.25";
formattedRead(s, "%s!%s:%s", a, &b, &c);
assert(a == "world" && b == 200 && c == 42.25);
s = "world1!201:42.5";
formattedRead(s, "%s!%s:%s", &a, &b, c);
assert(a == "world1" && b == 201 && c == 42.5);
s = "world2!202:42.75";
formattedRead(s, "%s!%s:%s", a, b, &c);
assert(a == "world2" && b == 202 && c == 42.75);
}
// for backwards compatibility
@system pure unittest
{
import std.math;
string s = " 1.2 3.4 ";
double x, y, z;
assert(formattedRead(s, " %s %s %s ", &x, &y, &z) == 2);
assert(s.empty);
assert(approxEqual(x, 1.2));
assert(approxEqual(y, 3.4));
assert(isNaN(z));
}
@system pure unittest
{
string line;
bool f1;
line = "true";
formattedRead(line, "%s", &f1);
assert(f1);
line = "TrUE";
formattedRead(line, "%s", &f1);
assert(f1);
line = "false";
formattedRead(line, "%s", &f1);
assert(!f1);
line = "fALsE";
formattedRead(line, "%s", &f1);
assert(!f1);
line = "1";
formattedRead(line, "%d", &f1);
assert(f1);
line = "-1";
formattedRead(line, "%d", &f1);
assert(f1);
line = "0";
formattedRead(line, "%d", &f1);
assert(!f1);
line = "-0";
formattedRead(line, "%d", &f1);
assert(!f1);
}
@system pure unittest
{
union B
{
char[int.sizeof] untyped;
int typed;
}
B b;
b.typed = 5;
char[] input = b.untyped[];
int witness;
formattedRead(input, "%r", &witness);
assert(witness == b.typed);
}
@system pure unittest
{
union A
{
char[float.sizeof] untyped;
float typed;
}
A a;
a.typed = 5.5;
char[] input = a.untyped[];
float witness;
formattedRead(input, "%r", &witness);
assert(witness == a.typed);
}
@system pure unittest
{
import std.typecons;
char[] line = "1 2".dup;
int a, b;
formattedRead(line, "%s %s", &a, &b);
assert(a == 1 && b == 2);
line = "10 2 3".dup;
formattedRead(line, "%d ", &a);
assert(a == 10);
assert(line == "2 3");
Tuple!(int, float) t;
line = "1 2.125".dup;
formattedRead(line, "%d %g", &t);
assert(t[0] == 1 && t[1] == 2.125);
line = "1 7643 2.125".dup;
formattedRead(line, "%s %*u %s", &t);
assert(t[0] == 1 && t[1] == 2.125);
}
@system pure unittest
{
string line;
char c1, c2;
line = "abc";
formattedRead(line, "%s%c", &c1, &c2);
assert(c1 == 'a' && c2 == 'b');
assert(line == "c");
}
@system pure unittest
{
string line;
line = "[1,2,3]";
int[] s1;
formattedRead(line, "%s", &s1);
assert(s1 == [1,2,3]);
}
@system pure unittest
{
string line;
line = "[1,2,3]";
int[] s1;
formattedRead(line, "[%(%s,%)]", &s1);
assert(s1 == [1,2,3]);
line = `["hello", "world"]`;
string[] s2;
formattedRead(line, "[%(%s, %)]", &s2);
assert(s2 == ["hello", "world"]);
line = "123 456";
int[] s3;
formattedRead(line, "%(%s %)", &s3);
assert(s3 == [123, 456]);
line = "h,e,l,l,o; w,o,r,l,d";
string[] s4;
formattedRead(line, "%(%(%c,%); %)", &s4);
assert(s4 == ["hello", "world"]);
}
@system pure unittest
{
string line;
int[4] sa1;
line = `[1,2,3,4]`;
formattedRead(line, "%s", &sa1);
assert(sa1 == [1,2,3,4]);
int[4] sa2;
line = `[1,2,3]`;
assertThrown(formattedRead(line, "%s", &sa2));
int[4] sa3;
line = `[1,2,3,4,5]`;
assertThrown(formattedRead(line, "%s", &sa3));
}
@system pure unittest
{
string input;
int[4] sa1;
input = `[1,2,3,4]`;
formattedRead(input, "[%(%s,%)]", &sa1);
assert(sa1 == [1,2,3,4]);
int[4] sa2;
input = `[1,2,3]`;
assertThrown!FormatException(formattedRead(input, "[%(%s,%)]", &sa2));
}
@system pure unittest
{
string line;
string s1, s2;
line = "hello, world";
formattedRead(line, "%s", &s1);
assert(s1 == "hello, world", s1);
line = "hello, world;yah";
formattedRead(line, "%s;%s", &s1, &s2);
assert(s1 == "hello, world", s1);
assert(s2 == "yah", s2);
line = `['h','e','l','l','o']`;
string s3;
formattedRead(line, "[%(%s,%)]", &s3);
assert(s3 == "hello");
line = `"hello"`;
string s4;
formattedRead(line, "\"%(%c%)\"", &s4);
assert(s4 == "hello");
}
@system pure unittest
{
string line;
string[int] aa1;
line = `[1:"hello", 2:"world"]`;
formattedRead(line, "%s", &aa1);
assert(aa1 == [1:"hello", 2:"world"]);
int[string] aa2;
line = `{"hello"=1; "world"=2}`;
formattedRead(line, "{%(%s=%s; %)}", &aa2);
assert(aa2 == ["hello":1, "world":2]);
int[string] aa3;
line = `{[hello=1]; [world=2]}`;
formattedRead(line, "{%([%(%c%)=%s]%|; %)}", &aa3);
assert(aa3 == ["hello":1, "world":2]);
}
// test rvalue using
@system pure unittest
{
string[int] aa1;
formattedRead!("%s")(`[1:"hello", 2:"world"]`, aa1);
assert(aa1 == [1:"hello", 2:"world"]);
int[string] aa2;
formattedRead(`{"hello"=1; "world"=2}`, "{%(%s=%s; %)}", aa2);
assert(aa2 == ["hello":1, "world":2]);
}
template FormatSpec(Char)
if (!is(Unqual!Char == Char))
{
alias FormatSpec = FormatSpec!(Unqual!Char);
}
/**
* A General handler for `printf` style format specifiers. Used for building more
* specific formatting functions.
*/
struct FormatSpec(Char)
if (is(Unqual!Char == Char))
{
import std.algorithm.searching : startsWith;
import std.ascii : isDigit, isPunctuation, isAlpha;
import std.conv : parse, text, to;
/**
Minimum _width, default `0`.
*/
int width = 0;
/**
Precision. Its semantics depends on the argument type. For
floating point numbers, _precision dictates the number of
decimals printed.
*/
int precision = UNSPECIFIED;
/**
Number of digits printed between _separators.
*/
int separators = UNSPECIFIED;
/**
Set to `DYNAMIC` when the separator character is supplied at runtime.
*/
int separatorCharPos = UNSPECIFIED;
/**
Character to insert between digits.
*/
dchar separatorChar = ',';
/**
Special value for width and precision. `DYNAMIC` width or
precision means that they were specified with `'*'` in the
format string and are passed at runtime through the varargs.
*/
enum int DYNAMIC = int.max;
/**
Special value for precision, meaning the format specifier
contained no explicit precision.
*/
enum int UNSPECIFIED = DYNAMIC - 1;
/**
The actual format specifier, `'s'` by default.
*/
char spec = 's';
/**
Index of the argument for positional parameters, from `1` to
`ubyte.max`. (`0` means not used).
*/
ubyte indexStart;
/**
Index of the last argument for positional parameter range, from
`1` to `ubyte.max`. (`0` means not used).
*/
ubyte indexEnd;
version (StdDdoc)
{
/**
The format specifier contained a `'-'` (`printf`
compatibility).
*/
bool flDash;
/**
The format specifier contained a `'0'` (`printf`
compatibility).
*/
bool flZero;
/**
The format specifier contained a $(D ' ') (`printf`
compatibility).
*/
bool flSpace;
/**
The format specifier contained a `'+'` (`printf`
compatibility).
*/
bool flPlus;
/**
The format specifier contained a `'#'` (`printf`
compatibility).
*/
bool flHash;
/**
The format specifier contained a `','`
*/
bool flSeparator;
// Fake field to allow compilation
ubyte allFlags;
}
else
{
union
{
import std.bitmanip : bitfields;
mixin(bitfields!(
bool, "flDash", 1,
bool, "flZero", 1,
bool, "flSpace", 1,
bool, "flPlus", 1,
bool, "flHash", 1,
bool, "flSeparator", 1,
ubyte, "", 2));
ubyte allFlags;
}
}
/**
In case of a compound format specifier starting with $(D
"%$(LPAREN)") and ending with `"%$(RPAREN)"`, `_nested`
contains the string contained within the two separators.
*/
const(Char)[] nested;
/**
In case of a compound format specifier, `_sep` contains the
string positioning after `"%|"`.
`sep is null` means no separator else `sep.empty` means 0 length
separator.
*/
const(Char)[] sep;
/**
`_trailing` contains the rest of the format string.
*/
const(Char)[] trailing;
/*
This string is inserted before each sequence (e.g. array)
formatted (by default `"["`).
*/
enum immutable(Char)[] seqBefore = "[";
/*
This string is inserted after each sequence formatted (by
default `"]"`).
*/
enum immutable(Char)[] seqAfter = "]";
/*
This string is inserted after each element keys of a sequence (by
default `":"`).
*/
enum immutable(Char)[] keySeparator = ":";
/*
This string is inserted in between elements of a sequence (by
default $(D ", ")).
*/
enum immutable(Char)[] seqSeparator = ", ";
/**
Construct a new `FormatSpec` using the format string `fmt`, no
processing is done until needed.
*/
this(in Char[] fmt) @safe pure
{
trailing = fmt;
}
/**
Write the format string to an output range until the next format
specifier is found and parse that format specifier.
See $(LREF FormatSpec) for an example, how to use `writeUpToNextSpec`.
Params:
writer = the $(REF_ALTTEXT output range, isOutputRange, std, range, primitives)
Returns:
True, when a format specifier is found.
Throws:
A $(LREF FormatException) when the found format specifier
could not be parsed.
*/
bool writeUpToNextSpec(OutputRange)(ref OutputRange writer) scope
{
if (trailing.empty)
return false;
for (size_t i = 0; i < trailing.length; ++i)
{
if (trailing[i] != '%') continue;
put(writer, trailing[0 .. i]);
trailing = trailing[i .. $];
enforceFmt(trailing.length >= 2, `Unterminated format specifier: "%"`);
trailing = trailing[1 .. $];
if (trailing[0] != '%')
{
// Spec found. Fill up the spec, and bailout
fillUp();
return true;
}
// Doubled! Reset and Keep going
i = 0;
}
// no format spec found
put(writer, trailing);
trailing = null;
return false;
}
private void fillUp() scope
{
// Reset content
if (__ctfe)
{
flDash = false;
flZero = false;
flSpace = false;
flPlus = false;
flHash = false;
flSeparator = false;
}
else
{
allFlags = 0;
}
width = 0;
precision = UNSPECIFIED;
nested = null;
// Parse the spec (we assume we're past '%' already)
for (size_t i = 0; i < trailing.length; )
{
switch (trailing[i])
{
case '(':
// Embedded format specifier.
auto j = i + 1;
// Get the matching balanced paren
for (uint innerParens;;)
{
enforceFmt(j + 1 < trailing.length,
text("Incorrect format specifier: %", trailing[i .. $]));
if (trailing[j++] != '%')
{
// skip, we're waiting for %( and %)
continue;
}
if (trailing[j] == '-') // for %-(
{
++j; // skip
enforceFmt(j < trailing.length,
text("Incorrect format specifier: %", trailing[i .. $]));
}
if (trailing[j] == ')')
{
if (innerParens-- == 0) break;
}
else if (trailing[j] == '|')
{
if (innerParens == 0) break;
}
else if (trailing[j] == '(')
{
++innerParens;
}
}
if (trailing[j] == '|')
{
auto k = j;
for (++j;;)
{
if (trailing[j++] != '%')
continue;
if (trailing[j] == '%')
++j;
else if (trailing[j] == ')')
break;
else
throw new FormatException(
text("Incorrect format specifier: %",
trailing[j .. $]));
}
nested = trailing[i + 1 .. k - 1];
sep = trailing[k + 1 .. j - 1];
}
else
{
nested = trailing[i + 1 .. j - 1];
sep = null; // no separator
}
//this = FormatSpec(innerTrailingSpec);
spec = '(';
// We practically found the format specifier
trailing = trailing[j + 1 .. $];
return;
case '-': flDash = true; ++i; break;
case '+': flPlus = true; ++i; break;
case '#': flHash = true; ++i; break;
case '0': flZero = true; ++i; break;
case ' ': flSpace = true; ++i; break;
case '*':
if (isDigit(trailing[++i]))
{
// a '*' followed by digits and '$' is a
// positional format
trailing = trailing[1 .. $];
width = -parse!(typeof(width))(trailing);
i = 0;
enforceFmt(trailing[i++] == '$',
"$ expected");
}
else
{
// read result
width = DYNAMIC;
}
break;
case '1': .. case '9':
auto tmp = trailing[i .. $];
const widthOrArgIndex = parse!uint(tmp);
enforceFmt(tmp.length,
text("Incorrect format specifier %", trailing[i .. $]));
i = arrayPtrDiff(tmp, trailing);
if (tmp.startsWith('$'))
{
// index of the form %n$
indexEnd = indexStart = to!ubyte(widthOrArgIndex);
++i;
}
else if (tmp.startsWith(':'))
{
// two indexes of the form %m:n$, or one index of the form %m:$
indexStart = to!ubyte(widthOrArgIndex);
tmp = tmp[1 .. $];
if (tmp.startsWith('$'))
{
indexEnd = indexEnd.max;
}
else
{
indexEnd = parse!(typeof(indexEnd))(tmp);
}
i = arrayPtrDiff(tmp, trailing);
enforceFmt(trailing[i++] == '$',
"$ expected");
}
else
{
// width
width = to!int(widthOrArgIndex);
}
break;
case ',':
// Precision
++i;
flSeparator = true;
if (trailing[i] == '*')
{
++i;
// read result
separators = DYNAMIC;
}
else if (isDigit(trailing[i]))
{
auto tmp = trailing[i .. $];
separators = parse!int(tmp);
i = arrayPtrDiff(tmp, trailing);
}
else
{
// "," was specified, but nothing after it
separators = 3;
}
if (trailing[i] == '?')
{
separatorCharPos = DYNAMIC;
++i;
}
break;
case '.':
// Precision
if (trailing[++i] == '*')
{
if (isDigit(trailing[++i]))
{
// a '.*' followed by digits and '$' is a
// positional precision
trailing = trailing[i .. $];
i = 0;
precision = -parse!int(trailing);
enforceFmt(trailing[i++] == '$',
"$ expected");
}
else
{
// read result
precision = DYNAMIC;
}
}
else if (trailing[i] == '-')
{
// negative precision, as good as 0
precision = 0;
auto tmp = trailing[i .. $];
parse!int(tmp); // skip digits
i = arrayPtrDiff(tmp, trailing);
}
else if (isDigit(trailing[i]))
{
auto tmp = trailing[i .. $];
precision = parse!int(tmp);
i = arrayPtrDiff(tmp, trailing);
}
else
{
// "." was specified, but nothing after it
precision = 0;
}
break;
default:
// this is the format char
spec = cast(char) trailing[i++];
trailing = trailing[i .. $];
return;
} // end switch
} // end for
throw new FormatException(text("Incorrect format specifier: ", trailing));
}
//--------------------------------------------------------------------------
private bool readUpToNextSpec(R)(ref R r) scope
{
import std.ascii : isLower, isWhite;
import std.utf : stride;
// Reset content
if (__ctfe)
{
flDash = false;
flZero = false;
flSpace = false;
flPlus = false;
flHash = false;
flSeparator = false;
}
else
{
allFlags = 0;
}
width = 0;
precision = UNSPECIFIED;
nested = null;
// Parse the spec
while (trailing.length)
{
const c = trailing[0];
if (c == '%' && trailing.length > 1)
{
const c2 = trailing[1];
if (c2 == '%')
{
assert(!r.empty, "Required at least one more input");
// Require a '%'
if (r.front != '%') break;
trailing = trailing[2 .. $];
r.popFront();
}
else
{
enforceFmt(isLower(c2) || c2 == '*' ||
c2 == '(',
text("'%", c2,
"' not supported with formatted read"));
trailing = trailing[1 .. $];
fillUp();
return true;
}
}
else
{
if (c == ' ')
{
while (!r.empty && isWhite(r.front)) r.popFront();
//r = std.algorithm.find!(not!(isWhite))(r);
}
else
{
enforceFmt(!r.empty,
text("parseToFormatSpec: Cannot find character '",
c, "' in the input string."));
if (r.front != trailing.front) break;
r.popFront();
}
trailing = trailing[stride(trailing, 0) .. $];
}
}
return false;
}
private string getCurFmtStr() const
{
import std.array : appender;
auto w = appender!string();
auto f = FormatSpec!Char("%s"); // for stringnize
put(w, '%');
if (indexStart != 0)
{
formatValue(w, indexStart, f);
put(w, '$');
}
if (flDash) put(w, '-');
if (flZero) put(w, '0');
if (flSpace) put(w, ' ');
if (flPlus) put(w, '+');
if (flHash) put(w, '#');
if (flSeparator) put(w, ',');
if (width != 0)
formatValue(w, width, f);
if (precision != FormatSpec!Char.UNSPECIFIED)
{
put(w, '.');
formatValue(w, precision, f);
}
put(w, spec);
return w.data;
}
private const(Char)[] headUpToNextSpec()
{
import std.array : appender;
auto w = appender!(typeof(return))();
auto tr = trailing;
while (tr.length)
{
if (tr[0] == '%')
{
if (tr.length > 1 && tr[1] == '%')
{
tr = tr[2 .. $];
w.put('%');
}
else
break;
}
else
{
w.put(tr.front);
tr.popFront();
}
}
return w.data;
}
/**
* Gives a string containing all of the member variables on their own
* line.
*
* Params:
* writer = A `char` accepting
* $(REF_ALTTEXT output range, isOutputRange, std, range, primitives)
* Returns:
* A `string` when not using an output range; `void` otherwise.
*/
string toString() const @safe pure
{
import std.array : appender;
auto app = appender!string();
app.reserve(200 + trailing.length);
toString(app);
return app.data;
}
/// ditto
void toString(OutputRange)(ref OutputRange writer) const
if (isOutputRange!(OutputRange, char))
{
auto s = singleSpec("%s");
put(writer, "address = ");
formatValue(writer, &this, s);
put(writer, "\nwidth = ");
formatValue(writer, width, s);
put(writer, "\nprecision = ");
formatValue(writer, precision, s);
put(writer, "\nspec = ");
formatValue(writer, spec, s);
put(writer, "\nindexStart = ");
formatValue(writer, indexStart, s);
put(writer, "\nindexEnd = ");
formatValue(writer, indexEnd, s);
put(writer, "\nflDash = ");
formatValue(writer, flDash, s);
put(writer, "\nflZero = ");
formatValue(writer, flZero, s);
put(writer, "\nflSpace = ");
formatValue(writer, flSpace, s);
put(writer, "\nflPlus = ");
formatValue(writer, flPlus, s);
put(writer, "\nflHash = ");
formatValue(writer, flHash, s);
put(writer, "\nflSeparator = ");
formatValue(writer, flSeparator, s);
put(writer, "\nnested = ");
formatValue(writer, nested, s);
put(writer, "\ntrailing = ");
formatValue(writer, trailing, s);
put(writer, '\n');
}
}
@safe unittest
{
import std.array;
import std.conv : text;
auto w = appender!(char[])();
auto f = FormatSpec!char("abc%sdef%sghi");
f.writeUpToNextSpec(w);
assert(w.data == "abc", w.data);
assert(f.trailing == "def%sghi", text(f.trailing));
f.writeUpToNextSpec(w);
assert(w.data == "abcdef", w.data);
assert(f.trailing == "ghi");
// test with embedded %%s
f = FormatSpec!char("ab%%cd%%ef%sg%%h%sij");
w.clear();
f.writeUpToNextSpec(w);
assert(w.data == "ab%cd%ef" && f.trailing == "g%%h%sij", w.data);
f.writeUpToNextSpec(w);
assert(w.data == "ab%cd%efg%h" && f.trailing == "ij");
// https://issues.dlang.org/show_bug.cgi?id=4775
f = FormatSpec!char("%%%s");
w.clear();
f.writeUpToNextSpec(w);
assert(w.data == "%" && f.trailing == "");
f = FormatSpec!char("%%%%%s%%");
w.clear();
while (f.writeUpToNextSpec(w)) continue;
assert(w.data == "%%%");
f = FormatSpec!char("a%%b%%c%");
w.clear();
assertThrown!FormatException(f.writeUpToNextSpec(w));
assert(w.data == "a%b%c" && f.trailing == "%");
}
// https://issues.dlang.org/show_bug.cgi?id=5237
@safe unittest
{
import std.array;
auto w = appender!string();
auto f = FormatSpec!char("%.16f");
f.writeUpToNextSpec(w); // dummy eating
assert(f.spec == 'f');
auto fmt = f.getCurFmtStr();
assert(fmt == "%.16f");
}
///
@safe pure unittest
{
import std.array;
auto a = appender!(string)();
auto fmt = "Number: %6.4e\nString: %s";
auto f = FormatSpec!char(fmt);
assert(f.writeUpToNextSpec(a) == true);
assert(a.data == "Number: ");
assert(f.trailing == "\nString: %s");
assert(f.spec == 'e');
assert(f.width == 6);
assert(f.precision == 4);
assert(f.writeUpToNextSpec(a) == true);
assert(a.data == "Number: \nString: ");
assert(f.trailing == "");
assert(f.spec == 's');
assert(f.writeUpToNextSpec(a) == false);
assert(a.data == "Number: \nString: ");
}
// https://issues.dlang.org/show_bug.cgi?id=14059
@safe unittest
{
import std.array : appender;
auto a = appender!(string)();
auto f = FormatSpec!char("%-(%s%"); // %)")
assertThrown!FormatException(f.writeUpToNextSpec(a));
f = FormatSpec!char("%(%-"); // %)")
assertThrown!FormatException(f.writeUpToNextSpec(a));
}
@safe unittest
{
import std.array : appender;
auto a = appender!(string)();
auto f = FormatSpec!char("%,d");
f.writeUpToNextSpec(a);
assert(f.spec == 'd', format("%s", f.spec));
assert(f.precision == FormatSpec!char.UNSPECIFIED);
assert(f.separators == 3);
f = FormatSpec!char("%5,10f");
f.writeUpToNextSpec(a);
assert(f.spec == 'f', format("%s", f.spec));
assert(f.separators == 10);
assert(f.width == 5);
f = FormatSpec!char("%5,10.4f");
f.writeUpToNextSpec(a);
assert(f.spec == 'f', format("%s", f.spec));
assert(f.separators == 10);
assert(f.width == 5);
assert(f.precision == 4);
}
@safe pure unittest
{
import std.algorithm.searching : canFind, findSplitBefore;
auto expected = "width = 2" ~
"\nprecision = 5" ~
"\nspec = f" ~
"\nindexStart = 0" ~
"\nindexEnd = 0" ~
"\nflDash = false" ~
"\nflZero = false" ~
"\nflSpace = false" ~
"\nflPlus = false" ~
"\nflHash = false" ~
"\nflSeparator = false" ~
"\nnested = " ~
"\ntrailing = \n";
auto spec = singleSpec("%2.5f");
auto res = spec.toString();
// make sure the address exists, then skip it
assert(res.canFind("address"));
assert(res.findSplitBefore("width")[1] == expected);
}
/**
Helper function that returns a `FormatSpec` for a single specifier given
in `fmt`.
Params:
fmt = A format specifier.
Returns:
A `FormatSpec` with the specifier parsed.
Throws:
A `FormatException` when more than one specifier is given or the specifier
is malformed.
*/
FormatSpec!Char singleSpec(Char)(Char[] fmt)
{
import std.conv : text;
enforceFmt(fmt.length >= 2, "fmt must be at least 2 characters long");
enforceFmt(fmt.front == '%', "fmt must start with a '%' character");
static struct DummyOutputRange {
void put(C)(scope const C[] buf) {} // eat elements
}
auto a = DummyOutputRange();
auto spec = FormatSpec!Char(fmt);
//dummy write
spec.writeUpToNextSpec(a);
enforceFmt(spec.trailing.empty,
text("Trailing characters in fmt string: '", spec.trailing));
return spec;
}
///
@safe pure unittest
{
import std.exception : assertThrown;
auto spec = singleSpec("%2.3e");
assert(spec.trailing == "");
assert(spec.spec == 'e');
assert(spec.width == 2);
assert(spec.precision == 3);
assertThrown!FormatException(singleSpec(""));
assertThrown!FormatException(singleSpec("2.3e"));
assertThrown!FormatException(singleSpec("%2.3eTest"));
}
/**
* Formats any value into `Char` accepting `OutputRange`, using the given `FormatSpec`.
*
* Aggregates:
* `struct`, `union`, `class`, and `interface` are formatted by calling `toString`.
*
* `toString` should have one of the following signatures:
*
* ---
* void toString(W)(ref W w, scope const ref FormatSpec fmt)
* void toString(W)(ref W w)
* string toString();
* ---
*
* Where `W` is an $(REF_ALTTEXT output range, isOutputRange, std,range,primitives)
* which accepts characters. The template type does not have to be called `W`.
*
* The following overloads are also accepted for legacy reasons or for use in virtual
* functions. It's recommended that any new code forgo these overloads if possible for
* speed and attribute acceptance reasons.
*
* ---
* void toString(scope void delegate(const(char)[]) sink, const ref FormatSpec fmt);
* void toString(scope void delegate(const(char)[]) sink, string fmt);
* void toString(scope void delegate(const(char)[]) sink);
* ---
*
* For the class objects which have input range interface,
* $(UL
* $(LI If the instance `toString` has overridden `Object.toString`, it is used.)
* $(LI Otherwise, the objects are formatted as input range.)
* )
*
* For the `struct` and `union` objects which does not have `toString`,
* $(UL
* $(LI If they have range interface, formatted as input range.)
* $(LI Otherwise, they are formatted like `Type(field1, filed2, ...)`.)
* )
*
* Otherwise, are formatted just as their type name.
*
* Params:
* w = The $(REF_ALTTEXT output range, isOutputRange, std,range,primitives) to write to.
* val = The value to write.
* f = The $(REF FormatSpec, std, format) defining how to write the value.
*/
void formatValue(Writer, T, Char)(auto ref Writer w, auto ref T val, scope const ref FormatSpec!Char f)
{
formatValueImpl(w, val, f);
}
/++
The following code compares the use of `formatValue` and `formattedWrite`.
+/
@safe pure unittest
{
import std.array : appender;
auto writer1 = appender!string();
writer1.formattedWrite("%08b", 42);
auto writer2 = appender!string();
auto f = singleSpec("%08b");
writer2.formatValue(42, f);
assert(writer1.data == writer2.data && writer1.data == "00101010");
}
/**
* `bool`s are formatted as `"true"` or `"false"` with `%s` and as `1` or
* `0` with integral-specific format specs.
*/
@safe pure unittest
{
import std.array : appender;
auto w = appender!string();
auto spec = singleSpec("%s");
formatValue(w, true, spec);
assert(w.data == "true");
}
/// `null` literal is formatted as `"null"`.
@safe pure unittest
{
import std.array : appender;
auto w = appender!string();
auto spec = singleSpec("%s");
formatValue(w, null, spec);
assert(w.data == "null");
}
/// Integrals are formatted like $(REF printf, core, stdc, stdio).
@safe pure unittest
{
import std.array : appender;
auto w = appender!string();
auto spec = singleSpec("%d");
formatValue(w, 1337, spec);
assert(w.data == "1337");
}
/// Floating-point values are formatted like $(REF printf, core, stdc, stdio)
@safe unittest
{
import std.array : appender;
auto w = appender!string();
auto spec = singleSpec("%.1f");
formatValue(w, 1337.7, spec);
assert(w.data == "1337.7");
}
/**
* Individual characters (`char, `wchar`, or `dchar`) are formatted as
* Unicode characters with `%s` and as integers with integral-specific format
* specs.
*/
@safe pure unittest
{
import std.array : appender;
auto w = appender!string();
auto spec = singleSpec("%c");
formatValue(w, 'a', spec);
assert(w.data == "a");
}
/// Strings are formatted like $(REF printf, core, stdc, stdio)
@safe pure unittest
{
import std.array : appender;
auto w = appender!string();
auto spec = singleSpec("%s");
formatValue(w, "hello", spec);
assert(w.data == "hello");
}
/// Static-size arrays are formatted as dynamic arrays.
@safe pure unittest
{
import std.array : appender;
auto w = appender!string();
auto spec = singleSpec("%s");
char[2] two = ['a', 'b'];
formatValue(w, two, spec);
assert(w.data == "ab");
}
/**
* Dynamic arrays are formatted as input ranges.
*
* Specializations:
* $(UL
* $(LI `void[]` is formatted like `ubyte[]`.)
* $(LI Const array is converted to input range by removing its qualifier.)
* )
*/
@safe pure unittest
{
import std.array : appender;
auto w = appender!string();
auto spec = singleSpec("%s");
auto two = [1, 2];
formatValue(w, two, spec);
assert(w.data == "[1, 2]");
}
/**
* Associative arrays are formatted by using `':'` and `", "` as
* separators, and enclosed by `'['` and `']'`.
*/
@safe pure unittest
{
import std.array : appender;
auto w = appender!string();
auto spec = singleSpec("%s");
auto aa = ["H":"W"];
formatValue(w, aa, spec);
assert(w.data == "[\"H\":\"W\"]", w.data);
}
/// `enum`s are formatted like their base value
@safe pure unittest
{
import std.array : appender;
auto w = appender!string();
auto spec = singleSpec("%s");
enum A { first, second, third }
formatValue(w, A.second, spec);
assert(w.data == "second");
}
/**
* Formatting a struct by defining a method `toString`, which takes an output
* range.
*
* It's recommended that any `toString` using $(REF_ALTTEXT output ranges, isOutputRange, std,range,primitives)
* use $(REF put, std,range,primitives) rather than use the `put` method of the range
* directly.
*/
@safe unittest
{
import std.array : appender;
import std.range.primitives;
static struct Point
{
int x, y;
void toString(W)(ref W writer, scope const ref FormatSpec!char f)
if (isOutputRange!(W, char))
{
// std.range.primitives.put
put(writer, "(");
formatValue(writer, x, f);
put(writer, ",");
formatValue(writer, y, f);
put(writer, ")");
}
}
auto w = appender!string();
auto spec = singleSpec("%s");
auto p = Point(16, 11);
formatValue(w, p, spec);
assert(w.data == "(16,11)");
}
/**
* Another example of formatting a `struct` with a defined `toString`,
* this time using the `scope delegate` method.
*
* $(RED This method is now discouraged for non-virtual functions).
* If possible, please use the output range method instead.
*/
@safe unittest
{
static struct Point
{
int x, y;
void toString(scope void delegate(scope const(char)[]) @safe sink,
scope const FormatSpec!char fmt) const
{
sink("(");
sink.formatValue(x, fmt);
sink(",");
sink.formatValue(y, fmt);
sink(")");
}
}
auto p = Point(16,11);
assert(format("%03d", p) == "(016,011)");
assert(format("%02x", p) == "(10,0b)");
}
/// Pointers are formatted as hex integers.
@system pure unittest
{
import std.array : appender;
auto w = appender!string();
auto spec = singleSpec("%s");
auto q = cast(void*) 0xFFEECCAA;
formatValue(w, q, spec);
assert(w.data == "FFEECCAA");
}
/// SIMD vectors are formatted as arrays.
@safe unittest
{
import core.simd;
import std.array : appender;
auto w = appender!string();
auto spec = singleSpec("%s");
static if (is(float4))
{
version (X86) {}
else
{
float4 f4;
f4.array[0] = 1;
f4.array[1] = 2;
f4.array[2] = 3;
f4.array[3] = 4;
formatValue(w, f4, spec);
assert(w.data == "[1, 2, 3, 4]");
}
}
}
/// Delegates are formatted by `ReturnType delegate(Parameters) FunctionAttributes`
@safe unittest
{
import std.conv : to;
int i;
int foo(short k) @nogc
{
return i + k;
}
@system int delegate(short) @nogc bar() nothrow pure
{
int* p = new int(1);
i = *p;
return &foo;
}
assert(to!string(&bar) == "int delegate(short) @nogc delegate() pure nothrow @system");
assert(() @trusted { return bar()(3); }() == 4);
}
/*
`bool`s are formatted as `"true"` or `"false"` with `%s` and as `1` or
`0` with integral-specific format specs.
*/
private void formatValueImpl(Writer, T, Char)(auto ref Writer w, T obj, scope const ref FormatSpec!Char f)
if (is(BooleanTypeOf!T) && !is(T == enum) && !hasToString!(T, Char))
{
BooleanTypeOf!T val = obj;
if (f.spec == 's')
writeAligned(w, val ? "true" : "false", f);
else
formatValueImpl(w, cast(int) val, f);
}
@safe pure unittest
{
assertCTFEable!(
{
formatTest( false, "false" );
formatTest( true, "true" );
});
}
@system unittest
{
class C1 { bool val; alias val this; this(bool v){ val = v; } }
class C2 { bool val; alias val this; this(bool v){ val = v; }
override string toString() const { return "C"; } }
formatTest( new C1(false), "false" );
formatTest( new C1(true), "true" );
formatTest( new C2(false), "C" );
formatTest( new C2(true), "C" );
struct S1 { bool val; alias val this; }
struct S2 { bool val; alias val this;
string toString() const { return "S"; } }
formatTest( S1(false), "false" );
formatTest( S1(true), "true" );
formatTest( S2(false), "S" );
formatTest( S2(true), "S" );
}
@safe pure unittest
{
string t1 = format("[%6s] [%6s] [%-6s]", true, false, true);
assert(t1 == "[ true] [ false] [true ]");
string t2 = format("[%3s] [%-2s]", true, false);
assert(t2 == "[true] [false]");
}
/*
`null` literal is formatted as `"null"`
*/
private void formatValueImpl(Writer, T, Char)(auto ref Writer w, T obj, scope const ref FormatSpec!Char f)
if (is(immutable T == immutable typeof(null)) && !is(T == enum) && !hasToString!(T, Char))
{
const spec = f.spec;
enforceFmt(spec == 's',
"null literal cannot match %" ~ spec);
writeAligned(w, "null", f);
}
@safe pure unittest
{
assert(collectExceptionMsg!FormatException(format("%p", null)).back == 'p');
assertCTFEable!(
{
formatTest( null, "null" );
});
}
@safe pure unittest
{
string t = format("[%6s] [%-6s]", null, null);
assert(t == "[ null] [null ]");
}
/*
Integrals are formatted like $(REF printf, core, stdc, stdio).
*/
private void formatValueImpl(Writer, T, Char)(auto ref Writer w, T obj, scope const ref FormatSpec!Char f)
if (is(IntegralTypeOf!T) && !is(T == enum) && !hasToString!(T, Char))
{
alias U = IntegralTypeOf!T;
U val = obj; // Extracting alias this may be impure/system/may-throw
const spec = f.spec;
if (spec == 'r')
{
// raw write, skip all else and write the thing
auto raw = (ref val)@trusted{
return (cast(const char*) &val)[0 .. val.sizeof];
}(val);
if (needToSwapEndianess(f))
{
foreach_reverse (c; raw)
put(w, c);
}
else
{
foreach (c; raw)
put(w, c);
}
return;
}
immutable uint base =
spec == 'x' || spec == 'X' ? 16 :
spec == 'o' ? 8 :
spec == 'b' ? 2 :
spec == 's' || spec == 'd' || spec == 'u' ? 10 :
0;
enforceFmt(base > 0,
"incompatible format character for integral argument: %" ~ spec);
// Forward on to formatIntegral to handle both U and const(U)
// Saves duplication of code for both versions.
static if (is(ucent) && (is(U == cent) || is(U == ucent)))
alias C = U;
else static if (isSigned!U)
alias C = long;
else
alias C = ulong;
formatIntegral(w, cast(C) val, f, base, Unsigned!U.max);
}
private void formatIntegral(Writer, T, Char)(ref Writer w, const(T) val, scope const ref FormatSpec!Char fs,
uint base, ulong mask)
{
T arg = val;
immutable negative = (base == 10 && arg < 0);
if (negative)
{
arg = -arg;
}
// All unsigned integral types should fit in ulong.
static if (is(ucent) && is(typeof(arg) == ucent))
formatUnsigned(w, (cast(ucent) arg) & mask, fs, base, negative);
else
formatUnsigned(w, (cast(ulong) arg) & mask, fs, base, negative);
}
private void formatUnsigned(Writer, T, Char)
(ref Writer w, T arg, scope const ref FormatSpec!Char fs, uint base, bool negative)
{
/* Write string:
* leftpad prefix1 prefix2 zerofill digits rightpad
*/
/* Convert arg to digits[].
* Note that 0 becomes an empty digits[]
*/
char[64] buffer = void; // 64 bits in base 2 at most
char[] digits;
if (arg < base && base <= 10 && arg)
{
// Most numbers are a single digit - avoid expensive divide
buffer[0] = cast(char)(arg + '0');
digits = buffer[0 .. 1];
}
else
{
size_t i = buffer.length;
while (arg)
{
--i;
char c = cast(char) (arg % base);
arg /= base;
if (c < 10)
buffer[i] = cast(char)(c + '0');
else
buffer[i] = cast(char)(c + (fs.spec == 'x' ? 'a' - 10 : 'A' - 10));
}
digits = buffer[i .. $]; // got the digits without the sign
}
immutable precision = (fs.precision == fs.UNSPECIFIED) ? 1 : fs.precision;
char padChar = 0;
if (!fs.flDash)
{
padChar = (fs.flZero && fs.precision == fs.UNSPECIFIED) ? '0' : ' ';
}
// Compute prefix1 and prefix2
char prefix1 = 0;
char prefix2 = 0;
if (base == 10)
{
if (negative)
prefix1 = '-';
else if (fs.flPlus)
prefix1 = '+';
else if (fs.flSpace)
prefix1 = ' ';
}
else if (base == 16 && fs.flHash && digits.length)
{
prefix1 = '0';
prefix2 = fs.spec == 'x' ? 'x' : 'X';
}
// adjust precision to print a '0' for octal if alternate format is on
else if (base == 8 && fs.flHash &&
(precision <= 1 || precision <= digits.length) && // too low precision
digits.length > 0)
prefix1 = '0';
size_t zerofill = precision > digits.length ? precision - digits.length : 0;
size_t leftpad = 0;
size_t rightpad = 0;
immutable prefixWidth = (prefix1 != 0) + (prefix2 != 0);
size_t finalWidth, separatorsCount;
if (fs.flSeparator != 0)
{
finalWidth = prefixWidth + digits.length + ((digits.length > 0) ? (digits.length - 1) / fs.separators : 0);
if (finalWidth < fs.width)
finalWidth = fs.width + (padChar == '0') * (((fs.width - prefixWidth) % (fs.separators + 1) == 0) ? 1 : 0);
separatorsCount = (padChar == '0') ? (finalWidth - prefixWidth - 1) / (fs.separators + 1) :
((digits.length > 0) ? (digits.length - 1) / fs.separators : 0);
}
else
{
import std.algorithm.comparison : max;
finalWidth = max(fs.width, prefixWidth + digits.length);
}
immutable ptrdiff_t spacesToPrint =
finalWidth - (
+ prefixWidth
+ zerofill
+ digits.length
+ separatorsCount
);
if (spacesToPrint > 0) // need to do some padding
{
if (padChar == '0')
zerofill += spacesToPrint;
else if (padChar)
leftpad = spacesToPrint;
else
rightpad = spacesToPrint;
}
// Print
foreach (i ; 0 .. leftpad)
put(w, ' ');
if (prefix1) put(w, prefix1);
if (prefix2) put(w, prefix2);
if (fs.flSeparator)
{
if (zerofill > 0)
{
put(w, '0');
--zerofill;
}
int j = cast(int) (finalWidth - prefixWidth - separatorsCount - 1);
for (size_t i = 0; i < zerofill; ++i, --j)
{
if (j % fs.separators == 0)
{
put(w, fs.separatorChar);
}
put(w, '0');
}
}
else
{
foreach (i ; 0 .. zerofill)
put(w, '0');
}
if (fs.flSeparator)
{
for (size_t j = 0; j < digits.length; ++j)
{
if (((j != 0) || ((spacesToPrint > 0) && (padChar == '0'))) && (digits.length - j) % fs.separators == 0)
{
put(w, fs.separatorChar);
}
put(w, digits[j]);
}
}
else
{
put(w, digits);
}
foreach (i ; 0 .. rightpad)
put(w, ' ');
}
// https://issues.dlang.org/show_bug.cgi?id=18838
@safe pure unittest
{
assert("%12,d".format(0) == " 0");
}
@safe pure unittest
{
assert(collectExceptionMsg!FormatException(format("%c", 5)).back == 'c');
assertCTFEable!(
{
formatTest(9, "9");
formatTest( 10, "10" );
});
}
@system unittest
{
class C1 { long val; alias val this; this(long v){ val = v; } }
class C2 { long val; alias val this; this(long v){ val = v; }
override string toString() const { return "C"; } }
formatTest( new C1(10), "10" );
formatTest( new C2(10), "C" );
struct S1 { long val; alias val this; }
struct S2 { long val; alias val this;
string toString() const { return "S"; } }
formatTest( S1(10), "10" );
formatTest( S2(10), "S" );
}
// https://issues.dlang.org/show_bug.cgi?id=9117
@safe unittest
{
static struct Frop {}
static struct Foo
{
int n = 0;
alias n this;
T opCast(T) () if (is(T == Frop))
{
return Frop();
}
string toString()
{
return "Foo";
}
}
static struct Bar
{
Foo foo;
alias foo this;
string toString()
{
return "Bar";
}
}
const(char)[] result;
void put(scope const char[] s){ result ~= s; }
Foo foo;
formattedWrite(&put, "%s", foo); // OK
assert(result == "Foo");
result = null;
Bar bar;
formattedWrite(&put, "%s", bar); // NG
assert(result == "Bar");
result = null;
int i = 9;
formattedWrite(&put, "%s", 9);
assert(result == "9");
}
// https://issues.dlang.org/show_bug.cgi?id=20064
@safe unittest
{
assert(format( "%03,d", 1234) == "1,234");
assert(format( "%04,d", 1234) == "1,234");
assert(format( "%05,d", 1234) == "1,234");
assert(format( "%06,d", 1234) == "01,234");
assert(format( "%07,d", 1234) == "001,234");
assert(format( "%08,d", 1234) == "0,001,234");
assert(format( "%09,d", 1234) == "0,001,234");
assert(format("%010,d", 1234) == "00,001,234");
assert(format("%011,d", 1234) == "000,001,234");
assert(format("%012,d", 1234) == "0,000,001,234");
assert(format("%013,d", 1234) == "0,000,001,234");
assert(format("%014,d", 1234) == "00,000,001,234");
assert(format("%015,d", 1234) == "000,000,001,234");
assert(format("%016,d", 1234) == "0,000,000,001,234");
assert(format("%017,d", 1234) == "0,000,000,001,234");
assert(format( "%03,d", -1234) == "-1,234");
assert(format( "%04,d", -1234) == "-1,234");
assert(format( "%05,d", -1234) == "-1,234");
assert(format( "%06,d", -1234) == "-1,234");
assert(format( "%07,d", -1234) == "-01,234");
assert(format( "%08,d", -1234) == "-001,234");
assert(format( "%09,d", -1234) == "-0,001,234");
assert(format("%010,d", -1234) == "-0,001,234");
assert(format("%011,d", -1234) == "-00,001,234");
assert(format("%012,d", -1234) == "-000,001,234");
assert(format("%013,d", -1234) == "-0,000,001,234");
assert(format("%014,d", -1234) == "-0,000,001,234");
assert(format("%015,d", -1234) == "-00,000,001,234");
assert(format("%016,d", -1234) == "-000,000,001,234");
assert(format("%017,d", -1234) == "-0,000,000,001,234");
}
@safe pure unittest
{
string t1 = format("[%6s] [%-6s]", 123, 123);
assert(t1 == "[ 123] [123 ]");
string t2 = format("[%6s] [%-6s]", -123, -123);
assert(t2 == "[ -123] [-123 ]");
}
private enum ctfpMessage = "Cannot format floating point types at compile-time";
private enum RoundingMode { up, down, toZero, toNearestTiesToEven, toNearestTiesAwayFromZero }
/*
Floating-point values are formatted like $(REF printf, core, stdc, stdio)
*/
private void formatValueImpl(Writer, T, Char)(auto ref Writer w, T obj, scope const ref FormatSpec!Char f)
if (is(FloatingPointTypeOf!T) && !is(T == enum) && !hasToString!(T, Char))
{
import std.algorithm.comparison : min;
import std.algorithm.searching : find;
import std.string : indexOf, indexOfAny, indexOfNeither;
import std.math : isInfinity, isNaN, signbit;
import std.ascii : isUpper;
string nanInfStr(scope const ref FormatSpec!Char f, const bool nan,
const bool inf, const int sb, const bool up) @safe pure nothrow
{
return nan
? up
? sb ? "-NAN" : f.flPlus ? "+NAN" : (f.flSpace ? " NAN" : "NAN")
: sb ? "-nan" : f.flPlus ? "+nan" : (f.flSpace ? " nan" : "nan")
: inf
? up
? sb ? "-INF" : f.flPlus ? "+INF" : (f.flSpace ? " INF" : "INF")
: sb ? "-inf" : f.flPlus ? "+inf" : (f.flSpace ? " inf" : "inf")
: "";
}
FloatingPointTypeOf!T val = obj;
const char spec = f.spec;
if (spec == 'r')
{
// raw write, skip all else and write the thing
auto raw = (ref val)@trusted{
return (cast(const char*) &val)[0 .. val.sizeof];
}(val);
if (needToSwapEndianess(f))
{
foreach_reverse (c; raw)
put(w, c);
}
else
{
foreach (c; raw)
put(w, c);
}
return;
}
enforceFmt(find("fgFGaAeEs", spec).length,
"incompatible format character for floating point argument: %" ~ spec);
enforceFmt(!__ctfe, ctfpMessage);
FormatSpec!Char fs = f; // fs is copy for change its values.
const spec2 = spec == 's' ? 'g' : spec;
version (CRuntime_Microsoft)
{
// convert early to get "inf" in case of overflow
// windows handels inf and nan strange
// https://devblogs.microsoft.com/oldnewthing/20130228-01/?p=5103
immutable double tval = val;
}
else
{
alias tval = val;
}
const nan = isNaN(tval);
const inf = isInfinity(tval);
char[512] buf2 = void;
size_t len;
char[] buf;
if (fs.spec=='a' || fs.spec=='A' || fs.spec=='e' || fs.spec=='E')
{
static if (is(T == float) || is(T == double) || (is(T == real) && T.mant_dig == double.mant_dig))
{
import std.math;
auto mode = RoundingMode.toNearestTiesToEven;
// std.math's FloatingPointControl isn't available on all target platforms
static if (is(FloatingPointControl))
{
switch (FloatingPointControl.rounding)
{
case FloatingPointControl.roundUp:
mode = RoundingMode.up;
break;
case FloatingPointControl.roundDown:
mode = RoundingMode.down;
break;
case FloatingPointControl.roundToZero:
mode = RoundingMode.toZero;
break;
case FloatingPointControl.roundToNearest:
mode = RoundingMode.toNearestTiesToEven;
break;
default: assert(false);
}
}
buf = printFloat(buf2[], val, fs, mode);
len = buf.length;
}
else
goto useSnprintf;
}
else
{
useSnprintf:
if (nan || inf)
{
const sb = signbit(tval);
const up = isUpper(spec);
string ns = nanInfStr(f, nan, inf, sb, up);
FormatSpec!Char co;
co.spec = 's';
co.width = f.width;
co.flDash = f.flDash;
formatValue(w, ns, co);
return;
}
char[1 /*%*/ + 5 /*flags*/ + 3 /*width.prec*/ + 2 /*format*/
+ 1 /*\0*/] sprintfSpec = void;
sprintfSpec[0] = '%';
uint i = 1;
if (fs.flDash) sprintfSpec[i++] = '-';
if (fs.flPlus) sprintfSpec[i++] = '+';
if (fs.flZero) sprintfSpec[i++] = '0';
if (fs.flSpace) sprintfSpec[i++] = ' ';
if (fs.flHash) sprintfSpec[i++] = '#';
sprintfSpec[i .. i + 3] = "*.*";
i += 3;
if (is(immutable typeof(val) == immutable real)) sprintfSpec[i++] = 'L';
sprintfSpec[i++] = spec2;
sprintfSpec[i] = 0;
//printf("format: '%s'; geeba: %g\n", sprintfSpec.ptr, val);
//writefln("'%s'", sprintfSpec[0 .. i]);
immutable n = ()@trusted{
import core.stdc.stdio : snprintf;
return snprintf(buf2.ptr, buf2.length,
sprintfSpec.ptr,
fs.width,
// negative precision is same as no precision specified
fs.precision == fs.UNSPECIFIED ? -1 : fs.precision,
tval);
}();
enforceFmt(n >= 0,
"floating point formatting failure");
len = min(n, buf2.length-1);
buf = buf2;
}
if (fs.flSeparator && !inf && !nan)
{
ptrdiff_t indexOfRemovable()
{
if (len < 2)
return -1;
size_t start = (buf[0 .. 1].indexOfAny(" 0123456789") == -1) ? 1 : 0;
if (len < 2 + start)
return -1;
if ((buf[start] == ' ') || (buf[start] == '0' && buf[start + 1] != '.'))
return start;
return -1;
}
ptrdiff_t dot, firstDigit, ePos, dotIdx, firstLen;
size_t separatorScoreCnt;
while (true)
{
dot = buf[0 .. len].indexOf('.');
firstDigit = buf[0 .. len].indexOfAny("0123456789");
ePos = buf[0 .. len].indexOf('e');
dotIdx = dot == -1 ? ePos == -1 ? len : ePos : dot;
firstLen = dotIdx - firstDigit;
separatorScoreCnt = (firstLen > 0) ? (firstLen - 1) / fs.separators : 0;
ptrdiff_t removableIdx = (len + separatorScoreCnt > fs.width) ? indexOfRemovable() : -1;
if ((removableIdx != -1) &&
((firstLen - (buf[removableIdx] == '0' ? 2 : 1)) / fs.separators + len - 1 >= fs.width))
{
buf[removableIdx .. $ - 1] = buf.dup[removableIdx + 1 .. $];
len--;
}
else
break;
}
immutable afterDotIdx = (ePos != -1) ? ePos : len;
// plus, minus, prefix
if (firstDigit > 0)
{
put(w, buf[0 .. firstDigit]);
}
// digits until dot with separator
for (auto j = 0; j < firstLen; ++j)
{
if (j > 0 && (firstLen - j) % fs.separators == 0)
{
put(w, fs.separatorChar);
}
put(w, buf[j + firstDigit]);
}
// print dot for decimal numbers only or with '#' format specifier
if (dot != -1 || fs.flHash)
{
put(w, '.');
}
// digits after dot
for (auto j = dotIdx + 1; j < afterDotIdx; ++j)
{
put(w, buf[j]);
}
// rest
if (ePos != -1)
{
put(w, buf[afterDotIdx .. len]);
}
}
else
{
put(w, buf[0 .. len]);
}
}
@safe unittest
{
assert(format("%.1f", 1337.7) == "1337.7");
assert(format("%,3.2f", 1331.982) == "1,331.98");
assert(format("%,3.0f", 1303.1982) == "1,303");
assert(format("%#,3.4f", 1303.1982) == "1,303.1982");
assert(format("%#,3.0f", 1303.1982) == "1,303.");
}
@safe /*pure*/ unittest // formatting floating point values is now impure
{
import std.conv : to;
assert(collectExceptionMsg!FormatException(format("%d", 5.1)).back == 'd');
static foreach (T; AliasSeq!(float, double, real))
{
formatTest( to!( T)(5.5), "5.5" );
formatTest( to!( const T)(5.5), "5.5" );
formatTest( to!(immutable T)(5.5), "5.5" );
formatTest( T.nan, "nan" );
}
}
@system unittest
{
formatTest( 2.25, "2.25" );
class C1 { double val; alias val this; this(double v){ val = v; } }
class C2 { double val; alias val this; this(double v){ val = v; }
override string toString() const { return "C"; } }
formatTest( new C1(2.25), "2.25" );
formatTest( new C2(2.25), "C" );
struct S1 { double val; alias val this; }
struct S2 { double val; alias val this;
string toString() const { return "S"; } }
formatTest( S1(2.25), "2.25" );
formatTest( S2(2.25), "S" );
}
// https://issues.dlang.org/show_bug.cgi?id=19939
@safe unittest
{
assert(format("^%13,3.2f$", 1.00) == "^ 1.00$");
assert(format("^%13,3.2f$", 10.00) == "^ 10.00$");
assert(format("^%13,3.2f$", 100.00) == "^ 100.00$");
assert(format("^%13,3.2f$", 1_000.00) == "^ 1,000.00$");
assert(format("^%13,3.2f$", 10_000.00) == "^ 10,000.00$");
assert(format("^%13,3.2f$", 100_000.00) == "^ 100,000.00$");
assert(format("^%13,3.2f$", 1_000_000.00) == "^ 1,000,000.00$");
assert(format("^%13,3.2f$", 10_000_000.00) == "^10,000,000.00$");
}
// https://issues.dlang.org/show_bug.cgi?id=20069
@safe unittest
{
assert(format("%012,f", -1234.0) == "-1,234.000000");
assert(format("%013,f", -1234.0) == "-1,234.000000");
assert(format("%014,f", -1234.0) == "-01,234.000000");
assert(format("%011,f", 1234.0) == "1,234.000000");
assert(format("%012,f", 1234.0) == "1,234.000000");
assert(format("%013,f", 1234.0) == "01,234.000000");
assert(format("%014,f", 1234.0) == "001,234.000000");
assert(format("%015,f", 1234.0) == "0,001,234.000000");
assert(format("%016,f", 1234.0) == "0,001,234.000000");
assert(format( "%08,.2f", -1234.0) == "-1,234.00");
assert(format( "%09,.2f", -1234.0) == "-1,234.00");
assert(format("%010,.2f", -1234.0) == "-01,234.00");
assert(format("%011,.2f", -1234.0) == "-001,234.00");
assert(format("%012,.2f", -1234.0) == "-0,001,234.00");
assert(format("%013,.2f", -1234.0) == "-0,001,234.00");
assert(format("%014,.2f", -1234.0) == "-00,001,234.00");
assert(format( "%08,.2f", 1234.0) == "1,234.00");
assert(format( "%09,.2f", 1234.0) == "01,234.00");
assert(format("%010,.2f", 1234.0) == "001,234.00");
assert(format("%011,.2f", 1234.0) == "0,001,234.00");
assert(format("%012,.2f", 1234.0) == "0,001,234.00");
assert(format("%013,.2f", 1234.0) == "00,001,234.00");
assert(format("%014,.2f", 1234.0) == "000,001,234.00");
assert(format("%015,.2f", 1234.0) == "0,000,001,234.00");
assert(format("%016,.2f", 1234.0) == "0,000,001,234.00");
}
@safe unittest
{
string t1 = format("[%6s] [%-6s]", 12.3, 12.3);
assert(t1 == "[ 12.3] [12.3 ]");
string t2 = format("[%6s] [%-6s]", -12.3, -12.3);
assert(t2 == "[ -12.3] [-12.3 ]");
}
// https://issues.dlang.org/show_bug.cgi?id=20396
@safe unittest
{
import std.math : nextUp;
assert(format!"%a"(nextUp(0.0f)) == "0x0.000002p-126");
assert(format!"%a"(nextUp(0.0)) == "0x0.0000000000001p-1022");
}
// https://issues.dlang.org/show_bug.cgi?id=20371
@safe unittest
{
assert(format!"%.1000a"(1.0) ==
"0x1.000000000000000000000000000000000000000000000000000000000000000000000000000"
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
~"0000000000000000000000000000000000000000000000000000000000000000000p+0");
}
/*
Formatting a `creal` is deprecated but still kept around for a while.
*/
deprecated("Use of complex types is deprecated. Use std.complex")
private void formatValueImpl(Writer, T, Char)(auto ref Writer w, T obj, scope const ref FormatSpec!Char f)
if (is(immutable T : immutable creal) && !is(T == enum) && !hasToString!(T, Char))
{
immutable creal val = obj;
formatValueImpl(w, val.re, f);
if (val.im >= 0)
{
put(w, '+');
}
formatValueImpl(w, val.im, f);
put(w, 'i');
}
version (TestComplex)
deprecated
@safe /*pure*/ unittest // formatting floating point values is now impure
{
import std.conv : to;
static foreach (T; AliasSeq!(cfloat, cdouble, creal))
{
formatTest( to!( T)(1 + 1i), "1+1i" );
formatTest( to!( const T)(1 + 1i), "1+1i" );
formatTest( to!(immutable T)(1 + 1i), "1+1i" );
}
static foreach (T; AliasSeq!(cfloat, cdouble, creal))
{
formatTest( to!( T)(0 - 3i), "0-3i" );
formatTest( to!( const T)(0 - 3i), "0-3i" );
formatTest( to!(immutable T)(0 - 3i), "0-3i" );
}
}
version (TestComplex)
deprecated
@system unittest
{
formatTest( 3+2.25i, "3+2.25i" );
class C1 { cdouble val; alias val this; this(cdouble v){ val = v; } }
class C2 { cdouble val; alias val this; this(cdouble v){ val = v; }
override string toString() const { return "C"; } }
formatTest( new C1(3+2.25i), "3+2.25i" );
formatTest( new C2(3+2.25i), "C" );
struct S1 { cdouble val; alias val this; }
struct S2 { cdouble val; alias val this;
string toString() const { return "S"; } }
formatTest( S1(3+2.25i), "3+2.25i" );
formatTest( S2(3+2.25i), "S" );
}
/*
Formatting an `ireal` is deprecated but still kept around for a while.
*/
deprecated("Use of imaginary types is deprecated. Use std.complex")
private void formatValueImpl(Writer, T, Char)(auto ref Writer w, T obj, scope const ref FormatSpec!Char f)
if (is(immutable T : immutable ireal) && !is(T == enum) && !hasToString!(T, Char))
{
immutable ireal val = obj;
formatValueImpl(w, val.im, f);
put(w, 'i');
}
version (TestComplex)
deprecated
@safe /*pure*/ unittest // formatting floating point values is now impure
{
import std.conv : to;
static foreach (T; AliasSeq!(ifloat, idouble, ireal))
{
formatTest( to!( T)(1i), "1i" );
formatTest( to!( const T)(1i), "1i" );
formatTest( to!(immutable T)(1i), "1i" );
}
}
version (TestComplex)
deprecated
@system unittest
{
formatTest( 2.25i, "2.25i" );
class C1 { idouble val; alias val this; this(idouble v){ val = v; } }
class C2 { idouble val; alias val this; this(idouble v){ val = v; }
override string toString() const { return "C"; } }
formatTest( new C1(2.25i), "2.25i" );
formatTest( new C2(2.25i), "C" );
struct S1 { idouble val; alias val this; }
struct S2 { idouble val; alias val this;
string toString() const { return "S"; } }
formatTest( S1(2.25i), "2.25i" );
formatTest( S2(2.25i), "S" );
}
/*
Individual characters are formatted as Unicode characters with `%s`
and as integers with integral-specific format specs
*/
private void formatValueImpl(Writer, T, Char)(auto ref Writer w, T obj, scope const ref FormatSpec!Char f)
if (is(CharTypeOf!T) && !is(T == enum) && !hasToString!(T, Char))
{
CharTypeOf!T[1] val = obj;
if (f.spec == 's' || f.spec == 'c')
writeAligned(w, val[], f);
else
{
alias U = AliasSeq!(ubyte, ushort, uint)[CharTypeOf!T.sizeof/2];
formatValueImpl(w, cast(U) val[0], f);
}
}
@safe pure unittest
{
assertCTFEable!(
{
formatTest( 'c', "c" );
});
}
@system unittest
{
class C1 { char val; alias val this; this(char v){ val = v; } }
class C2 { char val; alias val this; this(char v){ val = v; }
override string toString() const { return "C"; } }
formatTest( new C1('c'), "c" );
formatTest( new C2('c'), "C" );
struct S1 { char val; alias val this; }
struct S2 { char val; alias val this;
string toString() const { return "S"; } }
formatTest( S1('c'), "c" );
formatTest( S2('c'), "S" );
}
@safe unittest
{
//Little Endian
formatTest( "%-r", cast( char)'c', ['c' ] );
formatTest( "%-r", cast(wchar)'c', ['c', 0 ] );
formatTest( "%-r", cast(dchar)'c', ['c', 0, 0, 0] );
formatTest( "%-r", '本', ['\x2c', '\x67'] );
//Big Endian
formatTest( "%+r", cast( char)'c', [ 'c'] );
formatTest( "%+r", cast(wchar)'c', [0, 'c'] );
formatTest( "%+r", cast(dchar)'c', [0, 0, 0, 'c'] );
formatTest( "%+r", '本', ['\x67', '\x2c'] );
}
@safe pure unittest
{
string t1 = format("[%6s] [%-6s]", 'A', 'A');
assert(t1 == "[ A] [A ]");
string t2 = format("[%6s] [%-6s]", '本', '本');
assert(t2 == "[ 本] [本 ]");
}
/*
Strings are formatted like $(REF printf, core, stdc, stdio)
*/
private void formatValueImpl(Writer, T, Char)(auto ref Writer w, scope T obj, scope const ref FormatSpec!Char f)
if (is(StringTypeOf!T) && !is(StaticArrayTypeOf!T) && !is(T == enum) && !hasToString!(T, Char))
{
Unqual!(StringTypeOf!T) val = obj; // for `alias this`, see bug5371
formatRange(w, val, f);
}
@safe unittest
{
formatTest( "abc", "abc" );
}
@system unittest
{
// Test for bug 5371 for classes
class C1 { const string var; alias var this; this(string s){ var = s; } }
class C2 { string var; alias var this; this(string s){ var = s; } }
formatTest( new C1("c1"), "c1" );
formatTest( new C2("c2"), "c2" );
// Test for bug 5371 for structs
struct S1 { const string var; alias var this; }
struct S2 { string var; alias var this; }
formatTest( S1("s1"), "s1" );
formatTest( S2("s2"), "s2" );
}
@system unittest
{
class C3 { string val; alias val this; this(string s){ val = s; }
override string toString() const { return "C"; } }
formatTest( new C3("c3"), "C" );
struct S3 { string val; alias val this;
string toString() const { return "S"; } }
formatTest( S3("s3"), "S" );
}
@safe pure unittest
{
//Little Endian
formatTest( "%-r", "ab"c, ['a' , 'b' ] );
formatTest( "%-r", "ab"w, ['a', 0 , 'b', 0 ] );
formatTest( "%-r", "ab"d, ['a', 0, 0, 0, 'b', 0, 0, 0] );
formatTest( "%-r", "日本語"c, ['\xe6', '\x97', '\xa5', '\xe6', '\x9c', '\xac', '\xe8', '\xaa', '\x9e'] );
formatTest( "%-r", "日本語"w, ['\xe5', '\x65', '\x2c', '\x67', '\x9e', '\x8a']);
formatTest( "%-r", "日本語"d, ['\xe5', '\x65', '\x00', '\x00', '\x2c', '\x67',
'\x00', '\x00', '\x9e', '\x8a', '\x00', '\x00'] );
//Big Endian
formatTest( "%+r", "ab"c, [ 'a', 'b'] );
formatTest( "%+r", "ab"w, [ 0, 'a', 0, 'b'] );
formatTest( "%+r", "ab"d, [0, 0, 0, 'a', 0, 0, 0, 'b'] );
formatTest( "%+r", "日本語"c, ['\xe6', '\x97', '\xa5', '\xe6', '\x9c', '\xac', '\xe8', '\xaa', '\x9e'] );
formatTest( "%+r", "日本語"w, ['\x65', '\xe5', '\x67', '\x2c', '\x8a', '\x9e'] );
formatTest( "%+r", "日本語"d, ['\x00', '\x00', '\x65', '\xe5', '\x00', '\x00',
'\x67', '\x2c', '\x00', '\x00', '\x8a', '\x9e'] );
}
@safe pure unittest
{
string t1 = format("[%6s] [%-6s]", "AB", "AB");
assert(t1 == "[ AB] [AB ]");
string t2 = format("[%6s] [%-6s]", "本Ä", "本Ä");
assert(t2 == "[ 本Ä] [本Ä ]");
}
/*
Static-size arrays are formatted as dynamic arrays.
*/
private void formatValueImpl(Writer, T, Char)(auto ref Writer w, auto ref T obj, scope const ref FormatSpec!Char f)
if (is(StaticArrayTypeOf!T) && !is(T == enum) && !hasToString!(T, Char))
{
formatValueImpl(w, obj[], f);
}
// Test for https://issues.dlang.org/show_bug.cgi?id=8310
@safe unittest
{
import std.array : appender;
FormatSpec!char f;
auto w = appender!string();
char[2] two = ['a', 'b'];
formatValue(w, two, f);
char[2] getTwo(){ return two; }
formatValue(w, getTwo(), f);
}
/*
Dynamic arrays are formatted as input ranges.
*/
private void formatValueImpl(Writer, T, Char)(auto ref Writer w, T obj, scope const ref FormatSpec!Char f)
if (is(DynamicArrayTypeOf!T) && !is(StringTypeOf!T) && !is(T == enum) && !hasToString!(T, Char))
{
static if (is(const(ArrayTypeOf!T) == const(void[])))
{
formatValueImpl(w, cast(const ubyte[]) obj, f);
}
else static if (!isInputRange!T)
{
alias U = Unqual!(ArrayTypeOf!T);
static assert(isInputRange!U, U.stringof ~ " must be an InputRange");
U val = obj;
formatValueImpl(w, val, f);
}
else
{
formatRange(w, obj, f);
}
}
// alias this, input range I/F, and toString()
@system unittest
{
struct S(int flags)
{
int[] arr;
static if (flags & 1)
alias arr this;
static if (flags & 2)
{
@property bool empty() const { return arr.length == 0; }
@property int front() const { return arr[0] * 2; }
void popFront() { arr = arr[1..$]; }
}
static if (flags & 4)
string toString() const { return "S"; }
}
formatTest(S!0b000([0, 1, 2]), "S!0([0, 1, 2])");
formatTest(S!0b001([0, 1, 2]), "[0, 1, 2]"); // Test for bug 7628
formatTest(S!0b010([0, 1, 2]), "[0, 2, 4]");
formatTest(S!0b011([0, 1, 2]), "[0, 2, 4]");
formatTest(S!0b100([0, 1, 2]), "S");
formatTest(S!0b101([0, 1, 2]), "S"); // Test for bug 7628
formatTest(S!0b110([0, 1, 2]), "S");
formatTest(S!0b111([0, 1, 2]), "S");
class C(uint flags)
{
int[] arr;
static if (flags & 1)
alias arr this;
this(int[] a) { arr = a; }
static if (flags & 2)
{
@property bool empty() const { return arr.length == 0; }
@property int front() const { return arr[0] * 2; }
void popFront() { arr = arr[1..$]; }
}
static if (flags & 4)
override string toString() const { return "C"; }
}
formatTest(new C!0b000([0, 1, 2]), (new C!0b000([])).toString());
formatTest(new C!0b001([0, 1, 2]), "[0, 1, 2]"); // Test for bug 7628
formatTest(new C!0b010([0, 1, 2]), "[0, 2, 4]");
formatTest(new C!0b011([0, 1, 2]), "[0, 2, 4]");
formatTest(new C!0b100([0, 1, 2]), "C");
formatTest(new C!0b101([0, 1, 2]), "C"); // Test for bug 7628
formatTest(new C!0b110([0, 1, 2]), "C");
formatTest(new C!0b111([0, 1, 2]), "C");
}
@system unittest
{
// void[]
void[] val0;
formatTest( val0, "[]" );
void[] val = cast(void[]) cast(ubyte[])[1, 2, 3];
formatTest( val, "[1, 2, 3]" );
void[0] sval0 = [];
formatTest( sval0, "[]");
void[3] sval = cast(void[3]) cast(ubyte[3])[1, 2, 3];
formatTest( sval, "[1, 2, 3]" );
}
@safe unittest
{
// const(T[]) -> const(T)[]
const short[] a = [1, 2, 3];
formatTest( a, "[1, 2, 3]" );
struct S { const(int[]) arr; alias arr this; }
auto s = S([1,2,3]);
formatTest( s, "[1, 2, 3]" );
}
// https://issues.dlang.org/show_bug.cgi?id=6640
@safe unittest
{
struct Range
{
@safe:
string value;
@property bool empty() const { return !value.length; }
@property dchar front() const { return value.front; }
void popFront() { value.popFront(); }
@property size_t length() const { return value.length; }
}
immutable table =
[
["[%s]", "[string]"],
["[%10s]", "[ string]"],
["[%-10s]", "[string ]"],
["[%(%02x %)]", "[73 74 72 69 6e 67]"],
["[%(%c %)]", "[s t r i n g]"],
];
foreach (e; table)
{
formatTest(e[0], "string", e[1]);
formatTest(e[0], Range("string"), e[1]);
}
}
@system unittest
{
// string literal from valid UTF sequence is encoding free.
static foreach (StrType; AliasSeq!(string, wstring, dstring))
{
// Valid and printable (ASCII)
formatTest( [cast(StrType)"hello"],
`["hello"]` );
// 1 character escape sequences (' is not escaped in strings)
formatTest( [cast(StrType)"\"'\0\\\a\b\f\n\r\t\v"],
`["\"'\0\\\a\b\f\n\r\t\v"]` );
// 1 character optional escape sequences
formatTest( [cast(StrType)"\'\?"],
`["'?"]` );
// Valid and non-printable code point (<= U+FF)
formatTest( [cast(StrType)"\x10\x1F\x20test"],
`["\x10\x1F test"]` );
// Valid and non-printable code point (<= U+FFFF)
formatTest( [cast(StrType)"\u200B..\u200F"],
`["\u200B..\u200F"]` );
// Valid and non-printable code point (<= U+10FFFF)
formatTest( [cast(StrType)"\U000E0020..\U000E007F"],
`["\U000E0020..\U000E007F"]` );
}
// invalid UTF sequence needs hex-string literal postfix (c/w/d)
{
// U+FFFF with UTF-8 (Invalid code point for interchange)
formatTest( [cast(string)[0xEF, 0xBF, 0xBF]],
`[x"EF BF BF"c]` );
// U+FFFF with UTF-16 (Invalid code point for interchange)
formatTest( [cast(wstring)[0xFFFF]],
`[x"FFFF"w]` );
// U+FFFF with UTF-32 (Invalid code point for interchange)
formatTest( [cast(dstring)[0xFFFF]],
`[x"FFFF"d]` );
}
}
@safe unittest
{
// nested range formatting with array of string
formatTest( "%({%(%02x %)}%| %)", ["test", "msg"],
`{74 65 73 74} {6d 73 67}` );
}
@safe unittest
{
// stop auto escaping inside range formatting
auto arr = ["hello", "world"];
formatTest( "%(%s, %)", arr, `"hello", "world"` );
formatTest( "%-(%s, %)", arr, `hello, world` );
auto aa1 = [1:"hello", 2:"world"];
formatTest( "%(%s:%s, %)", aa1, [`1:"hello", 2:"world"`, `2:"world", 1:"hello"`] );
formatTest( "%-(%s:%s, %)", aa1, [`1:hello, 2:world`, `2:world, 1:hello`] );
auto aa2 = [1:["ab", "cd"], 2:["ef", "gh"]];
formatTest( "%-(%s:%s, %)", aa2, [`1:["ab", "cd"], 2:["ef", "gh"]`, `2:["ef", "gh"], 1:["ab", "cd"]`] );
formatTest( "%-(%s:%(%s%), %)", aa2, [`1:"ab""cd", 2:"ef""gh"`, `2:"ef""gh", 1:"ab""cd"`] );
formatTest( "%-(%s:%-(%s%)%|, %)", aa2, [`1:abcd, 2:efgh`, `2:efgh, 1:abcd`] );
}
// input range formatting
private void formatRange(Writer, T, Char)(ref Writer w, ref T val, scope const ref FormatSpec!Char f)
if (isInputRange!T)
{
// in this mode, we just want to do a representative print to discover if the format spec is valid
enum formatTestMode = is(Writer == NoOpSink);
import std.conv : text;
// Formatting character ranges like string
if (f.spec == 's')
{
alias E = ElementType!T;
static if (!is(E == enum) && is(CharTypeOf!E))
{
static if (is(StringTypeOf!T))
writeAligned(w, val[0 .. f.precision < $ ? f.precision : $], f);
else
{
if (!f.flDash)
{
static if (hasLength!T)
{
// right align
auto len = val.length;
}
else static if (isForwardRange!T && !isInfinite!T)
{
auto len = walkLength(val.save);
}
else
{
enforceFmt(f.width == 0, "Cannot right-align a range without length");
size_t len = 0;
}
if (f.precision != f.UNSPECIFIED && len > f.precision)
len = f.precision;
if (f.width > len)
foreach (i ; 0 .. f.width - len)
put(w, ' ');
if (f.precision == f.UNSPECIFIED)
put(w, val);
else
{
size_t printed = 0;
for (; !val.empty && printed < f.precision; val.popFront(), ++printed)
put(w, val.front);
}
}
else
{
size_t printed = void;
// left align
if (f.precision == f.UNSPECIFIED)
{
static if (hasLength!T)
{
printed = val.length;
put(w, val);
}
else
{
printed = 0;
for (; !val.empty; val.popFront(), ++printed)
{
put(w, val.front);
static if (formatTestMode) break; // one is enough to test
}
}
}
else
{
printed = 0;
for (; !val.empty && printed < f.precision; val.popFront(), ++printed)
put(w, val.front);
}
if (f.width > printed)
foreach (i ; 0 .. f.width - printed)
put(w, ' ');
}
}
}
else
{
put(w, f.seqBefore);
if (!val.empty)
{
formatElement(w, val.front, f);
val.popFront();
for (size_t i; !val.empty; val.popFront(), ++i)
{
put(w, f.seqSeparator);
formatElement(w, val.front, f);
static if (formatTestMode) break; // one is enough to test
}
}
static if (!isInfinite!T) put(w, f.seqAfter);
}
}
else if (f.spec == 'r')
{
static if (is(DynamicArrayTypeOf!T))
{
alias ARR = DynamicArrayTypeOf!T;
scope a = cast(ARR) val;
foreach (e ; a)
{
formatValue(w, e, f);
static if (formatTestMode) break; // one is enough to test
}
}
else
{
for (size_t i; !val.empty; val.popFront(), ++i)
{
formatValue(w, val.front, f);
static if (formatTestMode) break; // one is enough to test
}
}
}
else if (f.spec == '(')
{
if (val.empty)
return;
// Nested specifier is to be used
for (;;)
{
auto fmt = FormatSpec!Char(f.nested);
w: while (true)
{
immutable r = fmt.writeUpToNextSpec(w);
// There was no format specifier, so break
if (!r)
break;
if (f.flDash)
formatValue(w, val.front, fmt);
else
formatElement(w, val.front, fmt);
// Check if there will be a format specifier farther on in the
// string. If so, continue the loop, otherwise break. This
// prevents extra copies of the `sep` from showing up.
foreach (size_t i; 0 .. fmt.trailing.length)
if (fmt.trailing[i] == '%')
continue w;
break w;
}
static if (formatTestMode)
{
break; // one is enough to test
}
else
{
if (f.sep !is null)
{
put(w, fmt.trailing);
val.popFront();
if (val.empty)
break;
put(w, f.sep);
}
else
{
val.popFront();
if (val.empty)
break;
put(w, fmt.trailing);
}
}
}
}
else
throw new FormatException(text("Incorrect format specifier for range: %", f.spec));
}
// https://issues.dlang.org/show_bug.cgi?id=18778
@safe pure unittest
{
assert(format("%-(%1$s - %1$s, %)", ["A", "B", "C"]) == "A - A, B - B, C - C");
}
@safe pure unittest
{
assert(collectExceptionMsg(format("%d", "hi")).back == 'd');
}
// character formatting with ecaping
private void formatChar(Writer)(ref Writer w, in dchar c, in char quote)
{
import std.uni : isGraphical;
string fmt;
if (isGraphical(c))
{
if (c == quote || c == '\\')
put(w, '\\');
put(w, c);
return;
}
else if (c <= 0xFF)
{
if (c < 0x20)
{
foreach (i, k; "\n\r\t\a\b\f\v\0")
{
if (c == k)
{
put(w, '\\');
put(w, "nrtabfv0"[i]);
return;
}
}
}
fmt = "\\x%02X";
}
else if (c <= 0xFFFF)
fmt = "\\u%04X";
else
fmt = "\\U%08X";
formattedWrite(w, fmt, cast(uint) c);
}
// undocumented because of deprecation
// string elements are formatted like UTF-8 string literals.
void formatElement(Writer, T, Char)(auto ref Writer w, T val, scope const ref FormatSpec!Char f)
if (is(StringTypeOf!T) && !is(T == enum))
{
import std.array : appender;
import std.utf : decode, UTFException;
StringTypeOf!T str = val; // https://issues.dlang.org/show_bug.cgi?id=8015
if (f.spec == 's')
{
try
{
// ignore other specifications and quote
for (size_t i = 0; i < str.length; )
{
auto c = decode(str, i);
// \uFFFE and \uFFFF are considered valid by isValidDchar,
// so need checking for interchange.
if (c == 0xFFFE || c == 0xFFFF)
goto LinvalidSeq;
}
put(w, '\"');
for (size_t i = 0; i < str.length; )
{
auto c = decode(str, i);
formatChar(w, c, '"');
}
put(w, '\"');
return;
}
catch (UTFException)
{
}
// If val contains invalid UTF sequence, formatted like HexString literal
LinvalidSeq:
static if (is(typeof(str[0]) : const(char)))
{
enum postfix = 'c';
alias IntArr = const(ubyte)[];
}
else static if (is(typeof(str[0]) : const(wchar)))
{
enum postfix = 'w';
alias IntArr = const(ushort)[];
}
else static if (is(typeof(str[0]) : const(dchar)))
{
enum postfix = 'd';
alias IntArr = const(uint)[];
}
formattedWrite(w, "x\"%(%02X %)\"%s", cast(IntArr) str, postfix);
}
else
formatValue(w, str, f);
}
@safe pure unittest
{
import std.array : appender;
auto w = appender!string();
auto spec = singleSpec("%s");
formatElement(w, "Hello World", spec);
assert(w.data == "\"Hello World\"");
}
@safe unittest
{
// Test for bug 8015
import std.typecons;
struct MyStruct {
string str;
@property string toStr() {
return str;
}
alias toStr this;
}
Tuple!(MyStruct) t;
}
// undocumented because of deprecation
// Character elements are formatted like UTF-8 character literals.
void formatElement(Writer, T, Char)(auto ref Writer w, T val, scope const ref FormatSpec!Char f)
if (is(CharTypeOf!T) && !is(T == enum))
{
if (f.spec == 's')
{
put(w, '\'');
formatChar(w, val, '\'');
put(w, '\'');
}
else
formatValue(w, val, f);
}
///
@safe unittest
{
import std.array : appender;
auto w = appender!string();
auto spec = singleSpec("%s");
formatElement(w, "H", spec);
assert(w.data == "\"H\"", w.data);
}
// undocumented
// Maybe T is noncopyable struct, so receive it by 'auto ref'.
void formatElement(Writer, T, Char)(auto ref Writer w, auto ref T val, scope const ref FormatSpec!Char f)
if (!is(StringTypeOf!T) && !is(CharTypeOf!T) || is(T == enum))
{
formatValue(w, val, f);
}
/*
Associative arrays are formatted by using `':'` and $(D ", ") as
separators, and enclosed by `'['` and `']'`.
*/
private void formatValueImpl(Writer, T, Char)(auto ref Writer w, T obj, scope const ref FormatSpec!Char f)
if (is(AssocArrayTypeOf!T) && !is(T == enum) && !hasToString!(T, Char))
{
AssocArrayTypeOf!T val = obj;
const spec = f.spec;
enforceFmt(spec == 's' || spec == '(',
"incompatible format character for associative array argument: %" ~ spec);
enum const(Char)[] defSpec = "%s" ~ f.keySeparator ~ "%s" ~ f.seqSeparator;
auto fmtSpec = spec == '(' ? f.nested : defSpec;
size_t i = 0;
immutable end = val.length;
if (spec == 's')
put(w, f.seqBefore);
foreach (k, ref v; val)
{
auto fmt = FormatSpec!Char(fmtSpec);
fmt.writeUpToNextSpec(w);
if (f.flDash)
{
formatValue(w, k, fmt);
fmt.writeUpToNextSpec(w);
formatValue(w, v, fmt);
}
else
{
formatElement(w, k, fmt);
fmt.writeUpToNextSpec(w);
formatElement(w, v, fmt);
}
if (f.sep !is null)
{
fmt.writeUpToNextSpec(w);
if (++i != end)
put(w, f.sep);
}
else
{
if (++i != end)
fmt.writeUpToNextSpec(w);
}
}
if (spec == 's')
put(w, f.seqAfter);
}
@safe unittest
{
assert(collectExceptionMsg!FormatException(format("%d", [0:1])).back == 'd');
int[string] aa0;
formatTest( aa0, `[]` );
// elements escaping
formatTest( ["aaa":1, "bbb":2],
[`["aaa":1, "bbb":2]`, `["bbb":2, "aaa":1]`] );
formatTest( ['c':"str"],
`['c':"str"]` );
formatTest( ['"':"\"", '\'':"'"],
[`['"':"\"", '\'':"'"]`, `['\'':"'", '"':"\""]`] );
// range formatting for AA
auto aa3 = [1:"hello", 2:"world"];
// escape
formatTest( "{%(%s:%s $ %)}", aa3,
[`{1:"hello" $ 2:"world"}`, `{2:"world" $ 1:"hello"}`]);
// use range formatting for key and value, and use %|
formatTest( "{%([%04d->%(%c.%)]%| $ %)}", aa3,
[`{[0001->h.e.l.l.o] $ [0002->w.o.r.l.d]}`, `{[0002->w.o.r.l.d] $ [0001->h.e.l.l.o]}`] );
// https://issues.dlang.org/show_bug.cgi?id=12135
formatTest("%(%s:<%s>%|,%)", [1:2], "1:<2>");
formatTest("%(%s:<%s>%|%)" , [1:2], "1:<2>");
}
@system unittest
{
class C1 { int[char] val; alias val this; this(int[char] v){ val = v; } }
class C2 { int[char] val; alias val this; this(int[char] v){ val = v; }
override string toString() const { return "C"; } }
formatTest( new C1(['c':1, 'd':2]), [`['c':1, 'd':2]`, `['d':2, 'c':1]`] );
formatTest( new C2(['c':1, 'd':2]), "C" );
struct S1 { int[char] val; alias val this; }
struct S2 { int[char] val; alias val this;
string toString() const { return "S"; } }
formatTest( S1(['c':1, 'd':2]), [`['c':1, 'd':2]`, `['d':2, 'c':1]`] );
formatTest( S2(['c':1, 'd':2]), "S" );
}
// https://issues.dlang.org/show_bug.cgi?id=8921
@safe unittest
{
enum E : char { A = 'a', B = 'b', C = 'c' }
E[3] e = [E.A, E.B, E.C];
formatTest(e, "[A, B, C]");
E[] e2 = [E.A, E.B, E.C];
formatTest(e2, "[A, B, C]");
}
private enum HasToStringResult
{
none,
hasSomeToString,
constCharSink,
constCharSinkFormatString,
constCharSinkFormatSpec,
customPutWriter,
customPutWriterFormatSpec,
}
private template hasToString(T, Char)
{
static if (isPointer!T)
{
// X* does not have toString, even if X is aggregate type has toString.
enum hasToString = HasToStringResult.none;
}
else static if (is(typeof(
{T val = void;
const FormatSpec!Char f;
static struct S {void put(scope Char s){}}
S s;
val.toString(s, f);
// force toString to take parameters by ref
static assert(!__traits(compiles, val.toString(s, FormatSpec!Char())));
static assert(!__traits(compiles, val.toString(S(), f)));}
)))
{
enum hasToString = HasToStringResult.customPutWriterFormatSpec;
}
else static if (is(typeof(
{T val = void;
static struct S {void put(scope Char s){}}
S s;
val.toString(s);
// force toString to take parameters by ref
static assert(!__traits(compiles, val.toString(S())));}
)))
{
enum hasToString = HasToStringResult.customPutWriter;
}
else static if (is(typeof({ T val = void; FormatSpec!Char f; val.toString((scope const(char)[] s){}, f); })))
{
enum hasToString = HasToStringResult.constCharSinkFormatSpec;
}
else static if (is(typeof({ T val = void; val.toString((scope const(char)[] s){}, "%s"); })))
{
enum hasToString = HasToStringResult.constCharSinkFormatString;
}
else static if (is(typeof({ T val = void; val.toString((scope const(char)[] s){}); })))
{
enum hasToString = HasToStringResult.constCharSink;
}
else static if (is(typeof({ T val = void; return val.toString(); }()) S) && isSomeString!S)
{
enum hasToString = HasToStringResult.hasSomeToString;
}
else
{
enum hasToString = HasToStringResult.none;
}
}
@safe unittest
{
static struct A
{
void toString(Writer)(ref Writer w)
if (isOutputRange!(Writer, string))
{}
}
static struct B
{
void toString(scope void delegate(scope const(char)[]) sink, scope FormatSpec!char fmt) {}
}
static struct C
{
void toString(scope void delegate(scope const(char)[]) sink, string fmt) {}
}
static struct D
{
void toString(scope void delegate(scope const(char)[]) sink) {}
}
static struct E
{
string toString() {return "";}
}
static struct F
{
void toString(Writer)(ref Writer w, scope const ref FormatSpec!char fmt)
if (isOutputRange!(Writer, string))
{}
}
static struct G
{
string toString() {return "";}
void toString(Writer)(ref Writer w) if (isOutputRange!(Writer, string)) {}
}
static struct H
{
string toString() {return "";}
void toString(Writer)(ref Writer w, scope const ref FormatSpec!char fmt)
if (isOutputRange!(Writer, string))
{}
}
static struct I
{
void toString(Writer)(ref Writer w) if (isOutputRange!(Writer, string)) {}
void toString(Writer)(ref Writer w, scope const ref FormatSpec!char fmt)
if (isOutputRange!(Writer, string))
{}
}
static struct J
{
string toString() {return "";}
void toString(Writer)(ref Writer w, scope ref FormatSpec!char fmt)
if (isOutputRange!(Writer, string))
{}
}
static struct K
{
void toString(Writer)(Writer w, scope const ref FormatSpec!char fmt)
if (isOutputRange!(Writer, string))
{}
}
static struct L
{
void toString(Writer)(ref Writer w, scope const FormatSpec!char fmt)
if (isOutputRange!(Writer, string))
{}
}
with(HasToStringResult)
{
static assert(hasToString!(A, char) == customPutWriter);
static assert(hasToString!(B, char) == constCharSinkFormatSpec);
static assert(hasToString!(C, char) == constCharSinkFormatString);
static assert(hasToString!(D, char) == constCharSink);
static assert(hasToString!(E, char) == hasSomeToString);
static assert(hasToString!(F, char) == customPutWriterFormatSpec);
static assert(hasToString!(G, char) == customPutWriter);
static assert(hasToString!(H, char) == customPutWriterFormatSpec);
static assert(hasToString!(I, char) == customPutWriterFormatSpec);
static assert(hasToString!(J, char) == hasSomeToString);
static assert(hasToString!(K, char) == constCharSinkFormatSpec);
static assert(hasToString!(L, char) == none);
}
}
// Like NullSink, but toString() isn't even called at all. Used to test the format string.
private struct NoOpSink
{
void put(E)(scope const E) pure @safe @nogc nothrow {}
}
// object formatting with toString
private void formatObject(Writer, T, Char)(ref Writer w, ref T val, scope const ref FormatSpec!Char f)
if (hasToString!(T, Char))
{
enum overload = hasToString!(T, Char);
enum noop = is(Writer == NoOpSink);
static if (overload == HasToStringResult.customPutWriterFormatSpec)
{
static if (!noop) val.toString(w, f);
}
else static if (overload == HasToStringResult.customPutWriter)
{
static if (!noop) val.toString(w);
}
else static if (overload == HasToStringResult.constCharSinkFormatSpec)
{
static if (!noop) val.toString((scope const(char)[] s) { put(w, s); }, f);
}
else static if (overload == HasToStringResult.constCharSinkFormatString)
{
static if (!noop) val.toString((scope const(char)[] s) { put(w, s); }, f.getCurFmtStr());
}
else static if (overload == HasToStringResult.constCharSink)
{
static if (!noop) val.toString((scope const(char)[] s) { put(w, s); });
}
else static if (overload == HasToStringResult.hasSomeToString)
{
static if (!noop) put(w, val.toString());
}
else
{
static assert(0, "No way found to format " ~ T.stringof ~ " as string");
}
}
void enforceValidFormatSpec(T, Char)(scope const ref FormatSpec!Char f)
{
enum overload = hasToString!(T, Char);
static if (
overload != HasToStringResult.constCharSinkFormatSpec &&
overload != HasToStringResult.customPutWriterFormatSpec &&
!isInputRange!T)
{
enforceFmt(f.spec == 's',
"Expected '%s' format specifier for type '" ~ T.stringof ~ "'");
}
}
@system unittest
{
static interface IF1 { }
class CIF1 : IF1 { }
static struct SF1 { }
static union UF1 { }
static class CF1 { }
static interface IF2 { string toString(); }
static class CIF2 : IF2 { override string toString() { return ""; } }
static struct SF2 { string toString() { return ""; } }
static union UF2 { string toString() { return ""; } }
static class CF2 { override string toString() { return ""; } }
static interface IK1 { void toString(scope void delegate(scope const(char)[]) sink,
FormatSpec!char) const; }
static class CIK1 : IK1 { override void toString(scope void delegate(scope const(char)[]) sink,
FormatSpec!char) const { sink("CIK1"); } }
static struct KS1 { void toString(scope void delegate(scope const(char)[]) sink,
FormatSpec!char) const { sink("KS1"); } }
static union KU1 { void toString(scope void delegate(scope const(char)[]) sink,
FormatSpec!char) const { sink("KU1"); } }
static class KC1 { void toString(scope void delegate(scope const(char)[]) sink,
FormatSpec!char) const { sink("KC1"); } }
IF1 cif1 = new CIF1;
assertThrown!FormatException(format("%f", cif1));
assertThrown!FormatException(format("%f", SF1()));
assertThrown!FormatException(format("%f", UF1()));
assertThrown!FormatException(format("%f", new CF1()));
IF2 cif2 = new CIF2;
assertThrown!FormatException(format("%f", cif2));
assertThrown!FormatException(format("%f", SF2()));
assertThrown!FormatException(format("%f", UF2()));
assertThrown!FormatException(format("%f", new CF2()));
IK1 cik1 = new CIK1;
assert(format("%f", cik1) == "CIK1");
assert(format("%f", KS1()) == "KS1");
assert(format("%f", KU1()) == "KU1");
assert(format("%f", new KC1()) == "KC1");
}
/*
Aggregates
*/
private void formatValueImpl(Writer, T, Char)(auto ref Writer w, T val, scope const ref FormatSpec!Char f)
if (is(T == class) && !is(T == enum))
{
enforceValidFormatSpec!(T, Char)(f);
// TODO: remove this check once `@disable override` deprecation cycle is finished
static if (__traits(hasMember, T, "toString") && isSomeFunction!(val.toString))
static assert(!__traits(isDisabled, T.toString), T.stringof ~
" cannot be formatted because its `toString` is marked with `@disable`");
if (val is null)
put(w, "null");
else
{
import std.algorithm.comparison : among;
enum overload = hasToString!(T, Char);
with(HasToStringResult)
static if ((is(T == immutable) || is(T == const) || is(T == shared)) && overload == none)
{
// Remove this when Object gets const toString
// https://issues.dlang.org/show_bug.cgi?id=7879
static if (is(T == immutable))
put(w, "immutable(");
else static if (is(T == const))
put(w, "const(");
else static if (is(T == shared))
put(w, "shared(");
put(w, typeid(Unqual!T).name);
put(w, ')');
}
else static if (overload.among(constCharSink, constCharSinkFormatString, constCharSinkFormatSpec) ||
(!isInputRange!T && !is(BuiltinTypeOf!T)))
{
formatObject!(Writer, T, Char)(w, val, f);
}
else
{
//string delegate() dg = &val.toString;
Object o = val; // workaround
string delegate() dg = &o.toString;
scope Object object = new Object();
if (dg.funcptr != (&object.toString).funcptr) // toString is overridden
{
formatObject(w, val, f);
}
else static if (isInputRange!T)
{
formatRange(w, val, f);
}
else static if (is(BuiltinTypeOf!T X))
{
X x = val;
formatValueImpl(w, x, f);
}
else
{
formatObject(w, val, f);
}
}
}
}
@system unittest
{
import std.array : appender;
import std.range.interfaces;
// class range (https://issues.dlang.org/show_bug.cgi?id=5154)
auto c = inputRangeObject([1,2,3,4]);
formatTest( c, "[1, 2, 3, 4]" );
assert(c.empty);
c = null;
formatTest( c, "null" );
}
@system unittest
{
// https://issues.dlang.org/show_bug.cgi?id=5354
// If the class has both range I/F and custom toString, the use of custom
// toString routine is prioritized.
// Enable the use of custom toString that gets a sink delegate
// for class formatting.
enum inputRangeCode =
q{
int[] arr;
this(int[] a){ arr = a; }
@property int front() const { return arr[0]; }
@property bool empty() const { return arr.length == 0; }
void popFront(){ arr = arr[1..$]; }
};
class C1
{
mixin(inputRangeCode);
void toString(scope void delegate(scope const(char)[]) dg,
scope const ref FormatSpec!char f) const
{
dg("[012]");
}
}
class C2
{
mixin(inputRangeCode);
void toString(scope void delegate(const(char)[]) dg, string f) const { dg("[012]"); }
}
class C3
{
mixin(inputRangeCode);
void toString(scope void delegate(const(char)[]) dg) const { dg("[012]"); }
}
class C4
{
mixin(inputRangeCode);
override string toString() const { return "[012]"; }
}
class C5
{
mixin(inputRangeCode);
}
formatTest( new C1([0, 1, 2]), "[012]" );
formatTest( new C2([0, 1, 2]), "[012]" );
formatTest( new C3([0, 1, 2]), "[012]" );
formatTest( new C4([0, 1, 2]), "[012]" );
formatTest( new C5([0, 1, 2]), "[0, 1, 2]" );
}
// outside the unittest block, otherwise the FQN of the
// class contains the line number of the unittest
version (StdUnittest)
{
private class C {}
}
// https://issues.dlang.org/show_bug.cgi?id=7879
@safe unittest
{
const(C) c;
auto s = format("%s", c);
assert(s == "null");
immutable(C) c2 = new C();
s = format("%s", c2);
assert(s == "immutable(std.format.C)");
const(C) c3 = new C();
s = format("%s", c3);
assert(s == "const(std.format.C)");
shared(C) c4 = new C();
s = format("%s", c4);
assert(s == "shared(std.format.C)");
}
// https://issues.dlang.org/show_bug.cgi?id=19003
@safe unittest
{
struct S
{
int i;
@disable this();
invariant { assert(this.i); }
this(int i) @safe in { assert(i); } do { this.i = i; }
string toString() { return "S"; }
}
S s = S(1);
format!"%s"(s);
}
// https://issues.dlang.org/show_bug.cgi?id=20218
@safe pure unittest
{
void notCalled()
{
import std.range : repeat;
auto value = 1.repeat;
// test that range is not evaluated to completion at compiletime
format!"%s"(value);
}
}
// https://issues.dlang.org/show_bug.cgi?id=7879
@safe unittest
{
class F
{
override string toString() const @safe
{
return "Foo";
}
}
const(F) c;
auto s = format("%s", c);
assert(s == "null");
const(F) c2 = new F();
s = format("%s", c2);
assert(s == "Foo", s);
}
// ditto
private void formatValueImpl(Writer, T, Char)(auto ref Writer w, T val, scope const ref FormatSpec!Char f)
if (is(T == interface) && (hasToString!(T, Char) || !is(BuiltinTypeOf!T)) && !is(T == enum))
{
enforceValidFormatSpec!(T, Char)(f);
if (val is null)
put(w, "null");
else
{
static if (__traits(hasMember, T, "toString") && isSomeFunction!(val.toString))
static assert(!__traits(isDisabled, T.toString), T.stringof ~
" cannot be formatted because its `toString` is marked with `@disable`");
static if (hasToString!(T, Char) != HasToStringResult.none)
{
formatObject(w, val, f);
}
else static if (isInputRange!T)
{
formatRange(w, val, f);
}
else
{
version (Windows)
{
import core.sys.windows.com : IUnknown;
static if (is(T : IUnknown))
{
formatValueImpl(w, *cast(void**)&val, f);
}
else
{
formatValueImpl(w, cast(Object) val, f);
}
}
else
{
formatValueImpl(w, cast(Object) val, f);
}
}
}
}
@system unittest
{
// interface
import std.range.interfaces;
InputRange!int i = inputRangeObject([1,2,3,4]);
formatTest( i, "[1, 2, 3, 4]" );
assert(i.empty);
i = null;
formatTest( i, "null" );
// interface (downcast to Object)
interface Whatever {}
class C : Whatever
{
override @property string toString() const { return "ab"; }
}
Whatever val = new C;
formatTest( val, "ab" );
// https://issues.dlang.org/show_bug.cgi?id=11175
version (Windows)
{
import core.sys.windows.com : IUnknown, IID;
import core.sys.windows.windef : HRESULT;
interface IUnknown2 : IUnknown { }
class D : IUnknown2
{
extern(Windows) HRESULT QueryInterface(const(IID)* riid, void** pvObject) { return typeof(return).init; }
extern(Windows) uint AddRef() { return 0; }
extern(Windows) uint Release() { return 0; }
}
IUnknown2 d = new D;
string expected = format("%X", cast(void*) d);
formatTest(d, expected);
}
}
/// ditto
// Maybe T is noncopyable struct, so receive it by 'auto ref'.
private void formatValueImpl(Writer, T, Char)(auto ref Writer w, auto ref T val, scope const ref FormatSpec!Char f)
if ((is(T == struct) || is(T == union)) && (hasToString!(T, Char) || !is(BuiltinTypeOf!T)) && !is(T == enum))
{
static if (__traits(hasMember, T, "toString") && isSomeFunction!(val.toString))
static assert(!__traits(isDisabled, T.toString), T.stringof ~
" cannot be formatted because its `toString` is marked with `@disable`");
enforceValidFormatSpec!(T, Char)(f);
static if (hasToString!(T, Char))
{
formatObject(w, val, f);
}
else static if (isInputRange!T)
{
formatRange(w, val, f);
}
else static if (is(T == struct))
{
enum left = T.stringof~"(";
enum separator = ", ";
enum right = ")";
put(w, left);
foreach (i, e; val.tupleof)
{
static if (__traits(identifier, val.tupleof[i]) == "this")
continue;
else static if (0 < i && val.tupleof[i-1].offsetof == val.tupleof[i].offsetof)
{
static if (i == val.tupleof.length - 1 || val.tupleof[i].offsetof != val.tupleof[i+1].offsetof)
put(w, separator~val.tupleof[i].stringof[4..$]~"}");
else
put(w, separator~val.tupleof[i].stringof[4..$]);
}
else static if (i+1 < val.tupleof.length && val.tupleof[i].offsetof == val.tupleof[i+1].offsetof)
put(w, (i > 0 ? separator : "")~"#{overlap "~val.tupleof[i].stringof[4..$]);
else
{
static if (i > 0)
put(w, separator);
formatElement(w, e, f);
}
}
put(w, right);
}
else
{
put(w, T.stringof);
}
}
// https://issues.dlang.org/show_bug.cgi?id=9588
@safe pure unittest
{
struct S { int x; bool empty() { return false; } }
formatTest( S(), "S(0)" );
}
// https://issues.dlang.org/show_bug.cgi?id=4638
@safe unittest
{
struct U8 { string toString() const { return "blah"; } }
struct U16 { wstring toString() const { return "blah"; } }
struct U32 { dstring toString() const { return "blah"; } }
formatTest( U8(), "blah" );
formatTest( U16(), "blah" );
formatTest( U32(), "blah" );
}
// https://issues.dlang.org/show_bug.cgi?id=3890
@safe unittest
{
struct Int{ int n; }
struct Pair{ string s; Int i; }
formatTest( Pair("hello", Int(5)),
`Pair("hello", Int(5))` );
}
@system unittest
{
// union formatting without toString
union U1
{
int n;
string s;
}
U1 u1;
formatTest( u1, "U1" );
// union formatting with toString
union U2
{
int n;
string s;
string toString() const { return s; }
}
U2 u2;
u2.s = "hello";
formatTest( u2, "hello" );
}
@system unittest
{
import std.array;
// https://issues.dlang.org/show_bug.cgi?id=7230
static struct Bug7230
{
string s = "hello";
union {
string a;
int b;
double c;
}
long x = 10;
}
Bug7230 bug;
bug.b = 123;
FormatSpec!char f;
auto w = appender!(char[])();
formatValue(w, bug, f);
assert(w.data == `Bug7230("hello", #{overlap a, b, c}, 10)`);
}
@safe unittest
{
import std.array : appender;
static struct S{ @disable this(this); }
S s;
FormatSpec!char f;
auto w = appender!string();
formatValue(w, s, f);
assert(w.data == "S()");
}
@safe unittest
{
//struct Foo { @disable string toString(); }
//Foo foo;
interface Bar { @disable string toString(); }
Bar bar;
import std.array : appender;
auto w = appender!(char[])();
FormatSpec!char f;
// NOTE: structs cant be tested : the assertion is correct so compilation
// continues and fails when trying to link the unimplemented toString.
//static assert(!__traits(compiles, formatValue(w, foo, f)));
static assert(!__traits(compiles, formatValue(w, bar, f)));
}
/*
`enum`s are formatted like their base value
*/
private void formatValueImpl(Writer, T, Char)(auto ref Writer w, T val, scope const ref FormatSpec!Char f)
if (is(T == enum))
{
if (f.spec == 's')
{
foreach (i, e; EnumMembers!T)
{
if (val == e)
{
formatValueImpl(w, __traits(allMembers, T)[i], f);
return;
}
}
import std.array : appender;
auto w2 = appender!string();
// val is not a member of T, output cast(T) rawValue instead.
put(w2, "cast(" ~ T.stringof ~ ")");
static assert(!is(OriginalType!T == T), "OriginalType!" ~ T.stringof ~
"must not be equal to " ~ T.stringof);
FormatSpec!Char f2 = f;
f2.width = 0;
formatValueImpl(w2, cast(OriginalType!T) val, f2);
writeAligned(w, w2.data, f);
return;
}
formatValueImpl(w, cast(OriginalType!T) val, f);
}
@safe unittest
{
enum A { first, second, third }
formatTest( A.second, "second" );
formatTest( cast(A) 72, "cast(A)72" );
}
@safe unittest
{
enum A : string { one = "uno", two = "dos", three = "tres" }
formatTest( A.three, "three" );
formatTest( cast(A)"mill\ón", "cast(A)mill\ón" );
}
@safe unittest
{
enum A : bool { no, yes }
formatTest( A.yes, "yes" );
formatTest( A.no, "no" );
}
@safe unittest
{
// Test for bug 6892
enum Foo { A = 10 }
formatTest("%s", Foo.A, "A");
formatTest(">%4s<", Foo.A, "> A<");
formatTest("%04d", Foo.A, "0010");
formatTest("%+2u", Foo.A, "+10");
formatTest("%02x", Foo.A, "0a");
formatTest("%3o", Foo.A, " 12");
formatTest("%b", Foo.A, "1010");
}
@safe pure unittest
{
enum A { one, two, three }
string t1 = format("[%6s] [%-6s]", A.one, A.one);
assert(t1 == "[ one] [one ]");
string t2 = format("[%10s] [%-10s]", cast(A) 10, cast(A) 10);
assert(t2 == "[ cast(A)" ~ "10] [cast(A)" ~ "10 ]"); // due to bug in style checker
}
/*
Pointers are formatted as hex integers.
*/
private void formatValueImpl(Writer, T, Char)(auto ref Writer w, scope T val, scope const ref FormatSpec!Char f)
if (isPointer!T && !is(T == enum) && !hasToString!(T, Char))
{
static if (is(typeof({ shared const void* p = val; })))
alias SharedOf(T) = shared(T);
else
alias SharedOf(T) = T;
const SharedOf!(void*) p = val;
const pnum = ()@trusted{ return cast(ulong) p; }();
if (f.spec == 's')
{
if (p is null)
{
writeAligned(w, "null", f);
return;
}
FormatSpec!Char fs = f; // fs is copy for change its values.
fs.spec = 'X';
formatValueImpl(w, pnum, fs);
}
else
{
enforceFmt(f.spec == 'X' || f.spec == 'x',
"Expected one of %s, %x or %X for pointer type.");
formatValueImpl(w, pnum, f);
}
}
@safe pure unittest
{
int* p;
string t1 = format("[%6s] [%-6s]", p, p);
assert(t1 == "[ null] [null ]");
}
/*
SIMD vectors are formatted as arrays.
*/
private void formatValueImpl(Writer, V, Char)(auto ref Writer w, V val, scope const ref FormatSpec!Char f)
if (isSIMDVector!V)
{
formatValueImpl(w, val.array, f);
}
@safe unittest
{
import core.simd;
static if (is(float4))
{
version (X86)
{
version (OSX) {/* https://issues.dlang.org/show_bug.cgi?id=17823 */}
}
else
{
float4 f;
f.array[0] = 1;
f.array[1] = 2;
f.array[2] = 3;
f.array[3] = 4;
formatTest(f, "[1, 2, 3, 4]");
}
}
}
@safe pure unittest
{
int* p = null;
formatTest( p, "null" );
auto q = ()@trusted{ return cast(void*) 0xFFEECCAA; }();
formatTest( q, "FFEECCAA" );
}
// https://issues.dlang.org/show_bug.cgi?id=11782
@safe pure unittest
{
import std.range : iota;
auto a = iota(0, 10);
auto b = iota(0, 10);
auto p = ()@trusted{ auto p = &a; return p; }();
assert(format("%s",p) != format("%s",b));
}
@system pure unittest
{
// Test for https://issues.dlang.org/show_bug.cgi?id=7869
struct S
{
string toString() const { return ""; }
}
S* p = null;
formatTest( p, "null" );
S* q = cast(S*) 0xFFEECCAA;
formatTest( q, "FFEECCAA" );
}
// https://issues.dlang.org/show_bug.cgi?id=8186
@system unittest
{
class B
{
int*a;
this(){ a = new int; }
alias a this;
}
formatTest( B.init, "null" );
}
// https://issues.dlang.org/show_bug.cgi?id=9336
@system pure unittest
{
shared int i;
format("%s", &i);
}
// https://issues.dlang.org/show_bug.cgi?id=11778
@system pure unittest
{
int* p = null;
assertThrown!FormatException(format("%d", p));
assertThrown!FormatException(format("%04d", p + 2));
}
// https://issues.dlang.org/show_bug.cgi?id=12505
@safe pure unittest
{
void* p = null;
formatTest( "%08X", p, "00000000" );
}
/*
Delegates are formatted by `ReturnType delegate(Parameters) FunctionAttributes`
*/
private void formatValueImpl(Writer, T, Char)(auto ref Writer w, scope T, scope const ref FormatSpec!Char f)
if (isDelegate!T)
{
formatValueImpl(w, T.stringof, f);
}
@safe unittest
{
void func() @system { __gshared int x; ++x; throw new Exception("msg"); }
version (linux) formatTest( &func, "void delegate() @system" );
}
@safe pure unittest
{
int[] a = [ 1, 3, 2 ];
formatTest( "testing %(%s & %) embedded", a,
"testing 1 & 3 & 2 embedded");
formatTest( "testing %((%s) %)) wyda3", a,
"testing (1) (3) (2) wyda3" );
int[0] empt = [];
formatTest( "(%s)", empt,
"([])" );
}
// Fix for https://issues.dlang.org/show_bug.cgi?id=1591
private int getNthInt(string kind, A...)(uint index, A args)
{
return getNth!(kind, isIntegral,int)(index, args);
}
private T getNth(string kind, alias Condition, T, A...)(uint index, A args)
{
import std.conv : text, to;
switch (index)
{
foreach (n, _; A)
{
case n:
static if (Condition!(typeof(args[n])))
{
return to!T(args[n]);
}
else
{
throw new FormatException(
text(kind, " expected, not ", typeof(args[n]).stringof,
" for argument #", index + 1));
}
}
default:
throw new FormatException(
text("Missing ", kind, " argument"));
}
}
@safe unittest
{
// width/precision
assert(collectExceptionMsg!FormatException(format("%*.d", 5.1, 2))
== "integer width expected, not double for argument #1");
assert(collectExceptionMsg!FormatException(format("%-1*.d", 5.1, 2))
== "integer width expected, not double for argument #1");
assert(collectExceptionMsg!FormatException(format("%.*d", '5', 2))
== "integer precision expected, not char for argument #1");
assert(collectExceptionMsg!FormatException(format("%-1.*d", 4.7, 3))
== "integer precision expected, not double for argument #1");
assert(collectExceptionMsg!FormatException(format("%.*d", 5))
== "Orphan format specifier: %d");
assert(collectExceptionMsg!FormatException(format("%*.*d", 5))
== "Missing integer precision argument");
// separatorCharPos
assert(collectExceptionMsg!FormatException(format("%,?d", 5))
== "separator character expected, not int for argument #1");
assert(collectExceptionMsg!FormatException(format("%,?d", '?'))
== "Orphan format specifier: %d");
assert(collectExceptionMsg!FormatException(format("%.*,*?d", 5))
== "Missing separator digit width argument");
}
/* ======================== Unit Tests ====================================== */
version (StdUnittest)
private void formatTest(T)(T val, string expected, size_t ln = __LINE__, string fn = __FILE__)
{
import core.exception : AssertError;
import std.array : appender;
import std.conv : text;
FormatSpec!char f;
auto w = appender!string();
formatValue(w, val, f);
enforce!AssertError(
w.data == expected,
text("expected = `", expected, "`, result = `", w.data, "`"), fn, ln);
}
version (StdUnittest)
private void formatTest(T)(string fmt, T val, string expected, size_t ln = __LINE__, string fn = __FILE__) @safe
{
import core.exception : AssertError;
import std.array : appender;
import std.conv : text;
auto w = appender!string();
formattedWrite(w, fmt, val);
enforce!AssertError(
w.data == expected,
text("expected = `", expected, "`, result = `", w.data, "`"), fn, ln);
}
version (StdUnittest)
private void formatTest(T)(T val, string[] expected, size_t ln = __LINE__, string fn = __FILE__)
{
import core.exception : AssertError;
import std.array : appender;
import std.conv : text;
FormatSpec!char f;
auto w = appender!string();
formatValue(w, val, f);
foreach (cur; expected)
{
if (w.data == cur) return;
}
enforce!AssertError(
false,
text("expected one of `", expected, "`, result = `", w.data, "`"), fn, ln);
}
version (StdUnittest)
private void formatTest(T)(string fmt, T val, string[] expected, size_t ln = __LINE__, string fn = __FILE__) @safe
{
import core.exception : AssertError;
import std.array : appender;
import std.conv : text;
auto w = appender!string();
formattedWrite(w, fmt, val);
foreach (cur; expected)
{
if (w.data == cur) return;
}
enforce!AssertError(
false,
text("expected one of `", expected, "`, result = `", w.data, "`"), fn, ln);
}
@safe /*pure*/ unittest // formatting floating point values is now impure
{
import std.array;
auto stream = appender!string();
formattedWrite(stream, "%s", 1.1);
assert(stream.data == "1.1", stream.data);
}
@safe pure unittest
{
import std.algorithm;
import std.array;
auto stream = appender!string();
formattedWrite(stream, "%s", map!"a*a"([2, 3, 5]));
assert(stream.data == "[4, 9, 25]", stream.data);
// Test shared data.
stream = appender!string();
shared int s = 6;
formattedWrite(stream, "%s", s);
assert(stream.data == "6");
}
@safe pure unittest
{
import std.array;
auto stream = appender!string();
formattedWrite(stream, "%u", 42);
assert(stream.data == "42", stream.data);
}
@safe pure unittest
{
// testing raw writes
import std.array;
auto w = appender!(char[])();
uint a = 0x02030405;
formattedWrite(w, "%+r", a);
assert(w.data.length == 4 && w.data[0] == 2 && w.data[1] == 3
&& w.data[2] == 4 && w.data[3] == 5);
w.clear();
formattedWrite(w, "%-r", a);
assert(w.data.length == 4 && w.data[0] == 5 && w.data[1] == 4
&& w.data[2] == 3 && w.data[3] == 2);
}
@safe pure unittest
{
// testing positional parameters
import std.array;
auto w = appender!(char[])();
formattedWrite(w,
"Numbers %2$s and %1$s are reversed and %1$s%2$s repeated",
42, 0);
assert(w.data == "Numbers 0 and 42 are reversed and 420 repeated",
w.data);
assert(collectExceptionMsg!FormatException(formattedWrite(w, "%1$s, %3$s", 1, 2))
== "Positional specifier %3$s index exceeds 2");
w.clear();
formattedWrite(w, "asd%s", 23);
assert(w.data == "asd23", w.data);
w.clear();
formattedWrite(w, "%s%s", 23, 45);
assert(w.data == "2345", w.data);
}
@safe unittest
{
import core.stdc.string : strlen;
import std.array : appender;
import std.conv : text, octal;
import core.stdc.stdio : snprintf;
debug(format) printf("std.format.format.unittest\n");
auto stream = appender!(char[])();
//goto here;
formattedWrite(stream,
"hello world! %s %s ", true, 57, 1_000_000_000, 'x', " foo");
assert(stream.data == "hello world! true 57 ",
stream.data);
stream.clear();
formattedWrite(stream, "%g %A %s", 1.67, -1.28, float.nan);
assert(stream.data == "1.67 -0X1.47AE147AE147BP+0 nan",
stream.data);
stream.clear();
formattedWrite(stream, "%x %X", 0x1234AF, 0xAFAFAFAF);
assert(stream.data == "1234af AFAFAFAF");
stream.clear();
formattedWrite(stream, "%b %o", 0x1234AF, 0xAFAFAFAF);
assert(stream.data == "100100011010010101111 25753727657");
stream.clear();
formattedWrite(stream, "%d %s", 0x1234AF, 0xAFAFAFAF);
assert(stream.data == "1193135 2947526575");
stream.clear();
// formattedWrite(stream, "%s", 1.2 + 3.4i);
// assert(stream.data == "1.2+3.4i");
// stream.clear();
formattedWrite(stream, "%a %A", 1.32, 6.78f);
//formattedWrite(stream, "%x %X", 1.32);
assert(stream.data == "0x1.51eb851eb851fp+0 0X1.B1EB86P+2");
stream.clear();
formattedWrite(stream, "%#06.*f",2,12.345);
assert(stream.data == "012.35");
stream.clear();
formattedWrite(stream, "%#0*.*f",6,2,12.345);
assert(stream.data == "012.35");
stream.clear();
const real constreal = 1;
formattedWrite(stream, "%g",constreal);
assert(stream.data == "1");
stream.clear();
formattedWrite(stream, "%7.4g:", 12.678);
assert(stream.data == " 12.68:");
stream.clear();
formattedWrite(stream, "%7.4g:", 12.678L);
assert(stream.data == " 12.68:");
stream.clear();
formattedWrite(stream, "%04f|%05d|%#05x|%#5x",-4.0,-10,1,1);
assert(stream.data == "-4.000000|-0010|0x001| 0x1",
stream.data);
stream.clear();
int i;
string s;
i = -10;
formattedWrite(stream, "%d|%3d|%03d|%1d|%01.4f",i,i,i,i,cast(double) i);
assert(stream.data == "-10|-10|-10|-10|-10.0000");
stream.clear();
i = -5;
formattedWrite(stream, "%d|%3d|%03d|%1d|%01.4f",i,i,i,i,cast(double) i);
assert(stream.data == "-5| -5|-05|-5|-5.0000");
stream.clear();
i = 0;
formattedWrite(stream, "%d|%3d|%03d|%1d|%01.4f",i,i,i,i,cast(double) i);
assert(stream.data == "0| 0|000|0|0.0000");
stream.clear();
i = 5;
formattedWrite(stream, "%d|%3d|%03d|%1d|%01.4f",i,i,i,i,cast(double) i);
assert(stream.data == "5| 5|005|5|5.0000");
stream.clear();
i = 10;
formattedWrite(stream, "%d|%3d|%03d|%1d|%01.4f",i,i,i,i,cast(double) i);
assert(stream.data == "10| 10|010|10|10.0000");
stream.clear();
formattedWrite(stream, "%.0d", 0);
assert(stream.data == "");
stream.clear();
formattedWrite(stream, "%.g", .34);
assert(stream.data == "0.3");
stream.clear();
stream.clear(); formattedWrite(stream, "%.0g", .34);
assert(stream.data == "0.3");
stream.clear(); formattedWrite(stream, "%.2g", .34);
assert(stream.data == "0.34");
stream.clear(); formattedWrite(stream, "%0.0008f", 1e-08);
assert(stream.data == "0.00000001");
stream.clear(); formattedWrite(stream, "%0.0008f", 1e-05);
assert(stream.data == "0.00001000");
//return;
//core.stdc.stdio.fwrite(stream.data.ptr, stream.data.length, 1, stderr);
s = "helloworld";
string r;
stream.clear(); formattedWrite(stream, "%.2s", s[0 .. 5]);
assert(stream.data == "he");
stream.clear(); formattedWrite(stream, "%.20s", s[0 .. 5]);
assert(stream.data == "hello");
stream.clear(); formattedWrite(stream, "%8s", s[0 .. 5]);
assert(stream.data == " hello");
byte[] arrbyte = new byte[4];
arrbyte[0] = 100;
arrbyte[1] = -99;
arrbyte[3] = 0;
stream.clear(); formattedWrite(stream, "%s", arrbyte);
assert(stream.data == "[100, -99, 0, 0]", stream.data);
ubyte[] arrubyte = new ubyte[4];
arrubyte[0] = 100;
arrubyte[1] = 200;
arrubyte[3] = 0;
stream.clear(); formattedWrite(stream, "%s", arrubyte);
assert(stream.data == "[100, 200, 0, 0]", stream.data);
short[] arrshort = new short[4];
arrshort[0] = 100;
arrshort[1] = -999;
arrshort[3] = 0;
stream.clear(); formattedWrite(stream, "%s", arrshort);
assert(stream.data == "[100, -999, 0, 0]");
stream.clear(); formattedWrite(stream, "%s",arrshort);
assert(stream.data == "[100, -999, 0, 0]");
ushort[] arrushort = new ushort[4];
arrushort[0] = 100;
arrushort[1] = 20_000;
arrushort[3] = 0;
stream.clear(); formattedWrite(stream, "%s", arrushort);
assert(stream.data == "[100, 20000, 0, 0]");
int[] arrint = new int[4];
arrint[0] = 100;
arrint[1] = -999;
arrint[3] = 0;
stream.clear(); formattedWrite(stream, "%s", arrint);
assert(stream.data == "[100, -999, 0, 0]");
stream.clear(); formattedWrite(stream, "%s",arrint);
assert(stream.data == "[100, -999, 0, 0]");
long[] arrlong = new long[4];
arrlong[0] = 100;
arrlong[1] = -999;
arrlong[3] = 0;
stream.clear(); formattedWrite(stream, "%s", arrlong);
assert(stream.data == "[100, -999, 0, 0]");
stream.clear(); formattedWrite(stream, "%s",arrlong);
assert(stream.data == "[100, -999, 0, 0]");
ulong[] arrulong = new ulong[4];
arrulong[0] = 100;
arrulong[1] = 999;
arrulong[3] = 0;
stream.clear(); formattedWrite(stream, "%s", arrulong);
assert(stream.data == "[100, 999, 0, 0]");
string[] arr2 = new string[4];
arr2[0] = "hello";
arr2[1] = "world";
arr2[3] = "foo";
stream.clear(); formattedWrite(stream, "%s", arr2);
assert(stream.data == `["hello", "world", "", "foo"]`, stream.data);
stream.clear(); formattedWrite(stream, "%.8d", 7);
assert(stream.data == "00000007");
stream.clear(); formattedWrite(stream, "%.8x", 10);
assert(stream.data == "0000000a");
stream.clear(); formattedWrite(stream, "%-3d", 7);
assert(stream.data == "7 ");
stream.clear(); formattedWrite(stream, "%*d", -3, 7);
assert(stream.data == "7 ");
stream.clear(); formattedWrite(stream, "%.*d", -3, 7);
//writeln(stream.data);
assert(stream.data == "7");
stream.clear(); formattedWrite(stream, "%s", "abc"c);
assert(stream.data == "abc");
stream.clear(); formattedWrite(stream, "%s", "def"w);
assert(stream.data == "def", text(stream.data.length));
stream.clear(); formattedWrite(stream, "%s", "ghi"d);
assert(stream.data == "ghi");
here:
@trusted void* deadBeef() { return cast(void*) 0xDEADBEEF; }
stream.clear(); formattedWrite(stream, "%s", deadBeef());
assert(stream.data == "DEADBEEF", stream.data);
stream.clear(); formattedWrite(stream, "%#x", 0xabcd);
assert(stream.data == "0xabcd");
stream.clear(); formattedWrite(stream, "%#X", 0xABCD);
assert(stream.data == "0XABCD");
stream.clear(); formattedWrite(stream, "%#o", octal!12345);
assert(stream.data == "012345");
stream.clear(); formattedWrite(stream, "%o", 9);
assert(stream.data == "11");
stream.clear(); formattedWrite(stream, "%+d", 123);
assert(stream.data == "+123");
stream.clear(); formattedWrite(stream, "%+d", -123);
assert(stream.data == "-123");
stream.clear(); formattedWrite(stream, "% d", 123);
assert(stream.data == " 123");
stream.clear(); formattedWrite(stream, "% d", -123);
assert(stream.data == "-123");
stream.clear(); formattedWrite(stream, "%%");
assert(stream.data == "%");
stream.clear(); formattedWrite(stream, "%d", true);
assert(stream.data == "1");
stream.clear(); formattedWrite(stream, "%d", false);
assert(stream.data == "0");
stream.clear(); formattedWrite(stream, "%d", 'a');
assert(stream.data == "97", stream.data);
wchar wc = 'a';
stream.clear(); formattedWrite(stream, "%d", wc);
assert(stream.data == "97");
dchar dc = 'a';
stream.clear(); formattedWrite(stream, "%d", dc);
assert(stream.data == "97");
byte b = byte.max;
stream.clear(); formattedWrite(stream, "%x", b);
assert(stream.data == "7f");
stream.clear(); formattedWrite(stream, "%x", ++b);
assert(stream.data == "80");
stream.clear(); formattedWrite(stream, "%x", ++b);
assert(stream.data == "81");
short sh = short.max;
stream.clear(); formattedWrite(stream, "%x", sh);
assert(stream.data == "7fff");
stream.clear(); formattedWrite(stream, "%x", ++sh);
assert(stream.data == "8000");
stream.clear(); formattedWrite(stream, "%x", ++sh);
assert(stream.data == "8001");
i = int.max;
stream.clear(); formattedWrite(stream, "%x", i);
assert(stream.data == "7fffffff");
stream.clear(); formattedWrite(stream, "%x", ++i);
assert(stream.data == "80000000");
stream.clear(); formattedWrite(stream, "%x", ++i);
assert(stream.data == "80000001");
stream.clear(); formattedWrite(stream, "%x", 10);
assert(stream.data == "a");
stream.clear(); formattedWrite(stream, "%X", 10);
assert(stream.data == "A");
stream.clear(); formattedWrite(stream, "%x", 15);
assert(stream.data == "f");
stream.clear(); formattedWrite(stream, "%X", 15);
assert(stream.data == "F");
@trusted void ObjectTest()
{
Object c = null;
stream.clear(); formattedWrite(stream, "%s", c);
assert(stream.data == "null");
}
ObjectTest();
enum TestEnum
{
Value1, Value2
}
stream.clear(); formattedWrite(stream, "%s", TestEnum.Value2);
assert(stream.data == "Value2", stream.data);
stream.clear(); formattedWrite(stream, "%s", cast(TestEnum) 5);
assert(stream.data == "cast(TestEnum)5", stream.data);
//immutable(char[5])[int] aa = ([3:"hello", 4:"betty"]);
//stream.clear(); formattedWrite(stream, "%s", aa.values);
//core.stdc.stdio.fwrite(stream.data.ptr, stream.data.length, 1, stderr);
//assert(stream.data == "[[h,e,l,l,o],[b,e,t,t,y]]");
//stream.clear(); formattedWrite(stream, "%s", aa);
//assert(stream.data == "[3:[h,e,l,l,o],4:[b,e,t,t,y]]");
static const dchar[] ds = ['a','b'];
for (int j = 0; j < ds.length; ++j)
{
stream.clear(); formattedWrite(stream, " %d", ds[j]);
if (j == 0)
assert(stream.data == " 97");
else
assert(stream.data == " 98");
}
stream.clear(); formattedWrite(stream, "%.-3d", 7);
assert(stream.data == "7", ">" ~ stream.data ~ "<");
}
@safe unittest
{
import std.array;
import std.stdio;
immutable(char[5])[int] aa = ([3:"hello", 4:"betty"]);
assert(aa[3] == "hello");
assert(aa[4] == "betty");
auto stream = appender!(char[])();
alias AllNumerics =
AliasSeq!(byte, ubyte, short, ushort, int, uint, long, ulong,
float, double, real);
foreach (T; AllNumerics)
{
T value = 1;
stream.clear();
formattedWrite(stream, "%s", value);
assert(stream.data == "1");
}
stream.clear();
formattedWrite(stream, "%s", aa);
}
@system unittest
{
string s = "hello!124:34.5";
string a;
int b;
double c;
formattedRead(s, "%s!%s:%s", &a, &b, &c);
assert(a == "hello" && b == 124 && c == 34.5);
}
version (StdUnittest)
private void formatReflectTest(T)(ref T val, string fmt, string formatted, string fn = __FILE__, size_t ln = __LINE__)
{
import core.exception : AssertError;
import std.array : appender;
auto w = appender!string();
formattedWrite(w, fmt, val);
auto input = w.data;
enforce!AssertError(
input == formatted,
input, fn, ln);
T val2;
formattedRead(input, fmt, &val2);
static if (isAssociativeArray!T)
if (__ctfe)
{
alias aa1 = val;
alias aa2 = val2;
assert(aa1 == aa2);
assert(aa1.length == aa2.length);
assert(aa1.keys == aa2.keys);
assert(aa1.values == aa2.values);
assert(aa1.values.length == aa2.values.length);
foreach (i; 0 .. aa1.values.length)
assert(aa1.values[i] == aa2.values[i]);
foreach (i, key; aa1.keys)
assert(aa1.values[i] == aa1[key]);
foreach (i, key; aa2.keys)
assert(aa2.values[i] == aa2[key]);
return;
}
enforce!AssertError(
val == val2,
input, fn, ln);
}
version (StdUnittest)
private void formatReflectTest(T)(ref T val, string fmt, string[] formatted, string fn = __FILE__, size_t ln = __LINE__)
{
import core.exception : AssertError;
import std.array : appender;
auto w = appender!string();
formattedWrite(w, fmt, val);
auto input = w.data;
foreach (cur; formatted)
{
if (input == cur) return;
}
enforce!AssertError(
false,
input,
fn,
ln);
T val2;
formattedRead(input, fmt, &val2);
static if (isAssociativeArray!T)
if (__ctfe)
{
alias aa1 = val;
alias aa2 = val2;
assert(aa1 == aa2);
assert(aa1.length == aa2.length);
assert(aa1.keys == aa2.keys);
assert(aa1.values == aa2.values);
assert(aa1.values.length == aa2.values.length);
foreach (i; 0 .. aa1.values.length)
assert(aa1.values[i] == aa2.values[i]);
foreach (i, key; aa1.keys)
assert(aa1.values[i] == aa1[key]);
foreach (i, key; aa2.keys)
assert(aa2.values[i] == aa2[key]);
return;
}
enforce!AssertError(
val == val2,
input, fn, ln);
}
@system unittest
{
void booleanTest()
{
auto b = true;
formatReflectTest(b, "%s", `true`);
formatReflectTest(b, "%b", `1`);
formatReflectTest(b, "%o", `1`);
formatReflectTest(b, "%d", `1`);
formatReflectTest(b, "%u", `1`);
formatReflectTest(b, "%x", `1`);
}
void integerTest()
{
auto n = 127;
formatReflectTest(n, "%s", `127`);
formatReflectTest(n, "%b", `1111111`);
formatReflectTest(n, "%o", `177`);
formatReflectTest(n, "%d", `127`);
formatReflectTest(n, "%u", `127`);
formatReflectTest(n, "%x", `7f`);
}
void floatingTest()
{
auto f = 3.14;
formatReflectTest(f, "%s", `3.14`);
version (MinGW)
formatReflectTest(f, "%e", `3.140000e+000`);
else
formatReflectTest(f, "%e", `3.140000e+00`);
formatReflectTest(f, "%f", `3.140000`);
formatReflectTest(f, "%g", `3.14`);
}
void charTest()
{
auto c = 'a';
formatReflectTest(c, "%s", `a`);
formatReflectTest(c, "%c", `a`);
formatReflectTest(c, "%b", `1100001`);
formatReflectTest(c, "%o", `141`);
formatReflectTest(c, "%d", `97`);
formatReflectTest(c, "%u", `97`);
formatReflectTest(c, "%x", `61`);
}
void strTest()
{
auto s = "hello";
formatReflectTest(s, "%s", `hello`);
formatReflectTest(s, "%(%c,%)", `h,e,l,l,o`);
formatReflectTest(s, "%(%s,%)", `'h','e','l','l','o'`);
formatReflectTest(s, "[%(<%c>%| $ %)]", `[<h> $ <e> $ <l> $ <l> $ <o>]`);
}
void daTest()
{
auto a = [1,2,3,4];
formatReflectTest(a, "%s", `[1, 2, 3, 4]`);
formatReflectTest(a, "[%(%s; %)]", `[1; 2; 3; 4]`);
formatReflectTest(a, "[%(<%s>%| $ %)]", `[<1> $ <2> $ <3> $ <4>]`);
}
void saTest()
{
int[4] sa = [1,2,3,4];
formatReflectTest(sa, "%s", `[1, 2, 3, 4]`);
formatReflectTest(sa, "[%(%s; %)]", `[1; 2; 3; 4]`);
formatReflectTest(sa, "[%(<%s>%| $ %)]", `[<1> $ <2> $ <3> $ <4>]`);
}
void aaTest()
{
auto aa = [1:"hello", 2:"world"];
formatReflectTest(aa, "%s", [`[1:"hello", 2:"world"]`, `[2:"world", 1:"hello"]`]);
formatReflectTest(aa, "[%(%s->%s, %)]", [`[1->"hello", 2->"world"]`, `[2->"world", 1->"hello"]`]);
formatReflectTest(aa, "{%([%s=%(%c%)]%|; %)}", [`{[1=hello]; [2=world]}`, `{[2=world]; [1=hello]}`]);
}
import std.exception;
assertCTFEable!(
{
booleanTest();
integerTest();
if (!__ctfe) floatingTest(); // snprintf
charTest();
strTest();
daTest();
saTest();
aaTest();
return true;
});
}
//------------------------------------------------------------------------------
private void skipData(Range, Char)(ref Range input, scope const ref FormatSpec!Char spec)
{
import std.ascii : isDigit;
import std.conv : text;
switch (spec.spec)
{
case 'c': input.popFront(); break;
case 'd':
if (input.front == '+' || input.front == '-') input.popFront();
goto case 'u';
case 'u':
while (!input.empty && isDigit(input.front)) input.popFront();
break;
default:
assert(false,
text("Format specifier not understood: %", spec.spec));
}
}
private template acceptedSpecs(T)
{
static if (isIntegral!T) enum acceptedSpecs = "bdosuxX";
else static if (isFloatingPoint!T) enum acceptedSpecs = "seEfgG";
else static if (isSomeChar!T) enum acceptedSpecs = "bcdosuxX"; // integral + 'c'
else enum acceptedSpecs = "";
}
/**
* Reads a value from the given _input range according to spec
* and returns it as type `T`.
*
* Params:
* T = the type to return
* input = the _input range to read from
* spec = the `FormatSpec` to use when reading from `input`
* Returns:
* A value from `input` of type `T`
* Throws:
* A `FormatException` if `spec` cannot read a type `T`
* See_Also:
* $(REF parse, std, conv) and $(REF to, std, conv)
*/
T unformatValue(T, Range, Char)(ref Range input, scope const ref FormatSpec!Char spec)
{
return unformatValueImpl!T(input, spec);
}
/// Booleans
@safe pure unittest
{
auto str = "false";
auto spec = singleSpec("%s");
assert(unformatValue!bool(str, spec) == false);
str = "1";
spec = singleSpec("%d");
assert(unformatValue!bool(str, spec));
}
/// Null values
@safe pure unittest
{
auto str = "null";
auto spec = singleSpec("%s");
assert(str.unformatValue!(typeof(null))(spec) == null);
}
/// Integrals
@safe pure unittest
{
auto str = "123";
auto spec = singleSpec("%s");
assert(str.unformatValue!int(spec) == 123);
str = "ABC";
spec = singleSpec("%X");
assert(str.unformatValue!int(spec) == 2748);
str = "11610";
spec = singleSpec("%o");
assert(str.unformatValue!int(spec) == 5000);
}
/// Floating point numbers
@safe pure unittest
{
import std.math : approxEqual;
auto str = "123.456";
auto spec = singleSpec("%s");
assert(str.unformatValue!double(spec).approxEqual(123.456));
}
/// Character input ranges
@safe pure unittest
{
auto str = "aaa";
auto spec = singleSpec("%s");
assert(str.unformatValue!char(spec) == 'a');
// Using a numerical format spec reads a Unicode value from a string
str = "65";
spec = singleSpec("%d");
assert(str.unformatValue!char(spec) == 'A');
str = "41";
spec = singleSpec("%x");
assert(str.unformatValue!char(spec) == 'A');
str = "10003";
spec = singleSpec("%d");
assert(str.unformatValue!dchar(spec) == '✓');
}
/// Arrays and static arrays
@safe pure unittest
{
string str = "aaa";
auto spec = singleSpec("%s");
assert(str.unformatValue!(dchar[])(spec) == "aaa"d);
str = "aaa";
spec = singleSpec("%s");
dchar[3] ret = ['a', 'a', 'a'];
assert(str.unformatValue!(dchar[3])(spec) == ret);
str = "[1, 2, 3, 4]";
spec = singleSpec("%s");
assert(str.unformatValue!(int[])(spec) == [1, 2, 3, 4]);
str = "[1, 2, 3, 4]";
spec = singleSpec("%s");
int[4] ret2 = [1, 2, 3, 4];
assert(str.unformatValue!(int[4])(spec) == ret2);
}
/// Associative arrays
@safe pure unittest
{
auto str = `["one": 1, "two": 2]`;
auto spec = singleSpec("%s");
assert(str.unformatValue!(int[string])(spec) == ["one": 1, "two": 2]);
}
// https://issues.dlang.org/show_bug.cgi?id=7241
@safe pure unittest
{
string input = "a";
auto spec = FormatSpec!char("%s");
spec.readUpToNextSpec(input);
auto result = unformatValue!(dchar[1])(input, spec);
assert(result[0] == 'a');
}
private T unformatValueImpl(T, Range, Char)(ref Range input, scope const ref FormatSpec!Char spec)
if (isInputRange!Range && is(immutable T == immutable bool))
{
import std.algorithm.searching : find;
import std.conv : parse, text;
if (spec.spec == 's') return parse!T(input);
enforceFmt(find(acceptedSpecs!long, spec.spec).length,
text("Wrong unformat specifier '%", spec.spec , "' for ", T.stringof));
return unformatValue!long(input, spec) != 0;
}
private T unformatValueImpl(T, Range, Char)(ref Range input, scope const ref FormatSpec!Char spec)
if (isInputRange!Range && is(T == typeof(null)))
{
import std.conv : parse, text;
enforceFmt(spec.spec == 's',
text("Wrong unformat specifier '%", spec.spec , "' for ", T.stringof));
return parse!T(input);
}
/// ditto
private T unformatValueImpl(T, Range, Char)(ref Range input, scope const ref FormatSpec!Char spec)
if (isInputRange!Range && isIntegral!T && !is(T == enum) && isSomeChar!(ElementType!Range))
{
import std.algorithm.searching : find;
import std.conv : parse, text;
if (spec.spec == 'r')
{
static if (is(immutable ElementEncodingType!Range == immutable char)
|| is(immutable ElementEncodingType!Range == immutable byte)
|| is(immutable ElementEncodingType!Range == immutable ubyte))
return rawRead!T(input);
else
throw new FormatException(
"The raw read specifier %r may only be used with narrow strings and ranges of bytes."
);
}
enforceFmt(find(acceptedSpecs!T, spec.spec).length,
text("Wrong unformat specifier '%", spec.spec , "' for ", T.stringof));
enforceFmt(spec.width == 0, "Parsing integers with a width specification is not implemented"); // TODO
immutable uint base =
spec.spec == 'x' || spec.spec == 'X' ? 16 :
spec.spec == 'o' ? 8 :
spec.spec == 'b' ? 2 :
spec.spec == 's' || spec.spec == 'd' || spec.spec == 'u' ? 10 : 0;
assert(base != 0, "base must be not equal to zero");
return parse!T(input, base);
}
/// ditto
private T unformatValueImpl(T, Range, Char)(ref Range input, scope const ref FormatSpec!Char spec)
if (isFloatingPoint!T && !is(T == enum) && isInputRange!Range
&& isSomeChar!(ElementType!Range)&& !is(Range == enum))
{
import std.algorithm.searching : find;
import std.conv : parse, text;
if (spec.spec == 'r')
{
static if (is(immutable ElementEncodingType!Range == immutable char)
|| is(immutable ElementEncodingType!Range == immutable byte)
|| is(immutable ElementEncodingType!Range == immutable ubyte))
return rawRead!T(input);
else
throw new FormatException(
"The raw read specifier %r may only be used with narrow strings and ranges of bytes."
);
}
enforceFmt(find(acceptedSpecs!T, spec.spec).length,
text("Wrong unformat specifier '%", spec.spec , "' for ", T.stringof));
return parse!T(input);
}
/// ditto
private T unformatValueImpl(T, Range, Char)(ref Range input, scope const ref FormatSpec!Char spec)
if (isInputRange!Range && isSomeChar!T && !is(T == enum) && isSomeChar!(ElementType!Range))
{
import std.algorithm.searching : find;
import std.conv : to, text;
if (spec.spec == 's' || spec.spec == 'c')
{
auto result = to!T(input.front);
input.popFront();
return result;
}
enforceFmt(find(acceptedSpecs!T, spec.spec).length,
text("Wrong unformat specifier '%", spec.spec , "' for ", T.stringof));
static if (T.sizeof == 1)
return unformatValue!ubyte(input, spec);
else static if (T.sizeof == 2)
return unformatValue!ushort(input, spec);
else static if (T.sizeof == 4)
return unformatValue!uint(input, spec);
else
static assert(false, T.stringof ~ ".sizeof must be 1, 2, or 4 not " ~
to!string(T.sizeof));
}
/// ditto
private T unformatValueImpl(T, Range, Char)(ref Range input, scope const ref FormatSpec!Char fmt)
if (isInputRange!Range && is(StringTypeOf!T) && !isAggregateType!T && !is(T == enum))
{
import std.conv : text;
const spec = fmt.spec;
if (spec == '(')
{
return unformatRange!T(input, fmt);
}
enforceFmt(spec == 's',
text("Wrong unformat specifier '%", spec , "' for ", T.stringof));
static if (isStaticArray!T)
{
T result;
auto app = result[];
}
else
{
import std.array : appender;
auto app = appender!T();
}
if (fmt.trailing.empty)
{
for (; !input.empty; input.popFront())
{
static if (isStaticArray!T)
if (app.empty)
break;
app.put(input.front);
}
}
else
{
immutable end = fmt.trailing.front;
for (; !input.empty && input.front != end; input.popFront())
{
static if (isStaticArray!T)
if (app.empty)
break;
app.put(input.front);
}
}
static if (isStaticArray!T)
{
enforceFmt(app.empty, "need more input");
return result;
}
else
return app.data;
}
/// ditto
private T unformatValueImpl(T, Range, Char)(ref Range input, scope const ref FormatSpec!Char fmt)
if (isInputRange!Range && isArray!T && !is(StringTypeOf!T) && !isAggregateType!T && !is(T == enum))
{
import std.conv : parse, text;
const spec = fmt.spec;
if (spec == '(')
{
return unformatRange!T(input, fmt);
}
enforceFmt(spec == 's',
text("Wrong unformat specifier '%", spec , "' for ", T.stringof));
return parse!T(input);
}
/// ditto
private T unformatValueImpl(T, Range, Char)(ref Range input, scope const ref FormatSpec!Char fmt)
if (isInputRange!Range && isAssociativeArray!T && !is(T == enum))
{
import std.conv : parse, text;
const spec = fmt.spec;
if (spec == '(')
{
return unformatRange!T(input, fmt);
}
enforceFmt(spec == 's',
text("Wrong unformat specifier '%", spec , "' for ", T.stringof));
return parse!T(input);
}
/**
* Function that performs raw reading. Used by unformatValue
* for integral and float types.
*/
private T rawRead(T, Range)(ref Range input)
if (is(immutable ElementEncodingType!Range == immutable char)
|| is(immutable ElementEncodingType!Range == immutable byte)
|| is(immutable ElementEncodingType!Range == immutable ubyte))
{
union X
{
ubyte[T.sizeof] raw;
T typed;
}
X x;
foreach (i; 0 .. T.sizeof)
{
static if (isSomeString!Range)
{
x.raw[i] = input[0];
input = input[1 .. $];
}
else
{
// TODO: recheck this
x.raw[i] = input.front;
input.popFront();
}
}
return x.typed;
}
//debug = unformatRange;
private T unformatRange(T, Range, Char)(ref Range input, scope const ref FormatSpec!Char spec)
in
{
const char ss = spec.spec;
assert(ss == '(', "spec.spec must be '(' not " ~ ss);
}
do
{
debug (unformatRange) printf("unformatRange:\n");
T result;
static if (isStaticArray!T)
{
size_t i;
}
const(Char)[] cont = spec.trailing;
for (size_t j = 0; j < spec.trailing.length; ++j)
{
if (spec.trailing[j] == '%')
{
cont = spec.trailing[0 .. j];
break;
}
}
debug (unformatRange) printf("\t");
debug (unformatRange) if (!input.empty) printf("input.front = %c, ", input.front);
debug (unformatRange) printf("cont = %.*s\n", cast(int) cont.length, cont.ptr);
bool checkEnd()
{
return input.empty || !cont.empty && input.front == cont.front;
}
if (!checkEnd())
{
for (;;)
{
auto fmt = FormatSpec!Char(spec.nested);
fmt.readUpToNextSpec(input);
enforceFmt(!input.empty, "Unexpected end of input when parsing range");
debug (unformatRange) printf("\t) spec = %c, front = %c ", fmt.spec, input.front);
static if (isStaticArray!T)
{
result[i++] = unformatElement!(typeof(T.init[0]))(input, fmt);
}
else static if (isDynamicArray!T)
{
import std.conv : WideElementType;
result ~= unformatElement!(WideElementType!T)(input, fmt);
}
else static if (isAssociativeArray!T)
{
auto key = unformatElement!(typeof(T.init.keys[0]))(input, fmt);
fmt.readUpToNextSpec(input); // eat key separator
result[key] = unformatElement!(typeof(T.init.values[0]))(input, fmt);
}
debug (unformatRange) {
if (input.empty) printf("-> front = [empty] ");
else printf("-> front = %c ", input.front);
}
static if (isStaticArray!T)
{
debug (unformatRange) printf("i = %u < %u\n", i, T.length);
enforceFmt(i <= T.length, "Too many format specifiers for static array of length %d".format(T.length));
}
if (spec.sep !is null)
fmt.readUpToNextSpec(input);
auto sep = spec.sep !is null ? spec.sep
: fmt.trailing;
debug (unformatRange) {
if (!sep.empty && !input.empty) printf("-> %c, sep = %.*s\n", input.front, cast(int) sep.length, sep.ptr);
else printf("\n");
}
if (checkEnd())
break;
if (!sep.empty && input.front == sep.front)
{
while (!sep.empty)
{
enforceFmt(!input.empty, "Unexpected end of input when parsing range separator");
enforceFmt(input.front == sep.front, "Unexpected character when parsing range separator");
input.popFront();
sep.popFront();
}
debug (unformatRange) printf("input.front = %c\n", input.front);
}
}
}
static if (isStaticArray!T)
{
enforceFmt(i == T.length, "Too few (%d) format specifiers for static array of length %d".format(i, T.length));
}
return result;
}
// Undocumented
T unformatElement(T, Range, Char)(ref Range input, scope const ref FormatSpec!Char spec)
if (isInputRange!Range)
{
import std.conv : parseElement;
static if (isSomeString!T)
{
if (spec.spec == 's')
{
return parseElement!T(input);
}
}
else static if (isSomeChar!T)
{
if (spec.spec == 's')
{
return parseElement!T(input);
}
}
return unformatValue!T(input, spec);
}
private bool needToSwapEndianess(Char)(scope const ref FormatSpec!Char f)
{
import std.system : endian, Endian;
return endian == Endian.littleEndian && f.flPlus
|| endian == Endian.bigEndian && f.flDash;
}
/* ======================== Unit Tests ====================================== */
@system unittest
{
import std.conv : octal;
int i;
string s;
debug(format) printf("std.format.format.unittest\n");
s = format("hello world! %s %s %s%s%s", true, 57, 1_000_000_000, 'x', " foo");
assert(s == "hello world! true 57 1000000000x foo");
s = format("%s %A %s", 1.67, -1.28, float.nan);
assert(s == "1.67 -0X1.47AE147AE147BP+0 nan", s);
s = format("%x %X", 0x1234AF, 0xAFAFAFAF);
assert(s == "1234af AFAFAFAF");
s = format("%b %o", 0x1234AF, 0xAFAFAFAF);
assert(s == "100100011010010101111 25753727657");
s = format("%d %s", 0x1234AF, 0xAFAFAFAF);
assert(s == "1193135 2947526575");
}
version (TestComplex)
deprecated
@system unittest
{
string s = format("%s", 1.2 + 3.4i);
assert(s == "1.2+3.4i", s);
}
@system unittest
{
import std.conv : octal;
string s;
int i;
s = format("%#06.*f",2,12.345);
assert(s == "012.35");
s = format("%#0*.*f",6,2,12.345);
assert(s == "012.35");
s = format("%7.4g:", 12.678);
assert(s == " 12.68:");
s = format("%7.4g:", 12.678L);
assert(s == " 12.68:");
s = format("%04f|%05d|%#05x|%#5x",-4.0,-10,1,1);
assert(s == "-4.000000|-0010|0x001| 0x1");
i = -10;
s = format("%d|%3d|%03d|%1d|%01.4f",i,i,i,i,cast(double) i);
assert(s == "-10|-10|-10|-10|-10.0000");
i = -5;
s = format("%d|%3d|%03d|%1d|%01.4f",i,i,i,i,cast(double) i);
assert(s == "-5| -5|-05|-5|-5.0000");
i = 0;
s = format("%d|%3d|%03d|%1d|%01.4f",i,i,i,i,cast(double) i);
assert(s == "0| 0|000|0|0.0000");
i = 5;
s = format("%d|%3d|%03d|%1d|%01.4f",i,i,i,i,cast(double) i);
assert(s == "5| 5|005|5|5.0000");
i = 10;
s = format("%d|%3d|%03d|%1d|%01.4f",i,i,i,i,cast(double) i);
assert(s == "10| 10|010|10|10.0000");
s = format("%.0d", 0);
assert(s == "");
s = format("%.g", .34);
assert(s == "0.3");
s = format("%.0g", .34);
assert(s == "0.3");
s = format("%.2g", .34);
assert(s == "0.34");
s = format("%0.0008f", 1e-08);
assert(s == "0.00000001");
s = format("%0.0008f", 1e-05);
assert(s == "0.00001000");
s = "helloworld";
string r;
r = format("%.2s", s[0 .. 5]);
assert(r == "he");
r = format("%.20s", s[0 .. 5]);
assert(r == "hello");
r = format("%8s", s[0 .. 5]);
assert(r == " hello");
byte[] arrbyte = new byte[4];
arrbyte[0] = 100;
arrbyte[1] = -99;
arrbyte[3] = 0;
r = format("%s", arrbyte);
assert(r == "[100, -99, 0, 0]");
ubyte[] arrubyte = new ubyte[4];
arrubyte[0] = 100;
arrubyte[1] = 200;
arrubyte[3] = 0;
r = format("%s", arrubyte);
assert(r == "[100, 200, 0, 0]");
short[] arrshort = new short[4];
arrshort[0] = 100;
arrshort[1] = -999;
arrshort[3] = 0;
r = format("%s", arrshort);
assert(r == "[100, -999, 0, 0]");
ushort[] arrushort = new ushort[4];
arrushort[0] = 100;
arrushort[1] = 20_000;
arrushort[3] = 0;
r = format("%s", arrushort);
assert(r == "[100, 20000, 0, 0]");
int[] arrint = new int[4];
arrint[0] = 100;
arrint[1] = -999;
arrint[3] = 0;
r = format("%s", arrint);
assert(r == "[100, -999, 0, 0]");
long[] arrlong = new long[4];
arrlong[0] = 100;
arrlong[1] = -999;
arrlong[3] = 0;
r = format("%s", arrlong);
assert(r == "[100, -999, 0, 0]");
ulong[] arrulong = new ulong[4];
arrulong[0] = 100;
arrulong[1] = 999;
arrulong[3] = 0;
r = format("%s", arrulong);
assert(r == "[100, 999, 0, 0]");
string[] arr2 = new string[4];
arr2[0] = "hello";
arr2[1] = "world";
arr2[3] = "foo";
r = format("%s", arr2);
assert(r == `["hello", "world", "", "foo"]`);
r = format("%.8d", 7);
assert(r == "00000007");
r = format("%.8x", 10);
assert(r == "0000000a");
r = format("%-3d", 7);
assert(r == "7 ");
r = format("%-1*d", 4, 3);
assert(r == "3 ");
r = format("%*d", -3, 7);
assert(r == "7 ");
r = format("%.*d", -3, 7);
assert(r == "7");
r = format("%-1.*f", 2, 3.1415);
assert(r == "3.14");
r = format("abc"c);
assert(r == "abc");
//format() returns the same type as inputted.
wstring wr;
wr = format("def"w);
assert(wr == "def"w);
dstring dr;
dr = format("ghi"d);
assert(dr == "ghi"d);
// Empty static character arrays work as well
const char[0] cempty;
assert(format("test%spath", cempty) == "testpath");
const wchar[0] wempty;
assert(format("test%spath", wempty) == "testpath");
const dchar[0] dempty;
assert(format("test%spath", dempty) == "testpath");
void* p = cast(void*) 0xDEADBEEF;
r = format("%s", p);
assert(r == "DEADBEEF");
r = format("%#x", 0xabcd);
assert(r == "0xabcd");
r = format("%#X", 0xABCD);
assert(r == "0XABCD");
r = format("%#o", octal!12345);
assert(r == "012345");
r = format("%o", 9);
assert(r == "11");
r = format("%#o", 0); // https://issues.dlang.org/show_bug.cgi?id=15663
assert(r == "0");
r = format("%+d", 123);
assert(r == "+123");
r = format("%+d", -123);
assert(r == "-123");
r = format("% d", 123);
assert(r == " 123");
r = format("% d", -123);
assert(r == "-123");
r = format("%%");
assert(r == "%");
r = format("%d", true);
assert(r == "1");
r = format("%d", false);
assert(r == "0");
r = format("%d", 'a');
assert(r == "97");
wchar wc = 'a';
r = format("%d", wc);
assert(r == "97");
dchar dc = 'a';
r = format("%d", dc);
assert(r == "97");
byte b = byte.max;
r = format("%x", b);
assert(r == "7f");
r = format("%x", ++b);
assert(r == "80");
r = format("%x", ++b);
assert(r == "81");
short sh = short.max;
r = format("%x", sh);
assert(r == "7fff");
r = format("%x", ++sh);
assert(r == "8000");
r = format("%x", ++sh);
assert(r == "8001");
i = int.max;
r = format("%x", i);
assert(r == "7fffffff");
r = format("%x", ++i);
assert(r == "80000000");
r = format("%x", ++i);
assert(r == "80000001");
r = format("%x", 10);
assert(r == "a");
r = format("%X", 10);
assert(r == "A");
r = format("%x", 15);
assert(r == "f");
r = format("%X", 15);
assert(r == "F");
Object c = null;
r = format("%s", c);
assert(r == "null");
enum TestEnum
{
Value1, Value2
}
r = format("%s", TestEnum.Value2);
assert(r == "Value2");
immutable(char[5])[int] aa = ([3:"hello", 4:"betty"]);
r = format("%s", aa.values);
assert(r == `["hello", "betty"]` || r == `["betty", "hello"]`);
r = format("%s", aa);
assert(r == `[3:"hello", 4:"betty"]` || r == `[4:"betty", 3:"hello"]`);
static const dchar[] ds = ['a','b'];
for (int j = 0; j < ds.length; ++j)
{
r = format(" %d", ds[j]);
if (j == 0)
assert(r == " 97");
else
assert(r == " 98");
}
r = format(">%14d<, %s", 15, [1,2,3]);
assert(r == "> 15<, [1, 2, 3]");
assert(format("%8s", "bar") == " bar");
assert(format("%8s", "b\u00e9ll\u00f4") == " b\u00e9ll\u00f4");
}
// https://issues.dlang.org/show_bug.cgi?id=18205
@safe pure unittest
{
assert("|%8s|".format("abc") == "| abc|");
assert("|%8s|".format("αβγ") == "| αβγ|");
assert("|%8s|".format(" ") == "| |");
assert("|%8s|".format("été"d) == "| été|");
assert("|%8s|".format("été 2018"w) == "|été 2018|");
assert("%2s".format("e\u0301"w) == " e\u0301");
assert("%2s".format("a\u0310\u0337"d) == " a\u0310\u0337");
}
// https://issues.dlang.org/show_bug.cgi?id=3479
@safe unittest
{
import std.array;
auto stream = appender!(char[])();
formattedWrite(stream, "%2$.*1$d", 12, 10);
assert(stream.data == "000000000010", stream.data);
}
// https://issues.dlang.org/show_bug.cgi?id=6893
@safe unittest
{
import std.array;
enum E : ulong { A, B, C }
auto stream = appender!(char[])();
formattedWrite(stream, "%s", E.C);
assert(stream.data == "C");
}
// Used to check format strings are compatible with argument types
package static const checkFormatException(alias fmt, Args...) =
{
import std.conv : text;
try
{
auto n = .formattedWrite(NoOpSink(), fmt, Args.init);
enforceFmt(n == Args.length, text("Orphan format arguments: args[", n, "..", Args.length, "]"));
}
catch (Exception e)
return (e.msg == ctfpMessage) ? null : e;
return null;
}();
private void writeAligned(Writer, T, Char)(auto ref Writer w, T s, scope const ref FormatSpec!Char f)
if (isSomeString!T)
{
size_t width;
if (f.width > 0)
{
// check for non-ascii character
import std.algorithm.searching : any;
if (s.any!(a => a > 0x7F))
{
//TODO: optimize this
import std.uni : graphemeStride;
for (size_t i; i < s.length; i += graphemeStride(s, i))
++width;
}
else
width = s.length;
}
else
width = s.length;
if (!f.flDash)
{
// right align
if (f.width > width)
foreach (i ; 0 .. f.width - width) put(w, ' ');
put(w, s);
}
else
{
// left align
put(w, s);
if (f.width > width)
foreach (i ; 0 .. f.width - width) put(w, ' ');
}
}
@safe pure unittest
{
import std.array : appender;
auto w = appender!string();
auto spec = singleSpec("%s");
writeAligned(w, "a本Ä", spec);
assert(w.data == "a本Ä", w.data);
}
@safe pure unittest
{
import std.array : appender;
auto w = appender!string();
auto spec = singleSpec("%10s");
writeAligned(w, "a本Ä", spec);
assert(w.data == " a本Ä", "|" ~ w.data ~ "|");
}
@safe pure unittest
{
import std.array : appender;
auto w = appender!string();
auto spec = singleSpec("%-10s");
writeAligned(w, "a本Ä", spec);
assert(w.data == "a本Ä ", w.data);
}
/**
* Format arguments into a string.
*
* If the format string is fixed, passing it as a template parameter checks the
* type correctness of the parameters at compile-time. This also can result in
* better performance.
*
* Params: fmt = Format string. For detailed specification, see $(LREF formattedWrite).
* args = Variadic list of arguments to format into returned string.
*
* Throws:
* $(LREF, FormatException) if the number of arguments doesn't match the number
* of format parameters and vice-versa.
*/
typeof(fmt) format(alias fmt, Args...)(Args args)
if (isSomeString!(typeof(fmt)))
{
import std.array : appender;
alias e = checkFormatException!(fmt, Args);
alias Char = Unqual!(ElementEncodingType!(typeof(fmt)));
static assert(!e, e.msg);
auto w = appender!(immutable(Char)[]);
// no need to traverse the string twice during compile time
if (!__ctfe)
{
enum len = guessLength!Char(fmt);
w.reserve(len);
}
else
{
w.reserve(fmt.length);
}
formattedWrite(w, fmt, args);
return w.data;
}
/// Type checking can be done when fmt is known at compile-time:
@safe unittest
{
auto s = format!"%s is %s"("Pi", 3.14);
assert(s == "Pi is 3.14");
static assert(!__traits(compiles, {s = format!"%l"();})); // missing arg
static assert(!__traits(compiles, {s = format!""(404);})); // surplus arg
static assert(!__traits(compiles, {s = format!"%d"(4.03);})); // incompatible arg
}
// called during compilation to guess the length of the
// result of format
private size_t guessLength(Char, S)(S fmtString)
{
import std.array : appender;
size_t len;
auto output = appender!(immutable(Char)[])();
auto spec = FormatSpec!Char(fmtString);
while (spec.writeUpToNextSpec(output))
{
// take a guess
if (spec.width == 0 && (spec.precision == spec.UNSPECIFIED || spec.precision == spec.DYNAMIC))
{
switch (spec.spec)
{
case 'c':
++len;
break;
case 'd':
case 'x':
case 'X':
len += 3;
break;
case 'b':
len += 8;
break;
case 'f':
case 'F':
len += 10;
break;
case 's':
case 'e':
case 'E':
case 'g':
case 'G':
len += 12;
break;
default: break;
}
continue;
}
if ((spec.spec == 'e' || spec.spec == 'E' || spec.spec == 'g' ||
spec.spec == 'G' || spec.spec == 'f' || spec.spec == 'F') &&
spec.precision != spec.UNSPECIFIED && spec.precision != spec.DYNAMIC &&
spec.width == 0
)
{
len += spec.precision + 5;
continue;
}
if (spec.width == spec.precision)
len += spec.width;
else if (spec.width > 0 && spec.width != spec.DYNAMIC &&
(spec.precision == spec.UNSPECIFIED || spec.width > spec.precision))
{
len += spec.width;
}
else if (spec.precision != spec.UNSPECIFIED && spec.precision > spec.width)
len += spec.precision;
}
len += output.data.length;
return len;
}
@safe pure
unittest
{
assert(guessLength!char("%c") == 1);
assert(guessLength!char("%d") == 3);
assert(guessLength!char("%x") == 3);
assert(guessLength!char("%b") == 8);
assert(guessLength!char("%f") == 10);
assert(guessLength!char("%s") == 12);
assert(guessLength!char("%02d") == 2);
assert(guessLength!char("%02d") == 2);
assert(guessLength!char("%4.4d") == 4);
assert(guessLength!char("%2.4f") == 4);
assert(guessLength!char("%02d:%02d:%02d") == 8);
assert(guessLength!char("%0.2f") == 7);
assert(guessLength!char("%0*d") == 0);
}
/// ditto
immutable(Char)[] format(Char, Args...)(in Char[] fmt, Args args)
if (isSomeChar!Char)
{
import std.array : appender;
auto w = appender!(immutable(Char)[]);
auto n = formattedWrite(w, fmt, args);
version (all)
{
// In the future, this check will be removed to increase consistency
// with formattedWrite
import std.conv : text;
enforceFmt(n == args.length, text("Orphan format arguments: args[", n, "..", args.length, "]"));
}
return w.data;
}
@safe pure unittest
{
import core.exception;
import std.exception;
assertCTFEable!(
{
// assert(format(null) == "");
assert(format("foo") == "foo");
assert(format("foo%%") == "foo%");
assert(format("foo%s", 'C') == "fooC");
assert(format("%s foo", "bar") == "bar foo");
assert(format("%s foo %s", "bar", "abc") == "bar foo abc");
assert(format("foo %d", -123) == "foo -123");
assert(format("foo %d", 123) == "foo 123");
assertThrown!FormatException(format("foo %s"));
assertThrown!FormatException(format("foo %s", 123, 456));
assert(format("hel%slo%s%s%s", "world", -138, 'c', true) ==
"helworldlo-138ctrue");
});
assert(is(typeof(format("happy")) == string));
assert(is(typeof(format("happy"w)) == wstring));
assert(is(typeof(format("happy"d)) == dstring));
}
// https://issues.dlang.org/show_bug.cgi?id=16661
@safe unittest
{
assert(format("%.2f"d, 0.4) == "0.40");
assert("%02d"d.format(1) == "01"d);
}
/*****************************************************
* Format arguments into buffer $(I buf) which must be large
* enough to hold the result.
*
* Returns:
* The slice of `buf` containing the formatted string.
*
* Throws:
* A `RangeError` if `buf` isn't large enough to hold the
* formatted string.
*
* A $(LREF FormatException) if the length of `args` is different
* than the number of format specifiers in `fmt`.
*/
char[] sformat(alias fmt, Args...)(char[] buf, Args args)
if (isSomeString!(typeof(fmt)))
{
alias e = checkFormatException!(fmt, Args);
static assert(!e, e.msg);
return .sformat(buf, fmt, args);
}
/// ditto
char[] sformat(Char, Args...)(return scope char[] buf, scope const(Char)[] fmt, Args args)
{
import core.exception : RangeError;
import std.utf : encode;
static struct Sink
{
char[] buf;
size_t i;
void put(dchar c)
{
char[4] enc;
auto n = encode(enc, c);
if (buf.length < i + n)
throw new RangeError(__FILE__, __LINE__);
buf[i .. i + n] = enc[0 .. n];
i += n;
}
void put(scope const(char)[] s)
{
if (buf.length < i + s.length)
throw new RangeError(__FILE__, __LINE__);
buf[i .. i + s.length] = s[];
i += s.length;
}
void put(scope const(wchar)[] s)
{
for (; !s.empty; s.popFront())
put(s.front);
}
void put(scope const(dchar)[] s)
{
for (; !s.empty; s.popFront())
put(s.front);
}
}
auto sink = Sink(buf);
auto n = formattedWrite(sink, fmt, args);
version (all)
{
// In the future, this check will be removed to increase consistency
// with formattedWrite
import std.conv : text;
enforceFmt(
n == args.length,
text("Orphan format arguments: args[", n, " .. ", args.length, "]")
);
}
return buf[0 .. sink.i];
}
/// The format string can be checked at compile-time (see $(LREF format) for details):
@system unittest
{
char[10] buf;
assert(buf[].sformat!"foo%s"('C') == "fooC");
assert(sformat(buf[], "%s foo", "bar") == "bar foo");
}
@system unittest
{
import core.exception;
debug(string) trustedPrintf("std.string.sformat.unittest\n");
import std.exception;
assertCTFEable!(
{
char[10] buf;
assert(sformat(buf[], "foo") == "foo");
assert(sformat(buf[], "foo%%") == "foo%");
assert(sformat(buf[], "foo%s", 'C') == "fooC");
assert(sformat(buf[], "%s foo", "bar") == "bar foo");
assertThrown!RangeError(sformat(buf[], "%s foo %s", "bar", "abc"));
assert(sformat(buf[], "foo %d", -123) == "foo -123");
assert(sformat(buf[], "foo %d", 123) == "foo 123");
assertThrown!FormatException(sformat(buf[], "foo %s"));
assertThrown!FormatException(sformat(buf[], "foo %s", 123, 456));
assert(sformat(buf[], "%s %s %s", "c"c, "w"w, "d"d) == "c w d");
});
}
@system unittest // ensure that sformat avoids the GC
{
import core.memory : GC;
const a = ["foo", "bar"];
const u = GC.stats().usedSize;
char[20] buf;
sformat(buf, "%d", 123);
sformat(buf, "%s", a);
sformat(buf, "%s", 'c');
assert(u == GC.stats().usedSize);
}
/*****************************
* The .ptr is unsafe because it could be dereferenced and the length of the array may be 0.
* Returns:
* the difference between the starts of the arrays
*/
@trusted private pure nothrow @nogc
ptrdiff_t arrayPtrDiff(T)(const T[] array1, const T[] array2)
{
return array1.ptr - array2.ptr;
}
@safe unittest
{
assertCTFEable!({
auto tmp = format("%,d", 1000);
assert(tmp == "1,000", "'" ~ tmp ~ "'");
tmp = format("%,?d", 'z', 1234567);
assert(tmp == "1z234z567", "'" ~ tmp ~ "'");
tmp = format("%10,?d", 'z', 1234567);
assert(tmp == " 1z234z567", "'" ~ tmp ~ "'");
tmp = format("%11,2?d", 'z', 1234567);
assert(tmp == " 1z23z45z67", "'" ~ tmp ~ "'");
tmp = format("%11,*?d", 2, 'z', 1234567);
assert(tmp == " 1z23z45z67", "'" ~ tmp ~ "'");
tmp = format("%11,*d", 2, 1234567);
assert(tmp == " 1,23,45,67", "'" ~ tmp ~ "'");
tmp = format("%11,2d", 1234567);
assert(tmp == " 1,23,45,67", "'" ~ tmp ~ "'");
});
}
@safe unittest
{
auto tmp = format("%,f", 1000.0);
assert(tmp == "1,000.000000", "'" ~ tmp ~ "'");
tmp = format("%,f", 1234567.891011);
assert(tmp == "1,234,567.891011", "'" ~ tmp ~ "'");
tmp = format("%,f", -1234567.891011);
assert(tmp == "-1,234,567.891011", "'" ~ tmp ~ "'");
tmp = format("%,2f", 1234567.891011);
assert(tmp == "1,23,45,67.891011", "'" ~ tmp ~ "'");
tmp = format("%18,f", 1234567.891011);
assert(tmp == " 1,234,567.891011", "'" ~ tmp ~ "'");
tmp = format("%18,?f", '.', 1234567.891011);
assert(tmp == " 1.234.567.891011", "'" ~ tmp ~ "'");
tmp = format("%,?.3f", 'ä', 1234567.891011);
assert(tmp == "1ä234ä567.891", "'" ~ tmp ~ "'");
tmp = format("%,*?.3f", 1, 'ä', 1234567.891011);
assert(tmp == "1ä2ä3ä4ä5ä6ä7.891", "'" ~ tmp ~ "'");
tmp = format("%,4?.3f", '_', 1234567.891011);
assert(tmp == "123_4567.891", "'" ~ tmp ~ "'");
tmp = format("%12,3.3f", 1234.5678);
assert(tmp == " 1,234.568", "'" ~ tmp ~ "'");
tmp = format("%,e", 3.141592653589793238462);
assert(tmp == "3.141593e+00", "'" ~ tmp ~ "'");
tmp = format("%15,e", 3.141592653589793238462);
assert(tmp == " 3.141593e+00", "'" ~ tmp ~ "'");
tmp = format("%15,e", -3.141592653589793238462);
assert(tmp == " -3.141593e+00", "'" ~ tmp ~ "'");
tmp = format("%.4,*e", 2, 3.141592653589793238462);
assert(tmp == "3.1416e+00", "'" ~ tmp ~ "'");
tmp = format("%13.4,*e", 2, 3.141592653589793238462);
assert(tmp == " 3.1416e+00", "'" ~ tmp ~ "'");
tmp = format("%,.0f", 3.14);
assert(tmp == "3", "'" ~ tmp ~ "'");
tmp = format("%3,g", 1_000_000.123456);
assert(tmp == "1e+06", "'" ~ tmp ~ "'");
tmp = format("%19,?f", '.', -1234567.891011);
assert(tmp == " -1.234.567.891011", "'" ~ tmp ~ "'");
}
// Test for multiple indexes
@safe unittest
{
auto tmp = format("%2:5$s", 1, 2, 3, 4, 5);
assert(tmp == "2345", tmp);
}
// https://issues.dlang.org/show_bug.cgi?id=18047
@safe unittest
{
auto cmp = " 123,456";
assert(cmp.length == 12, format("%d", cmp.length));
auto tmp = format("%12,d", 123456);
assert(tmp.length == 12, format("%d", tmp.length));
assert(tmp == cmp, "'" ~ tmp ~ "'");
}
// https://issues.dlang.org/show_bug.cgi?id=17459
@safe unittest
{
auto cmp = "100";
auto tmp = format("%0d", 100);
assert(tmp == cmp, tmp);
cmp = "0100";
tmp = format("%04d", 100);
assert(tmp == cmp, tmp);
cmp = "0,000,000,100";
tmp = format("%012,3d", 100);
assert(tmp == cmp, tmp);
cmp = "0,000,001,000";
tmp = format("%012,3d", 1_000);
assert(tmp == cmp, tmp);
cmp = "0,000,100,000";
tmp = format("%012,3d", 100_000);
assert(tmp == cmp, tmp);
cmp = "0,001,000,000";
tmp = format("%012,3d", 1_000_000);
assert(tmp == cmp, tmp);
cmp = "0,100,000,000";
tmp = format("%012,3d", 100_000_000);
assert(tmp == cmp, tmp);
}
// https://issues.dlang.org/show_bug.cgi?id=17459
@safe unittest
{
auto cmp = "100,000";
auto tmp = format("%06,d", 100_000);
assert(tmp == cmp, tmp);
cmp = "100,000";
tmp = format("%07,d", 100_000);
assert(tmp == cmp, tmp);
cmp = "0,100,000";
tmp = format("%08,d", 100_000);
assert(tmp == cmp, tmp);
}
// https://issues.dlang.org/show_bug.cgi?id=20288
@safe unittest
{
string s = format("%,.2f", double.nan);
assert(s == "nan", s);
s = format("%,.2F", double.nan);
assert(s == "NAN", s);
s = format("%,.2f", -double.nan);
assert(s == "-nan", s);
s = format("%,.2F", -double.nan);
assert(s == "-NAN", s);
string g = format("^%13s$", "nan");
string h = "^ nan$";
assert(g == h, "\ngot:" ~ g ~ "\nexp:" ~ h);
string a = format("^%13,3.2f$", double.nan);
string b = format("^%13,3.2F$", double.nan);
string c = format("^%13,3.2f$", -double.nan);
string d = format("^%13,3.2F$", -double.nan);
assert(a == "^ nan$", "\ngot:'"~ a ~ "'\nexp:'^ nan$'");
assert(b == "^ NAN$", "\ngot:'"~ b ~ "'\nexp:'^ NAN$'");
assert(c == "^ -nan$", "\ngot:'"~ c ~ "'\nexp:'^ -nan$'");
assert(d == "^ -NAN$", "\ngot:'"~ d ~ "'\nexp:'^ -NAN$'");
a = format("^%-13,3.2f$", double.nan);
b = format("^%-13,3.2F$", double.nan);
c = format("^%-13,3.2f$", -double.nan);
d = format("^%-13,3.2F$", -double.nan);
assert(a == "^nan $", "\ngot:'"~ a ~ "'\nexp:'^nan $'");
assert(b == "^NAN $", "\ngot:'"~ b ~ "'\nexp:'^NAN $'");
assert(c == "^-nan $", "\ngot:'"~ c ~ "'\nexp:'^-nan $'");
assert(d == "^-NAN $", "\ngot:'"~ d ~ "'\nexp:'^-NAN $'");
a = format("^%+13,3.2f$", double.nan);
b = format("^%+13,3.2F$", double.nan);
c = format("^%+13,3.2f$", -double.nan);
d = format("^%+13,3.2F$", -double.nan);
assert(a == "^ +nan$", "\ngot:'"~ a ~ "'\nexp:'^ +nan$'");
assert(b == "^ +NAN$", "\ngot:'"~ b ~ "'\nexp:'^ +NAN$'");
assert(c == "^ -nan$", "\ngot:'"~ c ~ "'\nexp:'^ -nan$'");
assert(d == "^ -NAN$", "\ngot:'"~ d ~ "'\nexp:'^ -NAN$'");
a = format("^%-+13,3.2f$", double.nan);
b = format("^%-+13,3.2F$", double.nan);
c = format("^%-+13,3.2f$", -double.nan);
d = format("^%-+13,3.2F$", -double.nan);
assert(a == "^+nan $", "\ngot:'"~ a ~ "'\nexp:'^+nan $'");
assert(b == "^+NAN $", "\ngot:'"~ b ~ "'\nexp:'^+NAN $'");
assert(c == "^-nan $", "\ngot:'"~ c ~ "'\nexp:'^-nan $'");
assert(d == "^-NAN $", "\ngot:'"~ d ~ "'\nexp:'^-NAN $'");
a = format("^%- 13,3.2f$", double.nan);
b = format("^%- 13,3.2F$", double.nan);
c = format("^%- 13,3.2f$", -double.nan);
d = format("^%- 13,3.2F$", -double.nan);
assert(a == "^ nan $", "\ngot:'"~ a ~ "'\nexp:'^ nan $'");
assert(b == "^ NAN $", "\ngot:'"~ b ~ "'\nexp:'^ NAN $'");
assert(c == "^-nan $", "\ngot:'"~ c ~ "'\nexp:'^-nan $'");
assert(d == "^-NAN $", "\ngot:'"~ d ~ "'\nexp:'^-NAN $'");
}
private auto printFloat(T, Char)(return char[] buf, T val, FormatSpec!Char f,
RoundingMode rm = RoundingMode.toNearestTiesToEven)
if (is(T == float) || is(T == double) || (is(T == real) && T.mant_dig == double.mant_dig))
{
union FloatBits
{
T floatValue;
ulong ulongValue;
}
FloatBits fb;
fb.floatValue = val;
ulong ival = fb.ulongValue;
static if (!is(T == float))
{
version (DigitalMars)
{
// hack to work around https://issues.dlang.org/show_bug.cgi?id=20363
ival ^= rm;
ival ^= rm;
}
}
import std.math : log2;
enum log2_max_exp = cast(int) log2(T.max_exp);
ulong mnt = ival & ((1L << (T.mant_dig - 1)) - 1);
int exp = (ival >> (T.mant_dig - 1)) & ((1L << (log2_max_exp + 1)) - 1);
enum maxexp = 2 * T.max_exp - 1;
string sgn = (ival >> (T.mant_dig + log2_max_exp)) & 1 ? "-" : "";
if (sgn == "" && f.flPlus) sgn = "+";
if (sgn == "" && f.flSpace) sgn = " ";
assert(f.spec == 'a' || f.spec == 'A' || f.spec == 'e' || f.spec == 'E');
bool is_upper = f.spec == 'A' || f.spec == 'E';
// special treatment for nan and inf
if (exp == maxexp)
{
import std.algorithm.comparison : max;
size_t length = max(f.width, sgn.length + 3);
char[] result = length <= buf.length ? buf[0 .. length] : new char[length];
result[] = ' ';
auto offset = f.flDash ? 0 : (result.length - 3);
if (sgn != "")
{
if (f.flDash) ++offset;
result[offset-1] = sgn[0];
}
result[offset .. offset + 3] = (mnt == 0) ? ( is_upper ? "INF" : "inf" ) : ( is_upper ? "NAN" : "nan" );
return result;
}
final switch (f.spec)
{
case 'a': case 'A':
return printFloatA(buf, val, f, rm, sgn, exp, mnt, is_upper);
case 'e': case 'E':
return printFloatE(buf, val, f, rm, sgn, exp, mnt, is_upper);
}
}
private auto printFloatA(T, Char)(return char[] buf, T val, FormatSpec!Char f, RoundingMode rm,
string sgn, int exp, ulong mnt, bool is_upper)
if (is(T == float) || is(T == double) || (is(T == real) && T.mant_dig == double.mant_dig))
{
import std.algorithm.comparison : max;
enum char[16] alpha = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'];
enum char[16] Alpha = ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'];
enum int bias = T.max_exp - 1;
static if (is(T == float))
{
mnt <<= 1; // make mnt dividable by 4
enum mant_len = T.mant_dig;
}
else
enum mant_len = T.mant_dig - 1;
static assert(mant_len % 4 == 0);
// print full mantissa
char[(mant_len - 1) / 4 + 1] hex_mant;
size_t hex_mant_pos = 0;
size_t pos = mant_len;
while (pos >= 4 && (mnt & ((1L << pos) - 1)) != 0)
{
pos -= 4;
size_t tmp = (mnt >> pos) & 15;
hex_mant[hex_mant_pos++] = is_upper ? Alpha[tmp] : alpha[tmp];
}
// save integer part
auto first = exp == 0 ? '0' : '1';
// print exponent
if (exp == 0 && mnt == 0)
exp = 0; // special treatment for 0.0
else if (exp == 0)
exp = 1 - bias; // denormalized number
else
exp -= bias;
auto exp_sgn = exp >= 0 ? '+' : '-';
if (exp < 0) exp = -exp;
static if (is(T == float))
enum max_exp_digits = 4;
else
enum max_exp_digits = 5;
char[max_exp_digits] exp_str;
size_t exp_pos = max_exp_digits;
do
{
exp_str[--exp_pos] = '0' + exp%10;
exp /= 10;
} while (exp>0);
exp_str[--exp_pos] = exp_sgn;
// calculate needed buffer width
auto precision = f.precision == f.UNSPECIFIED ? hex_mant_pos : f.precision;
bool dot = precision > 0 || f.flHash;
size_t width = sgn.length + 3 + (dot ? 1 : 0) + precision + 1 + (max_exp_digits - exp_pos);
size_t length = max(width,f.width);
char[] buffer = length <= buf.length ? buf[0 .. length] : new char[length];
size_t b_pos = 0;
size_t delta = f.width - width; // only used, when f.width > width
// fill buffer
if (!f.flDash && !f.flZero && f.width > width)
{
buffer[b_pos .. b_pos + delta] = ' ';
b_pos += delta;
}
if (sgn != "") buffer[b_pos++] = sgn[0];
buffer[b_pos++] = '0';
buffer[b_pos++] = is_upper ? 'X' : 'x';
if (!f.flDash && f.flZero && f.width > width)
{
buffer[b_pos .. b_pos + delta] = '0';
b_pos += delta;
}
buffer[b_pos++] = first;
if (dot) buffer[b_pos++] = '.';
if (precision < hex_mant_pos)
{
buffer[b_pos .. b_pos + precision] = hex_mant[0 .. precision];
b_pos += precision;
enum roundType { ZERO, LOWER, FIVE, UPPER }
roundType next;
if (hex_mant[precision] == '0')
next = roundType.ZERO;
else if (hex_mant[precision] < '8')
next = roundType.LOWER;
else if (hex_mant[precision] > '8')
next = roundType.UPPER;
else
next = roundType.FIVE;
if (next == roundType.ZERO || next == roundType.FIVE)
{
foreach (i;precision + 1 .. hex_mant_pos)
{
if (hex_mant[i] > '0')
{
next = next == roundType.ZERO ? roundType.LOWER : roundType.UPPER;
break;
}
}
}
bool roundUp = false;
if (rm == RoundingMode.up)
roundUp = next != roundType.ZERO && sgn != "-";
else if (rm == RoundingMode.down)
roundUp = next != roundType.ZERO && sgn == "-";
else if (rm == RoundingMode.toZero)
roundUp = false;
else
{
assert(rm == RoundingMode.toNearestTiesToEven || rm == RoundingMode.toNearestTiesAwayFromZero);
roundUp = next == roundType.UPPER;
if (next == roundType.FIVE)
{
// IEEE754 allows for two different ways of implementing roundToNearest:
//
// Round to nearest, ties away from zero
if (rm == RoundingMode.toNearestTiesAwayFromZero)
roundUp = true;
else
{
// Round to nearest, ties to even
auto last = buffer[b_pos-1];
if (last == '.') last = buffer[b_pos-2];
roundUp = (last <= '9' && last % 2 != 0) || (last >= '9' && last % 2 == 0);
}
}
}
if (roundUp)
{
foreach_reverse (i;b_pos - precision - 2 .. b_pos)
{
if (buffer[i] == '.') continue;
if (buffer[i] == 'f' || buffer[i] == 'F')
buffer[i] = '0';
else
{
if (buffer[i] == '9')
buffer[i] = is_upper ? 'A' : 'a';
else
buffer[i]++;
break;
}
}
}
}
else
{
buffer[b_pos .. b_pos + hex_mant_pos] = hex_mant[0 .. hex_mant_pos];
buffer[b_pos + hex_mant_pos .. b_pos + precision] = '0';
b_pos += precision;
}
buffer[b_pos++] = is_upper ? 'P' : 'p';
buffer[b_pos .. b_pos + (max_exp_digits - exp_pos)] = exp_str[exp_pos .. $];
b_pos += max_exp_digits - exp_pos;
if (f.flDash && f.width > width)
{
buffer[b_pos .. b_pos + delta] = ' ';
b_pos += delta;
}
return buffer[0 .. b_pos];
}
@safe unittest
{
auto f = FormatSpec!dchar("");
f.spec = 'a';
char[256] buf;
assert(printFloat(buf[], float.nan, f) == "nan");
assert(printFloat(buf[], -float.nan, f) == "-nan");
assert(printFloat(buf[], float.infinity, f) == "inf");
assert(printFloat(buf[], -float.infinity, f) == "-inf");
assert(printFloat(buf[], 0.0f, f) == "0x0p+0");
assert(printFloat(buf[], -0.0f, f) == "-0x0p+0");
assert(printFloat(buf[], double.nan, f) == "nan");
assert(printFloat(buf[], -double.nan, f) == "-nan");
assert(printFloat(buf[], double.infinity, f) == "inf");
assert(printFloat(buf[], -double.infinity, f) == "-inf");
assert(printFloat(buf[], 0.0, f) == "0x0p+0");
assert(printFloat(buf[], -0.0, f) == "-0x0p+0");
import std.math : nextUp;
assert(printFloat(buf[], nextUp(0.0f), f) == "0x0.000002p-126");
assert(printFloat(buf[], float.epsilon, f) == "0x1p-23");
assert(printFloat(buf[], float.min_normal, f) == "0x1p-126");
assert(printFloat(buf[], float.max, f) == "0x1.fffffep+127");
assert(printFloat(buf[], nextUp(0.0), f) == "0x0.0000000000001p-1022");
assert(printFloat(buf[], double.epsilon, f) == "0x1p-52");
assert(printFloat(buf[], double.min_normal, f) == "0x1p-1022");
assert(printFloat(buf[], double.max, f) == "0x1.fffffffffffffp+1023");
import std.math : E, PI, PI_2, PI_4, M_1_PI, M_2_PI, M_2_SQRTPI,
LN10, LN2, LOG2, LOG2E, LOG2T, LOG10E, SQRT2, SQRT1_2;
assert(printFloat(buf[], cast(float) E, f) == "0x1.5bf0a8p+1");
assert(printFloat(buf[], cast(float) PI, f) == "0x1.921fb6p+1");
assert(printFloat(buf[], cast(float) PI_2, f) == "0x1.921fb6p+0");
assert(printFloat(buf[], cast(float) PI_4, f) == "0x1.921fb6p-1");
assert(printFloat(buf[], cast(float) M_1_PI, f) == "0x1.45f306p-2");
assert(printFloat(buf[], cast(float) M_2_PI, f) == "0x1.45f306p-1");
assert(printFloat(buf[], cast(float) M_2_SQRTPI, f) == "0x1.20dd76p+0");
assert(printFloat(buf[], cast(float) LN10, f) == "0x1.26bb1cp+1");
assert(printFloat(buf[], cast(float) LN2, f) == "0x1.62e43p-1");
assert(printFloat(buf[], cast(float) LOG2, f) == "0x1.344136p-2");
assert(printFloat(buf[], cast(float) LOG2E, f) == "0x1.715476p+0");
assert(printFloat(buf[], cast(float) LOG2T, f) == "0x1.a934fp+1");
assert(printFloat(buf[], cast(float) LOG10E, f) == "0x1.bcb7b2p-2");
assert(printFloat(buf[], cast(float) SQRT2, f) == "0x1.6a09e6p+0");
assert(printFloat(buf[], cast(float) SQRT1_2, f) == "0x1.6a09e6p-1");
assert(printFloat(buf[], cast(double) E, f) == "0x1.5bf0a8b145769p+1");
assert(printFloat(buf[], cast(double) PI, f) == "0x1.921fb54442d18p+1");
assert(printFloat(buf[], cast(double) PI_2, f) == "0x1.921fb54442d18p+0");
assert(printFloat(buf[], cast(double) PI_4, f) == "0x1.921fb54442d18p-1");
assert(printFloat(buf[], cast(double) M_1_PI, f) == "0x1.45f306dc9c883p-2");
assert(printFloat(buf[], cast(double) M_2_PI, f) == "0x1.45f306dc9c883p-1");
assert(printFloat(buf[], cast(double) M_2_SQRTPI, f) == "0x1.20dd750429b6dp+0");
assert(printFloat(buf[], cast(double) LN10, f) == "0x1.26bb1bbb55516p+1");
assert(printFloat(buf[], cast(double) LN2, f) == "0x1.62e42fefa39efp-1");
assert(printFloat(buf[], cast(double) LOG2, f) == "0x1.34413509f79ffp-2");
assert(printFloat(buf[], cast(double) LOG2E, f) == "0x1.71547652b82fep+0");
assert(printFloat(buf[], cast(double) LOG2T, f) == "0x1.a934f0979a371p+1");
assert(printFloat(buf[], cast(double) LOG10E, f) == "0x1.bcb7b1526e50ep-2");
assert(printFloat(buf[], cast(double) SQRT2, f) == "0x1.6a09e667f3bcdp+0");
assert(printFloat(buf[], cast(double) SQRT1_2, f) == "0x1.6a09e667f3bcdp-1");
}
@safe unittest
{
auto f = FormatSpec!dchar("");
f.spec = 'a';
f.precision = 3;
char[32] buf;
assert(printFloat(buf[], 1.0f, f) == "0x1.000p+0");
assert(printFloat(buf[], 3.3f, f) == "0x1.a66p+1");
assert(printFloat(buf[], 2.9f, f) == "0x1.733p+1");
assert(printFloat(buf[], 1.0, f) == "0x1.000p+0");
assert(printFloat(buf[], 3.3, f) == "0x1.a66p+1");
assert(printFloat(buf[], 2.9, f) == "0x1.733p+1");
}
@safe unittest
{
auto f = FormatSpec!dchar("");
f.spec = 'a';
f.precision = 0;
char[32] buf;
assert(printFloat(buf[], 1.0f, f) == "0x1p+0");
assert(printFloat(buf[], 3.3f, f) == "0x2p+1");
assert(printFloat(buf[], 2.9f, f) == "0x1p+1");
assert(printFloat(buf[], 1.0, f) == "0x1p+0");
assert(printFloat(buf[], 3.3, f) == "0x2p+1");
assert(printFloat(buf[], 2.9, f) == "0x1p+1");
}
@safe unittest
{
auto f = FormatSpec!dchar("");
f.spec = 'a';
f.precision = 0;
f.flHash = true;
char[32] buf;
assert(printFloat(buf[], 1.0f, f) == "0x1.p+0");
assert(printFloat(buf[], 3.3f, f) == "0x2.p+1");
assert(printFloat(buf[], 2.9f, f) == "0x1.p+1");
assert(printFloat(buf[], 1.0, f) == "0x1.p+0");
assert(printFloat(buf[], 3.3, f) == "0x2.p+1");
assert(printFloat(buf[], 2.9, f) == "0x1.p+1");
}
@safe unittest
{
auto f = FormatSpec!dchar("");
f.spec = 'a';
f.width = 22;
char[32] buf;
assert(printFloat(buf[], 1.0f, f) == " 0x1p+0");
assert(printFloat(buf[], 3.3f, f) == " 0x1.a66666p+1");
assert(printFloat(buf[], 2.9f, f) == " 0x1.733334p+1");
assert(printFloat(buf[], 1.0, f) == " 0x1p+0");
assert(printFloat(buf[], 3.3, f) == " 0x1.a666666666666p+1");
assert(printFloat(buf[], 2.9, f) == " 0x1.7333333333333p+1");
}
@safe unittest
{
auto f = FormatSpec!dchar("");
f.spec = 'a';
f.width = 22;
f.flDash = true;
char[32] buf;
assert(printFloat(buf[], 1.0f, f) == "0x1p+0 ");
assert(printFloat(buf[], 3.3f, f) == "0x1.a66666p+1 ");
assert(printFloat(buf[], 2.9f, f) == "0x1.733334p+1 ");
assert(printFloat(buf[], 1.0, f) == "0x1p+0 ");
assert(printFloat(buf[], 3.3, f) == "0x1.a666666666666p+1 ");
assert(printFloat(buf[], 2.9, f) == "0x1.7333333333333p+1 ");
}
@safe unittest
{
auto f = FormatSpec!dchar("");
f.spec = 'a';
f.width = 22;
f.flZero = true;
char[32] buf;
assert(printFloat(buf[], 1.0f, f) == "0x00000000000000001p+0");
assert(printFloat(buf[], 3.3f, f) == "0x0000000001.a66666p+1");
assert(printFloat(buf[], 2.9f, f) == "0x0000000001.733334p+1");
assert(printFloat(buf[], 1.0, f) == "0x00000000000000001p+0");
assert(printFloat(buf[], 3.3, f) == "0x001.a666666666666p+1");
assert(printFloat(buf[], 2.9, f) == "0x001.7333333333333p+1");
}
@safe unittest
{
auto f = FormatSpec!dchar("");
f.spec = 'a';
f.width = 22;
f.flPlus = true;
char[32] buf;
assert(printFloat(buf[], 1.0f, f) == " +0x1p+0");
assert(printFloat(buf[], 3.3f, f) == " +0x1.a66666p+1");
assert(printFloat(buf[], 2.9f, f) == " +0x1.733334p+1");
assert(printFloat(buf[], 1.0, f) == " +0x1p+0");
assert(printFloat(buf[], 3.3, f) == " +0x1.a666666666666p+1");
assert(printFloat(buf[], 2.9, f) == " +0x1.7333333333333p+1");
}
@safe unittest
{
auto f = FormatSpec!dchar("");
f.spec = 'a';
f.width = 22;
f.flDash = true;
f.flSpace = true;
char[32] buf;
assert(printFloat(buf[], 1.0f, f) == " 0x1p+0 ");
assert(printFloat(buf[], 3.3f, f) == " 0x1.a66666p+1 ");
assert(printFloat(buf[], 2.9f, f) == " 0x1.733334p+1 ");
assert(printFloat(buf[], 1.0, f) == " 0x1p+0 ");
assert(printFloat(buf[], 3.3, f) == " 0x1.a666666666666p+1 ");
assert(printFloat(buf[], 2.9, f) == " 0x1.7333333333333p+1 ");
}
@safe unittest
{
auto f = FormatSpec!dchar("");
f.spec = 'a';
f.precision = 1;
char[32] buf;
assert(printFloat(buf[], 0x1.18p0, f, RoundingMode.toNearestTiesAwayFromZero) == "0x1.2p+0");
assert(printFloat(buf[], 0x1.28p0, f, RoundingMode.toNearestTiesAwayFromZero) == "0x1.3p+0");
assert(printFloat(buf[], 0x1.1ap0, f, RoundingMode.toNearestTiesAwayFromZero) == "0x1.2p+0");
assert(printFloat(buf[], 0x1.16p0, f, RoundingMode.toNearestTiesAwayFromZero) == "0x1.1p+0");
assert(printFloat(buf[], 0x1.10p0, f, RoundingMode.toNearestTiesAwayFromZero) == "0x1.1p+0");
assert(printFloat(buf[], -0x1.18p0, f, RoundingMode.toNearestTiesAwayFromZero) == "-0x1.2p+0");
assert(printFloat(buf[], -0x1.28p0, f, RoundingMode.toNearestTiesAwayFromZero) == "-0x1.3p+0");
assert(printFloat(buf[], -0x1.1ap0, f, RoundingMode.toNearestTiesAwayFromZero) == "-0x1.2p+0");
assert(printFloat(buf[], -0x1.16p0, f, RoundingMode.toNearestTiesAwayFromZero) == "-0x1.1p+0");
assert(printFloat(buf[], -0x1.10p0, f, RoundingMode.toNearestTiesAwayFromZero) == "-0x1.1p+0");
assert(printFloat(buf[], 0x1.18p0, f) == "0x1.2p+0");
assert(printFloat(buf[], 0x1.28p0, f) == "0x1.2p+0");
assert(printFloat(buf[], 0x1.1ap0, f) == "0x1.2p+0");
assert(printFloat(buf[], 0x1.16p0, f) == "0x1.1p+0");
assert(printFloat(buf[], 0x1.10p0, f) == "0x1.1p+0");
assert(printFloat(buf[], -0x1.18p0, f) == "-0x1.2p+0");
assert(printFloat(buf[], -0x1.28p0, f) == "-0x1.2p+0");
assert(printFloat(buf[], -0x1.1ap0, f) == "-0x1.2p+0");
assert(printFloat(buf[], -0x1.16p0, f) == "-0x1.1p+0");
assert(printFloat(buf[], -0x1.10p0, f) == "-0x1.1p+0");
assert(printFloat(buf[], 0x1.18p0, f, RoundingMode.toZero) == "0x1.1p+0");
assert(printFloat(buf[], 0x1.28p0, f, RoundingMode.toZero) == "0x1.2p+0");
assert(printFloat(buf[], 0x1.1ap0, f, RoundingMode.toZero) == "0x1.1p+0");
assert(printFloat(buf[], 0x1.16p0, f, RoundingMode.toZero) == "0x1.1p+0");
assert(printFloat(buf[], 0x1.10p0, f, RoundingMode.toZero) == "0x1.1p+0");
assert(printFloat(buf[], -0x1.18p0, f, RoundingMode.toZero) == "-0x1.1p+0");
assert(printFloat(buf[], -0x1.28p0, f, RoundingMode.toZero) == "-0x1.2p+0");
assert(printFloat(buf[], -0x1.1ap0, f, RoundingMode.toZero) == "-0x1.1p+0");
assert(printFloat(buf[], -0x1.16p0, f, RoundingMode.toZero) == "-0x1.1p+0");
assert(printFloat(buf[], -0x1.10p0, f, RoundingMode.toZero) == "-0x1.1p+0");
assert(printFloat(buf[], 0x1.18p0, f, RoundingMode.up) == "0x1.2p+0");
assert(printFloat(buf[], 0x1.28p0, f, RoundingMode.up) == "0x1.3p+0");
assert(printFloat(buf[], 0x1.1ap0, f, RoundingMode.up) == "0x1.2p+0");
assert(printFloat(buf[], 0x1.16p0, f, RoundingMode.up) == "0x1.2p+0");
assert(printFloat(buf[], 0x1.10p0, f, RoundingMode.up) == "0x1.1p+0");
assert(printFloat(buf[], -0x1.18p0, f, RoundingMode.up) == "-0x1.1p+0");
assert(printFloat(buf[], -0x1.28p0, f, RoundingMode.up) == "-0x1.2p+0");
assert(printFloat(buf[], -0x1.1ap0, f, RoundingMode.up) == "-0x1.1p+0");
assert(printFloat(buf[], -0x1.16p0, f, RoundingMode.up) == "-0x1.1p+0");
assert(printFloat(buf[], -0x1.10p0, f, RoundingMode.up) == "-0x1.1p+0");
assert(printFloat(buf[], 0x1.18p0, f, RoundingMode.down) == "0x1.1p+0");
assert(printFloat(buf[], 0x1.28p0, f, RoundingMode.down) == "0x1.2p+0");
assert(printFloat(buf[], 0x1.1ap0, f, RoundingMode.down) == "0x1.1p+0");
assert(printFloat(buf[], 0x1.16p0, f, RoundingMode.down) == "0x1.1p+0");
assert(printFloat(buf[], 0x1.10p0, f, RoundingMode.down) == "0x1.1p+0");
assert(printFloat(buf[], -0x1.18p0, f, RoundingMode.down) == "-0x1.2p+0");
assert(printFloat(buf[], -0x1.28p0, f, RoundingMode.down) == "-0x1.3p+0");
assert(printFloat(buf[], -0x1.1ap0, f, RoundingMode.down) == "-0x1.2p+0");
assert(printFloat(buf[], -0x1.16p0, f, RoundingMode.down) == "-0x1.2p+0");
assert(printFloat(buf[], -0x1.10p0, f, RoundingMode.down) == "-0x1.1p+0");
}
// for 100% coverage
@safe unittest
{
auto f = FormatSpec!dchar("");
f.spec = 'a';
f.precision = 3;
char[32] buf;
assert(printFloat(buf[], 0x1.19f81p0, f) == "0x1.1a0p+0");
assert(printFloat(buf[], 0x1.19f01p0, f) == "0x1.19fp+0");
}
@safe unittest
{
auto f = FormatSpec!dchar("");
f.spec = 'A';
f.precision = 3;
char[32] buf;
assert(printFloat(buf[], 0x1.19f81p0, f) == "0X1.1A0P+0");
assert(printFloat(buf[], 0x1.19f01p0, f) == "0X1.19FP+0");
}
private auto printFloatE(T, Char)(return char[] buf, T val, FormatSpec!Char f, RoundingMode rm,
string sgn, int exp, ulong mnt, bool is_upper)
if (is(T == float) || is(T == double) || (is(T == real) && T.mant_dig == double.mant_dig))
{
import std.conv : to;
import std.algorithm.comparison : max;
enum int bias = T.max_exp - 1;
if (f.precision == f.UNSPECIFIED)
f.precision = 6;
// special treatment for 0.0
if (exp == 0 && mnt == 0)
{
size_t length = max(f.width, f.precision + ((f.precision == 0 && !f.flHash) ? 1 : 2) + sgn.length + 4);
char[] result = length <= buf.length ? buf[0 .. length] : new char[length];
result[] = '0';
if (f.flDash)
{
if (sgn != "")
result[0] = sgn[0];
int dot_pos = cast(int) (sgn.length + 1);
if (f.precision > 0 || f.flHash)
result[dot_pos] = '.';
auto exp_start = dot_pos + ((f.precision > 0 || f.flHash) ? 1 : 0) + f.precision;
if (exp_start + 4 < result.length)
result[exp_start + 4 .. $] = ' ';
result[exp_start] = is_upper?'E':'e';
result[exp_start + 1] = '+';
}
else
{
int sign_pos = cast(int) (result.length - 6);
if (f.precision > 0 || f.flHash)
{
int dot_pos = cast(int) (result.length - f.precision - 5);
result[dot_pos] = '.';
sign_pos = dot_pos - 2;
}
if (f.flZero)
sign_pos = 0;
else if (sign_pos > 0)
result[0 .. sign_pos + (sgn.length == 0 ? 1 : 0)] = ' ';
if (sgn != "")
result[sign_pos] = sgn[0];
result[$ - 3] = '+';
result[$ - 4] = is_upper ? 'E' : 'e';
}
return result;
}
// add leading 1 for normalized values or correct exponent for denormalied values
if (exp != 0)
mnt |= 1L << (T.mant_dig - 1);
else
exp = 1;
exp -= bias;
// estimate the number of bytes needed left and right of the decimal point
// the speed of the algorithm depends on being as accurate as possible with
// this estimate
// Default for the right side is the number of digits given by f.precision plus one for the dot
// plus 6 more for e+...
auto max_right = f.precision + 7;
// If the exponent is <= 0 there is only the sign and one digit left of the dot else
// we have to estimate the number of digits. The factor between exp, which is the number of
// digits in binary system and the searched number is log_2(10). We round this down to 3.32 to
// get a conservative estimate. We need to add 3, because of the sign, the fact, that the
// logarithm is one to small and because we need to round up instead of down, which to!int does.
// And then we might need one more digit in case of a rounding overflow.
auto max_left = exp>0 ? to!int(exp / 3.32) + 4 : 3;
// If the result is not left justified, we may need to add more digits here for getting the
// correct width.
if (!f.flDash)
max_left = max(max_left, f.width - max_right + max_left + 1);
// If the result is left justified, we may need to add more digits to the right. This strongly
// depends, on the exponent, see above. This time, we need to be conservative in the other direction
// for not missing a digit; therefore we round log_2(10) up to 3.33.
if (exp > 0 && f.flDash)
max_right = max(max_right, f.width - to!int(exp / 3.33) - 2);
else if (f.flDash)
max_right = max(max_right, f.width);
size_t length = max_left + max_right;
char[] buffer = length <= buf.length ? buf[0 .. length] : new char[length];
size_t start = max_left;
size_t left = max_left;
size_t right = max_left;
int final_exp = 0;
enum roundType { ZERO, LOWER, FIVE, UPPER }
roundType next;
// Depending on exp, we will use one of three algorithms:
//
// Algorithm A: For large exponents (exp >= T.mant_dig)
// Algorithm B: For small exponents (exp < T.mant_dig - 61)
// Algorithm C: For exponents close to 0.
//
// Algorithm A:
// The number to print looks like this: mantissa followed by several zeros.
//
// We know, that there is no fractional part, so we can just use integer division,
// consecutivly dividing by 10 and writing down the remainder from right to left.
// Unfortunately the integer is too large to fit in an ulong, so we use something
// like BigInt: An array of ulongs. We only use 60 bits of that ulongs, because
// this simplifies (and speeds up) the division to come.
//
// For the division we use integer division with reminder for each ulong and put
// the reminder of each step in the first 4 bits of ulong of the next step (think of
// long division for the rationale behind this). The final reminder is the next
// digit (from right to left).
//
// This results in the output we would have for the %f specifier. We now adjust this
// for %e: First we calculate the place, where the exponent should be printed, filling
// up with zeros if needed and second we move the leftmost digit one to the left
// and inserting a dot.
//
// After that we decide on the rounding type, using the digits right of the position,
// where the exponent will be printed (currently they are still there, but will be
// overwritten later).
//
// Algorithm B:
// The number to print looks like this: zero dot several zeros followed by the mantissa
//
// We know, that the number has no integer part. The algorithm consecutivly multiplies
// by 10. The integer part (rounded down) after the multiplication is the next digit
// (from left to right). This integer part is removed after each step.
// Again, the number is represented as an array of ulongs, with only 60 bits used of
// every ulong.
//
// For the multiplication we use normal integer multiplication, which can result in digits
// in the uppermost 4 bits. These 4 digits are the carry which is added to the result
// of the next multiplication and finally the last carry is the next digit.
//
// Other than for the %f specifier, this multiplication is splitted into two almost
// identical parts. The first part lasts as long as we find zeros. We need to do this
// to calculate the correct exponent.
//
// The second part will stop, when only zeros remain or when we've got enough digits
// for the requested precision. In the second case, we have to find out, which rounding
// we have. Aside from special cases we do this by calculating one more digit.
//
// Algorithm C:
// This time, we know, that the integral part and the fractional part each fit into a
// ulong. The mantissa might be partially in both parts or completely in the fractional
// part.
//
// We first calculate the integral part by consecutive division by 10. Depending on the
// precision this might result in more digits, than we need. In that case we calculate
// the position of the exponent and the rounding type.
//
// If there is no integral part, we need to find the first non zero digit. We do this by
// consecutive multiplication by 10, saving the first non zero digit followed by a dot.
//
// In either case, we continue filling up with the fractional part until we have enough
// digits. If still necessary, we decide the rounding type, mainly by looking at the
// next digit.
ulong[4] bigbuf;
if (exp >= T.mant_dig)
{
// large number without fractional digits
//
// As this number does not fit in a ulong, we use an array of ulongs. We only use 60 of the 64 bits,
// because this makes it much more easy to implement the division by 10.
int count = exp / 60 + 1;
// saved in big endian format
ulong[] mybig = count <= bigbuf.length ? bigbuf[0 .. count] : new ulong[count];
// only the first or the first two ulongs contain the mantiassa. The rest are zeros.
int lower = 60 - (exp - T.mant_dig + 1) % 60;
if (lower < T.mant_dig)
{
mybig[0] = mnt >> lower;
mybig[1] = (mnt & ((1L << lower) - 1)) << 60 - lower;
}
else
mybig[0] = (mnt & ((1L << lower) - 1)) << 60 - lower;
// Generation of digits by consecutive division with reminder by 10.
int msu = 0; // Most significant ulong; when it get's zero, we can ignore it further on
while (msu < count - 1 || mybig[$-1] != 0)
{
ulong mod = 0;
foreach (i;msu .. count)
{
mybig[i] |= mod << 60;
mod = mybig[i] % 10;
mybig[i] /= 10;
}
if (mybig[msu] == 0)
++msu;
buffer[--left] = cast(byte) ('0' + mod);
++final_exp;
}
--final_exp;
start = left + f.precision + 1;
// we need more zeros for precision
if (right < start)
buffer[right .. start] = '0';
// move leftmost digit one more left and add dot between
buffer[left - 1] = buffer[left];
buffer[left] = '.';
--left;
// rounding type
if (start >= right)
next = roundType.ZERO;
else if (buffer[start] != '0' && buffer[start] != '5')
next = buffer[start] > '5' ? roundType.UPPER : roundType.LOWER;
else
{
next = buffer[start]=='5' ? roundType.FIVE : roundType.ZERO;
foreach (i; start + 1 .. right)
if (buffer[i] > '0')
{
next = next == roundType.FIVE ? roundType.UPPER : roundType.LOWER;
break;
}
}
right = start;
if (f.precision == 0 && !f.flHash) --right;
}
else if (exp + 61 < T.mant_dig)
{
// small number without integer digits
//
// Again this number does not fit in a ulong and we use an array of ulongs. And again we
// only use 60 bits, because this simplifies the multiplication by 10.
int count = (T.mant_dig - exp - 2) / 60 + 1;
// saved in little endian format
ulong[] mybig = count <= bigbuf.length ? bigbuf[0 .. count] : new ulong[count];
// only the last or the last two ulongs contain the mantiassa. Because of little endian
// format these are the ulongs at index 0 and 1. The rest are zeros.
int upper = 60 - (-exp - 1) % 60;
if (upper < T.mant_dig)
{
mybig[0] = (mnt & ((1L << (T.mant_dig - upper)) - 1)) << 60 - (T.mant_dig - upper);
mybig[1] = mnt >> (T.mant_dig - upper);
}
else
mybig[0] = mnt << (upper - T.mant_dig);
int lsu = 0; // Least significant ulong; when it get's zero, we can ignore it further on
// adding zeros, until we reach first nonzero
while (lsu < count - 1 || mybig[$ - 1]!=0)
{
ulong over = 0;
foreach (i; lsu .. count)
{
mybig[i] = mybig[i] * 10 + over;
over = mybig[i] >> 60;
mybig[i] &= (1L << 60) - 1;
}
if (mybig[lsu] == 0)
++lsu;
--final_exp;
if (over != 0)
{
buffer[right++] = cast(byte) ('0' + over);
buffer[right++] = '.';
break;
}
}
if (f.precision == 0 && !f.flHash) --right;
// adding more digits
start = right;
while ((lsu < count - 1 || mybig[$ - 1] != 0) && right - start < f.precision)
{
ulong over = 0;
foreach (i;lsu .. count)
{
mybig[i] = mybig[i] * 10 + over;
over = mybig[i] >> 60;
mybig[i] &= (1L << 60) - 1;
}
if (mybig[lsu] == 0)
++lsu;
buffer[right++] = cast(byte) ('0' + over);
}
// filling up with zeros to match precision
if (right < start + f.precision)
{
buffer[right .. start + f.precision] = '0';
right = start + f.precision;
}
// rounding type
if (lsu >= count - 1 && mybig[count - 1] == 0)
next = roundType.ZERO;
else if (lsu == count - 1 && mybig[lsu] == 1L << 59)
next = roundType.FIVE;
else
{
ulong over = 0;
foreach (i;lsu .. count)
{
mybig[i] = mybig[i] * 10 + over;
over = mybig[i] >> 60;
mybig[i] &= (1L << 60) - 1;
}
next = over >= 5 ? roundType.UPPER : roundType.LOWER;
}
}
else
{
// medium sized number, probably with integer and fractional digits
// this is fastest, because both parts fit into a ulong each
ulong int_part = mnt >> (T.mant_dig - 1 - exp);
ulong frac_part = mnt & ((1L << (T.mant_dig - 1 - exp)) - 1);
start = 0;
// could we already decide on the rounding mode in the integer part?
bool found = false;
if (int_part > 0)
{
// integer part, if there is something to print
while (int_part >= 10)
{
buffer[--left] = '0' + (int_part % 10);
int_part /= 10;
++final_exp;
++start;
}
buffer[--left] = '.';
buffer[--left] = cast(byte) ('0' + int_part);
if (right - left > f.precision + 2)
{
auto old_right = right;
right = left + f.precision + 2;
if (buffer[right] == '5' || buffer[right] == '0')
{
next = buffer[right] == '5' ? roundType.FIVE : roundType.ZERO;
if (frac_part != 0)
next = next == roundType.FIVE ? roundType.UPPER : roundType.LOWER;
else
foreach (i;right + 1 .. old_right)
if (buffer[i] > '0')
{
next = next == roundType.FIVE ? roundType.UPPER : roundType.LOWER;
break;
}
}
else
next = buffer[right] > '5' ? roundType.UPPER : roundType.LOWER;
found = true;
}
}
else
{
// fractional part, skipping leading zeros
while (frac_part != 0)
{
--final_exp;
frac_part *= 10;
auto tmp = frac_part >> (T.mant_dig - 1 - exp);
frac_part &= ((1L << (T.mant_dig - 1 - exp)) - 1);
if (tmp > 0)
{
buffer[right++] = cast(byte) ('0' + tmp);
buffer[right++] = '.';
break;
}
}
next = roundType.ZERO;
}
if (f.precision == 0 && !f.flHash) right--;
// the fractional part after the zeros
while (frac_part != 0 && start < f.precision)
{
frac_part *= 10;
buffer[right++] = cast(byte) ('0' + (frac_part >> (T.mant_dig - 1 - exp)));
frac_part &= ((1L << (T.mant_dig - 1 - exp)) - 1);
++start;
}
if (start < f.precision)
{
buffer[right .. right + f.precision - start] = '0';
right += f.precision - start;
start = f.precision;
}
// rounding mode, if not allready known
if (frac_part != 0 && !found)
{
frac_part *= 10;
auto nextDigit = frac_part >> (T.mant_dig - 1 - exp);
frac_part &= ((1L << (T.mant_dig - 1 - exp)) - 1);
if (nextDigit == 5 && frac_part == 0)
next = roundType.FIVE;
else if (nextDigit >= 5)
next = roundType.UPPER;
else
next = roundType.LOWER;
}
}
// rounding
bool roundUp = false;
if (rm == RoundingMode.up)
roundUp = next != roundType.ZERO && sgn != "-";
else if (rm == RoundingMode.down)
roundUp = next != roundType.ZERO && sgn == "-";
else if (rm == RoundingMode.toZero)
roundUp = false;
else
{
assert(rm == RoundingMode.toNearestTiesToEven || rm == RoundingMode.toNearestTiesAwayFromZero);
roundUp = next == roundType.UPPER;
if (next == roundType.FIVE)
{
// IEEE754 allows for two different ways of implementing roundToNearest:
// Round to nearest, ties away from zero
if (rm == RoundingMode.toNearestTiesAwayFromZero)
roundUp = true;
else
{
// Round to nearest, ties to even
auto last = buffer[right-1];
if (last == '.') last = buffer[right-2];
roundUp = last % 2 != 0;
}
}
}
if (roundUp)
{
foreach_reverse (i;left .. right)
{
if (buffer[i] == '.') continue;
if (buffer[i] == '9')
buffer[i] = '0';
else
{
buffer[i]++;
goto printFloat_done;
}
}
// one more digit to the left, so we need to shift everything and increase exponent
buffer[--left] = '1';
buffer[left + 2] = buffer[left + 1];
if (f.flHash || f.precision != 0)
buffer[left + 1] = '.';
right--;
final_exp++;
printFloat_done:
}
// printing exponent
buffer[right++] = is_upper ? 'E' : 'e';
buffer[right++] = final_exp >= 0 ? '+' : '-';
if (final_exp < 0) final_exp = -final_exp;
static if (is(T == float))
enum max_exp_digits = 2;
else
enum max_exp_digits = 3;
char[max_exp_digits] exp_str;
size_t exp_pos = max_exp_digits;
do
{
exp_str[--exp_pos] = '0' + final_exp%10;
final_exp /= 10;
} while (final_exp>0);
if (max_exp_digits - exp_pos == 1)
exp_str[--exp_pos] = '0';
buffer[right .. right + max_exp_digits - exp_pos] = exp_str[exp_pos .. $];
right += max_exp_digits - exp_pos;
// sign and padding
bool need_sgn = false;
if (sgn != "")
{
// when padding with zeros we need to postpone adding the sign
if (right - left < f.width && !f.flDash && f.flZero)
need_sgn = true;
else
buffer[--left] = sgn[0];
}
if (right - left < f.width)
{
if (f.flDash)
{
// padding right
buffer[right .. f.width + left] = ' ';
right = f.width + left;
}
else
{
// padding left
buffer[right - f.width .. left] = f.flZero ? '0' : ' ';
left = right - f.width;
}
}
if (need_sgn)
buffer[left] = sgn[0];
// without this cast it's getting too slow
return buffer[left .. right];
}
@safe unittest
{
char[256] buf;
auto f = FormatSpec!dchar("");
f.spec = 'e';
assert(printFloat(buf[], float.nan, f) == "nan");
assert(printFloat(buf[], -float.nan, f) == "-nan");
assert(printFloat(buf[], float.infinity, f) == "inf");
assert(printFloat(buf[], -float.infinity, f) == "-inf");
assert(printFloat(buf[], 0.0f, f) == "0.000000e+00");
assert(printFloat(buf[], -0.0f, f) == "-0.000000e+00");
// cast needed due to https://issues.dlang.org/show_bug.cgi?id=20361
assert(printFloat(buf[], cast(float) 1e-40, f) == "9.999946e-41");
assert(printFloat(buf[], cast(float) -1e-40, f) == "-9.999946e-41");
assert(printFloat(buf[], 1e-30f, f) == "1.000000e-30");
assert(printFloat(buf[], -1e-30f, f) == "-1.000000e-30");
assert(printFloat(buf[], 1e-10f, f) == "1.000000e-10");
assert(printFloat(buf[], -1e-10f, f) == "-1.000000e-10");
assert(printFloat(buf[], 0.1f, f) == "1.000000e-01");
assert(printFloat(buf[], -0.1f, f) == "-1.000000e-01");
assert(printFloat(buf[], 10.0f, f) == "1.000000e+01");
assert(printFloat(buf[], -10.0f, f) == "-1.000000e+01");
assert(printFloat(buf[], 1e30f, f) == "1.000000e+30");
assert(printFloat(buf[], -1e30f, f) == "-1.000000e+30");
import std.math : nextUp, nextDown;
assert(printFloat(buf[], nextUp(0.0f), f) == "1.401298e-45");
assert(printFloat(buf[], nextDown(-0.0f), f) == "-1.401298e-45");
}
@safe unittest
{
char[256] buf;
auto f = FormatSpec!dchar("");
f.spec = 'e';
f.width = 20;
f.precision = 10;
assert(printFloat(buf[], float.nan, f) == " nan");
assert(printFloat(buf[], -float.nan, f) == " -nan");
assert(printFloat(buf[], float.infinity, f) == " inf");
assert(printFloat(buf[], -float.infinity, f) == " -inf");
assert(printFloat(buf[], 0.0f, f) == " 0.0000000000e+00");
assert(printFloat(buf[], -0.0f, f) == " -0.0000000000e+00");
// cast needed due to bug 20361
assert(printFloat(buf[], cast(float) 1e-40, f) == " 9.9999461011e-41");
assert(printFloat(buf[], cast(float) -1e-40, f) == " -9.9999461011e-41");
assert(printFloat(buf[], 1e-30f, f) == " 1.0000000032e-30");
assert(printFloat(buf[], -1e-30f, f) == " -1.0000000032e-30");
assert(printFloat(buf[], 1e-10f, f) == " 1.0000000134e-10");
assert(printFloat(buf[], -1e-10f, f) == " -1.0000000134e-10");
assert(printFloat(buf[], 0.1f, f) == " 1.0000000149e-01");
assert(printFloat(buf[], -0.1f, f) == " -1.0000000149e-01");
assert(printFloat(buf[], 10.0f, f) == " 1.0000000000e+01");
assert(printFloat(buf[], -10.0f, f) == " -1.0000000000e+01");
assert(printFloat(buf[], 1e30f, f) == " 1.0000000150e+30");
assert(printFloat(buf[], -1e30f, f) == " -1.0000000150e+30");
import std.math : nextUp, nextDown;
assert(printFloat(buf[], nextUp(0.0f), f) == " 1.4012984643e-45");
assert(printFloat(buf[], nextDown(-0.0f), f) == " -1.4012984643e-45");
}
@safe unittest
{
char[256] buf;
auto f = FormatSpec!dchar("");
f.spec = 'e';
f.width = 20;
f.precision = 10;
f.flDash = true;
assert(printFloat(buf[], float.nan, f) == "nan ");
assert(printFloat(buf[], -float.nan, f) == "-nan ");
assert(printFloat(buf[], float.infinity, f) == "inf ");
assert(printFloat(buf[], -float.infinity, f) == "-inf ");
assert(printFloat(buf[], 0.0f, f) == "0.0000000000e+00 ");
assert(printFloat(buf[], -0.0f, f) == "-0.0000000000e+00 ");
// cast needed due to bug 20361
assert(printFloat(buf[], cast(float) 1e-40, f) == "9.9999461011e-41 ");
assert(printFloat(buf[], cast(float) -1e-40, f) == "-9.9999461011e-41 ");
assert(printFloat(buf[], 1e-30f, f) == "1.0000000032e-30 ");
assert(printFloat(buf[], -1e-30f, f) == "-1.0000000032e-30 ");
assert(printFloat(buf[], 1e-10f, f) == "1.0000000134e-10 ");
assert(printFloat(buf[], -1e-10f, f) == "-1.0000000134e-10 ");
assert(printFloat(buf[], 0.1f, f) == "1.0000000149e-01 ");
assert(printFloat(buf[], -0.1f, f) == "-1.0000000149e-01 ");
assert(printFloat(buf[], 10.0f, f) == "1.0000000000e+01 ");
assert(printFloat(buf[], -10.0f, f) == "-1.0000000000e+01 ");
assert(printFloat(buf[], 1e30f, f) == "1.0000000150e+30 ");
assert(printFloat(buf[], -1e30f, f) == "-1.0000000150e+30 ");
import std.math : nextUp, nextDown;
assert(printFloat(buf[], nextUp(0.0f), f) == "1.4012984643e-45 ");
assert(printFloat(buf[], nextDown(-0.0f), f) == "-1.4012984643e-45 ");
}
@safe unittest
{
char[256] buf;
auto f = FormatSpec!dchar("");
f.spec = 'e';
f.width = 20;
f.precision = 10;
f.flZero = true;
assert(printFloat(buf[], float.nan, f) == " nan");
assert(printFloat(buf[], -float.nan, f) == " -nan");
assert(printFloat(buf[], float.infinity, f) == " inf");
assert(printFloat(buf[], -float.infinity, f) == " -inf");
assert(printFloat(buf[], 0.0f, f) == "00000.0000000000e+00");
assert(printFloat(buf[], -0.0f, f) == "-0000.0000000000e+00");
// cast needed due to bug 20361
assert(printFloat(buf[], cast(float) 1e-40, f) == "00009.9999461011e-41");
assert(printFloat(buf[], cast(float) -1e-40, f) == "-0009.9999461011e-41");
assert(printFloat(buf[], 1e-30f, f) == "00001.0000000032e-30");
assert(printFloat(buf[], -1e-30f, f) == "-0001.0000000032e-30");
assert(printFloat(buf[], 1e-10f, f) == "00001.0000000134e-10");
assert(printFloat(buf[], -1e-10f, f) == "-0001.0000000134e-10");
assert(printFloat(buf[], 0.1f, f) == "00001.0000000149e-01");
assert(printFloat(buf[], -0.1f, f) == "-0001.0000000149e-01");
assert(printFloat(buf[], 10.0f, f) == "00001.0000000000e+01");
assert(printFloat(buf[], -10.0f, f) == "-0001.0000000000e+01");
assert(printFloat(buf[], 1e30f, f) == "00001.0000000150e+30");
assert(printFloat(buf[], -1e30f, f) == "-0001.0000000150e+30");
import std.math : nextUp, nextDown;
assert(printFloat(buf[], nextUp(0.0f), f) == "00001.4012984643e-45");
assert(printFloat(buf[], nextDown(-0.0f), f) == "-0001.4012984643e-45");
}
@safe unittest
{
char[256] buf;
auto f = FormatSpec!dchar("");
f.spec = 'e';
f.precision = 1;
assert(printFloat(buf[], 11.5f, f, RoundingMode.toNearestTiesAwayFromZero) == "1.2e+01");
assert(printFloat(buf[], 12.5f, f, RoundingMode.toNearestTiesAwayFromZero) == "1.3e+01");
assert(printFloat(buf[], 11.7f, f, RoundingMode.toNearestTiesAwayFromZero) == "1.2e+01");
assert(printFloat(buf[], 11.3f, f, RoundingMode.toNearestTiesAwayFromZero) == "1.1e+01");
assert(printFloat(buf[], 11.0f, f, RoundingMode.toNearestTiesAwayFromZero) == "1.1e+01");
assert(printFloat(buf[], -11.5f, f, RoundingMode.toNearestTiesAwayFromZero) == "-1.2e+01");
assert(printFloat(buf[], -12.5f, f, RoundingMode.toNearestTiesAwayFromZero) == "-1.3e+01");
assert(printFloat(buf[], -11.7f, f, RoundingMode.toNearestTiesAwayFromZero) == "-1.2e+01");
assert(printFloat(buf[], -11.3f, f, RoundingMode.toNearestTiesAwayFromZero) == "-1.1e+01");
assert(printFloat(buf[], -11.0f, f, RoundingMode.toNearestTiesAwayFromZero) == "-1.1e+01");
assert(printFloat(buf[], 11.5f, f) == "1.2e+01");
assert(printFloat(buf[], 12.5f, f) == "1.2e+01");
assert(printFloat(buf[], 11.7f, f) == "1.2e+01");
assert(printFloat(buf[], 11.3f, f) == "1.1e+01");
assert(printFloat(buf[], 11.0f, f) == "1.1e+01");
assert(printFloat(buf[], -11.5f, f) == "-1.2e+01");
assert(printFloat(buf[], -12.5f, f) == "-1.2e+01");
assert(printFloat(buf[], -11.7f, f) == "-1.2e+01");
assert(printFloat(buf[], -11.3f, f) == "-1.1e+01");
assert(printFloat(buf[], -11.0f, f) == "-1.1e+01");
assert(printFloat(buf[], 11.5f, f, RoundingMode.toZero) == "1.1e+01");
assert(printFloat(buf[], 12.5f, f, RoundingMode.toZero) == "1.2e+01");
assert(printFloat(buf[], 11.7f, f, RoundingMode.toZero) == "1.1e+01");
assert(printFloat(buf[], 11.3f, f, RoundingMode.toZero) == "1.1e+01");
assert(printFloat(buf[], 11.0f, f, RoundingMode.toZero) == "1.1e+01");
assert(printFloat(buf[], -11.5f, f, RoundingMode.toZero) == "-1.1e+01");
assert(printFloat(buf[], -12.5f, f, RoundingMode.toZero) == "-1.2e+01");
assert(printFloat(buf[], -11.7f, f, RoundingMode.toZero) == "-1.1e+01");
assert(printFloat(buf[], -11.3f, f, RoundingMode.toZero) == "-1.1e+01");
assert(printFloat(buf[], -11.0f, f, RoundingMode.toZero) == "-1.1e+01");
assert(printFloat(buf[], 11.5f, f, RoundingMode.up) == "1.2e+01");
assert(printFloat(buf[], 12.5f, f, RoundingMode.up) == "1.3e+01");
assert(printFloat(buf[], 11.7f, f, RoundingMode.up) == "1.2e+01");
assert(printFloat(buf[], 11.3f, f, RoundingMode.up) == "1.2e+01");
assert(printFloat(buf[], 11.0f, f, RoundingMode.up) == "1.1e+01");
assert(printFloat(buf[], -11.5f, f, RoundingMode.up) == "-1.1e+01");
assert(printFloat(buf[], -12.5f, f, RoundingMode.up) == "-1.2e+01");
assert(printFloat(buf[], -11.7f, f, RoundingMode.up) == "-1.1e+01");
assert(printFloat(buf[], -11.3f, f, RoundingMode.up) == "-1.1e+01");
assert(printFloat(buf[], -11.0f, f, RoundingMode.up) == "-1.1e+01");
assert(printFloat(buf[], 11.5f, f, RoundingMode.down) == "1.1e+01");
assert(printFloat(buf[], 12.5f, f, RoundingMode.down) == "1.2e+01");
assert(printFloat(buf[], 11.7f, f, RoundingMode.down) == "1.1e+01");
assert(printFloat(buf[], 11.3f, f, RoundingMode.down) == "1.1e+01");
assert(printFloat(buf[], 11.0f, f, RoundingMode.down) == "1.1e+01");
assert(printFloat(buf[], -11.5f, f, RoundingMode.down) == "-1.2e+01");
assert(printFloat(buf[], -12.5f, f, RoundingMode.down) == "-1.3e+01");
assert(printFloat(buf[], -11.7f, f, RoundingMode.down) == "-1.2e+01");
assert(printFloat(buf[], -11.3f, f, RoundingMode.down) == "-1.2e+01");
assert(printFloat(buf[], -11.0f, f, RoundingMode.down) == "-1.1e+01");
}
@safe unittest
{
char[256] buf;
auto f = FormatSpec!dchar("");
f.spec = 'e';
assert(printFloat(buf[], double.nan, f) == "nan");
assert(printFloat(buf[], -double.nan, f) == "-nan");
assert(printFloat(buf[], double.infinity, f) == "inf");
assert(printFloat(buf[], -double.infinity, f) == "-inf");
assert(printFloat(buf[], 0.0, f) == "0.000000e+00");
assert(printFloat(buf[], -0.0, f) == "-0.000000e+00");
// / 1000 needed due to bug 20361
assert(printFloat(buf[], 1e-307 / 1000, f) == "1.000000e-310");
assert(printFloat(buf[], -1e-307 / 1000, f) == "-1.000000e-310");
assert(printFloat(buf[], 1e-30, f) == "1.000000e-30");
assert(printFloat(buf[], -1e-30, f) == "-1.000000e-30");
assert(printFloat(buf[], 1e-10, f) == "1.000000e-10");
assert(printFloat(buf[], -1e-10, f) == "-1.000000e-10");
assert(printFloat(buf[], 0.1, f) == "1.000000e-01");
assert(printFloat(buf[], -0.1, f) == "-1.000000e-01");
assert(printFloat(buf[], 10.0, f) == "1.000000e+01");
assert(printFloat(buf[], -10.0, f) == "-1.000000e+01");
assert(printFloat(buf[], 1e300, f) == "1.000000e+300");
assert(printFloat(buf[], -1e300, f) == "-1.000000e+300");
import std.math : nextUp, nextDown;
assert(printFloat(buf[], nextUp(0.0), f) == "4.940656e-324");
assert(printFloat(buf[], nextDown(-0.0), f) == "-4.940656e-324");
}
@safe unittest
{
char[256] buf;
auto f = FormatSpec!dchar("");
f.spec = 'e';
import std.math : nextUp;
double eps = nextUp(0.0);
f.precision = 1000;
assert(printFloat(buf[], eps, f) ==
"4.9406564584124654417656879286822137236505980261432476442558568250067550727020875186529983636163599"
~"23797965646954457177309266567103559397963987747960107818781263007131903114045278458171678489821036"
~"88718636056998730723050006387409153564984387312473397273169615140031715385398074126238565591171026"
~"65855668676818703956031062493194527159149245532930545654440112748012970999954193198940908041656332"
~"45247571478690147267801593552386115501348035264934720193790268107107491703332226844753335720832431"
~"93609238289345836806010601150616980975307834227731832924790498252473077637592724787465608477820373"
~"44696995336470179726777175851256605511991315048911014510378627381672509558373897335989936648099411"
~"64205702637090279242767544565229087538682506419718265533447265625000000000000000000000000000000000"
~"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
~"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
~"000000000000000000000e-324");
f.precision = 50;
assert(printFloat(buf[], double.max, f) ==
"1.79769313486231570814527423731704356798070567525845e+308");
assert(printFloat(buf[], double.epsilon, f) ==
"2.22044604925031308084726333618164062500000000000000e-16");
f.precision = 10;
assert(printFloat(buf[], 1.0/3.0, f) == "3.3333333333e-01");
assert(printFloat(buf[], 1.0/7.0, f) == "1.4285714286e-01");
assert(printFloat(buf[], 1.0/9.0, f) == "1.1111111111e-01");
}
@safe unittest
{
char[256] buf;
auto f = FormatSpec!dchar("");
f.spec = 'e';
f.precision = 15;
import std.math : E, PI, PI_2, PI_4, M_1_PI, M_2_PI, M_2_SQRTPI,
LN10, LN2, LOG2, LOG2E, LOG2T, LOG10E, SQRT2, SQRT1_2;
assert(printFloat(buf[], cast(double) E, f) == "2.718281828459045e+00");
assert(printFloat(buf[], cast(double) PI, f) == "3.141592653589793e+00");
assert(printFloat(buf[], cast(double) PI_2, f) == "1.570796326794897e+00");
assert(printFloat(buf[], cast(double) PI_4, f) == "7.853981633974483e-01");
assert(printFloat(buf[], cast(double) M_1_PI, f) == "3.183098861837907e-01");
assert(printFloat(buf[], cast(double) M_2_PI, f) == "6.366197723675814e-01");
assert(printFloat(buf[], cast(double) M_2_SQRTPI, f) == "1.128379167095513e+00");
assert(printFloat(buf[], cast(double) LN10, f) == "2.302585092994046e+00");
assert(printFloat(buf[], cast(double) LN2, f) == "6.931471805599453e-01");
assert(printFloat(buf[], cast(double) LOG2, f) == "3.010299956639812e-01");
assert(printFloat(buf[], cast(double) LOG2E, f) == "1.442695040888963e+00");
assert(printFloat(buf[], cast(double) LOG2T, f) == "3.321928094887362e+00");
assert(printFloat(buf[], cast(double) LOG10E, f) == "4.342944819032518e-01");
assert(printFloat(buf[], cast(double) SQRT2, f) == "1.414213562373095e+00");
assert(printFloat(buf[], cast(double) SQRT1_2, f) == "7.071067811865476e-01");
}
// for 100% coverage
@safe unittest
{
char[256] buf;
auto f = FormatSpec!dchar("");
f.spec = 'E';
f.precision = 80;
assert(printFloat(buf[], 5.62776e+12f, f) ==
"5.62775982080000000000000000000000000000000000000000000000000000000000000000000000E+12");
f.precision = 49;
assert(printFloat(buf[], 2.5997869e-12f, f) ==
"2.5997869221999758693186777236405760049819946289062E-12");
f.precision = 6;
assert(printFloat(buf[], -1.1418613e+07f, f) == "-1.141861E+07");
assert(printFloat(buf[], -1.368281e+07f, f) == "-1.368281E+07");
f.precision = 0;
assert(printFloat(buf[], 709422.0f, f, RoundingMode.up) == "8E+05");
f.precision = 1;
assert(printFloat(buf[], -245.666f, f) == "-2.5E+02");
}
// check no allocations
@system unittest
{
import core.memory;
auto stats = GC.stats;
char[256] buf;
auto f = FormatSpec!dchar("");
f.spec = 'a';
assert(printFloat(buf[], float.nan, f) == "nan");
assert(printFloat(buf[], -float.infinity, f) == "-inf");
assert(printFloat(buf[], 0.0f, f) == "0x0p+0");
assert(printFloat(buf[], -double.nan, f) == "-nan");
assert(printFloat(buf[], double.infinity, f) == "inf");
assert(printFloat(buf[], -0.0, f) == "-0x0p+0");
import std.math : nextUp, E;
assert(printFloat(buf[], nextUp(0.0f), f) == "0x0.000002p-126");
assert(printFloat(buf[], cast(float) E, f) == "0x1.5bf0a8p+1");
f.spec = 'E';
f.precision = 80;
assert(printFloat(buf[], 5.62776e+12f, f) ==
"5.62775982080000000000000000000000000000000000000000000000000000000000000000000000E+12");
f.precision = 6;
assert(printFloat(buf[], -1.1418613e+07f, f) == "-1.141861E+07");
assert(GC.stats.usedSize == stats.usedSize);
}
|
D
|
// D imports
import std.conv;
import std.string;
import std.math : abs;
// allegro imports
import allegro5.allegro;
import allegro5.allegro_primitives;
import allegro5.allegro_image;
import allegro5.allegro_font;
import allegro5.allegro_ttf;
import allegro5.allegro_color;
// app imports
import globals;
import main;
import entity : Entity;
import message : messageLines, MessageColor;
// draw 21x21 tiles centred on player
void renderMap(Entity e)
{
int cellX = e.locX - 10;
int cellY = e.locY - 10;
int startX = cellX;
// draw to buffer
al_set_target_bitmap(al_get_backbuffer(display));
// wrap if necessary
if(cellY < 0) cellY += MapSize;
foreach(y; 0..21)
{
// wrap?
if(cellY == MapSize) cellY = 0;
foreach(x; 0..21)
{
// wrap - can move some of this out of loop
if(cellX < 0) cellX += MapSize;
if(cellX == MapSize) cellX = 0;
int tileIndex = worldMap[cellY][cellX].bitmapIndex;
al_draw_bitmap_region(imgTileSet, tileIndex * TileSize, 0, TileSize, TileSize, x * TileSize, y * TileSize, 0);
++cellX;
}
++cellY;
cellX = startX;
}
}
void renderPlayer(Entity e)
{
//al_set_target_bitmap(al_get_backbuffer(display));
al_draw_bitmap_region(imgPlayer, e.facing * TileSize, 0, TileSize, TileSize, 10 * TileSize, 10 * TileSize, 0);
}
void renderMobs(Entity e, Entity p)
{
// FIXME: this method won't work when near the edges of the map!!
if( abs(e.locX - p.locX) <= 10 && abs(e.locY - p.locY) <= 10)
{
int dX = e.locX - p.locX;
int dY = e.locY - p.locY;
// ignore facing for now
al_draw_bitmap_region(imgMob, 0, 0, TileSize, TileSize, 10 * TileSize + dX * TileSize, 10 * TileSize + dY * TileSize, 0);
}
}
/*
* draw info about the player
* draw the mouse cursor and info if over the map view
*
*/
void renderHUD(ref Mouse mouse, Entity e)
{
ALLEGRO_COLOR colorWhite = al_map_rgb(255,255,255);
enum StatsX = 680;
enum StatsY = 16;
string output = "Entity Type: " ~ to!string(e.creatureType);
al_draw_text(messageFont, colorWhite, StatsX, StatsY, ALLEGRO_ALIGN_LEFT, output.toStringz);
output = "Soul Points: " ~ to!string(e.sp);
al_draw_text(messageFont, colorWhite, StatsX, StatsY+16, ALLEGRO_ALIGN_LEFT, output.toStringz);
output = "Life Points: " ~ to!string(e.hp);
al_draw_text(messageFont, colorWhite, StatsX, StatsY+32, ALLEGRO_ALIGN_LEFT, output.toStringz);
int mouseDrawX = (mouse.x / TileSize) * TileSize;
int mouseDrawY = (mouse.y / TileSize) * TileSize;
// only draw 'cursor' and show info if over map
if(mouse.x < 21*TileSize && mouse.y < 21*TileSize)
{
al_draw_rectangle( mouseDrawX, mouseDrawY, mouseDrawX + TileSize, mouseDrawY + TileSize, al_map_rgb(255,255,255), 1);
// show info about tile under mouse cursor
string[int] tileNames = [ 0:"Water", 1:"Grass", 2:"Rock", 3:"Tree"];
// get screen cell eg 5,5
int mouseScreenCellX = mouse.x/TileSize;
int mouseScreenCellY = mouse.y/TileSize;
// convert to world co-ords, wrap if required
int wX = e.locX + (mouseScreenCellX - 10);
int wY = e.locY + (mouseScreenCellY - 10);
if(wX < 0 )
{
wX += MapSize;
}
if(wX > MapSize-1 )
{
wX -= MapSize;
}
if(wY < 0 )
{
wY += MapSize;
}
if(wY > MapSize - 1 )
{
wY -= MapSize;
}
output = "Terrain: " ~ tileNames[worldMap[wY][wX].tileType];
al_draw_text(messageFont, colorWhite, StatsX, StatsY+128, ALLEGRO_ALIGN_LEFT, output.toStringz);
}
}
void renderMessages()
{
ALLEGRO_COLOR outputColor;
foreach(y, messStruct; messageLines)
{
//get color from struct
switch(messStruct.color)
{
case MessageColor.white:
outputColor = al_map_rgb(255, 255, 255);
break;
case MessageColor.red:
outputColor = al_map_rgb(255, 0, 0);
break;
case MessageColor.green:
outputColor = al_map_rgb(0, 255, 0);
break;
case MessageColor.yellow:
outputColor = al_map_rgb(255, 255, 0);
break;
default:
}
al_draw_text(messageFont, outputColor, MsgBoxX, MsgBoxY + y * 16, ALLEGRO_ALIGN_LEFT, messStruct.message.toStringz);
}
}
|
D
|
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
module SWIGTYPE_p_p_unsigned_char;
static import vtkd_im;
class SWIGTYPE_p_p_unsigned_char {
private void* swigCPtr;
public this(void* cObject, bool futureUse) {
swigCPtr = cObject;
}
protected this() {
swigCPtr = null;
}
public static void* swigGetCPtr(SWIGTYPE_p_p_unsigned_char obj) {
return (obj is null) ? null : obj.swigCPtr;
}
mixin vtkd_im.SwigOperatorDefinitions;
}
|
D
|
E: c72, c29, c82, c67, c33, c6, c19, c30, c41, c39, c88, c0, c35, c57, c64, c31, c89, c4, c76, c58, c26, c12, c71, c3, c65, c62, c16, c97, c61, c92, c40, c85, c24, c42, c56, c86, c87.
p0(E,E)
c72,c29
c76,c58
c26,c58
c12,c58
c30,c62
c0,c88
c64,c85
c33,c88
c92,c61
c31,c88
c16,c89
c16,c88
c41,c62
c58,c61
.
p7(E,E)
c82,c67
c0,c35
c31,c35
c30,c88
c76,c71
c12,c71
c58,c12
c16,c41
c26,c40
c72,c72
c41,c88
c82,c41
c33,c24
c39,c61
c97,c61
c76,c40
c72,c24
c92,c12
c16,c67
c16,c72
.
p6(E,E)
c33,c29
c6,c19
c72,c88
c82,c89
c3,c65
c30,c62
c58,c61
c76,c58
c4,c41
c0,c88
.
p5(E,E)
c30,c41
c39,c39
c57,c64
c12,c76
c76,c12
c72,c72
c31,c31
c26,c26
c33,c72
c30,c30
c82,c82
c0,c0
c16,c16
c26,c76
c39,c97
c92,c58
c33,c33
c72,c16
c92,c92
c42,c56
c16,c72
c41,c30
c58,c92
c82,c16
c16,c82
c12,c12
c85,c87
c0,c31
.
p2(E,E)
c4,c41
c33,c29
c82,c89
c76,c58
c30,c62
c6,c19
c85,c86
c57,c85
c42,c97
.
|
D
|
/target/x86_64-pc-windows-gnu/release/deps/crossbeam_deque-69a09c3da75aa6b1.rmeta: /cargo/registry/src/github.com-1ecc6299db9ec823/crossbeam-deque-0.7.1/src/lib.rs
/target/x86_64-pc-windows-gnu/release/deps/libcrossbeam_deque-69a09c3da75aa6b1.rlib: /cargo/registry/src/github.com-1ecc6299db9ec823/crossbeam-deque-0.7.1/src/lib.rs
/target/x86_64-pc-windows-gnu/release/deps/crossbeam_deque-69a09c3da75aa6b1.d: /cargo/registry/src/github.com-1ecc6299db9ec823/crossbeam-deque-0.7.1/src/lib.rs
/cargo/registry/src/github.com-1ecc6299db9ec823/crossbeam-deque-0.7.1/src/lib.rs:
|
D
|
module xf.game.EventQueue;
private {
import xf.game.Event;
import xf.utils.FreeList;
}
/**
this FIFO queue should keep waiting events and event history.
when events are added, they go to the waiting section
when the tick is advanced, appropriate events should be marked as active
when an active event is processed, it should be shifted to the history
the history can be trimmed to a specific number of ticks
*/
class EventQueue(alias CustomMix = emptyMix) {
struct Item {
Event event;
int ticksToGo;
mixin CustomMix;
}
protected void removeMatching_(ref FreeListQueue!(Item) q, bool delegate(ref Item) dg) {
for (auto it = q.begin(); !it.done; it.next()) {
if (dg(*it())) {
q.erase(it.node);
}
}
}
void removeMatching(bool delegate(ref Item) dg) {
removeMatching_(queue, dg);
}
protected int iterQueues(int delegate(ref FreeListQueue!(Item).Node) dg) {
foreach (ref node; queue) {
if (auto r = dg(node)) return r;
}
return 0;
}
final void advanceTick(uint ticks) {
foreach (ref node; &iterQueues) {
node().ticksToGo -= ticks;
}
}
bool moreEvents() {
return !queue.empty && queue.front.ticksToGo <= 0;
}
Event nextEvent() {
assert (moreEvents());
Item item = *queue.front();
queue.popFront;
return item.event;
}
void addEvent(Event e, int ticksToGo) {
Item item; {
item.event = e;
item.ticksToGo = ticksToGo;
}
if (queue.empty) {
queue ~= item;
} else {
for (auto it = queue.revBegin(); !it.done(); it.prev()) {
if (it().ticksToGo <= ticksToGo) {
queue.insertAfter(it.node, item);
return;
}
}
queue.pushFront(item);
}
}
void rollback(uint ticks, void delegate(Event) handler) {
assert (false);
}
void trimHistory(uint ticks) {
assert (false);
}
protected {
FreeListQueue!(Item) queue;
}
}
class LoggingEventQueue(alias CustomMix = emptyMix) : EventQueue!(CustomMix) {
override void removeMatching(bool delegate(ref Item) dg) {
super.removeMatching(dg);
removeMatching_(historyQueue, dg);
}
protected override int iterQueues(int delegate(ref FreeListQueue!(Item).Node) dg) {
if (auto r = super.iterQueues(dg)) return r;
foreach (ref node; historyQueue) {
if (auto r = dg(node)) return r;
}
return 0;
}
override Event nextEvent() {
assert (moreEvents());
Item item = *queue.front();
queue.popFront;
if (item.event.logged) {
historyQueue.pushBack(item);
}
return item.event;
}
void rollback(uint ticks, void delegate(Event) handler) {
foreach (ref node; &iterQueues) {
node().ticksToGo += ticks;
}
for (auto it = historyQueue.revBegin(); !it.done(); it.prev()) {
if (it().ticksToGo > 0) {
handler(it().event);
Item item = *historyQueue.back();
historyQueue.popBack();
if (it().event.replayed) {
queue.pushFront(item);
}
}
}
}
void trimHistory(uint ticks) {
// only leave events with ticksToGo > -'ticks'
int thresh = -cast(int)ticks;
while (!historyQueue.empty && historyQueue.front.ticksToGo <= thresh) {
historyQueue.popFront();
}
}
private {
FreeListQueue!(Item) historyQueue;
}
}
template emptyMix() {
}
|
D
|
module sendero.server.WorkerPool;
import tango.core.Thread;
import tango.core.sync.Semaphore, tango.core.sync.Mutex;
import sendero.server.runtime.SafeThread;
//import sendero.server.TimerDispatcher;
import sendero.util.collection.ThreadSafeQueue;
import tango.util.log.Log;
static Logger log;
static this()
{
log = Log.lookup("sendero.server.WorkerPool");
}
abstract class WorkerPoolBase(JobType)
{
this()
{
greenLight_ = new Semaphore;
jobQueue_ = new ThreadSafeQueue!(JobType);
}
static class Node
{
this(Thread t, Node prev = null)
{ this.t = t; this.prev = prev; }
Thread t;
Node next = null;
Node prev = null;
}
package Node head = null;
package Node tail = null;
private Node remove(Node node)
{
if(node.prev !is null) {
node.prev.next = node.next;
if(node.next !is null) node.next.prev = node.prev;
return node.next;
}
else {
assert(head == node);
if(node == tail) {
head = tail = null;
return null;
}
else {
head = node.next;
return node.next;
}
}
}
private void addThread(Thread t)
{
if(head is null) {
assert(tail is null);
head = tail = new Node(t);
}
else {
assert(tail !is null);
auto n = new Node(t, tail);
tail.next = n;
tail = n;
}
}
void pushJob(JobType job)
{
debug log.trace("Pushing job");
debug assert(jobQueue_ !is null);
jobQueue_.push(job);
greenLight_.notify;
debug log.trace("Done pushing job");
}
protected abstract Thread createThread();
void start(uint startThreads = 1)
{
startThreads_ = startThreads;
running_ = true;
for(uint i = 0; i < startThreads; ++i) {
auto t = createThread;
addThread(t);
t.start;
}
}
uint runningThreads()
{
uint i = 0;
auto node = head;
while(node !is null) {
assert(node.t);
if(node.t.isRunning) {
++i; node = node.next;
}
else node = remove(node);
}
return i;
}
void shutdown()
{
running_ = false;
}
void ensureAlive()
{
auto node = head;
while(node !is null) {
assert(node.t);
if(node.t.isRunning)
return;
else node = remove(node);
}
if(startThreads_ == 0) startThreads_ = 1;
log.error("Thread pool was dead on call to ensureAlive, "
"restarting {} threads", startThreads_);
start(startThreads_);
}
/+
void setHeartbeat(TimerDispatcher timer, uint resolutionMultiplier = 0)
{
auto heartbeat = new TimedTask(&ensureAlive, resolutionMultiplier, true);
timer.scheduleTask(heartbeat);
}
+/
protected:
uint startThreads_;
ThreadSafeQueue!(JobType) jobQueue_;
Semaphore greenLight_;
bool running_;
}
alias void delegate() WorkDg;
class WorkerPoolThread : SafeWorkerThread
{
this(WorkerPool pool)
{
assert(pool);
this.pool_ = pool;
}
private WorkerPool pool_;
override void doWork()
{
try
{
debug log.trace("Waiting for traffic");
pool_.greenLight_.wait;
debug log.trace("Got notified");
auto jobDg = pool_.jobQueue_.pull;
debug assert(jobDg !is null);
debug log.trace("Starting Job");
jobDg();
debug log.trace("Completed Job");
}
catch(Exception ex)
{
if(ex.info !is null) {
log.error("Exception caught:{}. Trace: {}", ex.toString, ex.info.toString);
}
else {
log.error("Exception caught:{}", ex.toString);
}
}
}
}
class WorkerPool : WorkerPoolBase!(WorkDg)
{
protected override Thread createThread()
{
return new WorkerPoolThread(this);
}
}
class JobWorkerPoolThread(JobType) : SafeWorkerThread
{
alias void delegate(JobType) DgT;
this(JobWorkerPool!(JobType) pool)
{
assert(pool.workerProc_);
assert(pool);
this.pool_ = pool;
this.workerProc_ = pool.workerProc_;
}
private DgT workerProc_;
private JobWorkerPool!(JobType) pool_;
override void doWork()
{
try
{
debug log.trace("Waiting for traffic");
pool_.greenLight_.wait;
debug log.info("Got notified");
auto job = pool_.jobQueue_.pull;
if(job !is null)
workerProc_(job);
}
catch(Exception ex)
{
if(ex.info !is null) {
log.error("Exception caught:{}. Trace: {}", ex.toString, ex.info.toString);
}
else {
log.error("Exception caught:{}", ex.toString);
}
}
}
}
class JobWorkerPool(JobType) : WorkerPoolBase!(JobType)
{
public:
alias void delegate(JobType) DgT;
this(DgT workerProc)
{
assert(workerProc);
this.workerProc_ = workerProc;
super();
}
protected override Thread createThread()
{
return new JobWorkerPoolThread!(JobType)(this);
}
protected:
DgT workerProc_;
}
|
D
|
/Users/patricerapaport/Desktop/swift/PRMacControls/Build/Intermediates.noindex/SwiftMigration/PRMacControls/Intermediates.noindex/PRMacControls.build/Debug/PRMacControls.build/Objects-normal/x86_64/myTabviewitem.o : /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myControlDoc.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfield.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/web/webService.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTable.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/sourcetable.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myOutline.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfieldTelephone.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfieldAdresse.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfieldDate.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfieldDecimal.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/selectorsProtocol.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myControl.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/mytoolbarItem.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTabviewitem.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfieldNum.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/cmyButton.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myCombo.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/web/downloadManager.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/preferenceManager.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/baseController.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/documentPopoverController.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/popoverController.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/editController.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/listController.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/user.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/listeControles.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/dates.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/alertes.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/strings.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/nums.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/enumerations.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/keyboardKeys.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfieldInt.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/baseView.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/myView.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/myWindow.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myBox.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myCustomCheckbox.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myCheckbox.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/patricerapaport/Desktop/swift/PRMacControls/Build/Intermediates.noindex/SwiftMigration/PRMacControls/Products/Debug/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /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/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/QuartzCore.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/Metal.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/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/AppKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/patricerapaport/Desktop/swift/PRMacControls/Build/Intermediates.noindex/SwiftMigration/PRMacControls/Products/Debug/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/PRMacControls.h /Users/patricerapaport/Desktop/swift/PRMacControls/Build/Intermediates.noindex/SwiftMigration/PRMacControls/Products/Debug/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/patricerapaport/Desktop/swift/PRMacControls/Build/Intermediates.noindex/SwiftMigration/PRMacControls/Intermediates.noindex/PRMacControls.build/Debug/PRMacControls.build/unextended-module.modulemap /Users/patricerapaport/Desktop/swift/PRMacControls/Build/Intermediates.noindex/SwiftMigration/PRMacControls/Products/Debug/Alamofire/Alamofire.framework/Modules/module.modulemap /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/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.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/AppKit.framework/Headers/AppKit.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/patricerapaport/Desktop/swift/PRMacControls/Build/Intermediates.noindex/SwiftMigration/PRMacControls/Intermediates.noindex/PRMacControls.build/Debug/PRMacControls.build/Objects-normal/x86_64/myTabviewitem~partial.swiftmodule : /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myControlDoc.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfield.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/web/webService.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTable.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/sourcetable.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myOutline.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfieldTelephone.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfieldAdresse.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfieldDate.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfieldDecimal.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/selectorsProtocol.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myControl.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/mytoolbarItem.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTabviewitem.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfieldNum.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/cmyButton.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myCombo.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/web/downloadManager.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/preferenceManager.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/baseController.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/documentPopoverController.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/popoverController.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/editController.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/listController.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/user.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/listeControles.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/dates.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/alertes.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/strings.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/nums.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/enumerations.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/keyboardKeys.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfieldInt.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/baseView.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/myView.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/myWindow.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myBox.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myCustomCheckbox.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myCheckbox.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/patricerapaport/Desktop/swift/PRMacControls/Build/Intermediates.noindex/SwiftMigration/PRMacControls/Products/Debug/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /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/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/QuartzCore.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/Metal.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/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/AppKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/patricerapaport/Desktop/swift/PRMacControls/Build/Intermediates.noindex/SwiftMigration/PRMacControls/Products/Debug/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/PRMacControls.h /Users/patricerapaport/Desktop/swift/PRMacControls/Build/Intermediates.noindex/SwiftMigration/PRMacControls/Products/Debug/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/patricerapaport/Desktop/swift/PRMacControls/Build/Intermediates.noindex/SwiftMigration/PRMacControls/Intermediates.noindex/PRMacControls.build/Debug/PRMacControls.build/unextended-module.modulemap /Users/patricerapaport/Desktop/swift/PRMacControls/Build/Intermediates.noindex/SwiftMigration/PRMacControls/Products/Debug/Alamofire/Alamofire.framework/Modules/module.modulemap /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/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.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/AppKit.framework/Headers/AppKit.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/patricerapaport/Desktop/swift/PRMacControls/Build/Intermediates.noindex/SwiftMigration/PRMacControls/Intermediates.noindex/PRMacControls.build/Debug/PRMacControls.build/Objects-normal/x86_64/myTabviewitem~partial.swiftdoc : /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myControlDoc.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfield.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/web/webService.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTable.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/sourcetable.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myOutline.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfieldTelephone.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfieldAdresse.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfieldDate.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfieldDecimal.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/selectorsProtocol.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myControl.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/mytoolbarItem.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTabviewitem.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfieldNum.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/cmyButton.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myCombo.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/web/downloadManager.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/preferenceManager.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/baseController.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/documentPopoverController.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/popoverController.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/editController.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/listController.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/user.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/listeControles.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/dates.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/alertes.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/strings.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/nums.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/enumerations.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/misc/keyboardKeys.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myTextfieldInt.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/baseView.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/myView.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/windows/myWindow.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myBox.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myCustomCheckbox.swift /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/controles/myCheckbox.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/patricerapaport/Desktop/swift/PRMacControls/Build/Intermediates.noindex/SwiftMigration/PRMacControls/Products/Debug/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /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/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/QuartzCore.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/Metal.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/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/AppKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/patricerapaport/Desktop/swift/PRMacControls/Build/Intermediates.noindex/SwiftMigration/PRMacControls/Products/Debug/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/patricerapaport/Desktop/swift/PRMacControls/PRMacControls/PRMacControls.h /Users/patricerapaport/Desktop/swift/PRMacControls/Build/Intermediates.noindex/SwiftMigration/PRMacControls/Products/Debug/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/patricerapaport/Desktop/swift/PRMacControls/Build/Intermediates.noindex/SwiftMigration/PRMacControls/Intermediates.noindex/PRMacControls.build/Debug/PRMacControls.build/unextended-module.modulemap /Users/patricerapaport/Desktop/swift/PRMacControls/Build/Intermediates.noindex/SwiftMigration/PRMacControls/Products/Debug/Alamofire/Alamofire.framework/Modules/module.modulemap /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/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.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/AppKit.framework/Headers/AppKit.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
|
<?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_7_BeT-9457611695.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</availablePage>
</pageList>
<sashModel currentSelection="//@sashModel/@windows.0/@children.0">
<windows>
<children xsi:type="di:TabFolder">
<children>
<emfPageIdentifier href="VAR_7_BeT-9457611695.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</children>
</children>
</windows>
</sashModel>
</di:SashWindowsMngr>
|
D
|
module derelict.steamworks.steamcontroller;
import derelict.steamworks.types;
enum STEAM_CONTROLLER_MAX_COUNT = 16;
enum STEAM_CONTROLLER_MAX_ANALOG_ACTIONS = 16;
enum STEAM_CONTROLLER_MAX_DIGITAL_ACTIONS = 128;
enum STEAM_CONTROLLER_MAX_ORIGINS = 8;
// When sending an option to a specific controller handle, you can send to all controllers via this command
enum STEAM_CONTROLLER_HANDLE_ALL_CONTROLLERS = uint64.max;
enum STEAM_CONTROLLER_MIN_ANALOG_ACTION_DATA = -1.0f;
enum STEAM_CONTROLLER_MAX_ANALOG_ACTION_DATA = 1.0f;
enum ESteamControllerPad
{
k_ESteamControllerPad_Left,
k_ESteamControllerPad_Right
}
enum EControllerSource
{
k_EControllerSource_None,
k_EControllerSource_LeftTrackpad,
k_EControllerSource_RightTrackpad,
k_EControllerSource_Joystick,
k_EControllerSource_ABXY,
k_EControllerSource_Switch,
k_EControllerSource_LeftTrigger,
k_EControllerSource_RightTrigger,
k_EControllerSource_Gyro,
k_EControllerSource_CenterTrackpad, // PS4
k_EControllerSource_RightJoystick, // Traditional Controllers
k_EControllerSource_DPad,
k_EControllerSource_Count
}
enum EControllerSourceMode
{
k_EControllerSourceMode_None,
k_EControllerSourceMode_Dpad,
k_EControllerSourceMode_Buttons,
k_EControllerSourceMode_FourButtons,
k_EControllerSourceMode_AbsoluteMouse,
k_EControllerSourceMode_RelativeMouse,
k_EControllerSourceMode_JoystickMove,
k_EControllerSourceMode_JoystickMouse,
k_EControllerSourceMode_JoystickCamera,
k_EControllerSourceMode_ScrollWheel,
k_EControllerSourceMode_Trigger,
k_EControllerSourceMode_TouchMenu,
k_EControllerSourceMode_MouseJoystick,
k_EControllerSourceMode_MouseRegion,
k_EControllerSourceMode_RadialMenu,
k_EControllerSourceMode_Switches
}
enum EControllerActionOrigin
{
k_EControllerActionOrigin_None,
k_EControllerActionOrigin_A,
k_EControllerActionOrigin_B,
k_EControllerActionOrigin_X,
k_EControllerActionOrigin_Y,
k_EControllerActionOrigin_LeftBumper,
k_EControllerActionOrigin_RightBumper,
k_EControllerActionOrigin_LeftGrip,
k_EControllerActionOrigin_RightGrip,
k_EControllerActionOrigin_Start,
k_EControllerActionOrigin_Back,
k_EControllerActionOrigin_LeftPad_Touch,
k_EControllerActionOrigin_LeftPad_Swipe,
k_EControllerActionOrigin_LeftPad_Click,
k_EControllerActionOrigin_LeftPad_DPadNorth,
k_EControllerActionOrigin_LeftPad_DPadSouth,
k_EControllerActionOrigin_LeftPad_DPadWest,
k_EControllerActionOrigin_LeftPad_DPadEast,
k_EControllerActionOrigin_RightPad_Touch,
k_EControllerActionOrigin_RightPad_Swipe,
k_EControllerActionOrigin_RightPad_Click,
k_EControllerActionOrigin_RightPad_DPadNorth,
k_EControllerActionOrigin_RightPad_DPadSouth,
k_EControllerActionOrigin_RightPad_DPadWest,
k_EControllerActionOrigin_RightPad_DPadEast,
k_EControllerActionOrigin_LeftTrigger_Pull,
k_EControllerActionOrigin_LeftTrigger_Click,
k_EControllerActionOrigin_RightTrigger_Pull,
k_EControllerActionOrigin_RightTrigger_Click,
k_EControllerActionOrigin_LeftStick_Move,
k_EControllerActionOrigin_LeftStick_Click,
k_EControllerActionOrigin_LeftStick_DPadNorth,
k_EControllerActionOrigin_LeftStick_DPadSouth,
k_EControllerActionOrigin_LeftStick_DPadWest,
k_EControllerActionOrigin_LeftStick_DPadEast,
k_EControllerActionOrigin_Gyro_Move,
k_EControllerActionOrigin_Gyro_Pitch,
k_EControllerActionOrigin_Gyro_Yaw,
k_EControllerActionOrigin_Gyro_Roll,
// PS4 Dual Shock
k_EControllerActionOrigin_PS4_X,
k_EControllerActionOrigin_PS4_Circle,
k_EControllerActionOrigin_PS4_Triangle,
k_EControllerActionOrigin_PS4_Square,
k_EControllerActionOrigin_PS4_LeftBumper,
k_EControllerActionOrigin_PS4_RightBumper,
k_EControllerActionOrigin_PS4_Options, //Start
k_EControllerActionOrigin_PS4_Share, //Back
k_EControllerActionOrigin_PS4_LeftPad_Touch,
k_EControllerActionOrigin_PS4_LeftPad_Swipe,
k_EControllerActionOrigin_PS4_LeftPad_Click,
k_EControllerActionOrigin_PS4_LeftPad_DPadNorth,
k_EControllerActionOrigin_PS4_LeftPad_DPadSouth,
k_EControllerActionOrigin_PS4_LeftPad_DPadWest,
k_EControllerActionOrigin_PS4_LeftPad_DPadEast,
k_EControllerActionOrigin_PS4_RightPad_Touch,
k_EControllerActionOrigin_PS4_RightPad_Swipe,
k_EControllerActionOrigin_PS4_RightPad_Click,
k_EControllerActionOrigin_PS4_RightPad_DPadNorth,
k_EControllerActionOrigin_PS4_RightPad_DPadSouth,
k_EControllerActionOrigin_PS4_RightPad_DPadWest,
k_EControllerActionOrigin_PS4_RightPad_DPadEast,
k_EControllerActionOrigin_PS4_CenterPad_Touch,
k_EControllerActionOrigin_PS4_CenterPad_Swipe,
k_EControllerActionOrigin_PS4_CenterPad_Click,
k_EControllerActionOrigin_PS4_CenterPad_DPadNorth,
k_EControllerActionOrigin_PS4_CenterPad_DPadSouth,
k_EControllerActionOrigin_PS4_CenterPad_DPadWest,
k_EControllerActionOrigin_PS4_CenterPad_DPadEast,
k_EControllerActionOrigin_PS4_LeftTrigger_Pull,
k_EControllerActionOrigin_PS4_LeftTrigger_Click,
k_EControllerActionOrigin_PS4_RightTrigger_Pull,
k_EControllerActionOrigin_PS4_RightTrigger_Click,
k_EControllerActionOrigin_PS4_LeftStick_Move,
k_EControllerActionOrigin_PS4_LeftStick_Click,
k_EControllerActionOrigin_PS4_LeftStick_DPadNorth,
k_EControllerActionOrigin_PS4_LeftStick_DPadSouth,
k_EControllerActionOrigin_PS4_LeftStick_DPadWest,
k_EControllerActionOrigin_PS4_LeftStick_DPadEast,
k_EControllerActionOrigin_PS4_RightStick_Move,
k_EControllerActionOrigin_PS4_RightStick_Click,
k_EControllerActionOrigin_PS4_RightStick_DPadNorth,
k_EControllerActionOrigin_PS4_RightStick_DPadSouth,
k_EControllerActionOrigin_PS4_RightStick_DPadWest,
k_EControllerActionOrigin_PS4_RightStick_DPadEast,
k_EControllerActionOrigin_PS4_DPad_North,
k_EControllerActionOrigin_PS4_DPad_South,
k_EControllerActionOrigin_PS4_DPad_West,
k_EControllerActionOrigin_PS4_DPad_East,
k_EControllerActionOrigin_PS4_Gyro_Move,
k_EControllerActionOrigin_PS4_Gyro_Pitch,
k_EControllerActionOrigin_PS4_Gyro_Yaw,
k_EControllerActionOrigin_PS4_Gyro_Roll,
// XBox One
k_EControllerActionOrigin_XBoxOne_A,
k_EControllerActionOrigin_XBoxOne_B,
k_EControllerActionOrigin_XBoxOne_X,
k_EControllerActionOrigin_XBoxOne_Y,
k_EControllerActionOrigin_XBoxOne_LeftBumper,
k_EControllerActionOrigin_XBoxOne_RightBumper,
k_EControllerActionOrigin_XBoxOne_Menu, //Start
k_EControllerActionOrigin_XBoxOne_View, //Back
k_EControllerActionOrigin_XBoxOne_LeftTrigger_Pull,
k_EControllerActionOrigin_XBoxOne_LeftTrigger_Click,
k_EControllerActionOrigin_XBoxOne_RightTrigger_Pull,
k_EControllerActionOrigin_XBoxOne_RightTrigger_Click,
k_EControllerActionOrigin_XBoxOne_LeftStick_Move,
k_EControllerActionOrigin_XBoxOne_LeftStick_Click,
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadNorth,
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadSouth,
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadWest,
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadEast,
k_EControllerActionOrigin_XBoxOne_RightStick_Move,
k_EControllerActionOrigin_XBoxOne_RightStick_Click,
k_EControllerActionOrigin_XBoxOne_RightStick_DPadNorth,
k_EControllerActionOrigin_XBoxOne_RightStick_DPadSouth,
k_EControllerActionOrigin_XBoxOne_RightStick_DPadWest,
k_EControllerActionOrigin_XBoxOne_RightStick_DPadEast,
k_EControllerActionOrigin_XBoxOne_DPad_North,
k_EControllerActionOrigin_XBoxOne_DPad_South,
k_EControllerActionOrigin_XBoxOne_DPad_West,
k_EControllerActionOrigin_XBoxOne_DPad_East,
// XBox 360
k_EControllerActionOrigin_XBox360_A,
k_EControllerActionOrigin_XBox360_B,
k_EControllerActionOrigin_XBox360_X,
k_EControllerActionOrigin_XBox360_Y,
k_EControllerActionOrigin_XBox360_LeftBumper,
k_EControllerActionOrigin_XBox360_RightBumper,
k_EControllerActionOrigin_XBox360_Start, //Start
k_EControllerActionOrigin_XBox360_Back, //Back
k_EControllerActionOrigin_XBox360_LeftTrigger_Pull,
k_EControllerActionOrigin_XBox360_LeftTrigger_Click,
k_EControllerActionOrigin_XBox360_RightTrigger_Pull,
k_EControllerActionOrigin_XBox360_RightTrigger_Click,
k_EControllerActionOrigin_XBox360_LeftStick_Move,
k_EControllerActionOrigin_XBox360_LeftStick_Click,
k_EControllerActionOrigin_XBox360_LeftStick_DPadNorth,
k_EControllerActionOrigin_XBox360_LeftStick_DPadSouth,
k_EControllerActionOrigin_XBox360_LeftStick_DPadWest,
k_EControllerActionOrigin_XBox360_LeftStick_DPadEast,
k_EControllerActionOrigin_XBox360_RightStick_Move,
k_EControllerActionOrigin_XBox360_RightStick_Click,
k_EControllerActionOrigin_XBox360_RightStick_DPadNorth,
k_EControllerActionOrigin_XBox360_RightStick_DPadSouth,
k_EControllerActionOrigin_XBox360_RightStick_DPadWest,
k_EControllerActionOrigin_XBox360_RightStick_DPadEast,
k_EControllerActionOrigin_XBox360_DPad_North,
k_EControllerActionOrigin_XBox360_DPad_South,
k_EControllerActionOrigin_XBox360_DPad_West,
k_EControllerActionOrigin_XBox360_DPad_East,
// SteamController V2
k_EControllerActionOrigin_SteamV2_A,
k_EControllerActionOrigin_SteamV2_B,
k_EControllerActionOrigin_SteamV2_X,
k_EControllerActionOrigin_SteamV2_Y,
k_EControllerActionOrigin_SteamV2_LeftBumper,
k_EControllerActionOrigin_SteamV2_RightBumper,
k_EControllerActionOrigin_SteamV2_LeftGrip,
k_EControllerActionOrigin_SteamV2_RightGrip,
k_EControllerActionOrigin_SteamV2_Start,
k_EControllerActionOrigin_SteamV2_Back,
k_EControllerActionOrigin_SteamV2_LeftPad_Touch,
k_EControllerActionOrigin_SteamV2_LeftPad_Swipe,
k_EControllerActionOrigin_SteamV2_LeftPad_Click,
k_EControllerActionOrigin_SteamV2_LeftPad_DPadNorth,
k_EControllerActionOrigin_SteamV2_LeftPad_DPadSouth,
k_EControllerActionOrigin_SteamV2_LeftPad_DPadWest,
k_EControllerActionOrigin_SteamV2_LeftPad_DPadEast,
k_EControllerActionOrigin_SteamV2_RightPad_Touch,
k_EControllerActionOrigin_SteamV2_RightPad_Swipe,
k_EControllerActionOrigin_SteamV2_RightPad_Click,
k_EControllerActionOrigin_SteamV2_RightPad_DPadNorth,
k_EControllerActionOrigin_SteamV2_RightPad_DPadSouth,
k_EControllerActionOrigin_SteamV2_RightPad_DPadWest,
k_EControllerActionOrigin_SteamV2_RightPad_DPadEast,
k_EControllerActionOrigin_SteamV2_LeftTrigger_Pull,
k_EControllerActionOrigin_SteamV2_LeftTrigger_Click,
k_EControllerActionOrigin_SteamV2_RightTrigger_Pull,
k_EControllerActionOrigin_SteamV2_RightTrigger_Click,
k_EControllerActionOrigin_SteamV2_LeftStick_Move,
k_EControllerActionOrigin_SteamV2_LeftStick_Click,
k_EControllerActionOrigin_SteamV2_LeftStick_DPadNorth,
k_EControllerActionOrigin_SteamV2_LeftStick_DPadSouth,
k_EControllerActionOrigin_SteamV2_LeftStick_DPadWest,
k_EControllerActionOrigin_SteamV2_LeftStick_DPadEast,
k_EControllerActionOrigin_SteamV2_Gyro_Move,
k_EControllerActionOrigin_SteamV2_Gyro_Pitch,
k_EControllerActionOrigin_SteamV2_Gyro_Yaw,
k_EControllerActionOrigin_SteamV2_Gyro_Roll,
k_EControllerActionOrigin_Count
}
enum ESteamControllerLEDFlag
{
k_ESteamControllerLEDFlag_SetColor,
k_ESteamControllerLEDFlag_RestoreUserDefault
}
struct ControllerMotionData_t
{
// Sensor-fused absolute rotation; will drift in heading
float rotQuatX;
float rotQuatY;
float rotQuatZ;
float rotQuatW;
// Positional acceleration
float posAccelX;
float posAccelY;
float posAccelZ;
// Angular velocity
float rotVelX;
float rotVelY;
float rotVelZ;
}
// ControllerHandle_t is used to refer to a specific controller.
// This handle will consistently identify a controller, even if it is disconnected and re-connected
alias ControllerHandle_t = uint64;
// These handles are used to refer to a specific in-game action or action set
// All action handles should be queried during initialization for performance reasons
alias ControllerActionSetHandle_t = uint64;
alias ControllerDigitalActionHandle_t = uint64;
alias ControllerAnalogActionHandle_t = uint64;
align(1):
struct ControllerAnalogActionData_t
{
// Type of data coming from this action, this will match what got specified in the action set
EControllerSourceMode eMode;
// The current state of this action; will be delta updates for mouse actions
float x, y;
// Whether or not this action is currently available to be bound in the active action set
bool bActive;
}
struct ControllerDigitalActionData_t
{
// The current state of this action; will be true if currently pressed
bool bState;
// Whether or not this action is currently available to be bound in the active action set
bool bActive;
}
static immutable const(char)* STEAMCONTROLLER_INTERFACE_VERSION = "SteamController005";
|
D
|
a person who is weak and excessively sentimental
|
D
|
module tests.homerun;
import dbox.common;
import deimos.glfw.glfw3;
import framework.debug_draw;
import framework.test;
import tests.test_entries : mode;
import network.network;
import std.conv : to;
import std.stdio;
class Homerun(mode m) : NeuralTest
{
size_t foodCount;
size_t boxDiminish;
float32 creature_a;
b2Vec2 creature_p;
size_t sleepAllowance;
size_t reward;
size_t eyeCounter;
bool canSee;
this()
{
static if (m != m.cpu) {
m_world.SetDebugDraw(g_debugDraw);
if (!BGE.sampleReady) {
network = new SNN(getNetConf);
network.randomize;
network.flush;
}
else network = BGE.getSample();
settings = &main.settings;
spawns = createSpawns(settings);
initialize;
}
}
override void initialize()
{
network.tDecay[0 .. network.inputs.length] = 0;
canSee = true;
energy = 1700;// + cast(int)settings.hz*4;
if(settings.IF) network.tDecay[] = 0;
//spawn first pickup from the spawns array
spawnPickup(spawns[0]);
}
static if (m == m.user) {
override void Keyboard(int key)
{
switch (key)
{
case GLFW_KEY_W:
{
b2Vec2 f = m_body.GetWorldVector(b2Vec2(0.0f, -10f));
b2Vec2 p = m_body.GetWorldPoint(b2Vec2(0.0f, 2.0f));
m_body.ApplyLinearImpulse(f,p,true);
energy -= 10;
}
break;
case GLFW_KEY_A:
{
m_body.ApplyAngularImpulse(.5f,true);
energy -= 2;
}
break;
case GLFW_KEY_D:
{
m_body.ApplyAngularImpulse(-.5f,true);
energy -= 2;
}
break;
case GLFW_KEY_SPACE:
{
eyes.process;
}
break;
default:
break;
}
}
}
//Main step loop.
override void Step(Settings* settings)
{
super.Step(settings);
if (!m_body.IsAwake) {
++sleepCounter;
}
else {
sleepCounter = 0;
}
float CBdist = b2DistanceSquared(m_food.GetWorldCenter,m_body.GetWorldCenter);
if (CBdist < foodShape.m_radius+0.5) {
switch(foodCount)
{
case 0:
energy = 1700;
network.fitness += 1;
m_food.SetTransform((spawns[1].position),0);
++foodCount;
canSee = false;
break;
case 1:
network.fitness += 1f;
++foodCount;
break;
default:
break;
}
}
CBdist = b2Distance(m_food.GetWorldCenter,m_body.GetPosition);
float prox = 1 - (CBdist / 700);
if (prox < 0 || prox > 1) {
prox = 0;
}
//if (prox > bestProx)
bestProx = prox;
static if (m != m.user) {
// if (firstTick) {
network.inputs[$-1] += 0.5f;
// firstTick = false;
// }
network.tick(settings);
energy -= 1;
if(network.outputs[0]) {
m_body.ApplyAngularImpulse(0.1f,true);
// network.inputs[1] += 0.5f;
//energy -= 1;
}
if(network.outputs[2]) {
m_body.ApplyAngularImpulse(-0.1f,true);
// network.inputs[2] += 0.5f;
//energy -= 1;
}
if(network.outputs[1]) {
b2Vec2 f = m_body.GetWorldVector(b2Vec2(0.0f, -5f));
b2Vec2 p = m_body.GetWorldPoint(b2Vec2(0.0f, 2.0f));
m_body.ApplyLinearImpulse(f,p,true);
// network.inputs[3] += 0.5f;
energy -= 10;
}
if (!canSee)
network.inputs[$-2] += 0.5f;
}
static if (m != m.cpu) {
trace ~= m_body.GetWorldCenter;
b2Color heat = b2Color(0,1,0);
foreach_reverse(i,t; trace) {
g_debugDraw.DrawPoint(t, 2, heat);
if (heat.g > 0) {
heat.g -= 0.001;
if (heat.r < 0.5) heat.r += 0.001;
}
}
b2Vec2 creatureD = m_body.GetWorldCenter;
creatureD.y -= 2f;
creatureD.x -= 1f;
g_debugDraw.DrawString(creatureD, to!string(energy));
if (settings.chaseCam) {
g_camera.m_center = m_body.GetWorldCenter;
}
if (settings.foodCam) {
g_camera.m_center = m_food.GetWorldCenter;
}
if (settings.drawOutputs) {
creatureD.y -= 1;
creatureD.x -= (network.outputs.length/2f) - 0.5f;
foreach(outputValue; network.outputs) {
++creatureD.x;
g_debugDraw.DrawPoint(creatureD, 10.0f, b2Color(outputValue, outputValue, outputValue)); //Input firing HUD
}
}
if (!canSee) {
auto pos = m_body.GetWorldCenter;
pos.y += 2;
pos.x -= 1.9f;
g_debugDraw.DrawString(pos, "*BLIND*");
}
}
static if (m != m.user) {
if (canSee) {
auto ca = m_body.GetAngle;
auto cp = m_body.GetPosition;
auto ang = 1.5f;
import core.stdc.math;
float32 _a = ca + (ang)*(b2_pi);
b2Vec2 _p = cp + b2Vec2(40f * cosf(_a), 40f * sinf(_a));
m_world.RayCast(cb,cp,_p);
if (cb.m_hit) {
network.inputs[0] += 0.5f;
cb.m_hit = false;
static if (m != m.cpu) {
g_debugDraw.DrawSegment(cp, cb.m_point, b2Color(1f, 0f, 0f));
}
}
else {
static if (m != m.cpu) {
g_debugDraw.DrawSegment(cp, _p, b2Color(0.8f, 0.8f, 0.8f));
}
}
}
if (energy <= 0) {
if (foodCount == 2) network.fitness = 3;
else network.fitness += bestProx;
done = true;
}
}
}
static NeuralTest Create()
{
return new typeof(this);
}
static Spawn[] createSpawns(Settings* set)
{
Spawn[] toReturn;
toReturn.length = 2;
foreach(i; 0 .. toReturn.length-1) {
float minRange = 3;
float maxRange = 25;
float xa;
if(uniform(0,2)) xa = uniform(minRange,maxRange);
else xa = -uniform(minRange,maxRange);
float ya;
if(uniform(0,2)) ya = uniform(minRange,maxRange);
else ya = -uniform(minRange,maxRange);
toReturn[i].position.x = xa;
toReturn[i].position.y = ya;
}
return toReturn;
}
static NetConf getNetConf()
{
return NetConf(3,[10],3);
}
}
|
D
|
/Users/yinheng/Desktop/code/node/rs/demo/target/rls/debug/deps/libproc_macro_error_attr-feda80c9be8a6814.dylib: /Users/yinheng/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro-error-attr-1.0.4/src/lib.rs /Users/yinheng/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro-error-attr-1.0.4/src/parse.rs /Users/yinheng/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro-error-attr-1.0.4/src/settings.rs
/Users/yinheng/Desktop/code/node/rs/demo/target/rls/debug/deps/proc_macro_error_attr-feda80c9be8a6814.d: /Users/yinheng/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro-error-attr-1.0.4/src/lib.rs /Users/yinheng/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro-error-attr-1.0.4/src/parse.rs /Users/yinheng/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro-error-attr-1.0.4/src/settings.rs
/Users/yinheng/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro-error-attr-1.0.4/src/lib.rs:
/Users/yinheng/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro-error-attr-1.0.4/src/parse.rs:
/Users/yinheng/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro-error-attr-1.0.4/src/settings.rs:
|
D
|
module UnrealScript.UTGame.UTLinkGunMuzzleFlashLight;
import ScriptClasses;
import UnrealScript.Helpers;
import UnrealScript.UDKBase.UDKExplosionLight;
extern(C++) interface UTLinkGunMuzzleFlashLight : UDKExplosionLight
{
public extern(D):
private static __gshared ScriptClass mStaticClass;
@property final static ScriptClass StaticClass() { mixin(MGSCC("Class UTGame.UTLinkGunMuzzleFlashLight")); }
private static __gshared UTLinkGunMuzzleFlashLight mDefaultProperties;
@property final static UTLinkGunMuzzleFlashLight DefaultProperties() { mixin(MGDPC("UTLinkGunMuzzleFlashLight", "UTLinkGunMuzzleFlashLight UTGame.Default__UTLinkGunMuzzleFlashLight")); }
static struct Functions
{
private static __gshared ScriptFunction mSetTeam;
public @property static final ScriptFunction SetTeam() { mixin(MGF("mSetTeam", "Function UTGame.UTLinkGunMuzzleFlashLight.SetTeam")); }
}
@property final auto ref
{
ScriptArray!(UDKExplosionLight.LightValues) RedTeamTimeShift() { mixin(MGPC("ScriptArray!(UDKExplosionLight.LightValues)", 624)); }
ScriptArray!(UDKExplosionLight.LightValues) BlueTeamTimeShift() { mixin(MGPC("ScriptArray!(UDKExplosionLight.LightValues)", 636)); }
}
final void SetTeam(ubyte NewTeam)
{
ubyte params[1];
params[] = 0;
params[0] = NewTeam;
(cast(ScriptObject)this).ProcessEvent(Functions.SetTeam, params.ptr, cast(void*)0);
}
}
|
D
|
module comp_d.data;
import std.stdio : writeln;
import std.meta, std.typecons;
import std.algorithm, std.container.rbtree, std.array;
/******************************/
// Symbol
alias Symbol = ptrdiff_t;
enum bool isSymbol(T) = is(T : Symbol);
// empty symbol, end of file symbol (for LRs), virtual (for LALR algorithm)
enum Symbol empty_ = -1, end_of_file_ = -2, virtual = -3;
immutable special_tokens = 3; // empty_, end_of_file, virtual. see data.d
/*******************************/
// Rule
alias Rule = Tuple!(Symbol, "lhs", Symbol[], "rhs");
enum bool isRule(T) = is(T : Rule);
template rule() {
Rule rule(Args...)(Args symbols) {
// Args must be the nonempty sequence of Symbol's.
static assert ( Args.length > 0, "\033[1m\033[32mThere must be at least 1 symbol in rule(...) .\033[0m" );
static assert ( allSatisfy!(isSymbol, Args), "\033[1m\033[32mThere is a parameter in rule(...) which is not the Symbol type.\033[0m" );
auto rhs = new Symbol[symbols.length-1];
foreach ( i, sym; symbols[1..$] ) rhs[i] = sym;
//Rule result;
//result.lhs = symbols[0], result.rhs = rhs;
//return result;
return Rule(symbols[0], rhs);
}
}
/*******************************/
// Grammar
alias Grammar = Rule[];
/*
deprecated template grammar() {
Grammar grammar(Args...)(Args rules) {
static assert ( Args.length > 0, "\033[1m\033[32mThere must be at least 1 rule in grammar(...) .\033[0m" );
static assert ( allSatisfy!(isRule, Args), "\033[1m\033[32mThere is a parameter in grammar(...) which is not the Rule type.\033[0m" );
auto result = new Rule[rules.length];
foreach ( i, rule; rules ) result[i] = rule;
return result;
}
}
*/
/*******************************/
// for LR table (moved to LRTable.d)
//alias LREntry = Tuple!(Action, ulong);
//alias LRTable = LREntry[][Symbol];
|
D
|
/*
Copyright: Marcelo S. N. Mancini (Hipreme|MrcSnm), 2018 - 2021
License: [https://creativecommons.org/licenses/by/4.0/|CC BY-4.0 License].
Authors: Marcelo S. N. Mancini
Copyright Marcelo S. N. Mancini 2018 - 2021.
Distributed under the CC BY-4.0 License.
(See accompanying file LICENSE.txt or copy at
https://creativecommons.org/licenses/by/4.0/
*/
module hip.api.input;
public import hip.api.input.mouse;
public import hip.api.input.gamepad;
public import hip.api.input.inputmap;
public import hip.api.input.binding;
alias getMousePosition = getTouchPosition;
alias getNormallizedMousePosition = getNormallizedTouchPosition;
alias getWorldMousePosition = getWorldTouchPosition;
alias getMouseDeltaPosition = getTouchDeltaPosition;
|
D
|
// https://issues.dlang.org/show_bug.cgi?id=17434
// EXTRA_FILES: test17434a.d imports/imp17434a.d imports/imp17434b.d
module test17434;
import test17434a;
void main()
{
imports.imp17434b.testing();
}
|
D
|
/**
* Contains TelegramInvoice
*/
module tg.payment.types.telegram_invoice;
import tg.core.type, tg.core.exception;
import std.json, tg.type;
/**
* This object contains basic information about an invoice.
*/
class TelegramInvoice : TelegramType {
/**
* Creates new type object
*/
nothrow pure public this () @safe {
_title = "";
_description = "";
_start_parameter = "";
_currency = "";
_total_amount = 0;
}
/** Add constructor with data init from response */
mixin(TelegramTypeConstructor);
override public void setFromJson (JSONValue data) {
if ( "title" !in data ) throw new TelegramException("Could not find reqired entry : title");
_title = data["title"].str();
if ( "description" !in data ) throw new TelegramException("Could not find reqired entry : description");
_description = data["description"].str();
if ( "start_parameter" !in data ) throw new TelegramException("Could not find reqired entry : start_parameter");
_start_parameter = data["start_parameter"].str();
if ( "currency" !in data ) throw new TelegramException("Could not find reqired entry : currency");
_currency = data["currency"].str();
if ( "total_amount" !in data ) throw new TelegramException("Could not find reqired entry : total_amount");
_total_amount = data["total_amount"].integer();
}
override public JSONValue getAsJson () {
JSONValue data = parseJSON("");
data["title"] = _title;
data["description"] = _description;
data["start_parameter"] = _start_parameter;
data["currency"] = _currency;
data["total_amount"] = _total_amount;
return data;
}
/** Product name */
private string _title;
/**
* Getter for '_title'
* Returns: Current value of '_title'
*/
@property string title () { return _title; }
/**
* Setter for '_title'
* Params: titleNew = New value of '_title'
* Returns: New value of '_title'
*/
@property string title ( string titleNew ) { return _title = titleNew; }
/** Product description */
private string _description;
/**
* Getter for '_description'
* Returns: Current value of '_description'
*/
@property string description () { return _description; }
/**
* Setter for '_description'
* Params: descriptionNew = New value of '_description'
* Returns: New value of '_description'
*/
@property string description ( string descriptionNew ) { return _description = descriptionNew; }
/** Unique bot deep-linking parameter that can be used to generate this invoice */
private string _start_parameter;
/**
* Getter for '_start_parameter'
* Returns: Current value of '_start_parameter'
*/
@property string startParameter () { return _start_parameter; }
/**
* Setter for '_start_parameter'
* Params: startParameterNew = New value of '_start_parameter'
* Returns: New value of '_start_parameter'
*/
@property string startParameter ( string startParameterNew ) { return _start_parameter = startParameterNew; }
/** Three-letter ISO 4217 currency code */
private string _currency;
/**
* Getter for '_currency'
* Returns: Current value of '_currency'
*/
@property string currency () { return _currency; }
/**
* Setter for '_currency'
* Params: currencyNew = New value of '_currency'
* Returns: New value of '_currency'
*/
@property string currency ( string currencyNew ) { return _currency = currencyNew; }
/** Total price in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). For example, for a price of <code>US$ 1.45</code> pass <code>amount = 145</code>. See the <em>exp</em> parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */
private ulong _total_amount;
/**
* Getter for '_total_amount'
* Returns: Current value of '_total_amount'
*/
@property ulong totalAmount () { return _total_amount; }
/**
* Setter for '_total_amount'
* Params: totalAmountNew = New value of '_total_amount'
* Returns: New value of '_total_amount'
*/
@property ulong totalAmount ( ulong totalAmountNew ) { return _total_amount = totalAmountNew; }
}
|
D
|
/**
* Contains OS-level routines needed by the garbage collector.
*
* Copyright: Copyright Digital Mars 2005 - 2013.
* License: $(WEB www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
* Authors: Walter Bright, David Friedman, Sean Kelly, Leandro Lucarella
*/
/* Copyright Digital Mars 2005 - 2013.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*/
module gc.os;
version (Windows)
{
import core.sys.windows.windows;
alias int pthread_t;
pthread_t pthread_self() nothrow
{
return cast(pthread_t) GetCurrentThreadId();
}
//version = GC_Use_Alloc_Win32;
}
else version (Posix)
{
import core.sys.posix.sys.mman;
version (FreeBSD) import core.sys.freebsd.sys.mman : MAP_ANON;
version (CRuntime_Glibc) import core.sys.linux.sys.mman : MAP_ANON;
version (OSX) import core.sys.osx.sys.mman : MAP_ANON;
import core.stdc.stdlib;
//version = GC_Use_Alloc_MMap;
}
else
{
import core.stdc.stdlib;
//version = GC_Use_Alloc_Malloc;
}
/+
static if(is(typeof(VirtualAlloc)))
version = GC_Use_Alloc_Win32;
else static if (is(typeof(mmap)))
version = GC_Use_Alloc_MMap;
else static if (is(typeof(valloc)))
version = GC_Use_Alloc_Valloc;
else static if (is(typeof(malloc)))
version = GC_Use_Alloc_Malloc;
else static assert(false, "No supported allocation methods available.");
+/
static if (is(typeof(VirtualAlloc))) // version (GC_Use_Alloc_Win32)
{
/**
* Map memory.
*/
void *os_mem_map(size_t nbytes) nothrow
{
return VirtualAlloc(null, nbytes, MEM_RESERVE | MEM_COMMIT,
PAGE_READWRITE);
}
/**
* Unmap memory allocated with os_mem_map().
* Returns:
* 0 success
* !=0 failure
*/
int os_mem_unmap(void *base, size_t nbytes) nothrow
{
return cast(int)(VirtualFree(base, 0, MEM_RELEASE) == 0);
}
}
else static if (is(typeof(mmap))) // else version (GC_Use_Alloc_MMap)
{
void *os_mem_map(size_t nbytes) nothrow
{ void *p;
p = mmap(null, nbytes, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
return (p == MAP_FAILED) ? null : p;
}
int os_mem_unmap(void *base, size_t nbytes) nothrow
{
return munmap(base, nbytes);
}
}
else static if (is(typeof(valloc))) // else version (GC_Use_Alloc_Valloc)
{
void *os_mem_map(size_t nbytes) nothrow
{
return valloc(nbytes);
}
int os_mem_unmap(void *base, size_t nbytes) nothrow
{
free(base);
return 0;
}
}
else static if (is(typeof(malloc))) // else version (GC_Use_Alloc_Malloc)
{
// NOTE: This assumes malloc granularity is at least (void*).sizeof. If
// (req_size + PAGESIZE) is allocated, and the pointer is rounded up
// to PAGESIZE alignment, there will be space for a void* at the end
// after PAGESIZE bytes used by the GC.
import gc.gc;
const size_t PAGE_MASK = PAGESIZE - 1;
void *os_mem_map(size_t nbytes) nothrow
{ byte *p, q;
p = cast(byte *) malloc(nbytes + PAGESIZE);
q = p + ((PAGESIZE - ((cast(size_t) p & PAGE_MASK))) & PAGE_MASK);
* cast(void**)(q + nbytes) = p;
return q;
}
int os_mem_unmap(void *base, size_t nbytes) nothrow
{
free( *cast(void**)( cast(byte*) base + nbytes ) );
return 0;
}
}
else
{
static assert(false, "No supported allocation methods available.");
}
/**
Check for any kind of memory pressure.
Params:
mapped = the amount of memory mapped by the GC in bytes
Returns:
true if memory is scarce
*/
// TOOD: get virtual mem sizes and current usage from OS
// TODO: compare current RSS and avail. physical memory
version (Windows)
{
bool isLowOnMem(size_t mapped) nothrow @nogc
{
version (D_LP64)
return false;
else
{
import core.sys.windows.windows;
MEMORYSTATUS stat;
GlobalMemoryStatus(&stat);
// Less than 5 % of virtual address space available
return stat.dwAvailVirtual < stat.dwTotalVirtual / 20;
}
}
}
else version (OSX)
{
bool isLowOnMem(size_t mapped) nothrow @nogc
{
enum GB = 2 ^^ 30;
version (D_LP64)
return false;
else
{
// 80 % of available 4GB is used for GC (excluding malloc and mmap)
enum size_t limit = 4UL * GB * 8 / 10;
return mapped > limit;
}
}
}
else
{
bool isLowOnMem(size_t mapped) nothrow @nogc
{
enum GB = 2 ^^ 30;
version (D_LP64)
return false;
else
{
// be conservative and assume 3GB
enum size_t limit = 3UL * GB * 8 / 10;
return mapped > limit;
}
}
}
|
D
|
import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric;
void main()
{
auto n = readln.chomp.to!int;
auto as = readln.split.to!(int[]);
sort(as);
auto x = as[$-1];
as = as[0..$-1];
int y, d = int.max;
foreach (a; as) {
auto e = abs((x+1)/2 - a);
if (e < d) {
y = a;
d = e;
}
}
writefln("%d %d", x, y);
}
|
D
|
/**
* This package provides a layer of abstraction over YQL queries and responses,
* to enable safe and expressive use of the web interface from D code.
*
* $(TABLE
* $(TR $(TD $(B Module Name)) $(TD $(B Description)))
* $(TR $(TD $(LINK2 _yql.query.html, _yql.query))
* $(TD Type-safe mechanisms for constructing YQL queries))
* $(TR $(TD $(LINK2 _yql.response.html, _yql.response))
* $(TD Type-safe mechanisms for processing YQL responses))
* )
*
* License: $(LINK2 https://boost.org/LICENSE_1_0.txt, Boost License 1.0)
* Copyright: Copyright © 2017, Lewis Revill
* Authors: Lewis Revill
*/
module yql;
public import yql.query;
public import yql.response;
/**
* Analyzing tech corporations by market capitalization.
*/
@safe @nogc pure nothrow
unittest
{
import std.algorithm.searching : all;
static immutable data = [column("Name"), column("MarketCapitalization"), column("Ask"), column("Bid"), column("Change")];
static immutable stocks = [value("'AAPL'"), value("'GOOG'"), value("'YHOO'"), value("'FB'"), value("'AMZN'")];
assert(stocks.all!(v => v.str != "null"));
immutable query = table("yahoo.finance.quotes")
.select(data)
.where(column("symbol").among(stocks))
.orderBy(column("MarketCapitalization"), Order.descending);
assert(query.valid);
// immutable uri = query
// .range
// .uri;
}
|
D
|
module gbaid.gba.instable;
import std.range : iota;
import std.traits : hasUDA;
import std.meta : aliasSeqOf;
import std.algorithm.searching : count;
import std.string : format;
import gbaid.util;
public import gbaid.gba.register;
public import gbaid.gba.memory;
public alias Executor = void function(Registers*, MemoryBus*, int);
public Executor[] createTable(alias nullInstruction)(int bitCount) {
auto table = new Executor[1 << bitCount];
foreach (i, t; table) {
table[i] = &nullInstruction;
}
return table;
}
public void addSubTable(string bits, alias instructionFamily, alias nullInstruction)(Executor[] table) {
// Generate the subtable
auto subTable = createTable!(instructionFamily, bits.count('t'), nullInstruction)();
// Check that there are as many bits as in the table length
int bitCount = cast(int) bits.length;
if (1 << bitCount != table.length) {
throw new Exception("Wrong number of bits");
}
// Count don't cares and table bits (and validate bit types)
int dontCareCount = 0;
int tableBitCount = 0;
foreach (b; bits) {
switch (b) {
case '0':
case '1':
break;
case 'd':
dontCareCount++;
break;
case 't':
tableBitCount++;
break;
default:
throw new Exception("Unknown bit type: '" ~ b ~ "'");
}
}
if (1 << tableBitCount != subTable.length) {
throw new Exception("Wrong number of sub-table bits");
}
// Enumerate combinations generated by the bit string
// 0 and 1 literals, d for don't care, t for table
// Start with all the 1 literals, which won't change
int fixed = 0;
foreach (int i, b; bits) {
if (b == '1') {
fixed.setBit(bitCount - 1 - i, 1);
}
}
// Now for every combination of don't cares create an
// intermediary value, which is only missing table bits
foreach (dontCareValue; 0 .. 1 << dontCareCount) {
int intermediary = fixed;
int dc = dontCareCount - 1;
foreach (int i, b; bits) {
if (b == 'd') {
intermediary.setBit(bitCount - 1 - i, dontCareValue.getBit(dc));
dc--;
}
}
// Now for every combination of table bits create the
// final value and assign the pointer in the table
foreach (tableBitValue; 0 .. 1 << tableBitCount) {
// Ignore null instructions
if (subTable[tableBitValue] is &nullInstruction) {
continue;
}
int index = intermediary;
int tc = tableBitCount - 1;
foreach (int i, b; bits) {
if (b == 't') {
index.setBit(bitCount - 1 - i, tableBitValue.getBit(tc));
tc--;
}
}
// Check if there's a conflict first
if (table[index] !is &nullInstruction) {
throw new Exception(format("The entry at index %d in sub-table with bits \"%s\" conflicts with "
~ "a previously added one", tableBitValue, bits));
}
table[index] = subTable[tableBitValue];
}
}
}
private Executor[] createTable(alias instructionFamily, int bitCount, alias unsupported)() {
static if (bitCount == 0) {
Executor[] table = [&instructionFamily!()];
} else {
Executor[] table;
foreach (i; aliasSeqOf!(iota(0, 1 << bitCount))) {
static if (hasUDA!(instructionFamily!i, "unsupported")) {
table ~= [&unsupported];
} else {
table ~= [&instructionFamily!i];
}
}
}
return table;
}
|
D
|
cmd_. := LD_LIBRARY_PATH=/Applications/XAMPP/xamppfiles/htdocs/aulas/2021_1/2021_1_Programacao_Internet_II/Aula08/node_modules/dtrace-provider/build/Release/lib.host:/Applications/XAMPP/xamppfiles/htdocs/aulas/2021_1/2021_1_Programacao_Internet_II/Aula08/node_modules/dtrace-provider/build/Release/lib.target:$$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; bash build.sh
|
D
|
/Users/oyo02699/apps/easycrm/easycrm-api/target/rls/debug/deps/lazy_static-8ca06278f5bc974b.rmeta: /Users/oyo02699/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/lazy_static-1.4.0/src/lib.rs /Users/oyo02699/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/lazy_static-1.4.0/src/inline_lazy.rs
/Users/oyo02699/apps/easycrm/easycrm-api/target/rls/debug/deps/lazy_static-8ca06278f5bc974b.d: /Users/oyo02699/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/lazy_static-1.4.0/src/lib.rs /Users/oyo02699/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/lazy_static-1.4.0/src/inline_lazy.rs
/Users/oyo02699/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/lazy_static-1.4.0/src/lib.rs:
/Users/oyo02699/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/lazy_static-1.4.0/src/inline_lazy.rs:
|
D
|
/Users/Mrbochiballs1/MakeSchool/Ballz/DerivedData/Ballz/Build/Intermediates/Ballz.build/Debug-iphonesimulator/MessagesExtension.build/Objects-normal/x86_64/MessagesViewController.o : /Users/Mrbochiballs1/MakeSchool/Ballz/MessagesExtension/MessagesViewController.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/SwiftOnoneSupport.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/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/SpriteKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/GLKit.swiftmodule
/Users/Mrbochiballs1/MakeSchool/Ballz/DerivedData/Ballz/Build/Intermediates/Ballz.build/Debug-iphonesimulator/MessagesExtension.build/Objects-normal/x86_64/MessagesViewController~partial.swiftmodule : /Users/Mrbochiballs1/MakeSchool/Ballz/MessagesExtension/MessagesViewController.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/SwiftOnoneSupport.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/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/SpriteKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/GLKit.swiftmodule
/Users/Mrbochiballs1/MakeSchool/Ballz/DerivedData/Ballz/Build/Intermediates/Ballz.build/Debug-iphonesimulator/MessagesExtension.build/Objects-normal/x86_64/MessagesViewController~partial.swiftdoc : /Users/Mrbochiballs1/MakeSchool/Ballz/MessagesExtension/MessagesViewController.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/SwiftOnoneSupport.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/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/SpriteKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/GLKit.swiftmodule
|
D
|
import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric, std.container, std.range;
void get(Args...)(ref Args args)
{
import std.traits, std.meta, std.typecons;
static if (Args.length == 1) {
alias Arg = Args[0];
static if (isArray!Arg) {
static if (isSomeChar!(ElementType!Arg)) {
args[0] = readln.chomp.to!Arg;
} else {
args[0] = readln.split.to!Arg;
}
} else static if (isTuple!Arg) {
auto input = readln.split;
static foreach (i; 0..Fields!Arg.length) {
args[0][i] = input[i].to!(Fields!Arg[i]);
}
} else {
args[0] = readln.chomp.to!Arg;
}
} else {
auto input = readln.split;
assert(input.length == Args.length);
static foreach (i; 0..Args.length) {
args[i] = input[i].to!(Args[i]);
}
}
}
void get_lines(Args...)(size_t N, ref Args args)
{
import std.traits, std.range;
static foreach (i; 0..Args.length) {
static assert(isArray!(Args[i]));
args[i].length = N;
}
foreach (i; 0..N) {
static if (Args.length == 1) {
get(args[0][i]);
} else {
auto input = readln.split;
static foreach (j; 0..Args.length) {
args[j][i] = input[j].to!(ElementType!(Args[j]));
}
}
}
}
enum P = 10L^^9 + 7;
void main()
{
int T; get(T);
while (T--) {
int N, K; get(N, K);
int[] aa; get(aa);
auto MAX = new int[](K + 1);
auto DP = new long[](K + 1);
DP[0] = 1;
foreach (a; aa) {
foreach_reverse (i; 0..K) {
if (MAX[i] + a > MAX[i+1]) {
MAX[i+1] = MAX[i] + a;
DP[i+1] = DP[i];
} else if (MAX[i] + a == MAX[i+1]) {
(DP[i+1] += DP[i]) %= P;
}
}
}
writeln(DP[K]);
}
}
/*
4 3
1 3 1 2
0 0 0 0
1 0 0 0
0 1 1 1
1 1 1 1
0 3 4 4
1 1 1 1
0 3 4 5
1 1 2 1
0 3 5 6
1 1 1 2
4 2
1 1 1 1
0 0 0
1 0 0
0 1 1
1 1 0
0 1 2
1 2 1
0 1 2
1 3 3
0 1 2
1 4 6
*/
|
D
|
/Users/linjianguo/Desktop/ReactiveCoCoDemo/DerivedData/ReactiveCoCoDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactiveSwift.build/Objects-normal/x86_64/ResultExtensions.o : /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Atomic.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Disposable.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Lifetime.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Reactive.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Bag.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/UnidirectionalBinding.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Signal.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Optional.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Flatten.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Action.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/SignalProducer.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/EventLogger.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Scheduler.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Observer.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/UninhabitedTypeGuards.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Deprecations+Removals.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/FoundationExtensions.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/ResultExtensions.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Event.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Property.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/ValidatingProperty.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/linjianguo/Desktop/ReactiveCoCoDemo/DerivedData/ReactiveCoCoDemo/Build/Products/Debug-iphonesimulator/Result/Result.framework/Modules/Result.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/linjianguo/Desktop/ReactiveCoCoDemo/Pods/Target\ Support\ Files/ReactiveSwift/ReactiveSwift-umbrella.h /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/Target\ Support\ Files/Result/Result-umbrella.h /Users/linjianguo/Desktop/ReactiveCoCoDemo/DerivedData/ReactiveCoCoDemo/Build/Products/Debug-iphonesimulator/Result/Result.framework/Headers/Result-Swift.h /Users/linjianguo/Desktop/ReactiveCoCoDemo/DerivedData/ReactiveCoCoDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactiveSwift.build/unextended-module.modulemap /Users/linjianguo/Desktop/ReactiveCoCoDemo/DerivedData/ReactiveCoCoDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Result.build/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/linjianguo/Desktop/ReactiveCoCoDemo/DerivedData/ReactiveCoCoDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactiveSwift.build/Objects-normal/x86_64/ResultExtensions~partial.swiftmodule : /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Atomic.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Disposable.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Lifetime.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Reactive.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Bag.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/UnidirectionalBinding.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Signal.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Optional.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Flatten.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Action.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/SignalProducer.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/EventLogger.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Scheduler.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Observer.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/UninhabitedTypeGuards.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Deprecations+Removals.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/FoundationExtensions.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/ResultExtensions.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Event.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Property.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/ValidatingProperty.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/linjianguo/Desktop/ReactiveCoCoDemo/DerivedData/ReactiveCoCoDemo/Build/Products/Debug-iphonesimulator/Result/Result.framework/Modules/Result.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/linjianguo/Desktop/ReactiveCoCoDemo/Pods/Target\ Support\ Files/ReactiveSwift/ReactiveSwift-umbrella.h /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/Target\ Support\ Files/Result/Result-umbrella.h /Users/linjianguo/Desktop/ReactiveCoCoDemo/DerivedData/ReactiveCoCoDemo/Build/Products/Debug-iphonesimulator/Result/Result.framework/Headers/Result-Swift.h /Users/linjianguo/Desktop/ReactiveCoCoDemo/DerivedData/ReactiveCoCoDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactiveSwift.build/unextended-module.modulemap /Users/linjianguo/Desktop/ReactiveCoCoDemo/DerivedData/ReactiveCoCoDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Result.build/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/linjianguo/Desktop/ReactiveCoCoDemo/DerivedData/ReactiveCoCoDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactiveSwift.build/Objects-normal/x86_64/ResultExtensions~partial.swiftdoc : /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Atomic.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Disposable.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Lifetime.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Reactive.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Bag.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/UnidirectionalBinding.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Signal.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Optional.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Flatten.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Action.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/SignalProducer.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/EventLogger.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Scheduler.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Observer.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/UninhabitedTypeGuards.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Deprecations+Removals.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/FoundationExtensions.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/ResultExtensions.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Event.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/Property.swift /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/ReactiveSwift/Sources/ValidatingProperty.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/linjianguo/Desktop/ReactiveCoCoDemo/DerivedData/ReactiveCoCoDemo/Build/Products/Debug-iphonesimulator/Result/Result.framework/Modules/Result.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/linjianguo/Desktop/ReactiveCoCoDemo/Pods/Target\ Support\ Files/ReactiveSwift/ReactiveSwift-umbrella.h /Users/linjianguo/Desktop/ReactiveCoCoDemo/Pods/Target\ Support\ Files/Result/Result-umbrella.h /Users/linjianguo/Desktop/ReactiveCoCoDemo/DerivedData/ReactiveCoCoDemo/Build/Products/Debug-iphonesimulator/Result/Result.framework/Headers/Result-Swift.h /Users/linjianguo/Desktop/ReactiveCoCoDemo/DerivedData/ReactiveCoCoDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactiveSwift.build/unextended-module.modulemap /Users/linjianguo/Desktop/ReactiveCoCoDemo/DerivedData/ReactiveCoCoDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Result.build/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 Ferdinand Majerech 2011.
// 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 library.yaml.encoding;
///Text encodings supported by D:YAML.
enum Encoding : ubyte
{
///Unicode UTF-8
UTF_8,
///Unicode UTF-16
UTF_16,
///Unicode UTF-32
UTF_32
}
|
D
|
/**
* Identify the characteristics of the host CPU, providing information
* about cache sizes and assembly optimisation hints. This module is
* provided primarily for assembly language programmers.
*
* References:
* Some of this information was extremely difficult to track down. Some of the
* documents below were found only in cached versions stored by search engines!
* This code relies on information found in:
*
* $(UL
* $(LI "Intel(R) 64 and IA-32 Architectures Software Developers Manual,
* Volume 2A: Instruction Set Reference, A-M" (2007).
* )
* $(LI "AMD CPUID Specification", Advanced Micro Devices, Rev 2.28 (2008).
* )
* $(LI "AMD Processor Recognition Application Note For Processors Prior to AMD
* Family 0Fh Processors", Advanced Micro Devices, Rev 3.13 (2005).
* )
* $(LI "AMD Geode(TM) GX Processors Data Book",
* Advanced Micro Devices, Publication ID 31505E, (2005).
* )
* $(LI "AMD K6 Processor Code Optimisation", Advanced Micro Devices, Rev D (2000).
* )
* $(LI "Application note 106: Software Customization for the 6x86 Family",
* Cyrix Corporation, Rev 1.5 (1998)
* )
* $(LI $(LINK http://www.datasheetcatalog.org/datasheet/nationalsemiconductor/GX1.pdf))
* $(LI "Geode(TM) GX1 Processor Series Low Power Integrated X86 Solution",
* National Semiconductor, (2002)
* )
* $(LI "The VIA Isaiah Architecture", G. Glenn Henry, Centaur Technology, Inc (2008).
* )
* $(LI $(LINK http://www.sandpile.org/ia32/cpuid.htm))
* $(LI $(LINK http://www.akkadia.org/drepper/cpumemory.pdf))
* $(LI "What every programmer should know about memory",
* Ulrich Depper, Red Hat, Inc., (2007).
* )
* $(LI "CPU Identification by the Windows Kernel", G. Chappell (2009).
* $(LINK http://www.geoffchappell.com/viewer.htm?doc=studies/windows/km/cpu/cx8.htm)
* )
* $(LI "Intel(R) Processor Identification and the CPUID Instruction, Application
* Note 485" (2009).
* )
* )
*
* Bugs: Currently only works on x86 and Itanium CPUs.
* Many processors have bugs in their microcode for the CPUID instruction,
* so sometimes the cache information may be incorrect.
*
* Copyright: Copyright Don Clugston 2007 - 2009.
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
* Authors: Don Clugston, Tomas Lindquist Olsen <tomas@famolsen.dk>
* Source: $(DRUNTIMESRC core/_cpuid.d)
*/
module core.cpuid;
version (GNU) version = GNU_OR_LDC;
version (LDC) version = GNU_OR_LDC;
@trusted:
nothrow:
@nogc:
// If optimizing for a particular processor, it is generally better
// to identify based on features rather than model. NOTE: Normally
// it's only worthwhile to optimise for the latest Intel and AMD CPU,
// with a backup for other CPUs.
// Pentium -- preferPentium1()
// PMMX -- + mmx()
// PPro -- default
// PII -- + mmx()
// PIII -- + mmx() + sse()
// PentiumM -- + mmx() + sse() + sse2()
// Pentium4 -- preferPentium4()
// PentiumD -- + isX86_64()
// Core2 -- default + isX86_64()
// AMD K5 -- preferPentium1()
// AMD K6 -- + mmx()
// AMD K6-II -- + mmx() + 3dnow()
// AMD K7 -- preferAthlon()
// AMD K8 -- + sse2()
// AMD K10 -- + isX86_64()
// Cyrix 6x86 -- preferPentium1()
// 6x86MX -- + mmx()
// GDC support uses extended inline assembly:
// https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html (general information and hints)
// https://gcc.gnu.org/onlinedocs/gcc/Simple-Constraints.html (binding variables to registers)
// https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html (x86 specific register short names)
public:
/// Cache size and behaviour
struct CacheInfo
{
/// Size of the cache, in kilobytes, per CPU.
/// For L1 unified (data + code) caches, this size is half the physical size.
/// (we don't halve it for larger sizes, since normally
/// data size is much greater than code size for critical loops).
size_t size;
/// Number of ways of associativity, eg:
/// $(UL
/// $(LI 1 = direct mapped)
/// $(LI 2 = 2-way set associative)
/// $(LI 3 = 3-way set associative)
/// $(LI ubyte.max = fully associative)
/// )
ubyte associativity;
/// Number of bytes read into the cache when a cache miss occurs.
uint lineSize;
}
public:
/// $(RED Scheduled for deprecation. Please use $(D dataCaches) instead.)
// Note: When we deprecate it, we simply make it private.
__gshared CacheInfo[5] datacache;
@property pure
{
/// The data caches. If there are fewer than 5 physical caches levels,
/// the remaining levels are set to size_t.max (== entire memory space)
const(CacheInfo)[5] dataCaches() { return _dataCaches; }
/// Returns vendor string, for display purposes only.
/// Do NOT use this to determine features!
/// Note that some CPUs have programmable vendorIDs.
string vendor() {return _vendor;}
/// Returns processor string, for display purposes only
string processor() {return _processor;}
/// Does it have an x87 FPU on-chip?
bool x87onChip() {return _x87onChip;}
/// Is MMX supported?
bool mmx() {return _mmx;}
/// Is SSE supported?
bool sse() {return _sse;}
/// Is SSE2 supported?
bool sse2() {return _sse2;}
/// Is SSE3 supported?
bool sse3() {return _sse3;}
/// Is SSSE3 supported?
bool ssse3() {return _ssse3;}
/// Is SSE4.1 supported?
bool sse41() {return _sse41;}
/// Is SSE4.2 supported?
bool sse42() {return _sse42;}
/// Is SSE4a supported?
bool sse4a() {return _sse4a;}
/// Is AES supported
bool aes() {return _aes;}
/// Is pclmulqdq supported
bool hasPclmulqdq() {return _hasPclmulqdq;}
/// Is rdrand supported
bool hasRdrand() {return _hasRdrand;}
/// Is AVX supported
bool avx() {return _avx;}
/// Is VEX-Encoded AES supported
bool vaes() {return _vaes;}
/// Is vpclmulqdq supported
bool hasVpclmulqdq(){return _hasVpclmulqdq; }
/// Is FMA supported
bool fma() {return _fma;}
/// Is FP16C supported
bool fp16c() {return _fp16c;}
/// Is AVX2 supported
bool avx2() {return _avx2;}
/// Is HLE (hardware lock elision) supported
bool hle() {return _hle;}
/// Is RTM (restricted transactional memory) supported
bool rtm() {return _rtm;}
/// Is rdseed supported
bool hasRdseed() {return _hasRdseed;}
/// Is SHA supported
bool hasSha() {return _hasSha;}
/// Is AMD 3DNOW supported?
bool amd3dnow() {return _amd3dnow;}
/// Is AMD 3DNOW Ext supported?
bool amd3dnowExt() {return _amd3dnowExt;}
/// Are AMD extensions to MMX supported?
bool amdMmx() {return _amdMmx;}
/// Is fxsave/fxrstor supported?
bool hasFxsr() {return _hasFxsr;}
/// Is cmov supported?
bool hasCmov() {return _hasCmov;}
/// Is rdtsc supported?
bool hasRdtsc() {return _hasRdtsc;}
/// Is cmpxchg8b supported?
bool hasCmpxchg8b() {return _hasCmpxchg8b;}
/// Is cmpxchg8b supported?
bool hasCmpxchg16b() {return _hasCmpxchg16b;}
/// Is SYSENTER/SYSEXIT supported?
bool hasSysEnterSysExit() {return _hasSysEnterSysExit;}
/// Is 3DNow prefetch supported?
bool has3dnowPrefetch() {return _has3dnowPrefetch;}
/// Are LAHF and SAHF supported in 64-bit mode?
bool hasLahfSahf() {return _hasLahfSahf;}
/// Is POPCNT supported?
bool hasPopcnt() {return _hasPopcnt;}
/// Is LZCNT supported?
bool hasLzcnt() {return _hasLzcnt;}
/// Is this an Intel64 or AMD 64?
bool isX86_64() {return _isX86_64;}
/// Is this an IA64 (Itanium) processor?
bool isItanium() { return _isItanium; }
/// Is hyperthreading supported?
bool hyperThreading() { return _hyperThreading; }
/// Returns number of threads per CPU
uint threadsPerCPU() {return _threadsPerCPU;}
/// Returns number of cores in CPU
uint coresPerCPU() {return _coresPerCPU;}
/// Optimisation hints for assembly code.
///
/// For forward compatibility, the CPU is compared against different
/// microarchitectures. For 32-bit x86, comparisons are made against
/// the Intel PPro/PII/PIII/PM family.
///
/// The major 32-bit x86 microarchitecture 'dynasties' have been:
///
/// $(UL
/// $(LI Intel P6 (PentiumPro, PII, PIII, PM, Core, Core2). )
/// $(LI AMD Athlon (K7, K8, K10). )
/// $(LI Intel NetBurst (Pentium 4, Pentium D). )
/// $(LI In-order Pentium (Pentium1, PMMX, Atom) )
/// )
///
/// Other early CPUs (Nx586, AMD K5, K6, Centaur C3, Transmeta,
/// Cyrix, Rise) were mostly in-order.
///
/// Some new processors do not fit into the existing categories:
///
/// $(UL
/// $(LI Intel Atom 230/330 (family 6, model 0x1C) is an in-order core. )
/// $(LI Centaur Isiah = VIA Nano (family 6, model F) is an out-of-order core. )
/// )
///
/// Within each dynasty, the optimisation techniques are largely
/// identical (eg, use instruction pairing for group 4). Major
/// instruction set improvements occur within each dynasty.
/// Does this CPU perform better on AMD K7 code than PentiumPro..Core2 code?
bool preferAthlon() { return _preferAthlon; }
/// Does this CPU perform better on Pentium4 code than PentiumPro..Core2 code?
bool preferPentium4() { return _preferPentium4; }
/// Does this CPU perform better on Pentium I code than Pentium Pro code?
bool preferPentium1() { return _preferPentium1; }
}
private immutable
{
/* These exist as immutables so that the query property functions can
* be backwards compatible with code that called them with ().
* Also, immutables can only be set by the static this().
*/
const(CacheInfo)[5] _dataCaches;
string _vendor;
string _processor;
bool _x87onChip;
bool _mmx;
bool _sse;
bool _sse2;
bool _sse3;
bool _ssse3;
bool _sse41;
bool _sse42;
bool _sse4a;
bool _aes;
bool _hasPclmulqdq;
bool _hasRdrand;
bool _avx;
bool _vaes;
bool _hasVpclmulqdq;
bool _fma;
bool _fp16c;
bool _avx2;
bool _hle;
bool _rtm;
bool _hasRdseed;
bool _hasSha;
bool _amd3dnow;
bool _amd3dnowExt;
bool _amdMmx;
bool _hasFxsr;
bool _hasCmov;
bool _hasRdtsc;
bool _hasCmpxchg8b;
bool _hasCmpxchg16b;
bool _hasSysEnterSysExit;
bool _has3dnowPrefetch;
bool _hasLahfSahf;
bool _hasPopcnt;
bool _hasLzcnt;
bool _isX86_64;
bool _isItanium;
bool _hyperThreading;
uint _threadsPerCPU;
uint _coresPerCPU;
bool _preferAthlon;
bool _preferPentium4;
bool _preferPentium1;
}
__gshared:
// All these values are set only once, and never subsequently modified.
public:
/// $(RED Warning: This field will be turned into a property in a future release.)
///
/// Processor type (vendor-dependent).
/// This should be visible ONLY for display purposes.
uint stepping, model, family;
/// $(RED This field has been deprecated. Please use $(D cacheLevels) instead.)
uint numCacheLevels = 1;
/// The number of cache levels in the CPU.
@property uint cacheLevels() { return numCacheLevels; }
private:
struct CpuFeatures
{
bool probablyIntel; // true = _probably_ an Intel processor, might be faking
bool probablyAMD; // true = _probably_ an AMD or Hygon processor
string processorName;
char [12] vendorID = 0;
char [48] processorNameBuffer = 0;
uint features = 0; // mmx, sse, sse2, hyperthreading, etc
uint miscfeatures = 0; // sse3, etc.
uint extfeatures = 0; // HLE, AVX2, RTM, etc.
uint amdfeatures = 0; // 3DNow!, mmxext, etc
uint amdmiscfeatures = 0; // sse4a, sse5, svm, etc
ulong xfeatures = 0; // XFEATURES_ENABLED_MASK
uint maxCores = 1;
uint maxThreads = 1;
}
CpuFeatures cpuFeatures;
/* Hide from the optimizer where cf (a register) is coming from, so that
* cf doesn't get "optimized away". The idea is to reference
* the global data through cf so not so many fixups are inserted
* into the executable image.
*/
CpuFeatures* getCpuFeatures() @nogc nothrow
{
pragma(inline, false);
return &cpuFeatures;
}
// Note that this may indicate multi-core rather than hyperthreading.
@property bool hyperThreadingBit() { return (cpuFeatures.features&HTT_BIT)!=0;}
// feature flags CPUID1_EDX
enum : uint
{
FPU_BIT = 1,
TIMESTAMP_BIT = 1<<4, // rdtsc
MDSR_BIT = 1<<5, // RDMSR/WRMSR
CMPXCHG8B_BIT = 1<<8,
SYSENTERSYSEXIT_BIT = 1<<11,
CMOV_BIT = 1<<15,
MMX_BIT = 1<<23,
FXSR_BIT = 1<<24,
SSE_BIT = 1<<25,
SSE2_BIT = 1<<26,
HTT_BIT = 1<<28,
IA64_BIT = 1<<30
}
// feature flags misc CPUID1_ECX
enum : uint
{
SSE3_BIT = 1,
PCLMULQDQ_BIT = 1<<1, // from AVX
MWAIT_BIT = 1<<3,
SSSE3_BIT = 1<<9,
FMA_BIT = 1<<12, // from AVX
CMPXCHG16B_BIT = 1<<13,
SSE41_BIT = 1<<19,
SSE42_BIT = 1<<20,
POPCNT_BIT = 1<<23,
AES_BIT = 1<<25, // AES instructions from AVX
OSXSAVE_BIT = 1<<27, // Used for AVX
AVX_BIT = 1<<28,
FP16C_BIT = 1<<29,
RDRAND_BIT = 1<<30,
}
// Feature flags for cpuid.{EAX = 7, ECX = 0}.EBX.
enum : uint
{
FSGSBASE_BIT = 1 << 0,
BMI1_BIT = 1 << 3,
HLE_BIT = 1 << 4,
AVX2_BIT = 1 << 5,
SMEP_BIT = 1 << 7,
BMI2_BIT = 1 << 8,
ERMS_BIT = 1 << 9,
INVPCID_BIT = 1 << 10,
RTM_BIT = 1 << 11,
RDSEED_BIT = 1 << 18,
SHA_BIT = 1 << 29,
}
// feature flags XFEATURES_ENABLED_MASK
enum : ulong
{
XF_FP_BIT = 0x1,
XF_SSE_BIT = 0x2,
XF_YMM_BIT = 0x4,
}
// AMD feature flags CPUID80000001_EDX
enum : uint
{
AMD_MMX_BIT = 1<<22,
// FXR_OR_CYRIXMMX_BIT = 1<<24, // Cyrix/NS: 6x86MMX instructions.
FFXSR_BIT = 1<<25,
PAGE1GB_BIT = 1<<26, // support for 1GB pages
RDTSCP_BIT = 1<<27,
AMD64_BIT = 1<<29,
AMD_3DNOW_EXT_BIT = 1<<30,
AMD_3DNOW_BIT = 1<<31
}
// AMD misc feature flags CPUID80000001_ECX
enum : uint
{
LAHFSAHF_BIT = 1,
LZCNT_BIT = 1<<5,
SSE4A_BIT = 1<<6,
AMD_3DNOW_PREFETCH_BIT = 1<<8,
}
version (GNU_OR_LDC) {
version (X86)
enum supportedX86 = true;
else version (X86_64)
enum supportedX86 = true;
else
enum supportedX86 = false;
} else version (D_InlineAsm_X86) {
enum supportedX86 = true;
} else version (D_InlineAsm_X86_64) {
enum supportedX86 = true;
} else {
enum supportedX86 = false;
}
static if (supportedX86) {
// Note that this code will also work for Itanium in x86 mode.
__gshared uint max_cpuid, max_extended_cpuid;
// CPUID2: "cache and tlb information"
void getcacheinfoCPUID2()
{
// We are only interested in the data caches
void decipherCpuid2(ubyte x) @nogc nothrow {
if (x==0) return;
// Values from http://www.sandpile.org/ia32/cpuid.htm.
// Includes Itanium and non-Intel CPUs.
//
static immutable ubyte [63] ids = [
0x0A, 0x0C, 0x0D, 0x2C, 0x60, 0x0E, 0x66, 0x67, 0x68,
// level 2 cache
0x41, 0x42, 0x43, 0x44, 0x45, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7F,
0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x49, 0x4E,
0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x48, 0x80, 0x81,
// level 3 cache
0x22, 0x23, 0x25, 0x29, 0x46, 0x47, 0x4A, 0x4B, 0x4C, 0x4D,
0xD0, 0xD1, 0xD2, 0xD6, 0xD7, 0xD8, 0xDC, 0xDD, 0xDE,
0xE2, 0xE3, 0xE4, 0xEA, 0xEB, 0xEC
];
static immutable uint [63] sizes = [
8, 16, 16, 64, 16, 24, 8, 16, 32,
128, 256, 512, 1024, 2048, 1024, 128, 256, 512, 1024, 2048, 512,
256, 512, 1024, 2048, 512, 1024, 4096, 6*1024,
128, 192, 128, 256, 384, 512, 3072, 512, 128,
512, 1024, 2048, 4096, 4096, 8192, 6*1024, 8192, 12*1024, 16*1024,
512, 1024, 2048, 1024, 2048, 4096, 1024+512, 3*1024, 6*1024,
2*1024, 4*1024, 8*1024, 12*1024, 28*1024, 24*1024
];
// CPUBUG: Pentium M reports 0x2C but tests show it is only 4-way associative
static immutable ubyte [63] ways = [
2, 4, 4, 8, 8, 6, 4, 4, 4,
4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 2,
8, 8, 8, 8, 4, 8, 16, 24,
4, 6, 2, 4, 6, 4, 12, 8, 8,
4, 8, 8, 8, 4, 8, 12, 16, 12, 16,
4, 4, 4, 8, 8, 8, 12, 12, 12,
16, 16, 16, 24, 24, 24
];
enum { FIRSTDATA2 = 8, FIRSTDATA3 = 28+9 }
for (size_t i=0; i< ids.length; ++i) {
if (x==ids[i]) {
int level = i< FIRSTDATA2 ? 0: i<FIRSTDATA3 ? 1 : 2;
if (x==0x49 && family==0xF && model==0x6) level=2;
datacache[level].size=sizes[i];
datacache[level].associativity=ways[i];
if (level == 3 || x==0x2C || x==0x0D || (x>=0x48 && x<=0x80)
|| x==0x86 || x==0x87
|| (x>=0x66 && x<=0x68) || (x>=0x39 && x<=0x3E)){
datacache[level].lineSize = 64;
} else datacache[level].lineSize = 32;
}
}
}
uint[4] a;
bool firstTime = true;
// On a multi-core system, this could theoretically fail, but it's only used
// for old single-core CPUs.
uint numinfos = 1;
do {
version (GNU_OR_LDC) asm pure nothrow @nogc {
"cpuid" : "=a" (a[0]), "=b" (a[1]), "=c" (a[2]), "=d" (a[3]) : "a" (2);
} else asm pure nothrow @nogc {
mov EAX, 2;
cpuid;
mov a, EAX;
mov a+4, EBX;
mov a+8, ECX;
mov a+12, EDX;
}
if (firstTime) {
if (a[0]==0x0000_7001 && a[3]==0x80 && a[1]==0 && a[2]==0) {
// Cyrix MediaGX MMXEnhanced returns: EAX= 00007001, EDX=00000080.
// These are NOT standard Intel values
// (TLB = 32 entry, 4 way associative, 4K pages)
// (L1 cache = 16K, 4way, linesize16)
datacache[0].size=8;
datacache[0].associativity=4;
datacache[0].lineSize=16;
return;
}
// lsb of a is how many times to loop.
numinfos = a[0] & 0xFF;
// and otherwise it should be ignored
a[0] &= 0xFFFF_FF00;
firstTime = false;
}
for (int c=0; c<4;++c) {
// high bit set == no info.
if (a[c] & 0x8000_0000) continue;
decipherCpuid2(cast(ubyte)(a[c] & 0xFF));
decipherCpuid2(cast(ubyte)((a[c]>>8) & 0xFF));
decipherCpuid2(cast(ubyte)((a[c]>>16) & 0xFF));
decipherCpuid2(cast(ubyte)((a[c]>>24) & 0xFF));
}
} while (--numinfos);
}
// CPUID4: "Deterministic cache parameters" leaf
void getcacheinfoCPUID4()
{
int cachenum = 0;
for (;;) {
uint a, b, number_of_sets;
version (GNU_OR_LDC) asm pure nothrow @nogc {
"cpuid" : "=a" (a), "=b" (b), "=c" (number_of_sets) : "a" (4), "c" (cachenum) : "edx";
} else asm pure nothrow @nogc {
mov EAX, 4;
mov ECX, cachenum;
cpuid;
mov a, EAX;
mov b, EBX;
mov number_of_sets, ECX;
}
++cachenum;
if ((a&0x1F)==0) break; // no more caches
immutable uint numthreads = ((a>>14) & 0xFFF) + 1;
immutable uint numcores = ((a>>26) & 0x3F) + 1;
if (numcores > cpuFeatures.maxCores) cpuFeatures.maxCores = numcores;
if ((a&0x1F)!=1 && ((a&0x1F)!=3)) continue; // we only want data & unified caches
++number_of_sets;
immutable ubyte level = cast(ubyte)(((a>>5)&7)-1);
if (level > datacache.length) continue; // ignore deep caches
datacache[level].associativity = a & 0x200 ? ubyte.max :cast(ubyte)((b>>22)+1);
datacache[level].lineSize = (b & 0xFFF)+ 1; // system coherency line size
immutable uint line_partitions = ((b >> 12)& 0x3FF) + 1;
// Size = number of sets * associativity * cachelinesize * linepartitions
// and must convert to Kb, also dividing by the number of hyperthreads using this cache.
immutable ulong sz = (datacache[level].associativity< ubyte.max)? number_of_sets *
datacache[level].associativity : number_of_sets;
datacache[level].size = cast(size_t)(
(sz * datacache[level].lineSize * line_partitions ) / (numthreads *1024));
if (level == 0 && (a&0xF)==3) {
// Halve the size for unified L1 caches
datacache[level].size/=2;
}
}
}
// CPUID8000_0005 & 6
void getAMDcacheinfo()
{
uint dummy, c5, c6, d6;
version (GNU_OR_LDC) asm pure nothrow @nogc {
"cpuid" : "=a" (dummy), "=c" (c5) : "a" (0x8000_0005) : "ebx", "edx";
} else asm pure nothrow @nogc {
mov EAX, 0x8000_0005; // L1 cache
cpuid;
// EAX has L1_TLB_4M.
// EBX has L1_TLB_4K
// EDX has L1 instruction cache
mov c5, ECX;
}
datacache[0].size = ( (c5>>24) & 0xFF);
datacache[0].associativity = cast(ubyte)( (c5 >> 16) & 0xFF);
datacache[0].lineSize = c5 & 0xFF;
if (max_extended_cpuid >= 0x8000_0006) {
// AMD K6-III or K6-2+ or later.
ubyte numcores = 1;
if (max_extended_cpuid >= 0x8000_0008) {
version (GNU_OR_LDC) asm pure nothrow @nogc {
"cpuid" : "=a" (dummy), "=c" (numcores) : "a" (0x8000_0008) : "ebx", "edx";
} else asm pure nothrow @nogc {
mov EAX, 0x8000_0008;
cpuid;
mov numcores, CL;
}
++numcores;
if (numcores>cpuFeatures.maxCores) cpuFeatures.maxCores = numcores;
}
version (GNU_OR_LDC) asm pure nothrow @nogc {
"cpuid" : "=a" (dummy), "=c" (c6), "=d" (d6) : "a" (0x8000_0006) : "ebx";
} else asm pure nothrow @nogc {
mov EAX, 0x8000_0006; // L2/L3 cache
cpuid;
mov c6, ECX; // L2 cache info
mov d6, EDX; // L3 cache info
}
static immutable ubyte [] assocmap = [ 0, 1, 2, 0, 4, 0, 8, 0, 16, 0, 32, 48, 64, 96, 128, 0xFF ];
datacache[1].size = (c6>>16) & 0xFFFF;
datacache[1].associativity = assocmap[(c6>>12)&0xF];
datacache[1].lineSize = c6 & 0xFF;
// The L3 cache value is TOTAL, not per core.
datacache[2].size = ((d6>>18)*512)/numcores; // could be up to 2 * this, -1.
datacache[2].associativity = assocmap[(d6>>12)&0xF];
datacache[2].lineSize = d6 & 0xFF;
}
}
// For Intel CoreI7 and later, use function 0x0B
// to determine number of processors.
void getCpuInfo0B()
{
int level=0;
int threadsPerCore;
uint a, b, c, d;
do {
version (GNU_OR_LDC) asm pure nothrow @nogc {
"cpuid" : "=a" (a), "=b" (b), "=c" (c), "=d" (d) : "a" (0x0B), "c" (level);
} else asm pure nothrow @nogc {
mov EAX, 0x0B;
mov ECX, level;
cpuid;
mov a, EAX;
mov b, EBX;
mov c, ECX;
mov d, EDX;
}
if (b!=0) {
// I'm not sure about this. The docs state that there
// are 2 hyperthreads per core if HT is factory enabled.
if (level==0)
threadsPerCore = b & 0xFFFF;
else if (level==1) {
cpuFeatures.maxThreads = b & 0xFFFF;
cpuFeatures.maxCores = cpuFeatures.maxThreads / threadsPerCore;
}
}
++level;
} while (a!=0 || b!=0);
}
void cpuidX86()
{
auto cf = getCpuFeatures();
uint a, b, c, d;
uint* venptr = cast(uint*)cf.vendorID.ptr;
version (GNU_OR_LDC)
{
asm pure nothrow @nogc {
"cpuid" : "=a" (max_cpuid), "=b" (venptr[0]), "=d" (venptr[1]), "=c" (venptr[2]) : "a" (0);
"cpuid" : "=a" (max_extended_cpuid) : "a" (0x8000_0000) : "ebx", "ecx", "edx";
}
}
else
{
uint a2;
version (D_InlineAsm_X86)
{
asm pure nothrow @nogc {
mov EAX, 0;
cpuid;
mov a, EAX;
mov EAX, venptr;
mov [EAX], EBX;
mov [EAX + 4], EDX;
mov [EAX + 8], ECX;
}
}
else version (D_InlineAsm_X86_64)
{
asm pure nothrow @nogc {
mov EAX, 0;
cpuid;
mov a, EAX;
mov RAX, venptr;
mov [RAX], EBX;
mov [RAX + 4], EDX;
mov [RAX + 8], ECX;
}
}
asm pure nothrow @nogc {
mov EAX, 0x8000_0000;
cpuid;
mov a2, EAX;
}
max_cpuid = a;
max_extended_cpuid = a2;
}
cf.probablyIntel = cf.vendorID == "GenuineIntel";
cf.probablyAMD = (cf.vendorID == "AuthenticAMD" || cf.vendorID == "HygonGenuine");
uint apic = 0; // brand index, apic id
version (GNU_OR_LDC) asm pure nothrow @nogc {
"cpuid" : "=a" (a), "=b" (apic), "=c" (cf.miscfeatures), "=d" (cf.features) : "a" (1);
} else {
asm pure nothrow @nogc {
mov EAX, 1; // model, stepping
cpuid;
mov a, EAX;
mov apic, EBX;
mov c, ECX;
mov d, EDX;
}
cf.features = d;
cf.miscfeatures = c;
}
stepping = a & 0xF;
immutable uint fbase = (a >> 8) & 0xF;
immutable uint mbase = (a >> 4) & 0xF;
family = ((fbase == 0xF) || (fbase == 0)) ? fbase + (a >> 20) & 0xFF : fbase;
model = ((fbase == 0xF) || (fbase == 6 && cf.probablyIntel) ) ?
mbase + ((a >> 12) & 0xF0) : mbase;
if (max_cpuid >= 7)
{
version (GNU_OR_LDC) asm pure nothrow @nogc {
"cpuid" : "=a" (a), "=b" (cf.extfeatures), "=c" (c) : "a" (7), "c" (0) : "edx";
} else {
uint ext;
asm pure nothrow @nogc {
mov EAX, 7; // Structured extended feature leaf.
mov ECX, 0; // Main leaf.
cpuid;
mov ext, EBX; // HLE, AVX2, RTM, etc.
}
cf.extfeatures = ext;
}
}
if (cf.miscfeatures & OSXSAVE_BIT)
{
version (GNU_OR_LDC) asm pure nothrow @nogc {
"xgetbv" : "=a" (a), "=d" (d) : "c" (0);
} else asm pure nothrow @nogc {
mov ECX, 0;
xgetbv;
mov d, EDX;
mov a, EAX;
}
cf.xfeatures = cast(ulong)d << 32 | a;
}
cf.amdfeatures = 0;
cf.amdmiscfeatures = 0;
if (max_extended_cpuid >= 0x8000_0001) {
version (GNU_OR_LDC) asm pure nothrow @nogc {
"cpuid" : "=a" (a), "=c" (cf.amdmiscfeatures), "=d" (cf.amdfeatures) : "a" (0x8000_0001) : "ebx";
} else {
asm pure nothrow @nogc {
mov EAX, 0x8000_0001;
cpuid;
mov c, ECX;
mov d, EDX;
}
cf.amdmiscfeatures = c;
cf.amdfeatures = d;
}
}
// Try to detect fraudulent vendorIDs
if (amd3dnow) cf.probablyIntel = false;
if (!cf.probablyIntel && max_extended_cpuid >= 0x8000_0008) {
//http://support.amd.com/TechDocs/25481.pdf pg.36
cf.maxCores = 1;
if (hyperThreadingBit) {
// determine max number of cores for AMD
version (GNU_OR_LDC) asm pure nothrow @nogc {
"cpuid" : "=a" (a), "=c" (c) : "a" (0x8000_0008) : "ebx", "edx";
} else asm pure nothrow @nogc {
mov EAX, 0x8000_0008;
cpuid;
mov c, ECX;
}
cf.maxCores += c & 0xFF;
}
}
if (max_extended_cpuid >= 0x8000_0004) {
uint* pnb = cast(uint*)cf.processorNameBuffer.ptr;
version (GNU_OR_LDC)
{
asm pure nothrow @nogc {
"cpuid" : "=a" (pnb[0]), "=b" (pnb[1]), "=c" (pnb[ 2]), "=d" (pnb[ 3]) : "a" (0x8000_0002);
"cpuid" : "=a" (pnb[4]), "=b" (pnb[5]), "=c" (pnb[ 6]), "=d" (pnb[ 7]) : "a" (0x8000_0003);
"cpuid" : "=a" (pnb[8]), "=b" (pnb[9]), "=c" (pnb[10]), "=d" (pnb[11]) : "a" (0x8000_0004);
}
}
else version (D_InlineAsm_X86)
{
asm pure nothrow @nogc {
push ESI;
mov ESI, pnb;
mov EAX, 0x8000_0002;
cpuid;
mov [ESI], EAX;
mov [ESI+4], EBX;
mov [ESI+8], ECX;
mov [ESI+12], EDX;
mov EAX, 0x8000_0003;
cpuid;
mov [ESI+16], EAX;
mov [ESI+20], EBX;
mov [ESI+24], ECX;
mov [ESI+28], EDX;
mov EAX, 0x8000_0004;
cpuid;
mov [ESI+32], EAX;
mov [ESI+36], EBX;
mov [ESI+40], ECX;
mov [ESI+44], EDX;
pop ESI;
}
}
else version (D_InlineAsm_X86_64)
{
asm pure nothrow @nogc {
push RSI;
mov RSI, pnb;
mov EAX, 0x8000_0002;
cpuid;
mov [RSI], EAX;
mov [RSI+4], EBX;
mov [RSI+8], ECX;
mov [RSI+12], EDX;
mov EAX, 0x8000_0003;
cpuid;
mov [RSI+16], EAX;
mov [RSI+20], EBX;
mov [RSI+24], ECX;
mov [RSI+28], EDX;
mov EAX, 0x8000_0004;
cpuid;
mov [RSI+32], EAX;
mov [RSI+36], EBX;
mov [RSI+40], ECX;
mov [RSI+44], EDX;
pop RSI;
}
}
// Intel P4 and PM pad at front with spaces.
// Other CPUs pad at end with nulls.
int start = 0, end = 0;
while (cf.processorNameBuffer[start] == ' ') { ++start; }
while (cf.processorNameBuffer[cf.processorNameBuffer.length-end-1] == 0) { ++end; }
cf.processorName = cast(string)(cf.processorNameBuffer[start..$-end]);
} else {
cf.processorName = "Unknown CPU";
}
// Determine cache sizes
// Intel docs specify that they return 0 for 0x8000_0005.
// AMD docs do not specify the behaviour for 0004 and 0002.
// Centaur/VIA and most other manufacturers use the AMD method,
// except Cyrix MediaGX MMX Enhanced uses their OWN form of CPUID2!
// NS Geode GX1 provides CyrixCPUID2 _and_ does the same wrong behaviour
// for CPUID80000005. But Geode GX uses the AMD method
// Deal with Geode GX1 - make it same as MediaGX MMX.
if (max_extended_cpuid==0x8000_0005 && max_cpuid==2) {
max_extended_cpuid = 0x8000_0004;
}
// Therefore, we try the AMD method unless it's an Intel chip.
// If we still have no info, try the Intel methods.
datacache[0].size = 0;
if (max_cpuid<2 || !cf.probablyIntel) {
if (max_extended_cpuid >= 0x8000_0005) {
getAMDcacheinfo();
} else if (cf.probablyAMD) {
// According to AMDProcRecognitionAppNote, this means CPU
// K5 model 0, or Am5x86 (model 4), or Am4x86DX4 (model 4)
// Am5x86 has 16Kb 4-way unified data & code cache.
datacache[0].size = 8;
datacache[0].associativity = 4;
datacache[0].lineSize = 32;
} else {
// Some obscure CPU.
// Values for Cyrix 6x86MX (family 6, model 0)
datacache[0].size = 64;
datacache[0].associativity = 4;
datacache[0].lineSize = 32;
}
}
if ((datacache[0].size == 0) && max_cpuid>=4) {
getcacheinfoCPUID4();
}
if ((datacache[0].size == 0) && max_cpuid>=2) {
getcacheinfoCPUID2();
}
if (datacache[0].size == 0) {
// Pentium, PMMX, late model 486, or an obscure CPU
if (mmx) { // Pentium MMX. Also has 8kB code cache.
datacache[0].size = 16;
datacache[0].associativity = 4;
datacache[0].lineSize = 32;
} else { // Pentium 1 (which also has 8kB code cache)
// or 486.
// Cyrix 6x86: 16, 4way, 32 linesize
datacache[0].size = 8;
datacache[0].associativity = 2;
datacache[0].lineSize = 32;
}
}
if (cf.probablyIntel && max_cpuid >= 0x0B) {
// For Intel i7 and later, use function 0x0B to determine
// cores and hyperthreads.
getCpuInfo0B();
} else {
if (hyperThreadingBit) cf.maxThreads = (apic>>>16) & 0xFF;
else cf.maxThreads = cf.maxCores;
if (cf.probablyAMD && max_extended_cpuid >= 0x8000_001E) {
version (GNU_OR_LDC) asm pure nothrow @nogc {
"cpuid" : "=a" (a), "=b" (b) : "a" (0x8000_001E) : "ecx", "edx";
} else {
asm pure nothrow @nogc {
mov EAX, 0x8000_001e;
cpuid;
mov b, EBX;
}
}
ubyte coresPerComputeUnit = ((b >> 8) & 3) + 1;
cf.maxCores = cf.maxThreads / coresPerComputeUnit;
}
}
}
// Return true if the cpuid instruction is supported.
// BUG(WONTFIX): Returns false for Cyrix 6x86 and 6x86L. They will be treated as 486 machines.
bool hasCPUID()
{
version (X86_64)
return true;
else
{
uint flags;
version (GNU_OR_LDC)
{
// http://wiki.osdev.org/CPUID#Checking_CPUID_availability
asm nothrow @nogc { "
pushfl # Save EFLAGS
pushfl # Store EFLAGS
xorl $0x00200000, (%%esp) # Invert the ID bit in stored EFLAGS
popfl # Load stored EFLAGS (with ID bit inverted)
pushfl # Store EFLAGS again (ID bit may or may not be inverted)
popl %%eax # eax = modified EFLAGS (ID bit may or may not be inverted)
xorl (%%esp), %%eax # eax = whichever bits were changed
popfl # Restore original EFLAGS
" : "=a" (flags);
}
}
else version (D_InlineAsm_X86)
{
asm nothrow @nogc {
pushfd;
pop EAX;
mov flags, EAX;
xor EAX, 0x0020_0000;
push EAX;
popfd;
pushfd;
pop EAX;
xor flags, EAX;
}
}
return (flags & 0x0020_0000) != 0;
}
}
} else { // supported X86
bool hasCPUID() { return false; }
void cpuidX86()
{
datacache[0].size = 8;
datacache[0].associativity = 2;
datacache[0].lineSize = 32;
}
}
/*
// TODO: Implement this function with OS support
void cpuidPPC()
{
enum :int { PPC601, PPC603, PPC603E, PPC604,
PPC604E, PPC620, PPCG3, PPCG4, PPCG5 }
// TODO:
// asm { mfpvr; } returns the CPU version but unfortunately it can
// only be used in kernel mode. So OS support is required.
int cputype = PPC603;
// 601 has a 8KB combined data & code L1 cache.
uint sizes[] = [4, 8, 16, 16, 32, 32, 32, 32, 64];
ubyte ways[] = [8, 2, 4, 4, 4, 8, 8, 8, 8];
uint L2size[]= [0, 0, 0, 0, 0, 0, 0, 256, 512];
uint L3size[]= [0, 0, 0, 0, 0, 0, 0, 2048, 0];
datacache[0].size = sizes[cputype];
datacache[0].associativity = ways[cputype];
datacache[0].lineSize = (cputype==PPCG5)? 128 :
(cputype == PPC620 || cputype == PPCG3)? 64 : 32;
datacache[1].size = L2size[cputype];
datacache[2].size = L3size[cputype];
datacache[1].lineSize = datacache[0].lineSize;
datacache[2].lineSize = datacache[0].lineSize;
}
// TODO: Implement this function with OS support
void cpuidSparc()
{
// UltaSparcIIi : L1 = 16, 2way. L2 = 512, 4 way.
// UltraSparcIII : L1 = 64, 4way. L2= 4096 or 8192.
// UltraSparcIIIi: L1 = 64, 4way. L2= 1024, 4 way
// UltraSparcIV : L1 = 64, 4way. L2 = 16*1024.
// UltraSparcIV+ : L1 = 64, 4way. L2 = 2048, L3=32*1024.
// Sparc64V : L1 = 128, 2way. L2 = 4096 4way.
}
*/
shared static this()
{
auto cf = getCpuFeatures();
if (hasCPUID()) {
cpuidX86();
} else {
// it's a 386 or 486, or a Cyrix 6x86.
//Probably still has an external cache.
}
if (datacache[0].size==0) {
// Guess same as Pentium 1.
datacache[0].size = 8;
datacache[0].associativity = 2;
datacache[0].lineSize = 32;
}
numCacheLevels = 1;
// And now fill up all the unused levels with full memory space.
for (size_t i=1; i< datacache.length; ++i) {
if (datacache[i].size==0) {
// Set all remaining levels of cache equal to full address space.
datacache[i].size = size_t.max/1024;
datacache[i].associativity = 1;
datacache[i].lineSize = datacache[i-1].lineSize;
}
else
++numCacheLevels;
}
// Set the immortals
_dataCaches = datacache;
_vendor = cast(string)cf.vendorID;
_processor = cf.processorName;
_x87onChip = (cf.features&FPU_BIT)!=0;
_mmx = (cf.features&MMX_BIT)!=0;
_sse = (cf.features&SSE_BIT)!=0;
_sse2 = (cf.features&SSE2_BIT)!=0;
_sse3 = (cf.miscfeatures&SSE3_BIT)!=0;
_ssse3 = (cf.miscfeatures&SSSE3_BIT)!=0;
_sse41 = (cf.miscfeatures&SSE41_BIT)!=0;
_sse42 = (cf.miscfeatures&SSE42_BIT)!=0;
_sse4a = (cf.amdmiscfeatures&SSE4A_BIT)!=0;
_aes = (cf.miscfeatures&AES_BIT)!=0;
_hasPclmulqdq = (cf.miscfeatures&PCLMULQDQ_BIT)!=0;
_hasRdrand = (cf.miscfeatures&RDRAND_BIT)!=0;
enum avx_mask = XF_SSE_BIT|XF_YMM_BIT;
_avx = (cf.xfeatures & avx_mask) == avx_mask && (cf.miscfeatures&AVX_BIT)!=0;
_vaes = avx && aes;
_hasVpclmulqdq = avx && hasPclmulqdq;
_fma = avx && (cf.miscfeatures&FMA_BIT)!=0;
_fp16c = avx && (cf.miscfeatures&FP16C_BIT)!=0;
_avx2 = avx && (cf.extfeatures & AVX2_BIT) != 0;
_hle = (cf.extfeatures & HLE_BIT) != 0;
_rtm = (cf.extfeatures & RTM_BIT) != 0;
_hasRdseed = (cf.extfeatures&RDSEED_BIT)!=0;
_hasSha = (cf.extfeatures&SHA_BIT)!=0;
_amd3dnow = (cf.amdfeatures&AMD_3DNOW_BIT)!=0;
_amd3dnowExt = (cf.amdfeatures&AMD_3DNOW_EXT_BIT)!=0;
_amdMmx = (cf.amdfeatures&AMD_MMX_BIT)!=0;
_hasFxsr = (cf.features&FXSR_BIT)!=0;
_hasCmov = (cf.features&CMOV_BIT)!=0;
_hasRdtsc = (cf.features&TIMESTAMP_BIT)!=0;
_hasCmpxchg8b = (cf.features&CMPXCHG8B_BIT)!=0;
_hasCmpxchg16b = (cf.miscfeatures&CMPXCHG16B_BIT)!=0;
_hasSysEnterSysExit =
// The SYSENTER/SYSEXIT features were buggy on Pentium Pro and early PentiumII.
// (REF: www.geoffchappell.com).
(cf.probablyIntel && (family < 6 || (family==6 && (model< 3 || (model==3 && stepping<3)))))
? false
: (cf.features & SYSENTERSYSEXIT_BIT)!=0;
_has3dnowPrefetch = (cf.amdmiscfeatures&AMD_3DNOW_PREFETCH_BIT)!=0;
_hasLahfSahf = (cf.amdmiscfeatures&LAHFSAHF_BIT)!=0;
_hasPopcnt = (cf.miscfeatures&POPCNT_BIT)!=0;
_hasLzcnt = (cf.amdmiscfeatures&LZCNT_BIT)!=0;
_isX86_64 = (cf.amdfeatures&AMD64_BIT)!=0;
_isItanium = (cf.features&IA64_BIT)!=0;
_hyperThreading = cf.maxThreads>cf.maxCores;
_threadsPerCPU = cf.maxThreads;
_coresPerCPU = cf.maxCores;
_preferAthlon = cf.probablyAMD && family >=6;
_preferPentium4 = cf.probablyIntel && family == 0xF;
_preferPentium1 = family < 6 || (family==6 && model < 0xF && !cf.probablyIntel);
}
|
D
|
/Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Multipart.build/BoundaryParser.swift.o : /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Multipart+BytesConvertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Parser.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/HeaderParser.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/BoundaryParser.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Serializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Part.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/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/URI.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/HTTP.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/TLS.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/libc.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.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/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Random.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/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Sockets.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Bits.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/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Transport.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/CHTTP/include/http_parser.h /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CHTTP.build/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CSQLite.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes
/Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Multipart.build/BoundaryParser~partial.swiftmodule : /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Multipart+BytesConvertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Parser.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/HeaderParser.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/BoundaryParser.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Serializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Part.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/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/URI.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/HTTP.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/TLS.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/libc.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.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/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Random.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/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Sockets.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Bits.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/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Transport.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/CHTTP/include/http_parser.h /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CHTTP.build/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CSQLite.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes
/Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Multipart.build/BoundaryParser~partial.swiftdoc : /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Multipart+BytesConvertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Parser.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/HeaderParser.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/BoundaryParser.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Serializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Part.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/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/URI.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/HTTP.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/TLS.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/libc.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.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/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Random.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/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Sockets.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Bits.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/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Transport.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/CHTTP/include/http_parser.h /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CHTTP.build/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CSQLite.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes
|
D
|
/*
* 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 glib.gnode;
import glib.gmem;
import glib.gtypes;
/* Tree traverse flags */
enum GTraverseFlags
{
G_TRAVERSE_LEAVES = 1 << 0,
G_TRAVERSE_NON_LEAVES = 1 << 1,
G_TRAVERSE_ALL = G_TRAVERSE_LEAVES | G_TRAVERSE_NON_LEAVES,
G_TRAVERSE_MASK = 0x03,
G_TRAVERSE_LEAFS = G_TRAVERSE_LEAVES,
G_TRAVERSE_NON_LEAFS = G_TRAVERSE_NON_LEAVES
}
/* Tree traverse orders */
enum GTraverseType
{
G_IN_ORDER,
G_PRE_ORDER,
G_POST_ORDER,
G_LEVEL_ORDER
}
extern (C) {
alias GNodeTraverseFunc = gboolean function (GNode *node, gpointer data);
alias GNodeForeachFunc = void function (GNode *node, gpointer data);
alias GCopyFunc = gpointer function (gconstpointer src, gpointer data);
}
struct GNode
{
gpointer data;
GNode *next;
GNode *prev;
GNode *parent;
GNode *children;
}
bool G_NODE_IS_ROOT(const(GNode) *n) {
return n.parent is null && n.prev is null && n.next is null;
}
bool G_NODE_IS_LEAF(const(GNode) *n) {
return n.children is null;
}
extern (C) {
GNode* g_node_new (gpointer data);
void g_node_destroy (GNode *root);
void g_node_unlink (GNode *node);
GNode* g_node_copy_deep (GNode *node,
GCopyFunc copy_func,
gpointer data);
GNode* g_node_copy (GNode *node);
GNode* g_node_insert (GNode *parent,
gint position,
GNode *node);
GNode* g_node_insert_before (GNode *parent,
GNode *sibling,
GNode *node);
GNode* g_node_insert_after (GNode *parent,
GNode *sibling,
GNode *node);
GNode* g_node_prepend (GNode *parent,
GNode *node);
guint g_node_n_nodes (GNode *root,
GTraverseFlags flags);
GNode* g_node_get_root (GNode *node);
gboolean g_node_is_ancestor (GNode *node,
GNode *descendant);
guint g_node_depth (GNode *node);
GNode* g_node_find (GNode *root,
GTraverseType order,
GTraverseFlags flags,
gpointer data);
}
auto g_node_append(P, N)(P parent, N node) {
return g_node_insert_before(parent, null, node);
}
auto g_node_insert_data(P, Pos, D)(P parent, Pos pos, D data) {
return g_node_insert(parent, pos, g_node_new(data));
}
auto g_node_insert_data_after(P, S, D)(P parent, S sibling, D data) {
return g_node_insert_after ((parent), (sibling), g_node_new (data));
}
auto g_node_insert_data_before(P, S, D)(P parent, S sibling, D data) {
return g_node_insert_before (parent, sibling, g_node_new (data));
}
auto g_node_prepend_data(P, D)(P parent, D data) {
return g_node_prepend (parent, g_node_new (data));
}
auto g_node_append_data(P, D)(P parent, D data) {
return g_node_insert_before (parent, null, g_node_new (data));
}
extern (C) {
void g_node_traverse (GNode *root,
GTraverseType order,
GTraverseFlags flags,
gint max_depth,
GNodeTraverseFunc func,
gpointer data);
guint g_node_max_height (GNode *root);
void g_node_children_foreach (GNode *node,
GTraverseFlags flags,
GNodeForeachFunc func,
gpointer data);
void g_node_reverse_children (GNode *node);
guint g_node_n_children (GNode *node);
GNode* g_nodenth_child (GNode *node,
guint n);
GNode* g_node_last_child (GNode *node);
GNode* g_node_find_child (GNode *node,
GTraverseFlags flags,
gpointer data);
gint g_node_child_position (GNode *node,
GNode *child);
gint g_node_child_index (GNode *node,
gpointer data);
GNode* g_node_first_sibling (GNode *node);
GNode* g_node_last_sibling (GNode *node);
}
auto g_node_prev_sibling(N)(N node) {
return node ? node.prev : null;
}
auto g_node_next_sibling(N)(N node) {
return node ? node.next : null;
}
auto g_node_first_child(N)(N node) {
return node ? node.children : null;
}
|
D
|
module tests.statements.macro_;
private
{
import tests.asserts;
}
unittest
{
// Simple macro
assertRender(`{% macro test %}MACRO{% endmacro %}{{test()}}`, "MACRO");
// Macro with params
assertRender(
`{% macro test(a, b='', c='c', d=10) %}` ~
`<test a="{{a}}" b="{{b}}" c="{{c}}" d={{d}} />` ~
`{% endmacro %}` ~
`{{test('A')}}` ~
`{{test(10, 'b', 'c', 15) }}`
,
`<test a="A" b="" c="c" d=10 />` ~
`<test a="10" b="b" c="c" d=15 />`
);
// Simple call
assertRender(
`{% macro render_dialog(title, class='dialog') %}` ~
`<div class="{{ class }}">` ~
`<h2>{{title}}</h2>` ~
`<div class="content">{{caller()}}</div>` ~
`</div>` ~
`{% endmacro %}` ~
`{% call render_dialog("Hello world") %}` ~
`Simple dialog render` ~
`{% endcall %}`
,
`<div class="dialog">` ~
`<h2>Hello world</h2>` ~
`<div class="content">Simple dialog render</div>` ~
`</div>`
);
// Call with params
assertRender(
`{% macro num_filter(numbers=[]) %}` ~
`{% for n in numbers if n % 2 and n < 8 %}` ~
`{{caller(n, loop.cycle('#', '№'))}}` ~
`{% endfor %}` ~
`{% endmacro %}` ~
`{% call(num, prefix='') num_filter([1,2,3,4,5,6,7,8,9]) %}` ~
`Number: {{prefix}}{{num}}` ~
`{% endcall %}`
,
`Number: #1` ~
`Number: №3` ~
`Number: #5` ~
`Number: №7`
);
}
unittest
{
// varargs, kwargs
assertRender(
`{% macro test(a, b=0) %}` ~
`A: {{a}} B: {{b}}`~
`{{varargs}}` ~
`{{kwargs | sort}}` ~
`{% endmacro %}` ~
`{{ test(1,2,3,4,c=5,d=6,e=7,f=8) }}`
,
`A: 1 B: 2` ~
`[3, 4]` ~
`[['c', 5], ['d', 6], ['e', 7], ['f', 8]]`
);
}
// Extended behavior
unittest
{
// Return value
assertRender(
`{% macro sum(a, b) %}` ~
`{% endmacro return a + b %}` ~
`{{ sum(1, 2) }}`
,
`3`
);
// Macro as function/filter
long a = 10;
assertRender!(a)(
`{% macro inc(a, b) %}` ~
`{% endmacro return a + b %}` ~
`{{ a.inc(10) }}` ~
`{{ a | inc(15) }}`
,
`20` ~ `25`
);
// Macro as test
assertRender(
`{% macro good(value) %}` ~
`{% endmacro return value % 2 == 0 and value > 10 %}` ~
`{{ 10 is good }}` ~
`{{ 16 is good }}`
,
`false` ~ `true`
);
}
|
D
|
module physics.contact;
import core;
import physics;
import std.stdio;
import std.conv;
class Contact
{
this(RigidBody r1, RigidBody r2, float restitution)
{
this.rigidBodies = [r1, r2];
this.restitution = restitution;
this.penetrationDepth = 1;
this.logger = new Logger();
}
void resolve(float dur, vec3 contactNormal)
{
//resolveVel(dur, contactNormal);
resolvePen(dur, contactNormal);
//resolveVelocity(dur, contactNormal);
//resolvePenetration(dur, contactNormal);
}
float calcSeperatingVelocity(vec3 contactNormal)
{
vec3 relVelocity = rigidBodies[0].vel;
if (rigidBodies[1])
{
relVelocity -= rigidBodies[1].vel;
}
// return dot product of these two vectors
return relVelocity * contactNormal;
}
private void resolveVelocity(float dur, vec3 contactNormal)
{
if ( true )//rigidBodies[0].canBounce)
{
float seperatingVel = calcSeperatingVelocity(contactNormal);
if (seperatingVel > 0)
{
return;
}
float newSepVel = -seperatingVel * restitution;
float deltaVel = newSepVel - seperatingVel;
float totalInverseMass = 1.0 / rigidBodies[0].mass;
if (rigidBodies[1])
{
totalInverseMass += 1.0 / rigidBodies[1].mass;
}
if (totalInverseMass <= 0)
{
return;
}
float impulse = deltaVel / totalInverseMass;
vec3 impulsePerIMass = contactNormal * impulse;
rigidBodies[0].vel += impulsePerIMass * (1.0 / rigidBodies[0].mass);
if (rigidBodies[1])
{
rigidBodies[1].vel += impulsePerIMass * -(1.0 / rigidBodies[1].mass);
}
}
else
{
//rigidBodies[0].vel = -rigidBodies[1].vel;
}
}
private void resolveVel(float dur, vec3 contactNormal)
{
float mass = rigidBodies[0].mass;
float dot = (rigidBodies[0].mass * rigidBodies[0].vel) * contactNormal;
float j = max(- (1 + restitution) * dot, 0);
rigidBodies[0].vel += j * contactNormal;
}
void resolvePenetration(float dur, vec3 contactNormal)
{
if ( true )//rigidBodies[0].canBounce)
{
if (penetrationDepth <= 0)
{
return;
}
float totalInverseMass = rigidBodies[0].mass;
if (rigidBodies[1])
{
totalInverseMass += rigidBodies[1].mass;
}
if (totalInverseMass <= 0)
{
return;
}
vec3 movePerIMass = -contactNormal * (-penetrationDepth / totalInverseMass);
rigidBodies[0].pos -= movePerIMass * rigidBodies[0].mass;
if (rigidBodies[1])
{
rigidBodies[1].pos -= movePerIMass * rigidBodies[1].mass;
logger.log("contactNormal: " ~ contactNormal.toString, 0);
}
}
else
{
//rigidBodies[0].pos += vec3(0, 0.1, 0);
//logger.log(contactNormal, 0);
}
}
void resolvePen(float dur, vec3 contactNormal)
{
rigidBodies[0].pos += vec3(0, 0.25, 0);
}
vec3 penDepth()
{
return rigidBodies[1].pos - rigidBodies[0].pos;
}
private:
RigidBody rigidBodies[2];
float restitution;
float penetrationDepth;
vec3 contactNormal;
Logger logger;
}
|
D
|
func int spell_logic_teleport2(var int manainvested)
{
printdebugnpc(PD_MAGIC,"Spell_Logic_Teleport2");
if(manainvested >= SPL_SENDCAST_TELEPORT)
{
AI_Teleport(self,"NC_KDW_CAVE_CENTER");
AI_PlayAni(self,"T_HEASHOOT_2_STAND");
KDW_TP_USED = TRUE;
return SPL_SENDCAST;
};
return SPL_NEXTLEVEL;
};
|
D
|
/Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Intermediates/HomeWeather.build/Debug-iphonesimulator/HomeWeather.build/Objects-normal/x86_64/WeatherData.o : /Users/sayonsomchanda/Documents/Apps/HomeWeather/HomeWeather/ViewController.swift /Users/sayonsomchanda/Documents/Apps/HomeWeather/HomeWeather/WeatherData.swift /Users/sayonsomchanda/Documents/Apps/HomeWeather/HomeWeather/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/sayonsomchanda/Documents/Apps/HomeWeather/HomeWeather/HomeWeather-Bridging-Header.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNObjectEventListener.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNErrorCodes.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/NSURLSessionConfiguration+PNConfiguration.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNTimeResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNSubscribeStatus.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNSubscriberResults.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNPublishStatus.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNPresenceWhereNowResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNPresenceChannelHereNowResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNPresenceGlobalHereNowResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNPresenceChannelGroupHereNowResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNHistoryResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNClientStateUpdateStatus.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNChannelGroupsResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNChannelGroupClientStateResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNChannelGroupChannelsResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNChannelClientStateResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNAPNSEnabledChannelsResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNServiceData.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNStatus.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNErrorStatus.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNAcknowledgmentStatus.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNConfiguration.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNClientInformation.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNAES.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+Time.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+Subscribe.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+State.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+Publish.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+Presence.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+History.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+ChannelGroup.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNLLogger.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNStructures.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+Core.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+APNS.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub-umbrella.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Modules/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/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Modules/SwiftyJSON.swiftmodule/x86_64.swiftmodule /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Headers/SwiftyJSON-Swift.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Headers/SwiftyJSON-umbrella.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Modules/module.modulemap /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule
/Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Intermediates/HomeWeather.build/Debug-iphonesimulator/HomeWeather.build/Objects-normal/x86_64/WeatherData~partial.swiftmodule : /Users/sayonsomchanda/Documents/Apps/HomeWeather/HomeWeather/ViewController.swift /Users/sayonsomchanda/Documents/Apps/HomeWeather/HomeWeather/WeatherData.swift /Users/sayonsomchanda/Documents/Apps/HomeWeather/HomeWeather/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/sayonsomchanda/Documents/Apps/HomeWeather/HomeWeather/HomeWeather-Bridging-Header.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNObjectEventListener.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNErrorCodes.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/NSURLSessionConfiguration+PNConfiguration.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNTimeResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNSubscribeStatus.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNSubscriberResults.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNPublishStatus.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNPresenceWhereNowResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNPresenceChannelHereNowResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNPresenceGlobalHereNowResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNPresenceChannelGroupHereNowResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNHistoryResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNClientStateUpdateStatus.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNChannelGroupsResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNChannelGroupClientStateResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNChannelGroupChannelsResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNChannelClientStateResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNAPNSEnabledChannelsResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNServiceData.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNStatus.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNErrorStatus.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNAcknowledgmentStatus.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNConfiguration.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNClientInformation.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNAES.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+Time.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+Subscribe.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+State.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+Publish.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+Presence.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+History.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+ChannelGroup.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNLLogger.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNStructures.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+Core.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+APNS.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub-umbrella.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Modules/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/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Modules/SwiftyJSON.swiftmodule/x86_64.swiftmodule /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Headers/SwiftyJSON-Swift.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Headers/SwiftyJSON-umbrella.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Modules/module.modulemap /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule
/Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Intermediates/HomeWeather.build/Debug-iphonesimulator/HomeWeather.build/Objects-normal/x86_64/WeatherData~partial.swiftdoc : /Users/sayonsomchanda/Documents/Apps/HomeWeather/HomeWeather/ViewController.swift /Users/sayonsomchanda/Documents/Apps/HomeWeather/HomeWeather/WeatherData.swift /Users/sayonsomchanda/Documents/Apps/HomeWeather/HomeWeather/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/sayonsomchanda/Documents/Apps/HomeWeather/HomeWeather/HomeWeather-Bridging-Header.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNObjectEventListener.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNErrorCodes.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/NSURLSessionConfiguration+PNConfiguration.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNTimeResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNSubscribeStatus.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNSubscriberResults.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNPublishStatus.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNPresenceWhereNowResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNPresenceChannelHereNowResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNPresenceGlobalHereNowResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNPresenceChannelGroupHereNowResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNHistoryResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNClientStateUpdateStatus.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNChannelGroupsResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNChannelGroupClientStateResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNChannelGroupChannelsResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNChannelClientStateResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNAPNSEnabledChannelsResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNServiceData.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNResult.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNStatus.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNErrorStatus.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNAcknowledgmentStatus.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNConfiguration.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNClientInformation.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNAES.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+Time.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+Subscribe.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+State.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+Publish.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+Presence.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+History.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+ChannelGroup.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNLLogger.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PNStructures.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+Core.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub+APNS.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Headers/PubNub-umbrella.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/PubNub/PubNub.framework/Modules/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/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Modules/SwiftyJSON.swiftmodule/x86_64.swiftmodule /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Headers/SwiftyJSON-Swift.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Headers/SwiftyJSON-umbrella.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Modules/module.modulemap /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/sayonsomchanda/Documents/Apps/HomeWeather/DerivedData/HomeWeather/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule
|
D
|
/**
* Contains support code for code profiling.
*
* Copyright: Copyright Digital Mars 1995 - 2012.
* License: Distributed under the
* $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0).
* (See accompanying file LICENSE)
* Authors: Walter Bright, Sean Kelly
* Source: $(DRUNTIMESRC src/rt/_trace.d)
*/
/* Copyright Digital Mars 1995 - 2011.
*/
module rt.trace;
private
{
import core.demangle;
import core.stdc.ctype;
import core.stdc.stdio;
import core.stdc.stdlib;
import core.stdc.string;
import rt.util.string;
version (CRuntime_Microsoft)
alias core.stdc.stdlib._strtoui64 strtoull;
}
extern (C):
alias long timer_t;
/////////////////////////////////////
//
struct SymPair
{
SymPair* next;
Symbol* sym; // function that is called
uint count; // number of times sym is called
}
/////////////////////////////////////
// A Symbol for each function name.
struct Symbol
{
Symbol* Sl, Sr; // left, right children
SymPair* Sfanin; // list of calling functions
SymPair* Sfanout; // list of called functions
timer_t totaltime; // aggregate time
timer_t functime; // time excluding subfunction calls
ubyte Sflags;
uint recursion; // call recursion level
char[] Sident; // name of symbol
}
const ubyte SFvisited = 1; // visited
//////////////////////////////////
// Build a linked list of these.
struct Stack
{
Stack* prev;
Symbol* sym;
timer_t starttime; // time when function was entered
timer_t ohd; // overhead of all the bookkeeping code
timer_t subtime; // time used by all subfunctions
}
__gshared // doesn't work with multithreaded code anyway
{
Symbol* root; // root of symbol table
Stack* stack_freelist;
Stack* trace_tos; // top of stack
int trace_inited; // !=0 if initialized
timer_t trace_ohd;
Symbol** psymbols;
uint nsymbols; // number of symbols
string trace_logfilename = "trace.log";
FILE* fplog;
string trace_deffilename = "trace.def";
FILE* fpdef;
}
////////////////////////////////////////
// Set file name for output.
// A file name of "" means write results to stdout.
// Returns:
// 0 success
// !=0 failure
int trace_setlogfilename(string name)
{
trace_logfilename = name;
return 0;
}
////////////////////////////////////////
// Set file name for output.
// A file name of "" means write results to stdout.
// Returns:
// 0 success
// !=0 failure
int trace_setdeffilename(string name)
{
trace_deffilename = name;
return 0;
}
////////////////////////////////////////
// Output optimal function link order.
static void trace_order(Symbol *s)
{
while (s)
{
trace_place(s,0);
if (s.Sl)
trace_order(s.Sl);
s = s.Sr;
}
}
//////////////////////////////////////////////
//
static Stack* stack_malloc()
{ Stack *s;
if (stack_freelist)
{ s = stack_freelist;
stack_freelist = s.prev;
}
else
s = cast(Stack *)trace_malloc(Stack.sizeof);
return s;
}
//////////////////////////////////////////////
//
static void stack_free(Stack *s)
{
s.prev = stack_freelist;
stack_freelist = s;
}
//////////////////////////////////////
// Qsort() comparison routine for array of pointers to SymPair's.
static int sympair_cmp(in void* e1, in void* e2)
{ SymPair** psp1;
SymPair** psp2;
psp1 = cast(SymPair**)e1;
psp2 = cast(SymPair**)e2;
return (*psp2).count - (*psp1).count;
}
//////////////////////////////////////
// Place symbol s, and then place any fan ins or fan outs with
// counts greater than count.
static void trace_place(Symbol *s, uint count)
{ SymPair* sp;
SymPair** base;
if (!(s.Sflags & SFvisited))
{ size_t num;
uint u;
//printf("\t%.*s\t%u\n", s.Sident.length, s.Sident.ptr, count);
fprintf(fpdef,"\t%.*s\n", s.Sident.length, s.Sident.ptr);
s.Sflags |= SFvisited;
// Compute number of items in array
num = 0;
for (sp = s.Sfanin; sp; sp = sp.next)
num++;
for (sp = s.Sfanout; sp; sp = sp.next)
num++;
if (!num)
return;
// Allocate and fill array
base = cast(SymPair**)trace_malloc(SymPair.sizeof * num);
u = 0;
for (sp = s.Sfanin; sp; sp = sp.next)
base[u++] = sp;
for (sp = s.Sfanout; sp; sp = sp.next)
base[u++] = sp;
// Sort array
qsort(base, num, (SymPair *).sizeof, &sympair_cmp);
//for (u = 0; u < num; u++)
//printf("\t\t%.*s\t%u\n", base[u].sym.Sident.length, base[u].sym.Sident.ptr, base[u].count);
// Place symbols
for (u = 0; u < num; u++)
{
if (base[u].count >= count)
{ uint u2;
uint c2;
u2 = (u + 1 < num) ? u + 1 : u;
c2 = base[u2].count;
if (c2 < count)
c2 = count;
trace_place(base[u].sym,c2);
}
else
break;
}
// Clean up
trace_free(base);
}
}
/////////////////////////////////////
// Terminate.
shared static ~this()
{
trace_term();
}
///////////////////////////////////
// Report results.
// Also compute nsymbols.
static void trace_report(Symbol* s)
{ SymPair* sp;
uint count;
//printf("trace_report()\n");
while (s)
{ nsymbols++;
if (s.Sl)
trace_report(s.Sl);
fprintf(fplog,"------------------\n");
count = 0;
for (sp = s.Sfanin; sp; sp = sp.next)
{
fprintf(fplog,"\t%5d\t%.*s\n", sp.count, sp.sym.Sident.length, sp.sym.Sident.ptr);
count += sp.count;
}
fprintf(fplog,"%.*s\t%u\t%lld\t%lld\n", s.Sident.length, s.Sident.ptr, count, s.totaltime, s.functime);
for (sp = s.Sfanout; sp; sp = sp.next)
{
fprintf(fplog,"\t%5d\t%.*s\n", sp.count, sp.sym.Sident.length, sp.sym.Sident.ptr);
}
s = s.Sr;
}
}
////////////////////////////////////
// Allocate and fill array of symbols.
static void trace_array(Symbol *s)
{
__gshared uint u;
if (!psymbols)
{ u = 0;
psymbols = cast(Symbol **)trace_malloc((Symbol *).sizeof * nsymbols);
}
while (s)
{
psymbols[u++] = s;
trace_array(s.Sl);
s = s.Sr;
}
}
//////////////////////////////////////
// Qsort() comparison routine for array of pointers to Symbol's.
static int symbol_cmp(in void* e1, in void* e2)
{ Symbol** ps1;
Symbol** ps2;
timer_t diff;
ps1 = cast(Symbol **)e1;
ps2 = cast(Symbol **)e2;
diff = (*ps2).functime - (*ps1).functime;
return (diff == 0) ? 0 : ((diff > 0) ? 1 : -1);
}
///////////////////////////////////
// Report function timings
static void trace_times(Symbol* root)
{ uint u;
timer_t freq;
// Sort array
qsort(psymbols, nsymbols, (Symbol *).sizeof, &symbol_cmp);
// Print array
QueryPerformanceFrequency(&freq);
fprintf(fplog,"\n======== Timer Is %lld Ticks/Sec, Times are in Microsecs ========\n\n",freq);
fprintf(fplog," Num Tree Func Per\n");
fprintf(fplog," Calls Time Time Call\n\n");
for (u = 0; u < nsymbols; u++)
{
Symbol* s = psymbols[u];
timer_t tl,tr;
timer_t fl,fr;
timer_t pl,pr;
timer_t percall;
char[8192] buf;
SymPair* sp;
uint calls;
char[] id;
calls = 0;
id = demangle(s.Sident, buf);
for (sp = s.Sfanin; sp; sp = sp.next)
calls += sp.count;
if (calls == 0)
calls = 1;
tl = (s.totaltime * 1000000) / freq;
fl = (s.functime * 1000000) / freq;
percall = s.functime / calls;
pl = (s.functime * 1000000) / calls / freq;
fprintf(fplog,"%7d%12lld%12lld%12lld %.*s\n",
calls, tl, fl, pl, id.length, id.ptr);
}
}
///////////////////////////////////
// Initialize.
static void trace_init()
{
if (!trace_inited)
{
trace_inited = 1;
{ // See if we can determine the overhead.
timer_t starttime;
timer_t endtime;
auto st = trace_tos;
trace_tos = null;
QueryPerformanceCounter(&starttime);
uint u;
for (u = 0; u < 100; u++)
{
_c_trace_pro(0,null);
_c_trace_epi();
}
QueryPerformanceCounter(&endtime);
trace_ohd = (endtime - starttime) / u;
//printf("trace_ohd = %lld\n",trace_ohd);
if (trace_ohd > 0)
trace_ohd--; // round down
trace_tos = st;
}
}
}
/////////////////////////////////
// Terminate.
void trace_term()
{
//printf("trace_term()\n");
if (trace_inited == 1)
{ Stack *n;
trace_inited = 2;
// Free remainder of the stack
while (trace_tos)
{
n = trace_tos.prev;
stack_free(trace_tos);
trace_tos = n;
}
while (stack_freelist)
{
n = stack_freelist.prev;
stack_free(stack_freelist);
stack_freelist = n;
}
// Merge in data from any existing file
trace_merge();
// Report results
fplog = fopen(trace_logfilename.ptr, "w");
if (fplog)
{ nsymbols = 0;
trace_report(root);
trace_array(root);
trace_times(root);
fclose(fplog);
}
// Output function link order
fpdef = fopen(trace_deffilename.ptr,"w");
if (fpdef)
{ fprintf(fpdef,"\nFUNCTIONS\n");
trace_order(root);
fclose(fpdef);
}
trace_free(psymbols);
psymbols = null;
}
}
/////////////////////////////////
// Our storage allocator.
static void *trace_malloc(size_t nbytes)
{ void *p;
p = malloc(nbytes);
if (!p)
exit(EXIT_FAILURE);
return p;
}
static void trace_free(void *p)
{
free(p);
}
//////////////////////////////////////////////
//
static Symbol* trace_addsym(char[] id)
{
Symbol** parent;
Symbol* rover;
Symbol* s;
int cmp;
char c;
//printf("trace_addsym('%s',%d)\n",p,len);
parent = &root;
rover = *parent;
while (rover !is null) // while we haven't run out of tree
{
cmp = dstrcmp(id, rover.Sident);
if (cmp == 0)
{
return rover;
}
parent = (cmp < 0) ? /* if we go down left side */
&(rover.Sl) : /* then get left child */
&(rover.Sr); /* else get right child */
rover = *parent; /* get child */
}
/* not in table, so insert into table */
s = cast(Symbol *)trace_malloc(Symbol.sizeof);
memset(s,0,Symbol.sizeof);
s.Sident = id;
*parent = s; // link new symbol into tree
return s;
}
/***********************************
* Add symbol s with count to SymPair list.
*/
static void trace_sympair_add(SymPair** psp, Symbol* s, uint count)
{ SymPair* sp;
for (; 1; psp = &sp.next)
{
sp = *psp;
if (!sp)
{
sp = cast(SymPair *)trace_malloc(SymPair.sizeof);
sp.sym = s;
sp.count = 0;
sp.next = null;
*psp = sp;
break;
}
else if (sp.sym == s)
{
break;
}
}
sp.count += count;
}
//////////////////////////////////////////////
//
static void trace_pro(char[] id)
{
//printf("trace_pro(ptr = %p, length = %lld)\n", id.ptr, id.length);
//printf("trace_pro(id = '%.*s')\n", id.length, id.ptr);
Stack* n;
Symbol* s;
timer_t starttime;
timer_t t;
if (!trace_inited)
trace_init(); // initialize package
QueryPerformanceCounter(&starttime);
if (id.length == 0)
return;
n = stack_malloc();
n.prev = trace_tos;
trace_tos = n;
s = trace_addsym(id);
trace_tos.sym = s;
if (trace_tos.prev)
{
Symbol* prev;
int i;
// Accumulate Sfanout and Sfanin
prev = trace_tos.prev.sym;
trace_sympair_add(&prev.Sfanout,s,1);
trace_sympair_add(&s.Sfanin,prev,1);
}
QueryPerformanceCounter(&t);
trace_tos.starttime = starttime;
trace_tos.ohd = trace_ohd + t - starttime;
trace_tos.subtime = 0;
s.recursion++;
//printf("trace_tos.ohd=%lld, trace_ohd=%lld + t=%lld - starttime=%lld\n",
// trace_tos.ohd,trace_ohd,t,starttime);
}
void _c_trace_pro(size_t idlen, char* idptr)
{
char[] id = idptr[0 .. idlen];
trace_pro(id);
}
/////////////////////////////////////////
//
void _c_trace_epi()
{ Stack* n;
timer_t endtime;
timer_t t;
timer_t ohd;
//printf("_c_trace_epi()\n");
if (trace_tos)
{
timer_t starttime;
timer_t totaltime;
QueryPerformanceCounter(&endtime);
starttime = trace_tos.starttime;
totaltime = endtime - starttime - trace_tos.ohd;
if (totaltime < 0)
{ //printf("endtime=%lld - starttime=%lld - trace_tos.ohd=%lld < 0\n",
// endtime,starttime,trace_tos.ohd);
totaltime = 0; // round off error, just make it 0
}
// totaltime is time spent in this function + all time spent in
// subfunctions - bookkeeping overhead.
trace_tos.sym.recursion--;
if(trace_tos.sym.recursion == 0)
trace_tos.sym.totaltime += totaltime;
//if (totaltime < trace_tos.subtime)
//printf("totaltime=%lld < trace_tos.subtime=%lld\n",totaltime,trace_tos.subtime);
trace_tos.sym.functime += totaltime - trace_tos.subtime;
ohd = trace_tos.ohd;
n = trace_tos.prev;
stack_free(trace_tos);
trace_tos = n;
if (n)
{ QueryPerformanceCounter(&t);
n.ohd += ohd + t - endtime;
n.subtime += totaltime;
//printf("n.ohd = %lld\n",n.ohd);
}
}
}
////////////////////////// FILE INTERFACE /////////////////////////
/////////////////////////////////////
// Read line from file fp.
// Returns:
// trace_malloc'd line buffer
// null if end of file
static char* trace_readline(FILE* fp)
{ int c;
int dim;
int i;
char *buf;
//printf("trace_readline(%p)\n", fp);
i = 0;
dim = 0;
buf = null;
while (1)
{
if (i == dim)
{ char *p;
dim += 80;
p = cast(char *)trace_malloc(dim);
memcpy(p,buf,i);
trace_free(buf);
buf = p;
}
c = fgetc(fp);
switch (c)
{
case EOF:
if (i == 0)
{ trace_free(buf);
return null;
}
goto L1;
case '\n':
goto L1;
default:
break;
}
buf[i] = cast(char)c;
i++;
}
L1:
buf[i] = 0;
//printf("line '%s'\n",buf);
return buf;
}
//////////////////////////////////////
// Skip space
static char *skipspace(char *p)
{
while (isspace(*p))
p++;
return p;
}
////////////////////////////////////////////////////////
// Merge in profiling data from existing file.
static void trace_merge()
{ FILE *fp;
char *buf;
char *p;
uint count;
Symbol *s;
SymPair *sfanin;
SymPair **psp;
if (trace_logfilename.length && (fp = fopen(trace_logfilename.ptr,"r")) !is null)
{
buf = null;
sfanin = null;
psp = &sfanin;
while (1)
{
trace_free(buf);
buf = trace_readline(fp);
if (!buf)
break;
switch (*buf)
{
case '=': // ignore rest of file
trace_free(buf);
goto L1;
case ' ':
case '\t': // fan in or fan out line
count = cast(int)strtoul(buf,&p,10);
if (p == buf) // if invalid conversion
continue;
p = skipspace(p);
if (!*p)
continue;
s = trace_addsym(p[0 .. strlen(p)]);
trace_sympair_add(psp,s,count);
break;
default:
if (!isalpha(*buf))
{
if (!sfanin)
psp = &sfanin;
continue; // regard unrecognized line as separator
}
goto case;
case '?':
case '_':
case '$':
case '@':
p = buf;
while (isgraph(*p))
p++;
*p = 0;
//printf("trace_addsym('%s')\n",buf);
s = trace_addsym(buf[0 .. strlen(buf)]);
if (s.Sfanin)
{ SymPair *sp;
for (; sfanin; sfanin = sp)
{
trace_sympair_add(&s.Sfanin,sfanin.sym,sfanin.count);
sp = sfanin.next;
trace_free(sfanin);
}
}
else
{ s.Sfanin = sfanin;
}
sfanin = null;
psp = &s.Sfanout;
{ timer_t t;
p++;
count = cast(int)strtoul(p,&p,10);
t = cast(long)strtoull(p,&p,10);
s.totaltime += t;
t = cast(long)strtoull(p,&p,10);
s.functime += t;
}
break;
}
}
L1:
fclose(fp);
}
}
////////////////////////// COMPILER INTERFACE /////////////////////
/////////////////////////////////////////////
// Function called by trace code in function prolog.
/////////////////////////////////////////////
// Function called by trace code in function epilog.
void _trace_epi_n()
{
version (OSX)
{ // 16 byte align stack
version (D_InlineAsm_X86)
{
asm
{
naked ;
pushad ;
sub ESP,12 ;
}
_c_trace_epi();
asm
{
add ESP,12 ;
popad ;
ret ;
}
}
else version (D_InlineAsm_X86_64)
{
asm
{ naked ;
push RAX ;
push RCX ;
push RDX ;
push RSI ;
push RDI ;
push R8 ;
push R9 ;
push R10 ;
push R11 ;
sub RSP, 2*16 ;
movdqu 0*16[RSP], XMM0;
movdqu 1*16[RSP], XMM1;
/* Don't worry about saving ST0/1
* Hope _c_trace_epi() doesn't change them
*/
}
_c_trace_epi();
asm
{
movdqu XMM0, 0*16[RSP];
movdqu XMM1, 1*16[RSP];
add RSP, 2*16 ;
pop R11 ;
pop R10 ;
pop R9 ;
pop R8 ;
pop RDI ;
pop RSI ;
pop RDX ;
pop RCX ;
pop RAX ;
ret ;
}
}
else
static assert(0);
}
else
{
version (D_InlineAsm_X86)
{
asm
{
naked ;
pushad ;
}
_c_trace_epi();
asm
{
popad ;
ret ;
}
}
else version (D_InlineAsm_X86_64)
{
asm
{
naked ;
push RAX ;
push RCX ;
push RDX ;
push RSI ;
push RDI ;
push R8 ;
push R9 ;
push R10 ;
push R11 ;
sub RSP, 2*16 ;
movdqu 0*16[RSP], XMM0;
movdqu 1*16[RSP], XMM1;
/* Don't worry about saving ST0/1
* Hope _c_trace_epi() doesn't change them
*/
}
_c_trace_epi();
asm
{
movdqu XMM0, 0*16[RSP];
movdqu XMM1, 1*16[RSP];
add RSP, 2*16 ;
pop R11 ;
pop R10 ;
pop R9 ;
pop R8 ;
pop RDI ;
pop RSI ;
pop RDX ;
pop RCX ;
pop RAX ;
ret ;
}
}
else
static assert(0);
}
}
version (Windows)
{
extern (Windows)
{
export int QueryPerformanceCounter(timer_t *);
export int QueryPerformanceFrequency(timer_t *);
}
}
else version (D_InlineAsm_X86)
{
extern (D)
{
void QueryPerformanceCounter(timer_t* ctr)
{
asm
{
naked ;
mov ECX,EAX ;
rdtsc ;
mov [ECX],EAX ;
mov 4[ECX],EDX ;
ret ;
}
}
void QueryPerformanceFrequency(timer_t* freq)
{
*freq = 3579545;
}
}
}
else version (D_InlineAsm_X86_64)
{
extern (D)
{
void QueryPerformanceCounter(timer_t* ctr)
{
asm
{
naked ;
rdtsc ;
mov [RDI],EAX ;
mov 4[RDI],EDX ;
ret ;
}
}
void QueryPerformanceFrequency(timer_t* freq)
{
*freq = 3579545;
}
}
}
else
{
static assert(0);
}
|
D
|
/Users/shawngong/Centa/.build/debug/Fluent.build/Preparation/Preparation.swift.o : /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Database/Database.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Database/Driver.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Entity/Entity.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Memory/Memory+Filters.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Memory/Memory+Group.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Memory/Memory+Sort.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Memory/MemoryDriver.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Preparation/Database+Preparation.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Preparation/Migration.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Preparation/Preparation.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Preparation/PreparationError.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Action.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Comparison.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Filter.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Group.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Join.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Limit.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Query.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Scope.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Sort.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Relations/Children.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Relations/Parent.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Relations/RelationError.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Relations/Siblings.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Schema/Database+Schema.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Schema/Schema+Creator.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Schema/Schema+Field.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Schema/Schema+Modifier.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Schema/Schema.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/SQL/GeneralSQLSerializer.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/SQL/SQL+Query.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/SQL/SQL+Schema.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/SQL/SQL.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/SQL/SQLSerializer.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Utilities/Fluent+Node.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 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Users/shawngong/Centa/.build/debug/CLibreSSL.build/module.modulemap /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/Dispatch.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/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/shawngong/Centa/.build/debug/Node.swiftmodule /Users/shawngong/Centa/.build/debug/PathIndexable.swiftmodule /Users/shawngong/Centa/.build/debug/Polymorphic.swiftmodule
/Users/shawngong/Centa/.build/debug/Fluent.build/Preparation~partial.swiftmodule : /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Database/Database.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Database/Driver.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Entity/Entity.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Memory/Memory+Filters.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Memory/Memory+Group.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Memory/Memory+Sort.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Memory/MemoryDriver.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Preparation/Database+Preparation.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Preparation/Migration.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Preparation/Preparation.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Preparation/PreparationError.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Action.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Comparison.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Filter.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Group.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Join.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Limit.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Query.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Scope.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Sort.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Relations/Children.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Relations/Parent.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Relations/RelationError.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Relations/Siblings.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Schema/Database+Schema.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Schema/Schema+Creator.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Schema/Schema+Field.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Schema/Schema+Modifier.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Schema/Schema.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/SQL/GeneralSQLSerializer.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/SQL/SQL+Query.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/SQL/SQL+Schema.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/SQL/SQL.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/SQL/SQLSerializer.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Utilities/Fluent+Node.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 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Users/shawngong/Centa/.build/debug/CLibreSSL.build/module.modulemap /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/Dispatch.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/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/shawngong/Centa/.build/debug/Node.swiftmodule /Users/shawngong/Centa/.build/debug/PathIndexable.swiftmodule /Users/shawngong/Centa/.build/debug/Polymorphic.swiftmodule
/Users/shawngong/Centa/.build/debug/Fluent.build/Preparation~partial.swiftdoc : /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Database/Database.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Database/Driver.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Entity/Entity.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Memory/Memory+Filters.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Memory/Memory+Group.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Memory/Memory+Sort.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Memory/MemoryDriver.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Preparation/Database+Preparation.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Preparation/Migration.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Preparation/Preparation.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Preparation/PreparationError.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Action.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Comparison.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Filter.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Group.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Join.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Limit.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Query.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Scope.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Query/Sort.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Relations/Children.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Relations/Parent.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Relations/RelationError.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Relations/Siblings.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Schema/Database+Schema.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Schema/Schema+Creator.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Schema/Schema+Field.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Schema/Schema+Modifier.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Schema/Schema.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/SQL/GeneralSQLSerializer.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/SQL/SQL+Query.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/SQL/SQL+Schema.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/SQL/SQL.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/SQL/SQLSerializer.swift /Users/shawngong/Centa/Packages/Fluent-1.4.0/Sources/Fluent/Utilities/Fluent+Node.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 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Users/shawngong/Centa/.build/debug/CLibreSSL.build/module.modulemap /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/Dispatch.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/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/shawngong/Centa/.build/debug/Node.swiftmodule /Users/shawngong/Centa/.build/debug/PathIndexable.swiftmodule /Users/shawngong/Centa/.build/debug/Polymorphic.swiftmodule
|
D
|
/Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Vapor.build/Content/JSONCoder+Custom.swift.o : /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Utilities/FileIO.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/FormDataCoder+HTTP.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/SessionData.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Utilities/Thread.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/URLEncoded.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Deprecated.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Commands/ServeCommand.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Commands/RoutesCommand.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Commands/BootCommand.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router+Method.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/SessionCache.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/ResponseCodable.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Request/RequestCodable.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router+Middleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Middleware/Middleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Middleware/CORSMiddleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Middleware/FileMiddleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Middleware/DateMiddleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Middleware/ErrorMiddleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/SessionsMiddleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router+LazyMiddleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/Response.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Utilities/AnyResponse.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Middleware/MiddlewareConfig.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Server/NIOServerConfig.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/SessionsConfig.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/ContentConfig.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Request/HTTPMethod+String.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router+Path.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/JSONCoder+Custom.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/Request+Session.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/Session.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Application.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/RouteCollection.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router+Function.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Services/VaporProvider.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/Responder.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/BasicResponder.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/ApplicationResponder.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/WebSocket/WebSocketResponder.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/PlaintextEncoder.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/HTTPMessageContainer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/ParametersContainer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/ContentContainer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/QueryContainer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/EngineRouter.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Server/Server.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Server/NIOServer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Server/RunningServer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/WebSocket/WebSocketServer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/WebSocket/NIOWebSocketServer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Error/Error.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Logging/Logger+LogError.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Error/AbortError.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/Sessions.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/KeyedCacheSessions.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/MemorySessions.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/ContentCoders.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Utilities/Exports.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/HTTPStatus.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/Redirect.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/SingleValueGet.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Services/Config+Default.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Commands/CommandConfig+Default.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Services/Services+Default.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Client/Client.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Client/FoundationClient.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/WebSocket/WebSocketClient.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/WebSocket/NIOWebSocketClient.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router+Content.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/Content.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Error/Abort.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Request/Request.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/View/Vapor+View.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIOHTTP1.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIOOpenSSL.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/HTTP.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIOTLS.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Command.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Console.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Routing.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Random.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/URLEncodedForm.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Validation.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 /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Crypto.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/WebSocket.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIOWebSocket.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/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/DatabaseKit.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/TemplateKit.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Multipart.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOSHA1/include/CNIOSHA1.h /usr/local/Cellar/libressl/2.8.3/include/openssl/asn1.h /usr/local/Cellar/libressl/2.8.3/include/openssl/tls1.h /usr/local/Cellar/libressl/2.8.3/include/openssl/dtls1.h /usr/local/Cellar/libressl/2.8.3/include/openssl/pkcs12.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ssl2.h /usr/local/Cellar/libressl/2.8.3/include/openssl/pem2.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ssl23.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ssl3.h /usr/local/Cellar/libressl/2.8.3/include/openssl/x509v3.h /usr/local/Cellar/libressl/2.8.3/include/openssl/md5.h /usr/local/Cellar/libressl/2.8.3/include/openssl/pkcs7.h /usr/local/Cellar/libressl/2.8.3/include/openssl/x509.h /usr/local/Cellar/libressl/2.8.3/include/openssl/sha.h /usr/local/Cellar/libressl/2.8.3/include/openssl/dsa.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ecdsa.h /usr/local/Cellar/libressl/2.8.3/include/openssl/rsa.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOZlib/include/CNIOZlib.h /usr/local/Cellar/libressl/2.8.3/include/openssl/obj_mac.h /usr/local/Cellar/libressl/2.8.3/include/openssl/hmac.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ec.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/cpp_magic.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/ifaddrs-android.h /usr/local/Cellar/libressl/2.8.3/include/openssl/rand.h /usr/local/Cellar/libressl/2.8.3/include/openssl/conf.h /usr/local/Cellar/libressl/2.8.3/include/openssl/opensslconf.h /usr/local/Cellar/libressl/2.8.3/include/openssl/dh.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ecdh.h /usr/local/Cellar/libressl/2.8.3/include/openssl/lhash.h /usr/local/Cellar/libressl/2.8.3/include/openssl/stack.h /usr/local/Cellar/libressl/2.8.3/include/openssl/safestack.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ssl.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio-ssl.git-1370587408992578247/Sources/CNIOOpenSSL/include/c_nio_openssl.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/crypto.git-7980259129511365902/Sources/CCryptoOpenSSL/include/c_crypto_openssl.h /usr/local/Cellar/libressl/2.8.3/include/openssl/pem.h /usr/local/Cellar/libressl/2.8.3/include/openssl/bn.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIODarwin/include/CNIODarwin.h /usr/local/Cellar/libressl/2.8.3/include/openssl/bio.h /usr/local/Cellar/libressl/2.8.3/include/openssl/crypto.h /usr/local/Cellar/libressl/2.8.3/include/openssl/srtp.h /usr/local/Cellar/libressl/2.8.3/include/openssl/evp.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/2.8.3/include/openssl/buffer.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOHTTPParser/include/CNIOHTTPParser.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOHTTPParser/include/c_nio_http_parser.h /usr/local/Cellar/libressl/2.8.3/include/openssl/err.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/CNIOAtomics.h /usr/local/Cellar/libressl/2.8.3/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/2.8.3/include/openssl/objects.h /usr/local/Cellar/libressl/2.8.3/include/openssl/opensslv.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/2.8.3/include/openssl/x509_vfy.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio-ssl-support.git--2359138821295600615/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio-zlib-support.git--1071467962839356487/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/checkouts/crypto.git-7980259129511365902/Sources/CBase32/include/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/checkouts/crypto.git-7980259129511365902/Sources/CBcrypt/include/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/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Vapor.build/JSONCoder+Custom~partial.swiftmodule : /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Utilities/FileIO.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/FormDataCoder+HTTP.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/SessionData.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Utilities/Thread.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/URLEncoded.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Deprecated.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Commands/ServeCommand.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Commands/RoutesCommand.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Commands/BootCommand.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router+Method.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/SessionCache.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/ResponseCodable.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Request/RequestCodable.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router+Middleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Middleware/Middleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Middleware/CORSMiddleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Middleware/FileMiddleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Middleware/DateMiddleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Middleware/ErrorMiddleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/SessionsMiddleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router+LazyMiddleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/Response.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Utilities/AnyResponse.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Middleware/MiddlewareConfig.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Server/NIOServerConfig.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/SessionsConfig.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/ContentConfig.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Request/HTTPMethod+String.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router+Path.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/JSONCoder+Custom.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/Request+Session.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/Session.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Application.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/RouteCollection.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router+Function.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Services/VaporProvider.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/Responder.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/BasicResponder.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/ApplicationResponder.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/WebSocket/WebSocketResponder.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/PlaintextEncoder.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/HTTPMessageContainer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/ParametersContainer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/ContentContainer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/QueryContainer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/EngineRouter.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Server/Server.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Server/NIOServer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Server/RunningServer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/WebSocket/WebSocketServer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/WebSocket/NIOWebSocketServer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Error/Error.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Logging/Logger+LogError.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Error/AbortError.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/Sessions.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/KeyedCacheSessions.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/MemorySessions.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/ContentCoders.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Utilities/Exports.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/HTTPStatus.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/Redirect.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/SingleValueGet.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Services/Config+Default.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Commands/CommandConfig+Default.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Services/Services+Default.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Client/Client.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Client/FoundationClient.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/WebSocket/WebSocketClient.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/WebSocket/NIOWebSocketClient.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router+Content.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/Content.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Error/Abort.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Request/Request.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/View/Vapor+View.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIOHTTP1.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIOOpenSSL.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/HTTP.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIOTLS.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Command.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Console.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Routing.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Random.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/URLEncodedForm.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Validation.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 /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Crypto.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/WebSocket.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIOWebSocket.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/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/DatabaseKit.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/TemplateKit.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Multipart.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOSHA1/include/CNIOSHA1.h /usr/local/Cellar/libressl/2.8.3/include/openssl/asn1.h /usr/local/Cellar/libressl/2.8.3/include/openssl/tls1.h /usr/local/Cellar/libressl/2.8.3/include/openssl/dtls1.h /usr/local/Cellar/libressl/2.8.3/include/openssl/pkcs12.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ssl2.h /usr/local/Cellar/libressl/2.8.3/include/openssl/pem2.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ssl23.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ssl3.h /usr/local/Cellar/libressl/2.8.3/include/openssl/x509v3.h /usr/local/Cellar/libressl/2.8.3/include/openssl/md5.h /usr/local/Cellar/libressl/2.8.3/include/openssl/pkcs7.h /usr/local/Cellar/libressl/2.8.3/include/openssl/x509.h /usr/local/Cellar/libressl/2.8.3/include/openssl/sha.h /usr/local/Cellar/libressl/2.8.3/include/openssl/dsa.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ecdsa.h /usr/local/Cellar/libressl/2.8.3/include/openssl/rsa.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOZlib/include/CNIOZlib.h /usr/local/Cellar/libressl/2.8.3/include/openssl/obj_mac.h /usr/local/Cellar/libressl/2.8.3/include/openssl/hmac.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ec.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/cpp_magic.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/ifaddrs-android.h /usr/local/Cellar/libressl/2.8.3/include/openssl/rand.h /usr/local/Cellar/libressl/2.8.3/include/openssl/conf.h /usr/local/Cellar/libressl/2.8.3/include/openssl/opensslconf.h /usr/local/Cellar/libressl/2.8.3/include/openssl/dh.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ecdh.h /usr/local/Cellar/libressl/2.8.3/include/openssl/lhash.h /usr/local/Cellar/libressl/2.8.3/include/openssl/stack.h /usr/local/Cellar/libressl/2.8.3/include/openssl/safestack.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ssl.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio-ssl.git-1370587408992578247/Sources/CNIOOpenSSL/include/c_nio_openssl.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/crypto.git-7980259129511365902/Sources/CCryptoOpenSSL/include/c_crypto_openssl.h /usr/local/Cellar/libressl/2.8.3/include/openssl/pem.h /usr/local/Cellar/libressl/2.8.3/include/openssl/bn.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIODarwin/include/CNIODarwin.h /usr/local/Cellar/libressl/2.8.3/include/openssl/bio.h /usr/local/Cellar/libressl/2.8.3/include/openssl/crypto.h /usr/local/Cellar/libressl/2.8.3/include/openssl/srtp.h /usr/local/Cellar/libressl/2.8.3/include/openssl/evp.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/2.8.3/include/openssl/buffer.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOHTTPParser/include/CNIOHTTPParser.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOHTTPParser/include/c_nio_http_parser.h /usr/local/Cellar/libressl/2.8.3/include/openssl/err.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/CNIOAtomics.h /usr/local/Cellar/libressl/2.8.3/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/2.8.3/include/openssl/objects.h /usr/local/Cellar/libressl/2.8.3/include/openssl/opensslv.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/2.8.3/include/openssl/x509_vfy.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio-ssl-support.git--2359138821295600615/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio-zlib-support.git--1071467962839356487/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/checkouts/crypto.git-7980259129511365902/Sources/CBase32/include/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/checkouts/crypto.git-7980259129511365902/Sources/CBcrypt/include/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/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Vapor.build/JSONCoder+Custom~partial.swiftdoc : /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Utilities/FileIO.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/FormDataCoder+HTTP.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/SessionData.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Utilities/Thread.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/URLEncoded.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Deprecated.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Commands/ServeCommand.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Commands/RoutesCommand.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Commands/BootCommand.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router+Method.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/SessionCache.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/ResponseCodable.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Request/RequestCodable.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router+Middleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Middleware/Middleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Middleware/CORSMiddleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Middleware/FileMiddleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Middleware/DateMiddleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Middleware/ErrorMiddleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/SessionsMiddleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router+LazyMiddleware.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/Response.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Utilities/AnyResponse.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Middleware/MiddlewareConfig.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Server/NIOServerConfig.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/SessionsConfig.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/ContentConfig.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Request/HTTPMethod+String.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router+Path.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/JSONCoder+Custom.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/Request+Session.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/Session.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Application.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/RouteCollection.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router+Function.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Services/VaporProvider.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/Responder.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/BasicResponder.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/ApplicationResponder.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/WebSocket/WebSocketResponder.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/PlaintextEncoder.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/HTTPMessageContainer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/ParametersContainer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/ContentContainer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/QueryContainer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/EngineRouter.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Server/Server.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Server/NIOServer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Server/RunningServer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/WebSocket/WebSocketServer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/WebSocket/NIOWebSocketServer.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Error/Error.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Logging/Logger+LogError.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Error/AbortError.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/Sessions.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/KeyedCacheSessions.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Sessions/MemorySessions.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/ContentCoders.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Utilities/Exports.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/HTTPStatus.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Response/Redirect.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/SingleValueGet.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Services/Config+Default.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Commands/CommandConfig+Default.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Services/Services+Default.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Client/Client.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Client/FoundationClient.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/WebSocket/WebSocketClient.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/WebSocket/NIOWebSocketClient.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Routing/Router+Content.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Content/Content.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Error/Abort.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/Request/Request.swift /Users/godemodegame/Desktop/ATMApp/.build/checkouts/vapor.git-5492988889259800272/Sources/Vapor/View/Vapor+View.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIOHTTP1.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIOOpenSSL.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/HTTP.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIOTLS.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Command.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Console.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Routing.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Random.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/URLEncodedForm.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Validation.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 /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Crypto.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/WebSocket.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/NIOWebSocket.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/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/DatabaseKit.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/TemplateKit.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/Multipart.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOSHA1/include/CNIOSHA1.h /usr/local/Cellar/libressl/2.8.3/include/openssl/asn1.h /usr/local/Cellar/libressl/2.8.3/include/openssl/tls1.h /usr/local/Cellar/libressl/2.8.3/include/openssl/dtls1.h /usr/local/Cellar/libressl/2.8.3/include/openssl/pkcs12.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ssl2.h /usr/local/Cellar/libressl/2.8.3/include/openssl/pem2.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ssl23.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ssl3.h /usr/local/Cellar/libressl/2.8.3/include/openssl/x509v3.h /usr/local/Cellar/libressl/2.8.3/include/openssl/md5.h /usr/local/Cellar/libressl/2.8.3/include/openssl/pkcs7.h /usr/local/Cellar/libressl/2.8.3/include/openssl/x509.h /usr/local/Cellar/libressl/2.8.3/include/openssl/sha.h /usr/local/Cellar/libressl/2.8.3/include/openssl/dsa.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ecdsa.h /usr/local/Cellar/libressl/2.8.3/include/openssl/rsa.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOZlib/include/CNIOZlib.h /usr/local/Cellar/libressl/2.8.3/include/openssl/obj_mac.h /usr/local/Cellar/libressl/2.8.3/include/openssl/hmac.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ec.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/cpp_magic.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/ifaddrs-android.h /usr/local/Cellar/libressl/2.8.3/include/openssl/rand.h /usr/local/Cellar/libressl/2.8.3/include/openssl/conf.h /usr/local/Cellar/libressl/2.8.3/include/openssl/opensslconf.h /usr/local/Cellar/libressl/2.8.3/include/openssl/dh.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ecdh.h /usr/local/Cellar/libressl/2.8.3/include/openssl/lhash.h /usr/local/Cellar/libressl/2.8.3/include/openssl/stack.h /usr/local/Cellar/libressl/2.8.3/include/openssl/safestack.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ssl.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio-ssl.git-1370587408992578247/Sources/CNIOOpenSSL/include/c_nio_openssl.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/crypto.git-7980259129511365902/Sources/CCryptoOpenSSL/include/c_crypto_openssl.h /usr/local/Cellar/libressl/2.8.3/include/openssl/pem.h /usr/local/Cellar/libressl/2.8.3/include/openssl/bn.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIODarwin/include/CNIODarwin.h /usr/local/Cellar/libressl/2.8.3/include/openssl/bio.h /usr/local/Cellar/libressl/2.8.3/include/openssl/crypto.h /usr/local/Cellar/libressl/2.8.3/include/openssl/srtp.h /usr/local/Cellar/libressl/2.8.3/include/openssl/evp.h /usr/local/Cellar/libressl/2.8.3/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/2.8.3/include/openssl/buffer.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOHTTPParser/include/CNIOHTTPParser.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOHTTPParser/include/c_nio_http_parser.h /usr/local/Cellar/libressl/2.8.3/include/openssl/err.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/CNIOAtomics.h /usr/local/Cellar/libressl/2.8.3/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/2.8.3/include/openssl/objects.h /usr/local/Cellar/libressl/2.8.3/include/openssl/opensslv.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/2.8.3/include/openssl/x509_vfy.h /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio-ssl-support.git--2359138821295600615/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/checkouts/swift-nio-zlib-support.git--1071467962839356487/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/checkouts/crypto.git-7980259129511365902/Sources/CBase32/include/module.modulemap /Users/godemodegame/Desktop/ATMApp/.build/checkouts/crypto.git-7980259129511365902/Sources/CBcrypt/include/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
|
/**
* Copyright © Yurai Web Framework 2021
* License: MIT (https://github.com/YuraiWeb/yurai/blob/main/LICENSE)
* Author: Jacob Jensen (bausshf)
*/
module yurai.prebuilding.prebuildcontrollers;
void prebuildControllers()
{
import std.file : write, dirEntries, SpanMode, readText;
import std.algorithm : filter, startsWith, endsWith;
import std.array : split, replace, join;
import std.string : strip, format;
string[] controllerModules = [];
foreach (string name; dirEntries("controllers", SpanMode.depth).filter!(f => f.name.endsWith(".d")))
{
string content = readText(name);
auto lines = content.replace("\r", "\n").split("\n");
bool foundModuleStatement;
foreach (line; lines)
{
if (!line || !line.length)
{
continue;
}
auto entries = line.split(";");
foreach (ref entry; entries)
{
entry = entry.strip;
if (entry.startsWith("module "))
{
auto moduleName = entry[7 .. $].strip;
if (moduleName != "controllers")
{
controllerModules ~= "\"" ~ moduleName ~ "\"";
}
foundModuleStatement = true;
break;
}
}
if (foundModuleStatement)
{
break;
}
}
}
enum finalModule = `module yurai.prebuild.controllersmap;
enum Yurai_ControllerModules = [
%s
];`;
auto moduleCode = finalModule.format(controllerModules.join(",\r\n"));
write("prebuild/controllersmap.d", moduleCode);
}
|
D
|
/**
Compiler settings and abstraction.
Copyright: © 2013 rejectedsoftware e.K.
License: Subject to the terms of the MIT license, as written in the included LICENSE.txt file.
Authors: Sönke Ludwig
*/
module dub.compilers.compiler;
import dub.compilers.dmd;
import dub.compilers.gdc;
import dub.compilers.ldc;
import dub.internal.vibecompat.core.log;
import dub.internal.vibecompat.data.json;
import dub.internal.vibecompat.inet.path;
import std.algorithm;
import std.array;
import std.conv;
import std.exception;
import std.process;
static this()
{
registerCompiler(new DmdCompiler);
registerCompiler(new GdcCompiler);
registerCompiler(new LdcCompiler);
}
Compiler getCompiler(string name)
{
foreach (c; s_compilers)
if (c.name == name)
return c;
// try to match names like gdmd or gdc-2.61
if (name.canFind("dmd")) return getCompiler("dmd");
if (name.canFind("gdc")) return getCompiler("gdc");
if (name.canFind("ldc")) return getCompiler("ldc");
throw new Exception("Unknown compiler: "~name);
}
void registerCompiler(Compiler c)
{
s_compilers ~= c;
}
void warnOnSpecialCompilerFlags(string[] compiler_flags, string package_name, string config_name)
{
struct SpecialFlag {
string[] flags;
string alternative;
}
static immutable SpecialFlag[] s_specialFlags = [
{["-c", "-o-"], "Automatically issued by DUB, do not specify in package.json"},
{[ "-w", "-Wall", "-Werr"], `Use "buildRequirements" to control warning behavior`},
{["-property", "-fproperty"], "Using this flag may break building of dependencies and it will probably be removed from DMD in the future"},
{["-wi"], `Use the "buildRequirements" field to control warning behavior`},
{["-d", "-de", "-dw"], `Use the "buildRequirements" field to control deprecation behavior`},
{["-of"], `Use "targetPath" and "targetName" to customize the output file`},
{["-debug", "-fdebug", "-g"], "Call dub with --build=debug"},
{["-release", "-frelease", "-O", "-inline"], "Call dub with --build=release"},
{["-unittest", "-funittest"], "Call dub with --build=unittest"},
{["-lib"], `Use {"targetType": "staticLibrary"} or let dub manage this`},
{["-D"], "Call dub with --build=docs or --build=ddox"},
{["-X"], "Call dub with --build=ddox"},
{["-cov"], "Call dub with --build=cov or --build=unittest-cox"},
{["-profile"], "Call dub with --build=profile"},
{["-version="], `Use "versions" to specify version constants in a compiler independent way`},
{["-debug=", `Use "debugVersions" to specify version constants in a compiler independent way`]},
{["-I"], `Use "importPaths" to specify import paths in a compiler independent way`},
{["-J"], `Use "stringImportPaths" to specify import paths in a compiler independent way`},
];
bool got_preamble = false;
void outputPreamble()
{
if (got_preamble) return;
got_preamble = true;
logWarn("");
if (config_name.empty) logWarn("## Warning for package %s ##", package_name);
else logWarn("## Warning for package %s, configuration %s ##", package_name, config_name);
logWarn("");
logWarn("The following compiler flags have been specified in the package description");
logWarn("file. They are handled by DUB and direct use in packages is discouraged.");
logWarn("Alternatively, you can set the DFLAGS environment variable to pass custom flags");
logWarn("to the compiler, or use one of the suggestions below:");
logWarn("");
}
foreach (f; compiler_flags) {
foreach (sf; s_specialFlags) {
if (sf.flags.canFind!(sff => f == sff || (sff.endsWith("=") && f.startsWith(sff)))) {
outputPreamble();
logWarn("%s: %s", f, sf.alternative);
break;
}
}
}
if (got_preamble) logWarn("");
}
/**
Replaces each referenced import library by the appropriate linker flags.
This function tries to invoke "pkg-config" if possible and falls back to
direct flag translation if that fails.
*/
void resolveLibs(ref BuildSettings settings)
{
if (settings.libs.length == 0) return;
if (settings.targetType == TargetType.library || settings.targetType == TargetType.staticLibrary) {
logDiagnostic("Ignoring all import libraries for static library build.");
settings.libs = null;
version(Windows) settings.sourceFiles = settings.sourceFiles.filter!(f => !f.endsWith(".lib")).array;
}
try {
logDiagnostic("Trying to use pkg-config to resolve library flags for %s.", settings.libs);
auto libflags = execute(["pkg-config", "--libs"] ~ settings.libs.map!(l => "lib"~l)().array());
enforce(libflags.status == 0, "pkg-config exited with error code "~to!string(libflags.status));
foreach (f; libflags.output.split()) {
if (f.startsWith("-Wl,")) settings.addLFlags(f[4 .. $].split(","));
else settings.addLFlags(f);
}
settings.libs = null;
} catch (Exception e) {
logDiagnostic("pkg-config failed: %s", e.msg);
logDiagnostic("Falling back to direct -lxyz flags.");
}
}
interface Compiler {
@property string name() const;
BuildPlatform determinePlatform(ref BuildSettings settings, string compiler_binary, string arch_override = null);
/// Replaces high level fields with low level fields and converts
/// dmd flags to compiler-specific flags
void prepareBuildSettings(ref BuildSettings settings, BuildSetting supported_fields = BuildSetting.all);
/// Removes any dflags that match one of the BuildOptions values and populates the BuildSettings.options field.
void extractBuildOptions(ref BuildSettings settings);
/// Adds the appropriate flag to set a target path
void setTarget(ref BuildSettings settings, in BuildPlatform platform);
/// Invokes the compiler using the given flags
void invoke(in BuildSettings settings, in BuildPlatform platform);
/// Invokes the underlying linker directly
void invokeLinker(in BuildSettings settings, in BuildPlatform platform, string[] objects);
final protected void enforceBuildRequirements(ref BuildSettings settings)
{
settings.addOptions(BuildOptions.warningsAsErrors);
if (settings.requirements & BuildRequirements.allowWarnings) { settings.options &= ~BuildOptions.warningsAsErrors; settings.options |= BuildOptions.warnings; }
if (settings.requirements & BuildRequirements.silenceWarnings) settings.options &= ~(BuildOptions.warningsAsErrors|BuildOptions.warnings);
if (settings.requirements & BuildRequirements.disallowDeprecations) { settings.options &= ~(BuildOptions.ignoreDeprecations|BuildOptions.deprecationWarnings); settings.options |= BuildOptions.deprecationErrors; }
if (settings.requirements & BuildRequirements.silenceDeprecations) { settings.options &= ~(BuildOptions.deprecationErrors|BuildOptions.deprecationWarnings); settings.options |= BuildOptions.ignoreDeprecations; }
if (settings.requirements & BuildRequirements.disallowInlining) settings.options &= BuildOptions.inline;
if (settings.requirements & BuildRequirements.disallowOptimization) settings.options &= ~BuildOptions.optimize;
if (settings.requirements & BuildRequirements.requireBoundsCheck) settings.options &= ~BuildOptions.noBoundsChecks;
if (settings.requirements & BuildRequirements.requireContracts) settings.options &= ~BuildOptions.release;
if (settings.requirements & BuildRequirements.relaxProperties) settings.options &= ~BuildOptions.property;
}
}
/// BuildPlatform specific settings, like needed libraries or additional
/// include paths.
struct BuildSettings {
TargetType targetType;
string targetPath;
string targetName;
string workingDirectory;
string[] dflags;
string[] lflags;
string[] libs;
string[] sourceFiles;
string[] copyFiles;
string[] versions;
string[] debugVersions;
string[] importPaths;
string[] stringImportPaths;
string[] preGenerateCommands;
string[] postGenerateCommands;
string[] preBuildCommands;
string[] postBuildCommands;
BuildRequirements requirements;
BuildOptions options;
void addDFlags(in string[] value...) { dflags ~= value; }
void removeDFlags(in string[] value...) { remove(dflags, value); }
void addLFlags(in string[] value...) { lflags ~= value; }
void addLibs(in string[] value...) { add(libs, value); }
void addSourceFiles(in string[] value...) { add(sourceFiles, value); }
void removeSourceFiles(in string[] value...) { removePaths(sourceFiles, value); }
void addCopyFiles(in string[] value...) { add(copyFiles, value); }
void addVersions(in string[] value...) { add(versions, value); }
void addDebugVersions(in string[] value...) { add(debugVersions, value); }
void addImportPaths(in string[] value...) { add(importPaths, value); }
void addStringImportPaths(in string[] value...) { add(stringImportPaths, value); }
void addPreGenerateCommands(in string[] value...) { add(preGenerateCommands, value, false); }
void addPostGenerateCommands(in string[] value...) { add(postGenerateCommands, value, false); }
void addPreBuildCommands(in string[] value...) { add(preBuildCommands, value, false); }
void addPostBuildCommands(in string[] value...) { add(postBuildCommands, value, false); }
void addRequirements(in BuildRequirements[] value...) { foreach (v; value) this.requirements |= v; }
void addOptions(in BuildOptions[] value...) { foreach (v; value) this.options |= v; }
void removeOptions(in BuildOptions[] value...) { foreach (v; value) this.options &= ~v; }
// Adds vals to arr without adding duplicates.
private void add(ref string[] arr, in string[] vals, bool no_duplicates = true)
{
if (!no_duplicates) {
arr ~= vals;
return;
}
foreach (v; vals) {
bool found = false;
foreach (i; 0 .. arr.length)
if (arr[i] == v) {
found = true;
break;
}
if (!found) arr ~= v;
}
}
private void removePaths(ref string[] arr, in string[] vals)
{
bool matches(string s)
{
foreach (p; vals)
if (Path(s) == Path(p))
return true;
return false;
}
arr = arr.filter!(s => !matches(s))().array();
}
private void remove(ref string[] arr, in string[] vals)
{
bool matches(string s)
{
foreach (p; vals)
if (s == p)
return true;
return false;
}
arr = arr.filter!(s => !matches(s))().array();
}
}
/// Represents a platform a package can be build upon.
struct BuildPlatform {
/// e.g. ["posix", "windows"]
string[] platform;
/// e.g. ["x86", "x86_64"]
string[] architecture;
/// Canonical compiler name e.g. "dmd"
string compiler;
/// Compiler binary name e.g. "ldmd2"
string compilerBinary;
/// Build platforms can be specified via a string specification.
///
/// Specifications are build upon the following scheme, where each component
/// is optional (indicated by []), but the order is obligatory.
/// "[-platform][-architecture][-compiler]"
///
/// So the following strings are valid specifications:
/// "-windows-x86-dmd"
/// "-dmd"
/// "-arm"
/// "-arm-dmd"
/// "-windows-dmd"
///
/// Params:
/// specification = The specification being matched. It must be the empty string or start with a dash.
///
/// Returns:
/// true if the given specification matches this BuildPlatform, false otherwise. (The empty string matches)
///
bool matchesSpecification(const(char)[] specification) const {
if (specification.empty)
return true;
auto splitted=specification.splitter('-');
assert(!splitted.empty, "No valid platform specification! The leading hyphen is required!");
splitted.popFront(); // Drop leading empty match.
enforce(!splitted.empty, "Platform specification if present, must not be empty!");
if (platform.canFind(splitted.front)) {
splitted.popFront();
if(splitted.empty)
return true;
}
if (architecture.canFind(splitted.front)) {
splitted.popFront();
if(splitted.empty)
return true;
}
if (compiler == splitted.front) {
splitted.popFront();
enforce(splitted.empty, "No valid specification! The compiler has to be the last element!");
return true;
}
return false;
}
unittest {
auto platform=BuildPlatform(["posix", "linux"], ["x86_64"], "dmd");
assert(platform.matchesSpecification("-posix"));
assert(platform.matchesSpecification("-linux"));
assert(platform.matchesSpecification("-linux-dmd"));
assert(platform.matchesSpecification("-linux-x86_64-dmd"));
assert(platform.matchesSpecification("-x86_64"));
assert(!platform.matchesSpecification("-windows"));
assert(!platform.matchesSpecification("-ldc"));
assert(!platform.matchesSpecification("-windows-dmd"));
}
}
enum BuildSetting {
dflags = 1<<0,
lflags = 1<<1,
libs = 1<<2,
sourceFiles = 1<<3,
copyFiles = 1<<4,
versions = 1<<5,
debugVersions = 1<<6,
importPaths = 1<<7,
stringImportPaths = 1<<8,
options = 1<<9,
none = 0,
commandLine = dflags|copyFiles,
commandLineSeparate = commandLine|lflags,
all = dflags|lflags|libs|sourceFiles|copyFiles|versions|debugVersions|importPaths|stringImportPaths|options,
noOptions = all & ~options
}
enum TargetType {
autodetect,
none,
executable,
library,
sourceLibrary,
dynamicLibrary,
staticLibrary
}
enum BuildRequirements {
none = 0, /// No special requirements
allowWarnings = 1<<0, /// Warnings do not abort compilation
silenceWarnings = 1<<1, /// Don't show warnings
disallowDeprecations = 1<<2, /// Using deprecated features aborts compilation
silenceDeprecations = 1<<3, /// Don't show deprecation warnings
disallowInlining = 1<<4, /// Avoid function inlining, even in release builds
disallowOptimization = 1<<5, /// Avoid optimizations, even in release builds
requireBoundsCheck = 1<<6, /// Always perform bounds checks
requireContracts = 1<<7, /// Leave assertions and contracts enabled in release builds
relaxProperties = 1<<8, /// DEPRECATED: Do not enforce strict property handling (-property)
noDefaultFlags = 1<<9, /// Do not issue any of the default build flags (e.g. -debug, -w, -property etc.) - use only for development purposes
}
enum BuildOptions {
none = 0, /// Use compiler defaults
debug_ = 1<<0, /// Compile in debug mode (enables contracts, -debug)
release = 1<<1, /// Compile in release mode (disables assertions and bounds checks, -release)
coverage = 1<<2, /// Enable code coverage analysis (-cov)
debugInfo = 1<<3, /// Enable symbolic debug information (-g)
debugInfoC = 1<<4, /// Enable symbolic debug information in C compatible form (-gc)
alwaysStackFrame = 1<<5, /// Always generate a stack frame (-gs)
stackStomping = 1<<6, /// Perform stack stomping (-gx)
inline = 1<<7, /// Perform function inlining (-inline)
noBoundsChecks = 1<<8, /// Disable all bounds checking (-noboundscheck)
optimize = 1<<9, /// Enable optimizations (-O)
profile = 1<<10, /// Emit profiling code (-profile)
unittests = 1<<11, /// Compile unit tests (-unittest)
verbose = 1<<12, /// Verbose compiler output (-v)
ignoreUnknownPragmas = 1<<13, /// Ignores unknown pragmas during compilation (-ignore)
syntaxOnly = 1<<14, /// Don't generate object files (-o-)
warnings = 1<<15, /// Enable warnings (-wi)
warningsAsErrors = 1<<16, /// Treat warnings as errors (-w)
ignoreDeprecations = 1<<17, /// Do not warn about using deprecated features (-d)
deprecationWarnings = 1<<18, /// Warn about using deprecated features (-dw)
deprecationErrors = 1<<19, /// Stop compilation upon usage of deprecated features (-de)
property = 1<<20, /// DEPRECATED: Enforce property syntax (-property)
}
string getTargetFileName(in BuildSettings settings, in BuildPlatform platform)
{
assert(settings.targetName.length > 0, "No target name set.");
final switch (settings.targetType) {
case TargetType.autodetect: assert(false, "Configurations must have a concrete target type.");
case TargetType.none: return null;
case TargetType.sourceLibrary: return null;
case TargetType.executable:
if( platform.platform.canFind("windows") )
return settings.targetName ~ ".exe";
else return settings.targetName;
case TargetType.library:
case TargetType.staticLibrary:
if (platform.platform.canFind("windows") && platform.compiler == "dmd")
return settings.targetName ~ ".lib";
else return "lib" ~ settings.targetName ~ ".a";
case TargetType.dynamicLibrary:
if( platform.platform.canFind("windows") )
return settings.targetName ~ ".dll";
else return "lib" ~ settings.targetName ~ ".so";
}
}
private {
Compiler[] s_compilers;
}
|
D
|
instance Non_1504_Wegelagerer(Npc_Default)
{
name[0] = "Rozbójnik";
npcType = Npctype_ROGUE;
guild = GIL_None;
level = 9;
voice = 6;
id = 1504;
attribute[ATR_STRENGTH] = 65;
attribute[ATR_DEXTERITY] = 55;
attribute[ATR_MANA_MAX] = 0;
attribute[ATR_MANA] = 0;
attribute[ATR_HITPOINTS_MAX] = 205;
attribute[ATR_HITPOINTS] = 205;
Mdl_SetVisual(self,"HUMANS.MDS");
Mdl_SetVisualBody(self,"hum_body_Naked0",2,0,"Hum_Head_Bald",10,3,-1);
B_Scale(self);
Mdl_SetModelFatness(self,0);
fight_tactic = FAI_HUMAN_Strong;
Npc_SetTalentSkill(self,NPC_TALENT_1H,1);
EquipItem(self,ItMw_1H_Axe_Old_01);
CreateInvItems(self,ItMiNugget,54);
CreateInvItems(self,ItFo_Potion_Health_01,2);
CreateInvItem(self,ItFoBeer);
CreateInvItem(self,ore_bandits_message2);
daily_routine = Rtn_start_1504;
};
func void Rtn_start_1504()
{
Npc_SetPermAttitude(self,ATT_HOSTILE);
TA_Smalltalk(22,0,6,0,"OW_PATH_BANDITOS01");
TA_Smalltalk(6,0,22,0,"OW_PATH_BANDITOS01");
};
|
D
|
/+
+ Copyright © 2015 Rémi Thebault
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation files
+ (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge,
+ publish, distribute, sublicense, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+
+ The above copyright notice and this permission notice (including the
+ next paragraph) shall be included in all copies or substantial
+ portions of the Software.
+
+ 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+/
module wayland.client;
public import wayland.client.core;
public import wayland.client.protocol;
public import wayland.client.opaque_types;
public import wayland.client.util;
public import wayland.client.ifaces;
public import wayland.client.egl;
public import wayland.client.dy_loader;
|
D
|
an abnormal new mass of tissue that serves no purpose
|
D
|
module deimos.cef3.download_handler;
// Copyright (c) 2012 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.
//
extern(C) {
import deimos.cef3.base;
///
// Callback structure used to asynchronously continue a download.
///
struct cef_before_download_callback_t {
///
// Base structure.
///
cef_base_t base;
///
// Call to continue the download. Set |download_path| to the full file path
// for the download including the file name or leave blank to use the
// suggested name and the default temp directory. Set |show_dialog| to true
// (1) if you do wish to show the default "Save As" dialog.
///
extern(System) void function(cef_before_download_callback_t* self, const(cef_string_t)* download_path, int show_dialog) cont;
}
///
// Callback structure used to asynchronously cancel a download.
///
struct cef_download_item_callback_t {
///
// Base structure.
///
cef_base_t base;
///
// Call to cancel the download.
///
extern(System) void function(cef_download_item_callback_t* self) cancel;
}
///
// Structure used to handle file downloads. The functions of this structure will
// called on the browser process UI thread.
///
struct cef_download_handler_t {
///
// Base structure.
///
cef_base_t base;
///
// Called before a download begins. |suggested_name| is the suggested name for
// the download file. By default the download will be canceled. Execute
// |callback| either asynchronously or in this function to continue the
// download if desired. Do not keep a reference to |download_item| outside of
// this function.
///
extern(System) void function(cef_download_handler_t* self, cef_browser_t* browser, cef_download_item_t* download_item, const(cef_string_t)* suggested_name, cef_before_download_callback_t* callback) on_before_download;
///
// Called when a download's status or progress information has been updated.
// Execute |callback| either asynchronously or in this function to cancel the
// download if desired. Do not keep a reference to |download_item| outside of
// this function.
///
extern(System) void function(cef_download_handler_t* self, cef_browser_t* browser, cef_download_item_t* download_item, cef_download_item_callback_t* callback) on_download_updated;
}
}
|
D
|
/**
* Written in the D programming language.
* This module provides ELF-specific support for sections with shared libraries.
*
* Copyright: Copyright Martin Nowak 2012-2013.
* License: $(WEB www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
* Authors: Martin Nowak
* Source: $(DRUNTIMESRC src/rt/_sections_linux.d)
*/
module rt.sections_elf_shared;
version (CRuntime_Glibc) enum SharedELF = true;
else version (FreeBSD) enum SharedELF = true;
else enum SharedELF = false;
static if (SharedELF):
// debug = PRINTF;
import core.memory;
import core.stdc.stdio;
import core.stdc.stdlib : calloc, exit, free, malloc, EXIT_FAILURE;
import core.stdc.string : strlen;
version (linux)
{
import core.sys.linux.dlfcn;
import core.sys.linux.elf;
import core.sys.linux.link;
}
else version (FreeBSD)
{
import core.sys.freebsd.dlfcn;
import core.sys.freebsd.sys.elf;
import core.sys.freebsd.sys.link_elf;
}
else
{
static assert(0, "unimplemented");
}
import core.sys.posix.pthread;
import rt.deh;
import rt.dmain2;
import rt.minfo;
import rt.util.container.array;
import rt.util.container.hashtab;
alias DSO SectionGroup;
struct DSO
{
static int opApply(scope int delegate(ref DSO) dg)
{
foreach (dso; _loadedDSOs)
{
if (auto res = dg(*dso))
return res;
}
return 0;
}
static int opApplyReverse(scope int delegate(ref DSO) dg)
{
foreach_reverse (dso; _loadedDSOs)
{
if (auto res = dg(*dso))
return res;
}
return 0;
}
@property immutable(ModuleInfo*)[] modules() const
{
return _moduleGroup.modules;
}
@property ref inout(ModuleGroup) moduleGroup() inout
{
return _moduleGroup;
}
@property immutable(FuncTable)[] ehTables() const
{
return _ehTables[];
}
@property inout(void[])[] gcRanges() inout
{
return _gcRanges[];
}
private:
invariant()
{
assert(_moduleGroup.modules.length);
assert(_tlsMod || !_tlsSize);
}
immutable(FuncTable)[] _ehTables;
ModuleGroup _moduleGroup;
Array!(void[]) _gcRanges;
size_t _tlsMod;
size_t _tlsSize;
version (Shared)
{
Array!(void[]) _codeSegments; // array of code segments
Array!(DSO*) _deps; // D libraries needed by this DSO
void* _handle; // corresponding handle
}
}
/****
* Boolean flag set to true while the runtime is initialized.
*/
__gshared bool _isRuntimeInitialized;
version (FreeBSD) private __gshared void* dummy_ref;
/****
* Gets called on program startup just before GC is initialized.
*/
void initSections()
{
_isRuntimeInitialized = true;
// reference symbol to support weak linkage
version (FreeBSD) dummy_ref = &_d_dso_registry;
}
/***
* Gets called on program shutdown just after GC is terminated.
*/
void finiSections()
{
_isRuntimeInitialized = false;
}
alias ScanDG = void delegate(void* pbeg, void* pend) nothrow;
version (Shared)
{
/***
* Called once per thread; returns array of thread local storage ranges
*/
Array!(ThreadDSO)* initTLSRanges()
{
return &_loadedDSOs;
}
void finiTLSRanges(Array!(ThreadDSO)* tdsos)
{
tdsos.reset();
}
void scanTLSRanges(Array!(ThreadDSO)* tdsos, scope ScanDG dg) nothrow
{
foreach (ref tdso; *tdsos)
dg(tdso._tlsRange.ptr, tdso._tlsRange.ptr + tdso._tlsRange.length);
}
// interface for core.thread to inherit loaded libraries
void* pinLoadedLibraries() nothrow
{
auto res = cast(Array!(ThreadDSO)*)calloc(1, Array!(ThreadDSO).sizeof);
res.length = _loadedDSOs.length;
foreach (i, ref tdso; _loadedDSOs)
{
(*res)[i] = tdso;
if (tdso._addCnt)
{
// Increment the dlopen ref for explicitly loaded libraries to pin them.
.dlopen(linkMapForHandle(tdso._pdso._handle).l_name, RTLD_LAZY) !is null || assert(0);
(*res)[i]._addCnt = 1; // new array takes over the additional ref count
}
}
return res;
}
void unpinLoadedLibraries(void* p) nothrow
{
auto pary = cast(Array!(ThreadDSO)*)p;
// In case something failed we need to undo the pinning.
foreach (ref tdso; *pary)
{
if (tdso._addCnt)
{
auto handle = tdso._pdso._handle;
handle !is null || assert(0);
.dlclose(handle);
}
}
pary.reset();
.free(pary);
}
// Called before TLS ctors are ran, copy over the loaded libraries
// of the parent thread.
void inheritLoadedLibraries(void* p)
{
assert(_loadedDSOs.empty);
_loadedDSOs.swap(*cast(Array!(ThreadDSO)*)p);
.free(p);
}
// Called after all TLS dtors ran, decrements all remaining dlopen refs.
void cleanupLoadedLibraries()
{
foreach (ref tdso; _loadedDSOs)
{
if (tdso._addCnt == 0) continue;
auto handle = tdso._pdso._handle;
handle !is null || assert(0);
for (; tdso._addCnt > 0; --tdso._addCnt)
.dlclose(handle);
}
_loadedDSOs.reset();
}
}
else
{
/***
* Called once per thread; returns array of thread local storage ranges
*/
Array!(void[])* initTLSRanges()
{
return &_tlsRanges;
}
void finiTLSRanges(Array!(void[])* rngs)
{
rngs.reset();
}
void scanTLSRanges(Array!(void[])* rngs, scope ScanDG dg) nothrow
{
foreach (rng; *rngs)
dg(rng.ptr, rng.ptr + rng.length);
}
}
private:
// start of linked list for ModuleInfo references
version (FreeBSD) deprecated extern (C) __gshared void* _Dmodule_ref;
version (Shared)
{
/*
* Array of thread local DSO metadata for all libraries loaded and
* initialized in this thread.
*
* Note:
* A newly spawned thread will inherit these libraries.
* Note:
* We use an array here to preserve the order of
* initialization. If that became a performance issue, we
* could use a hash table and enumerate the DSOs during
* loading so that the hash table values could be sorted when
* necessary.
*/
struct ThreadDSO
{
DSO* _pdso;
static if (_pdso.sizeof == 8) uint _refCnt, _addCnt;
else static if (_pdso.sizeof == 4) ushort _refCnt, _addCnt;
else static assert(0, "unimplemented");
void[] _tlsRange;
alias _pdso this;
}
Array!(ThreadDSO) _loadedDSOs;
/*
* Set to true during rt_loadLibrary/rt_unloadLibrary calls.
*/
bool _rtLoading;
/*
* Hash table to map link_map* to corresponding DSO*.
* The hash table is protected by a Mutex.
*/
__gshared pthread_mutex_t _handleToDSOMutex;
__gshared HashTab!(void*, DSO*) _handleToDSO;
/*
* Section in executable that contains copy relocations.
* Might be null when druntime is dynamically loaded by a C host.
*/
__gshared const(void)[] _copyRelocSection;
}
else
{
/*
* Static DSOs loaded by the runtime linker. This includes the
* executable. These can't be unloaded.
*/
__gshared Array!(DSO*) _loadedDSOs;
/*
* Thread local array that contains TLS memory ranges for each
* library initialized in this thread.
*/
Array!(void[]) _tlsRanges;
enum _rtLoading = false;
}
///////////////////////////////////////////////////////////////////////////////
// Compiler to runtime interface.
///////////////////////////////////////////////////////////////////////////////
/*
* This data structure is generated by the compiler, and then passed to
* _d_dso_registry().
*/
struct CompilerDSOData
{
size_t _version; // currently 1
void** _slot; // can be used to store runtime data
immutable(object.ModuleInfo*)* _minfo_beg, _minfo_end; // array of modules in this object file
immutable(rt.deh.FuncTable)* _deh_beg, _deh_end; // array of exception handling data
}
T[] toRange(T)(T* beg, T* end) { return beg[0 .. end - beg]; }
/* For each shared library and executable, the compiler generates code that
* sets up CompilerDSOData and calls _d_dso_registry().
* A pointer to that code is inserted into both the .ctors and .dtors
* segment so it gets called by the loader on startup and shutdown.
*/
extern(C) void _d_dso_registry(CompilerDSOData* data)
{
// only one supported currently
data._version >= 1 || assert(0, "corrupt DSO data version");
// no backlink => register
if (*data._slot is null)
{
immutable firstDSO = _loadedDSOs.empty;
if (firstDSO) initLocks();
DSO* pdso = cast(DSO*).calloc(1, DSO.sizeof);
assert(typeid(DSO).init().ptr is null);
*data._slot = pdso; // store backlink in library record
pdso._moduleGroup = ModuleGroup(toRange(data._minfo_beg, data._minfo_end));
pdso._ehTables = toRange(data._deh_beg, data._deh_end);
dl_phdr_info info = void;
findDSOInfoForAddr(data._slot, &info) || assert(0);
scanSegments(info, pdso);
version (Shared)
{
auto handle = handleForAddr(data._slot);
if (firstDSO)
{
/// Assert that the first loaded DSO is druntime itself. Use a
/// local druntime symbol (rt_get_bss_start) to get the handle.
assert(handleForAddr(data._slot) == handleForAddr(&rt_get_bss_start));
_copyRelocSection = getCopyRelocSection();
}
checkModuleCollisions(info, pdso._moduleGroup.modules, _copyRelocSection);
getDependencies(info, pdso._deps);
pdso._handle = handle;
setDSOForHandle(pdso, pdso._handle);
if (!_rtLoading)
{
/* This DSO was not loaded by rt_loadLibrary which
* happens for all dependencies of an executable or
* the first dlopen call from a C program.
* In this case we add the DSO to the _loadedDSOs of this
* thread with a refCnt of 1 and call the TlsCtors.
*/
immutable ushort refCnt = 1, addCnt = 0;
auto tlsRng = getTLSRange(pdso._tlsMod, pdso._tlsSize);
_loadedDSOs.insertBack(ThreadDSO(pdso, refCnt, addCnt, tlsRng));
}
}
else
{
foreach (p; _loadedDSOs) assert(p !is pdso);
_loadedDSOs.insertBack(pdso);
_tlsRanges.insertBack(getTLSRange(pdso._tlsMod, pdso._tlsSize));
}
// don't initialize modules before rt_init was called (see Bugzilla 11378)
if (_isRuntimeInitialized)
{
registerGCRanges(pdso);
// rt_loadLibrary will run tls ctors, so do this only for dlopen
immutable runTlsCtors = !_rtLoading;
runModuleConstructors(pdso, runTlsCtors);
}
}
// has backlink => unregister
else
{
DSO* pdso = cast(DSO*)*data._slot;
*data._slot = null;
// don't finalizes modules after rt_term was called (see Bugzilla 11378)
if (_isRuntimeInitialized)
{
// rt_unloadLibrary already ran tls dtors, so do this only for dlclose
immutable runTlsDtors = !_rtLoading;
runModuleDestructors(pdso, runTlsDtors);
unregisterGCRanges(pdso);
// run finalizers after module dtors (same order as in rt_term)
version (Shared) runFinalizers(pdso);
}
version (Shared)
{
if (!_rtLoading)
{
/* This DSO was not unloaded by rt_unloadLibrary so we
* have to remove it from _loadedDSOs here.
*/
foreach (i, ref tdso; _loadedDSOs)
{
if (tdso._pdso == pdso)
{
_loadedDSOs.remove(i);
break;
}
}
}
assert(pdso._handle == handleForAddr(data._slot));
unsetDSOForHandle(pdso, pdso._handle);
pdso._handle = null;
}
else
{
// static DSOs are unloaded in reverse order
assert(pdso._tlsSize == _tlsRanges.back.length);
_tlsRanges.popBack();
assert(pdso == _loadedDSOs.back);
_loadedDSOs.popBack();
}
freeDSO(pdso);
if (_loadedDSOs.empty) finiLocks(); // last DSO
}
}
///////////////////////////////////////////////////////////////////////////////
// dynamic loading
///////////////////////////////////////////////////////////////////////////////
// Shared D libraries are only supported when linking against a shared druntime library.
version (Shared)
{
ThreadDSO* findThreadDSO(DSO* pdso)
{
foreach (ref tdata; _loadedDSOs)
if (tdata._pdso == pdso) return &tdata;
return null;
}
void incThreadRef(DSO* pdso, bool incAdd)
{
if (auto tdata = findThreadDSO(pdso)) // already initialized
{
if (incAdd && ++tdata._addCnt > 1) return;
++tdata._refCnt;
}
else
{
foreach (dep; pdso._deps)
incThreadRef(dep, false);
immutable ushort refCnt = 1, addCnt = incAdd ? 1 : 0;
auto tlsRng = getTLSRange(pdso._tlsMod, pdso._tlsSize);
_loadedDSOs.insertBack(ThreadDSO(pdso, refCnt, addCnt, tlsRng));
pdso._moduleGroup.runTlsCtors();
}
}
void decThreadRef(DSO* pdso, bool decAdd)
{
auto tdata = findThreadDSO(pdso);
tdata !is null || assert(0);
!decAdd || tdata._addCnt > 0 || assert(0, "Mismatching rt_unloadLibrary call.");
if (decAdd && --tdata._addCnt > 0) return;
if (--tdata._refCnt > 0) return;
pdso._moduleGroup.runTlsDtors();
foreach (i, ref td; _loadedDSOs)
if (td._pdso == pdso) _loadedDSOs.remove(i);
foreach (dep; pdso._deps)
decThreadRef(dep, false);
}
extern(C) void* rt_loadLibrary(const char* name)
{
immutable save = _rtLoading;
_rtLoading = true;
scope (exit) _rtLoading = save;
auto handle = .dlopen(name, RTLD_LAZY);
if (handle is null) return null;
// if it's a D library
if (auto pdso = dsoForHandle(handle))
incThreadRef(pdso, true);
return handle;
}
extern(C) int rt_unloadLibrary(void* handle)
{
if (handle is null) return false;
immutable save = _rtLoading;
_rtLoading = true;
scope (exit) _rtLoading = save;
// if it's a D library
if (auto pdso = dsoForHandle(handle))
decThreadRef(pdso, true);
return .dlclose(handle) == 0;
}
}
///////////////////////////////////////////////////////////////////////////////
// helper functions
///////////////////////////////////////////////////////////////////////////////
void initLocks()
{
version (Shared)
!pthread_mutex_init(&_handleToDSOMutex, null) || assert(0);
}
void finiLocks()
{
version (Shared)
!pthread_mutex_destroy(&_handleToDSOMutex) || assert(0);
}
void runModuleConstructors(DSO* pdso, bool runTlsCtors)
{
pdso._moduleGroup.sortCtors();
pdso._moduleGroup.runCtors();
if (runTlsCtors) pdso._moduleGroup.runTlsCtors();
}
void runModuleDestructors(DSO* pdso, bool runTlsDtors)
{
if (runTlsDtors) pdso._moduleGroup.runTlsDtors();
pdso._moduleGroup.runDtors();
}
void registerGCRanges(DSO* pdso)
{
foreach (rng; pdso._gcRanges)
GC.addRange(rng.ptr, rng.length);
}
void unregisterGCRanges(DSO* pdso)
{
foreach (rng; pdso._gcRanges)
GC.removeRange(rng.ptr);
}
version (Shared) void runFinalizers(DSO* pdso)
{
foreach (seg; pdso._codeSegments)
GC.runFinalizers(seg);
}
void freeDSO(DSO* pdso)
{
pdso._gcRanges.reset();
version (Shared) pdso._codeSegments.reset();
.free(pdso);
}
version (Shared)
{
nothrow:
link_map* linkMapForHandle(void* handle)
{
link_map* map;
dlinfo(handle, RTLD_DI_LINKMAP, &map) == 0 || assert(0);
return map;
}
link_map* exeLinkMap(link_map* map)
{
assert(map);
while (map.l_prev !is null)
map = map.l_prev;
return map;
}
DSO* dsoForHandle(void* handle)
{
DSO* pdso;
!pthread_mutex_lock(&_handleToDSOMutex) || assert(0);
if (auto ppdso = handle in _handleToDSO)
pdso = *ppdso;
!pthread_mutex_unlock(&_handleToDSOMutex) || assert(0);
return pdso;
}
void setDSOForHandle(DSO* pdso, void* handle)
{
!pthread_mutex_lock(&_handleToDSOMutex) || assert(0);
assert(handle !in _handleToDSO);
_handleToDSO[handle] = pdso;
!pthread_mutex_unlock(&_handleToDSOMutex) || assert(0);
}
void unsetDSOForHandle(DSO* pdso, void* handle)
{
!pthread_mutex_lock(&_handleToDSOMutex) || assert(0);
assert(_handleToDSO[handle] == pdso);
_handleToDSO.remove(handle);
!pthread_mutex_unlock(&_handleToDSOMutex) || assert(0);
}
void getDependencies(in ref dl_phdr_info info, ref Array!(DSO*) deps)
{
// get the entries of the .dynamic section
ElfW!"Dyn"[] dyns;
foreach (ref phdr; info.dlpi_phdr[0 .. info.dlpi_phnum])
{
if (phdr.p_type == PT_DYNAMIC)
{
auto p = cast(ElfW!"Dyn"*)(info.dlpi_addr + phdr.p_vaddr);
dyns = p[0 .. phdr.p_memsz / ElfW!"Dyn".sizeof];
break;
}
}
// find the string table which contains the sonames
const(char)* strtab;
foreach (dyn; dyns)
{
if (dyn.d_tag == DT_STRTAB)
{
version (linux)
strtab = cast(const(char)*)dyn.d_un.d_ptr;
else version (FreeBSD)
strtab = cast(const(char)*)(info.dlpi_addr + dyn.d_un.d_ptr); // relocate
else
static assert(0, "unimplemented");
break;
}
}
foreach (dyn; dyns)
{
immutable tag = dyn.d_tag;
if (!(tag == DT_NEEDED || tag == DT_AUXILIARY || tag == DT_FILTER))
continue;
// soname of the dependency
auto name = strtab + dyn.d_un.d_val;
// get handle without loading the library
auto handle = handleForName(name);
// the runtime linker has already loaded all dependencies
if (handle is null) assert(0);
// if it's a D library
if (auto pdso = dsoForHandle(handle))
deps.insertBack(pdso); // append it to the dependencies
}
}
void* handleForName(const char* name)
{
auto handle = .dlopen(name, RTLD_NOLOAD | RTLD_LAZY);
if (handle !is null) .dlclose(handle); // drop reference count
return handle;
}
}
///////////////////////////////////////////////////////////////////////////////
// Elf program header iteration
///////////////////////////////////////////////////////////////////////////////
/************
* Scan segments in Linux dl_phdr_info struct and store
* the TLS and writeable data segments in *pdso.
*/
void scanSegments(in ref dl_phdr_info info, DSO* pdso)
{
foreach (ref phdr; info.dlpi_phdr[0 .. info.dlpi_phnum])
{
switch (phdr.p_type)
{
case PT_LOAD:
if (phdr.p_flags & PF_W) // writeable data segment
{
auto beg = cast(void*)(info.dlpi_addr + phdr.p_vaddr);
pdso._gcRanges.insertBack(beg[0 .. phdr.p_memsz]);
}
version (Shared) if (phdr.p_flags & PF_X) // code segment
{
auto beg = cast(void*)(info.dlpi_addr + phdr.p_vaddr);
pdso._codeSegments.insertBack(beg[0 .. phdr.p_memsz]);
}
break;
case PT_TLS: // TLS segment
assert(!pdso._tlsSize); // is unique per DSO
pdso._tlsMod = info.dlpi_tls_modid;
pdso._tlsSize = phdr.p_memsz;
break;
default:
break;
}
}
}
/**************************
* Input:
* result where the output is to be written; dl_phdr_info is a Linux struct
* Returns:
* true if found, and *result is filled in
* References:
* http://linux.die.net/man/3/dl_iterate_phdr
*/
version (linux) bool findDSOInfoForAddr(in void* addr, dl_phdr_info* result=null) nothrow @nogc
{
static struct DG { const(void)* addr; dl_phdr_info* result; }
extern(C) int callback(dl_phdr_info* info, size_t sz, void* arg) nothrow @nogc
{
auto p = cast(DG*)arg;
if (findSegmentForAddr(*info, p.addr))
{
if (p.result !is null) *p.result = *info;
return 1; // break;
}
return 0; // continue iteration
}
auto dg = DG(addr, result);
/* Linux function that walks through the list of an application's shared objects and
* calls 'callback' once for each object, until either all shared objects
* have been processed or 'callback' returns a nonzero value.
*/
return dl_iterate_phdr(&callback, &dg) != 0;
}
else version (FreeBSD) bool findDSOInfoForAddr(in void* addr, dl_phdr_info* result=null) nothrow @nogc
{
return !!_rtld_addr_phdr(addr, result);
}
/*********************************
* Determine if 'addr' lies within shared object 'info'.
* If so, return true and fill in 'result' with the corresponding ELF program header.
*/
bool findSegmentForAddr(in ref dl_phdr_info info, in void* addr, ElfW!"Phdr"* result=null) nothrow @nogc
{
if (addr < cast(void*)info.dlpi_addr) // less than base address of object means quick reject
return false;
foreach (ref phdr; info.dlpi_phdr[0 .. info.dlpi_phnum])
{
auto beg = cast(void*)(info.dlpi_addr + phdr.p_vaddr);
if (cast(size_t)(addr - beg) < phdr.p_memsz)
{
if (result !is null) *result = phdr;
return true;
}
}
return false;
}
version (linux) import core.sys.linux.errno : program_invocation_name;
// should be in core.sys.freebsd.stdlib
version (FreeBSD) extern(C) const(char)* getprogname() nothrow @nogc;
@property const(char)* progname() nothrow @nogc
{
version (linux) return program_invocation_name;
version (FreeBSD) return getprogname();
}
nothrow
const(char)[] dsoName(const char* dlpi_name)
{
// the main executable doesn't have a name in its dlpi_name field
const char* p = dlpi_name[0] != 0 ? dlpi_name : progname;
return p[0 .. strlen(p)];
}
extern(C)
{
void* rt_get_bss_start() @nogc nothrow;
void* rt_get_end() @nogc nothrow;
}
/// get the BSS section of the executable to check for copy relocations
const(void)[] getCopyRelocSection() nothrow
{
auto bss_start = rt_get_bss_start();
auto bss_end = rt_get_end();
immutable bss_size = bss_end - bss_start;
/**
Check whether __bss_start/_end both lie within the executable DSO.same DSO.
When a C host program dynamically loads druntime, i.e. it isn't linked
against, __bss_start/_end might be defined in different DSOs, b/c the
linker creates those symbols only when they are used.
But as there are no copy relocations when dynamically loading a shared
library, we can simply return a null bss range in that case.
*/
if (bss_size <= 0)
return null;
version (linux)
enum ElfW!"Addr" exeBaseAddr = 0;
else version (FreeBSD)
enum ElfW!"Addr" exeBaseAddr = 0;
dl_phdr_info info = void;
findDSOInfoForAddr(bss_start, &info) || assert(0);
if (info.dlpi_addr != exeBaseAddr)
return null;
findDSOInfoForAddr(bss_end - 1, &info) || assert(0);
if (info.dlpi_addr != exeBaseAddr)
return null;
return bss_start[0 .. bss_size];
}
/**
* Check for module collisions. A module in a shared library collides
* with an existing module if it's ModuleInfo is interposed (search
* symbol interposition) by another DSO. Therefor two modules with the
* same name do not collide if their DSOs are in separate symbol resolution
* chains.
*/
void checkModuleCollisions(in ref dl_phdr_info info, in immutable(ModuleInfo)*[] modules,
in void[] copyRelocSection) nothrow
in { assert(modules.length); }
body
{
immutable(ModuleInfo)* conflicting;
foreach (m; modules)
{
auto addr = cast(const(void*))m;
if (cast(size_t)(addr - copyRelocSection.ptr) < copyRelocSection.length)
{
// Module is in .bss of the exe because it was copy relocated
}
else if (!findSegmentForAddr(info, addr))
{
// Module is in another DSO
conflicting = m;
break;
}
}
if (conflicting !is null)
{
dl_phdr_info other=void;
findDSOInfoForAddr(conflicting, &other) || assert(0);
auto modname = conflicting.name;
auto loading = dsoName(info.dlpi_name);
auto existing = dsoName(other.dlpi_name);
fprintf(stderr, "Fatal Error while loading '%.*s':\n\tThe module '%.*s' is already defined in '%.*s'.\n",
cast(int)loading.length, loading.ptr,
cast(int)modname.length, modname.ptr,
cast(int)existing.length, existing.ptr);
import core.stdc.stdlib : _Exit;
_Exit(1);
}
}
/**************************
* Input:
* addr an internal address of a DSO
* Returns:
* the dlopen handle for that DSO or null if addr is not within a loaded DSO
*/
version (Shared) void* handleForAddr(void* addr)
{
Dl_info info = void;
if (dladdr(addr, &info) != 0)
return handleForName(info.dli_fname);
return null;
}
///////////////////////////////////////////////////////////////////////////////
// TLS module helper
///////////////////////////////////////////////////////////////////////////////
/*
* Returns: the TLS memory range for a given module and the calling
* thread or null if that module has no TLS.
*
* Note: This will cause the TLS memory to be eagerly allocated.
*/
struct tls_index
{
size_t ti_module;
size_t ti_offset;
}
extern(C) void* __tls_get_addr(tls_index* ti);
/* The dynamic thread vector (DTV) pointers may point 0x8000 past the start of
* each TLS block. This is at least true for PowerPC and Mips platforms.
* See: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/powerpc/dl-tls.h;h=f7cf6f96ebfb505abfd2f02be0ad0e833107c0cd;hb=HEAD#l34
* https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/mips/dl-tls.h;h=93a6dc050cb144b9f68b96fb3199c60f5b1fcd18;hb=HEAD#l32
*/
version(X86)
enum TLS_DTV_OFFSET = 0x;
else version(X86_64)
enum TLS_DTV_OFFSET = 0x;
else version(ARM)
enum TLS_DTV_OFFSET = 0x;
else version(AArch64)
enum TLS_DTV_OFFSET = 0x;
else version(SPARC)
enum TLS_DTV_OFFSET = 0x;
else version(SPARC64)
enum TLS_DTV_OFFSET = 0x;
else version(PPC)
enum TLS_DTV_OFFSET = 0x8000;
else version(PPC64)
enum TLS_DTV_OFFSET = 0x8000;
else version(MIPS)
enum TLS_DTV_OFFSET = 0x8000;
else version(MIPS64)
enum TLS_DTV_OFFSET = 0x8000;
else
static assert( false, "Platform not supported." );
void[] getTLSRange(size_t mod, size_t sz)
{
if (mod == 0)
return null;
// base offset
auto ti = tls_index(mod, 0);
return (__tls_get_addr(&ti)-TLS_DTV_OFFSET)[0 .. sz];
}
|
D
|
any evidence that helps to establish the falsity of something
a willful perversion of facts
the act of rendering something false as by fraudulent changes (of documents or measures etc.) or counterfeiting
the act of determining that something is false
|
D
|
import std.datetime;
import std.conv;
import std.array;
import std.stdio;
import std.string : format;
import mqttd;
shared static this()
{
import vibe.core.log : setLogFormat, FileLogger;
import vibe.core.core : sleep, runTask;
import core.time;
setLogFormat(FileLogger.Format.threadTime);
auto settings = Settings();
settings.clientId = "publisher";
auto mqtt = new MqttClient(settings);
mqtt.connect();
auto publisherQ0 = runTask(()
{
while (mqtt.connected)
{
mqtt.publish("chat/simple", "I'm still here!!!");
sleep(2.seconds());
}
});
auto publisherQ1 = runTask(()
{
sleep(1.seconds());
while (mqtt.connected)
{
mqtt.publish("chat/qos1", "Ack required", QoSLevel.QoS1);
sleep(2.seconds());
}
});
}
|
D
|
/**
IndexedArray
Copyright: (c) Enalye 2017
License: Zlib
Authors: Enalye
*/
module atelier.core.indexedarray;
import std.parallelism;
import std.range;
import std.typecons;
/**
Special Array that remove fragmentation while keeping indexes valid.
*/
class IndexedArray(T, uint _capacity, bool _useParallelism = false) {
private uint _dataTop = 0u;
private uint _availableIndexesTop = 0u;
private uint _removeTop = 0u;
private T[_capacity] _dataTable;
private uint[_capacity] _availableIndexes;
private uint[_capacity] _translationTable;
private uint[_capacity] _reverseTranslationTable;
private uint[_capacity] _removeTable;
@property {
uint length() const {
return _dataTop;
}
uint capacity() const {
return _capacity;
}
ref T[_capacity] data() {
return _dataTable;
}
}
uint push(T value) {
uint index;
if ((_dataTop + 1u) == _capacity) {
throw new Exception("IndexedArray overload");
}
if (_availableIndexesTop) {
//Take out the last available index on the list.
_availableIndexesTop--;
index = _availableIndexes[_availableIndexesTop];
}
else {
//Or use a new id.
index = _dataTop;
}
//Add the value to the data stack.
_dataTable[_dataTop] = value;
_translationTable[index] = _dataTop;
_reverseTranslationTable[_dataTop] = index;
++_dataTop;
return index;
}
void pop(uint index) {
uint valueIndex = _translationTable[index];
//Push the index on the available indexes stack.
_availableIndexes[_availableIndexesTop] = index;
_availableIndexesTop++;
//Invalidate the index.
_translationTable[index] = -1;
//Take the top value on the stack and fill the gap.
_dataTop--;
if (valueIndex < _dataTop) {
uint userIndex = _reverseTranslationTable[_dataTop];
_dataTable[valueIndex] = _dataTable[_dataTop];
_translationTable[userIndex] = valueIndex;
_reverseTranslationTable[valueIndex] = userIndex;
}
}
void reset() {
_dataTop = 0u;
_availableIndexesTop = 0u;
_removeTop = 0u;
}
void markInternalForRemoval(uint index) {
synchronized {
_removeTable[_removeTop] = _reverseTranslationTable[index];
_removeTop++;
}
}
void markForRemoval(uint index) {
_removeTable[_removeTop] = index;
_removeTop++;
}
void sweepMarkedData() {
for (uint i = 0u; i < _removeTop; i++) {
pop(_removeTable[i]);
}
_removeTop = 0u;
}
static if (_useParallelism) {
int opApply(int delegate(ref T) dlg) {
int result;
foreach (i; parallel(iota(_dataTop))) {
result = dlg(_dataTable[i]);
if (result)
break;
}
return result;
}
}
else {
int opApply(int delegate(ref T) dlg) {
int result;
foreach (i; 0u .. _dataTop) {
result = dlg(_dataTable[i]);
if (result)
break;
}
return result;
}
}
int opApply(int delegate(const ref T) dlg) const {
int result;
foreach (i; 0u .. _dataTop) {
result = dlg(_dataTable[i]);
if (result)
break;
}
return result;
}
static if (_useParallelism) {
int opApply(int delegate(ref T, uint) dlg) {
int result;
foreach (i; parallel(iota(_dataTop))) {
result = dlg(_dataTable[i], i);
if (result)
break;
}
return result;
}
}
else {
int opApply(int delegate(ref T, uint) dlg) {
int result;
foreach (i; 0u .. _dataTop) {
result = dlg(_dataTable[i], i);
if (result)
break;
}
return result;
}
}
int opApply(int delegate(const ref T, uint) dlg) const {
int result;
foreach (i; 0u .. _dataTop) {
result = dlg(_dataTable[i], i);
if (result)
break;
}
return result;
}
int opApply(int delegate(const Tuple!(const uint, const T)) dlg) const {
int result;
foreach (i; 0u .. _dataTop) {
result = dlg(tuple!(const uint, const T)(_reverseTranslationTable[i], _dataTable[i]));
if (result)
break;
}
return result;
}
T opIndex(uint index) {
return _dataTable[_translationTable[index]];
}
bool has(uint index) {
if (index > _dataTop)
return false;
if (_translationTable[index] == -1)
return false;
return true;
}
/// Returns the first element in the list
T first() {
assert(_dataTop > 0);
return _dataTable[0];
}
/// Returns the last element in the list
T last() {
assert(_dataTop > 0);
return _dataTable[_dataTop - 1];
}
}
|
D
|
import std.stdio, std.algorithm, std.conv, std.array, std.string;
void main()
{
auto S = readln.chomp.to!(char[]);
auto N = S.length;
long r;
foreach (i, c; S) {
if (c == 'U') {
r += i*2 + N-i-1;
} else {
r += (N-i-1)*2 + i;
}
}
writeln(r);
}
|
D
|
/Users/cedricnicolas/Desktop/JustGrow/Build/Intermediates/JustGrow.build/Debug-iphoneos/JustGrow.build/Objects-normal/arm64/ViewController.o : /Users/cedricnicolas/Desktop/JustGrow/JustGrow/AppDelegate.swift /Users/cedricnicolas/Desktop/JustGrow/JustGrow/ViewController.swift /Users/cedricnicolas/Desktop/JustGrow/JustGrow/aboutUs.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/SwiftOnoneSupport.swiftmodule
/Users/cedricnicolas/Desktop/JustGrow/Build/Intermediates/JustGrow.build/Debug-iphoneos/JustGrow.build/Objects-normal/arm64/ViewController~partial.swiftmodule : /Users/cedricnicolas/Desktop/JustGrow/JustGrow/AppDelegate.swift /Users/cedricnicolas/Desktop/JustGrow/JustGrow/ViewController.swift /Users/cedricnicolas/Desktop/JustGrow/JustGrow/aboutUs.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/SwiftOnoneSupport.swiftmodule
/Users/cedricnicolas/Desktop/JustGrow/Build/Intermediates/JustGrow.build/Debug-iphoneos/JustGrow.build/Objects-normal/arm64/ViewController~partial.swiftdoc : /Users/cedricnicolas/Desktop/JustGrow/JustGrow/AppDelegate.swift /Users/cedricnicolas/Desktop/JustGrow/JustGrow/ViewController.swift /Users/cedricnicolas/Desktop/JustGrow/JustGrow/aboutUs.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/SwiftOnoneSupport.swiftmodule
|
D
|
/Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/.build/debug/FileKit.build/FileSystemWatcher.swift.o : /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Array+File.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/ArrayFile.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Bundle+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Data+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/DataFile.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/DataType.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Dictionary+File.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/DictionaryFile.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/DirectoryEnumerator.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/DispatchEvent.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/DispatchWatcher.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/File.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileKitError.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FilePermissions.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileProtection.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileSystemEvent.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileSystemEventStream.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileSystemWatcher.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileType.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Image+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/ImageFile.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/NSArray+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/NSData+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/NSDataFile.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/NSDictionary+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/NSString+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Operators.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Path.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Process+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/RelativePathType.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/String+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/TextFile.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 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/.build/debug/CYaml.build/module.modulemap /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/Dispatch.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/CoreGraphics.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/AppKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/QuartzCore.swiftmodule /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/CoreImage.swiftmodule
/Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/.build/debug/FileKit.build/FileSystemWatcher~partial.swiftmodule : /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Array+File.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/ArrayFile.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Bundle+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Data+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/DataFile.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/DataType.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Dictionary+File.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/DictionaryFile.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/DirectoryEnumerator.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/DispatchEvent.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/DispatchWatcher.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/File.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileKitError.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FilePermissions.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileProtection.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileSystemEvent.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileSystemEventStream.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileSystemWatcher.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileType.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Image+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/ImageFile.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/NSArray+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/NSData+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/NSDataFile.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/NSDictionary+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/NSString+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Operators.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Path.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Process+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/RelativePathType.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/String+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/TextFile.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 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/.build/debug/CYaml.build/module.modulemap /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/Dispatch.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/CoreGraphics.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/AppKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/QuartzCore.swiftmodule /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/CoreImage.swiftmodule
/Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/.build/debug/FileKit.build/FileSystemWatcher~partial.swiftdoc : /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Array+File.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/ArrayFile.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Bundle+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Data+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/DataFile.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/DataType.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Dictionary+File.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/DictionaryFile.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/DirectoryEnumerator.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/DispatchEvent.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/DispatchWatcher.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/File.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileKitError.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FilePermissions.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileProtection.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileSystemEvent.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileSystemEventStream.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileSystemWatcher.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/FileType.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Image+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/ImageFile.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/NSArray+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/NSData+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/NSDataFile.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/NSDictionary+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/NSString+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Operators.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Path.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/Process+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/RelativePathType.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/String+FileKit.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/FileKit-4.0.2/Sources/TextFile.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 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/.build/debug/CYaml.build/module.modulemap /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/Dispatch.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/CoreGraphics.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/AppKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/QuartzCore.swiftmodule /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/CoreImage.swiftmodule
|
D
|
/*
threading.thread provides a module handling simple thread management.
*/
module threading.thread;
// version = THREAD_TEST;
import core.thread;
version (THREAD_TEST) {
import std.stdio : writeln, writefln;
}
/**
* The event handler used for thread start events.
* Thread start events are fired whenever a thread is created and started using the createThread() function.
*/
class ThreadStartEvent {
private:
/**
* The function pointer.
*/
void function() F;
/**
* The delegate pointer.
*/
void delegate() D;
public:
/**
* Creates a new instance of ThreadStartEvent.
*/
this(void function() F) {
this.F = F;
}
/**
* Creates a new instance of ThreadStartEvent.
*/
this(void delegate() D) {
this.D = D;
}
/**
* Executes the event.
*/
void exec() {
if (F) F();
else if (D) D();
}
}
/**
* The thread start events.
*/
private shared ThreadStartEvent[] threadStartEvents;
/**
* Adds an event to the thread start events.
*/
void addEvent(ThreadStartEvent event) {
synchronized {
auto tse = cast(ThreadStartEvent[])threadStartEvents;
tse ~= event;
threadStartEvents = cast(shared(ThreadStartEvent[]))tse;
}
}
/**
* Creates a new thread using a function pointer.
*/
Thread createThread(void function() F) {
auto t = new Thread({
if (threadStartEvents) {
auto tse = cast(ThreadStartEvent[])threadStartEvents;
foreach (event; tse)
event.exec();
}
F();
});
return t;
}
/**
* Creates a new thread using a delegate pointer.
*/
Thread createThread(void delegate() D) {
auto t = new Thread({
if (threadStartEvents) {
auto tse = cast(ThreadStartEvent[])threadStartEvents;
foreach (event; tse)
event.exec();
}
D();
});
return t;
}
/**
* Sleeps the current thread for a specific amount of milliseconds.
*/
void sleep(size_t milliseconds) {
Thread.sleep(dur!("msecs")(milliseconds));
}
version (THREAD_TEST) {
unittest {
writeln("BEGIN THREAD_TEST...");
addEvent(new ThreadStartEvent({ writeln("Started a thread..."); }));
foreach (i; 0 .. 5) {
createThread({ writeln("Thread: ", i); }).start();
sleep(2000);
}
writeln("ENDED THREAD_TEST...");
}
}
|
D
|
/**
* Poodinis Dependency Injection Framework
* Copyright 2014-2021 Mike Bierlee
* This software is licensed under the terms of the MIT license.
* The full terms of the license can be found in the LICENSE file.
*/
import poodinis;
import std.stdio;
interface Engine {
public void engage();
}
class FuelEngine : Engine {
public void engage() {
writeln("VROOOOOOM!");
}
}
class ElectricEngine : Engine {
public void engage() {
writeln("hummmmmmmm....");
}
}
class HybridCar {
alias KilometersPerHour = int;
@Autowire!FuelEngine
private Engine fuelEngine;
@Autowire!ElectricEngine
private Engine electricEngine;
public void moveAtSpeed(KilometersPerHour speed) {
if (speed <= 45) {
electricEngine.engage();
} else {
fuelEngine.engage();
}
}
}
void main() {
auto dependencies = new shared DependencyContainer();
dependencies.register!HybridCar;
dependencies.register!(Engine, FuelEngine);
dependencies.register!(Engine, ElectricEngine);
auto car = dependencies.resolve!HybridCar;
car.moveAtSpeed(10); // Should print "hummmmmmmm...."
car.moveAtSpeed(50); // Should print "VROOOOOOM!"
}
|
D
|
the phenomenon of sediment or gravel accumulating
matter that has been deposited by some natural process
the natural process of laying down a deposit of something
money deposited in a bank or some similar institution
a partial payment made at the time of purchase
money given as security for an article acquired for temporary use
a payment given as a guarantee that an obligation will be met
a facility where things can be deposited for storage or safekeeping
the act of putting something somewhere
put, fix, force, or implant
put into a bank account
put (something somewhere) firmly
|
D
|
build/default/debug/_ext/1779392585/drv_mrf_miwi_24j40.d \
build/default/debug/_ext/1779392585/drv_mrf_miwi_24j40.p1: \
C:/Users/tpeea/Documents/MPLABXProjects/MLA/framework/driver/mrf_miwi/src/drv_mrf_miwi_24j40.c \
../MLA/framework/miwi/miwi_mesh.h \
../Projet_Zigbee/firmware/src/system_config/8bitwdk_pic18f46j50_24j40/system_config.h \
../Projet_Zigbee/firmware/src/system_config/8bitwdk_pic18f46j50_24j40/delay.h \
../Projet_Zigbee/firmware/src/system_config/8bitwdk_pic18f46j50_24j40/config_24j40.h \
../Projet_Zigbee/firmware/src/system_config/8bitwdk_pic18f46j50_24j40/system.h \
../MLA/framework/driver/mrf_miwi/drv_mrf_miwi.h \
../Projet_Zigbee/firmware/src/system_config/8bitwdk_pic18f46j50_24j40/spi.h \
../Projet_Zigbee/firmware/src/system_config/8bitwdk_pic18f46j50_24j40/miwi_config.h \
../Projet_Zigbee/firmware/src/system_config/8bitwdk_pic18f46j50_24j40/miwi_config_mesh.h \
../Projet_Zigbee/firmware/src/system_config/8bitwdk_pic18f46j50_24j40/console.h \
../Projet_Zigbee/firmware/src/system_config/8bitwdk_pic18f46j50_24j40/symbol.h \
../Projet_Zigbee/firmware/src/system_config/8bitwdk_pic18f46j50_24j40/timer.h \
../Projet_Zigbee/firmware/src/system_config/8bitwdk_pic18f46j50_24j40/lcd.h \
../MLA/framework/driver/mrf_miwi/drv_mrf_miwi_24j40.h
|
D
|
/++
Parsing and building packets for the MySQL binary interface.
The types in this file does not work directly on a connection. They expect to
get enough data in their constructor.
NOTE:
There are several responses from the server that cannot be fully parsed
without requesting more data from the connection. These responses are
partly located here, and partly in mysql.protocol.commands.
See_Also:
http://dev.mysql.com/doc/internals/en/client-server-protocol.html
mysql.protocol.packet_helpers
Copyright: Copyright 2011-2013
License: $(LINK www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
Authors: Steve Teale, James W. Oliphant, simendsjo, Sönke Ludwig, sshamov,
Nick Sabalausky
+/
module mysql.protocol.packets;
import std.datetime;
import std.variant;
import std.array;
import std.exception;
import std.string;
import std.algorithm;
import std.typecons;
import std.traits;
debug import std.stdio;
import mysql.common;
import mysql.protocol.constants;
import mysql.protocol.extra_types;
public import mysql.protocol.packet_helpers;
/++
Thrown if we encounter an unexpected packet or byte stream in some server
result.
+/
class MySQLIllegalPacketException : MySQLProtocolException
{
ubyte[] packet;
this(ubyte[] packet, string msg, string file = __FILE__, size_t line = __LINE__)
{
super(msg, file, line);
this.packet = packet;
}
}
/++
Throw if we got an OKPacket we didn't expect
+/
class MySQLOKPacketException : MySQLIllegalPacketException
{
OKPacket okPacket;
this(OKPacket okPacket, string msg, string file = __FILE__, size_t line = __LINE__)
{
super(okPacket.packet, msg, file, line);
this.okPacket = okPacket;
}
}
/++
Throw if we got an EOFPacket we didn't expect
+/
class MySQLEOFPacketException : MySQLIllegalPacketException
{
EOFPacket eofPacket;
this(EOFPacket eofPacket, string msg, string file = __FILE__, size_t line = __LINE__)
{
super(eofPacket.packet, msg, file, line);
this.eofPacket = eofPacket;
}
}
/++
Throw if we got an ErrorPacket we didn't expect
+/
class MySQLErrorPacketException : MySQLIllegalPacketException
{
ErrorPacket errorPacket;
this(ErrorPacket errorPacket, string msg = "", string file = __FILE__, size_t line = __LINE__)
{
super(errorPacket.packet, msg.length ? msg : errorPacket.errorMessage, file, line);
this.errorPacket = errorPacket;
}
}
/++
Throw if we got an unknown packet
+/
class MySQLUnknownPacketException : MySQLIllegalPacketException
{
this(ubyte[] packet, string msg, string file = __FILE__, size_t line = __LINE__)
{
super(packet, msg, file, line);
}
}
/++
Throws an exception if packet is not an OKPacket
+/
void enforceOK(ubyte[] packet, string msg = "", string file = __FILE__, uint line = __LINE__)
{
if(packet.isErrorPacket)
{
throw new MySQLErrorPacketException(ErrorPacket(packet),
msg ? msg : "Expected OK packet, got Error", file, line);
}
else if(packet.isEOFPacket)
{
throw new MySQLEOFPacketException(EOFPacket(packet),
msg ? msg : "Expected OK packet, got EOF", file, line);
}
else if(!packet.isOKPacket)
{
throw new MySQLUnknownPacketException(packet,
msg ? msg : "Expected OK packet, got unknown", file, line);
}
}
/++
Throws an exception if packet is not an EOFPacket
+/
void enforceEOF(ubyte[] packet, string msg = "", string file = __FILE__, uint line = __LINE__)
{
if(packet.isErrorPacket)
{
throw new MySQLErrorPacketException(ErrorPacket(packet),
msg ? msg : "Expected EOF packet, got Error", file, line);
}
else if(packet.isOKPacket)
{
throw new MySQLOKPacketException(OKPacket(packet),
msg ? msg : "Expected EOF packet, got OK", file, line);
}
else if(!packet.isEOFPacket)
{
throw new MySQLUnknownPacketException(packet,
msg ? msg : "Expected EOF packet, got unknown", file, line);
}
}
/++
Marker for generic packet type
+/
enum ResultPacketMarker : ubyte
{
/++
See_Also: ErrorPacket
+/
error = 0xff,
/++
See_Also: OKPacket
+/
ok = 0x00,
/++
See_Also: EOFPacket
+/
eof = 0xfe,
}
/++
True if the packet starts with the EOF packet marker
Note that the same marker is used for 8 byte LCI
+/
bool isEOFPacket(in ubyte[] packet) pure nothrow
in
{
assert(!packet.empty);
}
body
{
return packet.front == ResultPacketMarker.eof && packet.length < 9;
}
/++
True if the packet starts with the OK packet marker
+/
bool isOKPacket(in ubyte[] packet) pure nothrow
{
return packet.front == ResultPacketMarker.ok;
}
/++
True if the packet starts with the Error packet marker
+/
bool isErrorPacket(in ubyte[] packet) pure nothrow
{
return packet.front == ResultPacketMarker.error;
}
/++
Successful completion of a command
See_Also: http://dev.mysql.com/doc/internals/en/generic-response-packets.html#packet-OK_Packet
+/
struct OKPacket
{
public:
@property
{
/// The underlying raw packet
ubyte[] packet() pure nothrow { return _packet; }
/// Number of rows affected
ulong affectedRows() pure const nothrow { return _affectedRows; }
/// Last insert-id generated
ulong lastInsertId() pure const nothrow { return _lastInsertId; }
/// Server status
ServerStatus serverStatus() pure const nothrow { return _serverStatus; }
/// Number of warnings
ushort warnings() pure const nothrow { return _warnings; }
/// Human readably info about the query
string info() pure const nothrow { return _info; }
}
/// Parse from a packet
this(ubyte[] packet)
in
{
assert(packet.front == ResultPacketMarker.ok);
}
body
{
_packet = packet;
packet.popFront(); // skip marker/field code
auto lci = packet.consumeIfComplete!LCI();
assert(!lci.isNull);
assert(!lci.isIncomplete);
_affectedRows = lci.value;
lci = packet.consumeIfComplete!LCI();
assert(!lci.isNull);
assert(!lci.isIncomplete);
_lastInsertId = lci.value;
_serverStatus = cast(ServerStatus)packet.consume!short();
_warnings = packet.consume!short();
_info = cast(string)packet.idup;
}
private:
ubyte[] _packet;
ulong _affectedRows;
ulong _lastInsertId;
ServerStatus _serverStatus;
ushort _warnings;
string _info;
}
/++
An Error packet. This is used to signal an error in a request to the server.
See_Also: http://dev.mysql.com/doc/internals/en/generic-response-packets.html#packet-ERR_Packet
+/
struct ErrorPacket
{
public:
@property
{
/// The underlying raw packet
ubyte[] packet() pure nothrow { return _packet; }
/// The internal MySQL error code
ushort errorCode() pure const nothrow { return _errorCode; }
/// Current sql state
string sqlState() pure nothrow { return _sqlState; }
/// Human readable error message
string errorMessage() pure nothrow { return _errorMessage; }
}
/// Construct from a raw packet
this(ubyte[] packet)
in
{
assert(packet.front == ResultPacketMarker.error);
}
body
{
_packet = packet;
packet.popFront(); // skip marker/field code
_errorCode = packet.consume!ushort();
assert(packet.front == cast(ubyte) '#'); // Protocol 4.1
packet.popFront();
_sqlState = (cast(string)packet[0 .. 5])[];
packet.skip(5);
_errorMessage = cast(string)packet.idup;
}
private:
ubyte[] _packet;
ushort _errorCode;
string _sqlState;
string _errorMessage;
}
/++
EOF packet sent from the server. This usually signals and of a part of a server
response.
An EOF packet is also called "Last Data Packet" or "End Packet".
IMPLEMENTATION_NOTE:
The EOF packet may appear in places where a Protocol::LengthEncodedInteger
may appear. You have to check the packet length is less then 9 to make sure
it is a EOF packet.
See_Also:
http://dev.mysql.com/doc/internals/en/generic-response-packets.html#packet-EOF_Packet
isEOFPacket
+/
struct EOFPacket
{
public:
@property
{
/// The underlying raw packet
ubyte[] packet() pure nothrow { return _packet; }
/// Warning count
ushort warnings() pure const nothrow { return _warnings; }
/// Server status
ServerStatus serverStatus() pure const nothrow { return _serverStatus; }
}
/// Construct an EOFPacket struct from the raw data packet
this(ubyte[] packet)
in
{
assert(packet.isEOFPacket());
assert(packet.length == 5);
}
body
{
_packet = packet;
packet.popFront(); // eof marker
_warnings = packet.consume!short();
_serverStatus = cast(ServerStatus)packet.consume!short();
}
private:
ubyte[] _packet;
ushort _warnings;
ServerStatus _serverStatus;
}
/++
Initial server response when connecting to the server.
See_also: http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeV10
+/
struct HandshakePacket
{
public:
@property
{
/// Protocol version
ubyte protocolVersion() const pure nothrow { return _protocolVersion; }
/// Human readable server version
string serverVersion() const pure nothrow { return _serverVersion; }
/// Connection id
uint connectionId() const pure nothrow { return _connectionId; }
/// Server capabilities
CapabilityFlags serverCapabilities() const pure nothrow { return _serverCapabilities; }
/++
Default server character set
See_Also: http://dev.mysql.com/doc/internals/en/character-set.html
+/
ubyte characterSet() const pure nothrow { return _characterSet; }
/++
Server status
See_also: http://dev.mysql.com/doc/internals/en/status-flags.html#packet-Protocol::StatusFlags
+/
ushort serverStatus() const pure nothrow { return _serverStatus; }
/++
Auth buffer required to log in
+/
ubyte[] authBuf() pure nothrow { return _authBuf; }
}
/// Construct from a raw packet
this(ubyte[] packet)
{
consumeServerPreInfo(packet);
consumeScrambleBuf(packet);
consumeServerInfo(packet);
consumeAuthBuf(packet);
}
private:
ubyte _protocolVersion;
string _serverVersion;
uint _connectionId;
CapabilityFlags _serverCapabilities;
ubyte _characterSet;
ushort _serverStatus;
ubyte[] _authBuf;
void consumeServerPreInfo(ref ubyte[] packet) pure
{
_protocolVersion = packet.consume!ubyte();
_serverVersion = packet.consume!string(packet.countUntil(0));
packet.skip(1); // \0 terminated _serverVersion
_connectionId = packet.consume!uint();
}
void consumeScrambleBuf(ref ubyte[] packet) pure
{
_authBuf.length = 255;
_authBuf[0..8] = packet.consume(8)[]; // scramble_buff
mypenforce(packet.consume!ubyte() == 0,
"filler should always be 0");
}
void consumeServerInfo(ref ubyte[] packet) pure
{
// lower bytes
_serverCapabilities = cast(CapabilityFlags)packet.consume!ushort();
_characterSet = packet.consume!ubyte();
_serverStatus = packet.consume!ushort();
// server_capabilities (upper bytes)
_serverCapabilities += cast(CapabilityFlags)(packet.consume!ushort() << 16);
// Assumed to be set since v4.1.1, according to spec
_serverCapabilities |= CapabilityFlags.LONG_PASSWORD;
mypenforce(_serverCapabilities & CapabilityFlags.PROTOCOL_41,
"Server doesn't support protocol v4.1");
mypenforce(_serverCapabilities & CapabilityFlags.SECURE_CONNECTION,
"Server doesn't support protocol v4.1 connection");
}
void consumeAuthBuf(ref ubyte[] packet) pure
{
packet.skip(1); // this byte supposed to be scramble length, but is actually zero
packet.skip(10); // filler of \0
// rest of the scramble
auto len = packet.countUntil(0);
mypenforce(len >= 12,
"second part of scramble buffer should be at least 12 bytes");
mypenforce(_authBuf.length > 8+len);
_authBuf[8..8+len] = packet.consume(len)[];
_authBuf.length = 8+len; // cut to correct size
mypenforce(packet.consume!ubyte() == 0,
"Excepted \\0 terminating scramble buf");
}
}
/++
Response from the client to an initial HandshakePacket.
This will send the username, password and more to complete the connection.
See_Also: http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeResponse
+/
struct HandshakeResponsePacket
{
public:
/// The underlying raw packet
@property ubyte[] packet() pure nothrow { return _packet;}
/++
Params:
username = username
password = user password
database = default database
cCaps = Client capabilities
authBuf = Scramblebuf sent from the server in the initial HandshakePacket
+/
this(in string username, in string password, in string database,
in CapabilityFlags cCaps, in ubyte[] authBuf)
{
buildAuthPacket(username, database, cCaps, makeToken(password, authBuf));
}
private:
ubyte[] _packet;
static ubyte[] makeToken(in string password, in ubyte[] authBuf) pure
{
import std.digest.sha;
auto pass1 = sha1Of(cast(const(ubyte)[])password);
auto pass2 = sha1Of(pass1);
SHA1 sha1;
sha1.start();
sha1.put(authBuf);
sha1.put(pass2);
auto result = sha1.finish();
foreach (size_t i; 0..20)
result[i] = result[i] ^ pass1[i];
return result.dup;
}
void buildAuthPacket(in string username, in string database,
in CapabilityFlags cCaps, in ubyte[] token) pure nothrow
in
{
assert(token.length == 20);
}
body
{
_packet.reserve(4/*header*/ + 4 + 4 + 1 + 23 + username.length+1
+ token.length+1 + database.length+1);
// create room for the beginning headers that we set rather than
// append
_packet.length = 4 + 4 + 4;
// NOTE: we'll set the header last when we know the size
// Set the default capabilities required by the client
cCaps.encodeInto(_packet[4..8]);
// Request a conventional maximum packet length.
1.encodeInto(_packet[8..12]);
_packet ~= 33; // Set UTF-8 as default charSet
// There's a statutory block of zero bytes here - fill them in.
foreach(i; 0 .. 23)
_packet ~= 0;
// Add the user name as a null terminated string
foreach(i; 0 .. username.length)
_packet ~= username[i];
_packet ~= 0; // \0
// Add our calculated authentication token as a length prefixed string.
assert(token.length <= ubyte.max);
_packet ~= cast(ubyte)token.length;
foreach(i; 0 .. token.length)
_packet ~= token[i];
if(database.length)
{
foreach(i; 0 .. database.length)
_packet ~= database[i];
_packet ~= 0; // \0
}
}
}
/++
Column definition packet
This describes information of a column in a TextResultSet or BinaryResultSet
See_Also: http://dev.mysql.com/doc/internals/en/com-query-response.html#packet-Protocol::ColumnDefinition41
+/
struct ColumnDefinition
{
public:
@property
{
/// Schema name (Database name)
string schema() pure const nothrow { return _schema; }
/++
Virtual table name for column as string - this could be an alias as in
'from tablename as foo'
+/
string table() pure const nothrow { return _table; }
/// Physical table name
string originalTable() pure const nothrow { return _originalTable; }
/// Virtual column name
string name() pure const nothrow { return _name; }
/// Physical column name
string originalName() pure const nothrow { return _originalName; }
/// Column character set
ushort charSet() pure const nothrow { return _charSet; }
/// Maximum length of field
uint length() pure const nothrow { return _length; }
/++
The type of the column hopefully (but not always) corresponding to enum
SQLType. Only the low byte currently used
+/
SQLType type() pure const nothrow { return _type; }
/// Column flags - unsigned, binary, null and so on
FieldFlags flags() pure const nothrow { return _flags; }
/// Precision for floating point values
ubyte scale() pure const nothrow { return _scale; }
/++
If this was constructed with a COM_FIELD_LIST command, this will
include the default values
+/
string defaultValues() pure nothrow { return _defaultValues; }
/// NotNull from flags
bool notNull() pure const nothrow { return (_flags & FieldFlags.NOT_NULL) != 0; }
/// Unsigned from flags
bool unsigned() pure const nothrow { return (_flags & FieldFlags.UNSIGNED) != 0; }
/// Binary from flags
bool binary() pure const nothrow { return (_flags & FieldFlags.BINARY) != 0; }
/// Is-enum from flags
bool isenum() pure const nothrow { return (_flags & FieldFlags.ENUM) != 0; }
/// Is-set (a SET column that is) from flags
bool isset() pure const nothrow { return (_flags & FieldFlags.SET) != 0; }
}
/// Construct from a raw packet.
this(ubyte[] packet)
in
{
assert(packet.length);
}
out
{
assert(!packet.length);
}
body
{
const catalog = packet.consume!(string, 4);
// FIXME: catalog is always "def", even when I'm looking at it here
// For some reason though, this assertion fails in dmd head (pre 2.064)
// assert(catalog == "def");
_schema = packet.consume!LCS();
_table = packet.consume!LCS();
_originalTable = packet.consume!LCS();
_name = packet.consume!LCS();
_originalName = packet.consume!LCS();
mypenforce(packet.length >= 13, "Malformed field specification packet");
packet.popFront(); // one byte filler here
_charSet = packet.consume!short();
_length = packet.consume!int();
_type = cast(SQLType)packet.consume!ubyte();
_flags = cast(FieldFlags)packet.consume!short();
_scale = packet.consume!ubyte();
packet.skip(2); // two byte filler
// Command is COM_FIELD_LIST
if(packet.length)
{
auto lci = packet.consumeIfComplete!LCI();
assert(!lci.isNull);
assert(!lci.isIncomplete);
_defaultValues = cast(string)packet.consume(cast(size_t)lci.value);
}
}
private:
string _schema;
string _table;
string _originalTable;
string _name;
string _originalName;
ushort _charSet;
uint _length;
SQLType _type;
FieldFlags _flags;
ubyte _scale;
string _defaultValues;
}
/++
Partial ResultSet packet.
This only include the first packet information needed to fetch the rest of the
packets.
+/
struct ResultSet
{
public:
/// Number of columns in the result
@property long columnCount() pure const nothrow { return _columnCount; }
/// Construct from a raw packet
this(ubyte[] packet)
{
auto lci = packet.consumeIfComplete!LCI();
assert(!lci.isNull);
assert(!lci.isIncomplete);
_columnCount = lci.value;
}
private:
long _columnCount;
}
/++
Result from a ComStmtPrepare (prepare)
Note that this does not read columns or parameters.
See_Also: http://dev.mysql.com/doc/internals/en/com-stmt-prepare-response.html
+/
struct StmtPrepareOK
{
public:
@property
{
/// Statement id
int statementId() pure const nothrow { return _statementId; }
/// Number of warnings
short numWarnings() pure const nothrow { return _numWarnings; }
/// Number of parameters in the request
short numParams() pure const nothrow { return _numParams; }
/// Number of columns in the resultset
short numColumns() pure const nothrow { return _numColumns; }
}
/// Construct from a raw packet
this(ubyte[] packet)
in
{
assert(packet.front == ResultPacketMarker.ok);
}
body
{
packet.popFront(); // Magic marker
_statementId = packet.consume!int;
assert(_statementId != 0, "MySQL didn't return a statement id");
_numColumns = packet.consume!short;
_numParams = packet.consume!short;
packet.popFront(); // Filler
_numWarnings = packet.consume!short;
}
private:
int _statementId;
short _numWarnings;
short _numParams;
short _numColumns;
}
/++
Execute a prepared statement
This type act as a builder for the packet. See the method setParam.
See_Also: http://dev.mysql.com/doc/internals/en/com-stmt-execute.html
+/
struct ComStmtExecutePacket
{
public:
@property
{
/// Raw packet
ubyte[] packet() pure nothrow { return _packet[0.._packetLength]; }
/// Number of parameters
ushort numParams() pure const nothrow { return cast(ushort)_params.length; }
}
/// Construct
this(int statementId, ColumnDefinition[] params, CursorType cursor)
{
assert(statementId != 0,
"ComStmtExecutePacket only works on prepared statements");
enum ubyte newParamsBoundFlag = 1;
_params = params;
auto len =
4 // StatementId
+ 1 // Flags
+ 4 // Iteration count
;
_nullBitmapOffset = len;
if(_params.length)
{
len += calcNullBitmapLength(_params.length);
len += 1; // newParamsBoundFlag
if(newParamsBoundFlag)
{
_typesOffset = len;
len += _params.length*2; // type byte + sign byte
_valuesOffset = len;
len += _params.length*4; // assume 4 bytes per value. Might need to reallocate
}
}
_packetLength = _valuesOffset ? _valuesOffset : len; // No values yet
_packet = new ubyte[len];
_valueBeginOffsets.length = _params.length;
_valueEndOffsets.length = _params.length;
foreach(i; 0 .. _params.length)
setNull(cast(ushort)i);
auto builder = _packet;
statementId.encodeIntoAndSkip(builder);
cursor.encodeIntoAndSkip(builder); // flags
0.encodeIntoAndSkip(builder); // iteration count
if(_params.length)
{
builder.skip(calcNullBitmapLength(_params.length));
newParamsBoundFlag.encodeIntoAndSkip(builder);
}
}
/++
Set a parameter by index.
This might reallocate the underlying packet to make room for the new type.
For performance, you should add the parameters in ascending order.
BUGS:
Doesn't support Variant
+/
void setParam(T)(ushort index, T value) pure
{
scope(exit) assertNullOrValue();
mypenforce(index < _params.length, "Parameter index out of bounds");
// debug writeln("SetParam ", index, " = ", value);
assert(index < _params.length);
const typeOffset = typeOffset(index);
const valueBeginOffset = valueBeginOffset(index);
const valueEndOffset = valueEndOffset(index);
// TODO: If it's null, we don't need to update the type?
static if(is(T == typeof(null)))
{
_packet[typeOffset] = _params[index].type;
_packet[typeOffset+1] = SQLSign.UNSIGNED;
}
else
{
_packet[typeOffset] = sqlTypeOf!T;
_packet[typeOffset+1] = sqlSignOf!T;
}
const oldValueSize = valueSize(index);
const oldValueEnd = valueEndOffset;
static if(is(T == typeof(null)))
const newValue = cast(ubyte[])null;
else
const newValue = toMySQLBinaryValue(value);
const newValueEnd = valueBeginOffset + newValue.length;
const newValueSize = newValueEnd - valueBeginOffset;
const sizeDiff = newValue.length - oldValueSize;
/+
debug writefln(
" packetLength: %d"
~" valueBegin: %d"
~" OldValueEnd: %d"
~" OldValueSize: %d"
~" NewValueSize: %d"
~" NewValue: %s"
~" NewValue: %s"
~" NewValueEnd: %d"
~" SizeDiff: %d"
, _packetLength
, valueBeginOffset
, oldValueEnd
, oldValueSize
, newValueSize
, newValue
, cast(string)newValue
, newValueEnd
, sizeDiff
);
+/
if(sizeDiff)
{
const newPacketLength = _packetLength + sizeDiff;
// Possibly extend array
if(newPacketLength > _packet.length)
_packet.length += sizeDiff; // TODO: Extended it ever further?
assert(newPacketLength <= _packet.length);
// Move all values on the right side
_packet[oldValueEnd .. _packetLength].encodeInto(
_packet[newValueEnd..newPacketLength]);
// Update positions
for(size_t i=index+1; i < _params.length; ++i)
{
_valueBeginOffsets[i] += sizeDiff;
_valueEndOffsets[i] += sizeDiff;
}
// Update packet length
_packetLength = newPacketLength;
_valueEndOffsets[index] += sizeDiff;
}
if(newValue is null)
{
// debug writeln("Setting param ", index, " to null");
setNull(index);
}
else
{
clearNull(index);
// debug writeln("Setting param ", index, " to ", newValue);
newValue.encodeInto(_packet[valueBeginOffset..newValueEnd]);
}
// debug writeln("Values: ", _packet[_valuesOffset .. _packetLength]);
// debug writeln("Nulls : ", _packet[_nullBitmapOffset .. _typesOffset-1]);
}
private:
pure const nothrow invariant()
{
assert(_packetLength <= _packet.length);
}
// Makes sure we either have a null or a value and not both
void assertNullOrValue() pure const nothrow
{
foreach(ushort i; 0 .. cast(ushort)_params.length)
{
const psz = valueSize(i);
// try debug writeln("Param ", i, " is size ", psz, " and has null: ", getNullBit(i));
// catch(Exception ex) {}
if(psz > 0)
assert(!getNullBit(i));
else
assert(getNullBit(i));
}
}
/++
Sets parameter at index to be null
NOTE: This does not actually clear the value. Use setParam
+/
void setNull(ushort index) pure nothrow
{
setNullBit(index, true);
assert(getNullBit(index) == true);
}
/// Sets parameter at index to be non-null
void clearNull(ushort index) pure nothrow
{
setNullBit(index, false);
assert(getNullBit(index) == false);
}
/// Offset in _packet where the type information begin
size_t typeOffset(ushort index) pure const nothrow
{
return _typesOffset + (2*index);
}
/// Offset in _packet where the value begin
size_t valueBeginOffset(ushort index) pure const nothrow
{
return _valuesOffset + _valueBeginOffsets[index];
}
/// Offset in _packet where the value end
size_t valueEndOffset(ushort index) pure const nothrow
{
return _valuesOffset + _valueEndOffsets[index];
}
/// Returns the stored length of the value at index
size_t valueSize(ushort index) pure const nothrow
{
return valueEndOffset(index) - valueBeginOffset(index);
}
/// Number of bytes in the nullbitmap
static size_t calcNullBitmapLength(size_t numParams) pure nothrow
{
return (numParams+7)/8;
}
/// Returns byte position in nullbitmap for this index
static size_t getNullBytePos(ushort index) pure nothrow
{
return index/8;
}
/// Returns bit position in this indexs byte. See getNullBytePos
static ubyte getNullBitPos(ushort index) pure nothrow
{
return index%8;
}
/// Set a parameters null-flag. Use setParam instead
void setNullBit(ushort index, bool setNull) pure nothrow
{
scope(exit) assert(getNullBit(index) == setNull);
const bytepos = getNullBytePos(index);
const bitpos = getNullBitPos(index);
const posInPacket = _nullBitmapOffset + bytepos;
assert(posInPacket < _typesOffset);
if(setNull)
_packet[posInPacket] |= 1 << bitpos;
else
_packet[posInPacket] &= ~(1 << bitpos);
}
bool getNullBit(short index) const pure nothrow
{
const bytepos = getNullBytePos(index);
const bitpos = getNullBitPos(index);
const posInPacket = _nullBitmapOffset + bytepos;
return cast(bool)(_packet[posInPacket] >> bitpos & 1);
}
ubyte[] _packet;
size_t _packetLength;
ColumnDefinition[] _params;
size_t _nullBitmapOffset;
size_t _typesOffset; /// Offset in _packet where the types begin
size_t _valuesOffset; /// Offset in _packet where the values begin
size_t[] _valueBeginOffsets; /// Offset from valuesOffset where the parameter begin
size_t[] _valueEndOffsets; /// Offset from valuesOffset where the parameter end
}
/++
A result row from a prepared statement
+/
struct BinaryRow
{
public:
@property
{
/// Number of values
size_t length() const pure nothrow { return _values.length; }
/// Values
Variant[] values() pure nothrow { return _values; }
}
/// Return value at index i
Variant opIndex(size_t i) pure nothrow
{
return _values[i];
}
/// Construct
this(ubyte[] packet, in ColumnDefinition[] columns)
in
{
assert(packet);
}
out
{
assert(!packet.length);
}
body
{
packet.popFront(); // header. Always 0
_values = minimallyInitializedArray!(Variant[])(columns.length);
auto nulls = consumeNullBitmap(packet, cast(uint)(columns.length));
foreach(i, col; columns)
{
if(nulls[i])
{
// TODO: Create variant of type col.type?
}
else
{
auto sqlValue = packet.consumeIfComplete(col.type, true, col.unsigned);
if(col.type == SQLType.TINY && col.length == 1)
_values[i] == cast(bool)sqlValue.value.get!int();
else
_values[i] = sqlValue.value;
}
}
}
private:
Variant[] _values;
static bool[] consumeNullBitmap(ref ubyte[] packet, uint numColumns) pure
{
const nbmlen = calcBitmapLength(numColumns);
ubyte[] nbm = packet[0..nbmlen];
packet.skip(nbmlen);
return decodeNullBitmap(nbm, numColumns);
}
static size_t calcBitmapLength(uint numColumns) pure nothrow
{
return (numColumns + 7 + 2) / 8;
}
// This is to decode the bitmap in a binary result row. First two bits are skipped
static bool[] decodeNullBitmap(ubyte[] bitmap, uint numColumns) pure nothrow
in
{
assert(bitmap.length >= calcBitmapLength(numColumns),
"bitmap not large enough to store all null fields");
}
out(result)
{
assert(result.length == numColumns);
}
body
{
bool[] nulls;
nulls.length = numColumns;
// the current byte we are processing for nulls
ubyte bits = bitmap.front();
// strip away the first two bits as they are reserved
bits >>= 2;
// .. and then we only have 6 bits left to process for this byte
ubyte bitsLeftInByte = 6;
foreach(ref isNull; nulls)
{
assert(bitsLeftInByte <= 8);
// processed all bits? fetch new byte
if (bitsLeftInByte == 0)
{
assert(bits == 0, "not all bits are processed!");
assert(!bitmap.empty, "bits array too short for number of columns");
bitmap.popFront();
bits = bitmap.front;
bitsLeftInByte = 8;
}
assert(bitsLeftInByte > 0);
isNull = (bits & 0b0000_0001) != 0;
// get ready to process next bit
bits >>= 1;
--bitsLeftInByte;
}
return nulls;
}
}
|
D
|
module sema.visitor;
import ast;
import logger;
import sema.symbol;
import sema.infer : Type_Environment;
import krug_module;
import std.stdio;
import std.conv;
class AST_Visitor {
abstract void process_node(ast.Node node);
}
class Top_Level_Node_Visitor : AST_Visitor {
protected Symbol_Table curr_sym_table;
abstract void analyze_named_type_node(ast.Named_Type_Node);
abstract void analyze_function_node(ast.Function_Node);
abstract void analyze_var_stat_node(ast.Variable_Statement_Node);
abstract void visit_stat(ast.Statement_Node);
// kind of messy architecture
// going on here but its the cleanest
// way that works atm.
void setup_sym_table(Module mod, string sub_mod, ref AST as_tree) {
if (mod.sym_tables is null) {
mod.sym_tables = push_sym_table();
}
curr_sym_table = mod.sym_tables;
}
Symbol_Table push_sym_table() {
auto s = new Symbol_Table(curr_sym_table);
logger.verbose(" - PUSHED SYMBOL TABLE ", to!string(s.id));
curr_sym_table = s;
return s;
}
Symbol_Table leave_sym_table() {
auto old = curr_sym_table;
logger.verbose(" - POPPED SYMBOL TABLE ", to!string(old.id));
curr_sym_table = old.outer;
return old;
}
void visit_block(ast.Block_Node block, void delegate(Symbol_Table curr_stab) previsit = null, void delegate(Symbol_Table curr_stab) postvisit = null) {
// this should ONLY happen on the first pass...
// maybe have a check to throw an error if
// this occurs after the decl pass.
if (block.sym_table is null) {
logger.verbose("Setting up a symbol table in block");
block.sym_table = push_sym_table();
}
logger.verbose("Restored symbol table ", to!string(block.sym_table.id), " entries:");
foreach (entry; block.sym_table.symbols.byKeyValue()) {
logger.verbose("- ", entry.key);
}
foreach (entry; block.sym_table.env.data.byKeyValue()) {
logger.verbose("* ", entry.key);
}
logger.verbose("");
curr_sym_table = block.sym_table;
if (previsit !is null) {
previsit(curr_sym_table);
}
foreach (stat; block.statements) {
if (stat is null) {
logger.warn("null statement in block? " ~ to!string(block));
continue;
}
// handle nested blocks
if (auto b = cast(Block_Node) stat) {
visit_block(b);
}
else {
visit_stat(stat);
}
}
if (postvisit !is null) {
postvisit(curr_sym_table);
}
leave_sym_table();
}
override void process_node(ast.Node node) {
if (auto named_type_node = cast(ast.Named_Type_Node) node) {
analyze_named_type_node(named_type_node);
}
else if (auto func_node = cast(ast.Function_Node) node) {
analyze_function_node(func_node);
}
else if (auto var_node = cast(ast.Variable_Statement_Node) node) {
analyze_var_stat_node(var_node);
}
else {
logger.fatal("unhandled node in " ~ to!string(this) ~ " execution:\n" ~ to!string(
node));
}
}
}
|
D
|
/**
* Defines a package and module.
*
* Specification: $(LINK2 https://dlang.org/spec/module.html, Modules)
*
* Copyright: Copyright (C) 1999-2021 by The D Language Foundation, 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: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dmodule.d, _dmodule.d)
* Documentation: https://dlang.org/phobos/dmd_dmodule.html
* Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dmodule.d
*/
module dmd.dmodule;
import core.stdc.stdio;
import core.stdc.stdlib;
import core.stdc.string;
import dmd.aggregate;
import dmd.arraytypes;
import dmd.astcodegen;
import dmd.astenums;
import dmd.compiler;
import dmd.gluelayer;
import dmd.dimport;
import dmd.dmacro;
import dmd.doc;
import dmd.dscope;
import dmd.dsymbol;
import dmd.dsymbolsem;
import dmd.errors;
import dmd.expression;
import dmd.expressionsem;
import dmd.globals;
import dmd.id;
import dmd.identifier;
import dmd.parse;
import dmd.cparse;
import dmd.root.array;
import dmd.root.file;
import dmd.root.filename;
import dmd.root.outbuffer;
import dmd.root.port;
import dmd.root.rmem;
import dmd.root.rootobject;
import dmd.root.string;
import dmd.semantic2;
import dmd.semantic3;
import dmd.target;
import dmd.utils;
import dmd.visitor;
enum package_d = "package." ~ mars_ext;
enum package_di = "package." ~ hdr_ext;
/********************************************
* Look for the source file if it's different from filename.
* Look for .di, .d, directory, and along global.path.
* Does not open the file.
* Params:
* filename = as supplied by the user
* path = path to look for filename
* Returns:
* the found file name or
* `null` if it is not different from filename.
*/
private const(char)[] lookForSourceFile(const char[] filename, const char*[] path)
{
//printf("lookForSourceFile(`%.*s`)\n", cast(int)filename.length, filename.ptr);
/* Search along path[] for .di file, then .d file, then .i file, then .c file.
*/
const sdi = FileName.forceExt(filename, hdr_ext);
if (FileName.exists(sdi) == 1)
return sdi;
scope(exit) FileName.free(sdi.ptr);
const sd = FileName.forceExt(filename, mars_ext);
if (FileName.exists(sd) == 1)
return sd;
scope(exit) FileName.free(sd.ptr);
const si = FileName.forceExt(filename, i_ext);
if (FileName.exists(si) == 1)
return si;
scope(exit) FileName.free(si.ptr);
const sc = FileName.forceExt(filename, c_ext);
if (FileName.exists(sc) == 1)
return sc;
scope(exit) FileName.free(sc.ptr);
if (FileName.exists(filename) == 2)
{
/* The filename exists and it's a directory.
* Therefore, the result should be: filename/package.d
* iff filename/package.d is a file
*/
const ni = FileName.combine(filename, package_di);
if (FileName.exists(ni) == 1)
return ni;
FileName.free(ni.ptr);
const n = FileName.combine(filename, package_d);
if (FileName.exists(n) == 1)
return n;
FileName.free(n.ptr);
}
if (FileName.absolute(filename))
return null;
if (!path.length)
return null;
foreach (entry; path)
{
const p = entry.toDString();
const(char)[] n = FileName.combine(p, sdi);
if (FileName.exists(n) == 1) {
return n;
}
FileName.free(n.ptr);
n = FileName.combine(p, sd);
if (FileName.exists(n) == 1) {
return n;
}
FileName.free(n.ptr);
n = FileName.combine(p, si);
if (FileName.exists(n) == 1) {
return n;
}
FileName.free(n.ptr);
n = FileName.combine(p, sc);
if (FileName.exists(n) == 1) {
return n;
}
FileName.free(n.ptr);
const b = FileName.removeExt(filename);
n = FileName.combine(p, b);
FileName.free(b.ptr);
if (FileName.exists(n) == 2)
{
const n2i = FileName.combine(n, package_di);
if (FileName.exists(n2i) == 1)
return n2i;
FileName.free(n2i.ptr);
const n2 = FileName.combine(n, package_d);
if (FileName.exists(n2) == 1) {
return n2;
}
FileName.free(n2.ptr);
}
FileName.free(n.ptr);
}
return null;
}
// function used to call semantic3 on a module's dependencies
void semantic3OnDependencies(Module m)
{
if (!m)
return;
if (m.semanticRun > PASS.semantic3)
return;
m.semantic3(null);
foreach (i; 1 .. m.aimports.dim)
semantic3OnDependencies(m.aimports[i]);
}
/**
* Remove generated .di files on error and exit
*/
void removeHdrFilesAndFail(ref Param params, ref Modules modules)
{
if (params.doHdrGeneration)
{
foreach (m; modules)
{
if (m.isHdrFile)
continue;
File.remove(m.hdrfile.toChars());
}
}
fatal();
}
/**
* Converts a chain of identifiers to the filename of the module
*
* Params:
* packages = the names of the "parent" packages
* ident = the name of the child package or module
*
* Returns:
* the filename of the child package or module
*/
private const(char)[] getFilename(Identifier[] packages, Identifier ident)
{
const(char)[] filename = ident.toString();
if (packages.length == 0)
return filename;
OutBuffer buf;
OutBuffer dotmods;
auto modAliases = &global.params.modFileAliasStrings;
void checkModFileAlias(const(char)[] p)
{
/* Check and replace the contents of buf[] with
* an alias string from global.params.modFileAliasStrings[]
*/
dotmods.writestring(p);
foreach_reverse (const m; *modAliases)
{
const q = strchr(m, '=');
assert(q);
if (dotmods.length == q - m && memcmp(dotmods.peekChars(), m, q - m) == 0)
{
buf.setsize(0);
auto rhs = q[1 .. strlen(q)];
if (rhs.length > 0 && (rhs[$ - 1] == '/' || rhs[$ - 1] == '\\'))
rhs = rhs[0 .. $ - 1]; // remove trailing separator
buf.writestring(rhs);
break; // last matching entry in ms[] wins
}
}
dotmods.writeByte('.');
}
foreach (pid; packages)
{
const p = pid.toString();
buf.writestring(p);
if (modAliases.dim)
checkModFileAlias(p);
version (Windows)
enum FileSeparator = '\\';
else
enum FileSeparator = '/';
buf.writeByte(FileSeparator);
}
buf.writestring(filename);
if (modAliases.dim)
checkModFileAlias(filename);
buf.writeByte(0);
filename = buf.extractSlice()[0 .. $ - 1];
return filename;
}
/***********************************************************
*/
extern (C++) class Package : ScopeDsymbol
{
PKG isPkgMod = PKG.unknown;
uint tag; // auto incremented tag, used to mask package tree in scopes
Module mod; // !=null if isPkgMod == PKG.module_
final extern (D) this(const ref Loc loc, Identifier ident)
{
super(loc, ident);
__gshared uint packageTag;
this.tag = packageTag++;
}
override const(char)* kind() const
{
return "package";
}
override bool equals(const RootObject o) const
{
// custom 'equals' for bug 17441. "package a" and "module a" are not equal
if (this == o)
return true;
auto p = cast(Package)o;
return p && isModule() == p.isModule() && ident.equals(p.ident);
}
/****************************************************
* Input:
* packages[] the pkg1.pkg2 of pkg1.pkg2.mod
* Returns:
* the symbol table that mod should be inserted into
* Output:
* *pparent the rightmost package, i.e. pkg2, or NULL if no packages
* *ppkg the leftmost package, i.e. pkg1, or NULL if no packages
*/
extern (D) static DsymbolTable resolve(Identifier[] packages, Dsymbol* pparent, Package* ppkg)
{
DsymbolTable dst = Module.modules;
Dsymbol parent = null;
//printf("Package::resolve()\n");
if (ppkg)
*ppkg = null;
foreach (pid; packages)
{
Package pkg;
Dsymbol p = dst.lookup(pid);
if (!p)
{
pkg = new Package(Loc.initial, pid);
dst.insert(pkg);
pkg.parent = parent;
pkg.symtab = new DsymbolTable();
}
else
{
pkg = p.isPackage();
assert(pkg);
// It might already be a module, not a package, but that needs
// to be checked at a higher level, where a nice error message
// can be generated.
// dot net needs modules and packages with same name
// But we still need a symbol table for it
if (!pkg.symtab)
pkg.symtab = new DsymbolTable();
}
parent = pkg;
dst = pkg.symtab;
if (ppkg && !*ppkg)
*ppkg = pkg;
if (pkg.isModule())
{
// Return the module so that a nice error message can be generated
if (ppkg)
*ppkg = cast(Package)p;
break;
}
}
if (pparent)
*pparent = parent;
return dst;
}
override final inout(Package) isPackage() inout
{
return this;
}
/**
* Checks if pkg is a sub-package of this
*
* For example, if this qualifies to 'a1.a2' and pkg - to 'a1.a2.a3',
* this function returns 'true'. If it is other way around or qualified
* package paths conflict function returns 'false'.
*
* Params:
* pkg = possible subpackage
*
* Returns:
* see description
*/
final bool isAncestorPackageOf(const Package pkg) const
{
if (this == pkg)
return true;
if (!pkg || !pkg.parent)
return false;
return isAncestorPackageOf(pkg.parent.isPackage());
}
override Dsymbol search(const ref Loc loc, Identifier ident, int flags = SearchLocalsOnly)
{
//printf("%s Package.search('%s', flags = x%x)\n", toChars(), ident.toChars(), flags);
flags &= ~SearchLocalsOnly; // searching an import is always transitive
if (!isModule() && mod)
{
// Prefer full package name.
Dsymbol s = symtab ? symtab.lookup(ident) : null;
if (s)
return s;
//printf("[%s] through pkdmod: %s\n", loc.toChars(), toChars());
return mod.search(loc, ident, flags);
}
return ScopeDsymbol.search(loc, ident, flags);
}
override void accept(Visitor v)
{
v.visit(this);
}
final Module isPackageMod()
{
if (isPkgMod == PKG.module_)
{
return mod;
}
return null;
}
/**
* Checks for the existence of a package.d to set isPkgMod appropriately
* if isPkgMod == PKG.unknown
*/
final void resolvePKGunknown()
{
if (isModule())
return;
if (isPkgMod != PKG.unknown)
return;
Identifier[] packages;
for (Dsymbol s = this.parent; s; s = s.parent)
packages ~= s.ident;
reverse(packages);
if (lookForSourceFile(getFilename(packages, ident), global.path ? (*global.path)[] : null))
Module.load(Loc(), packages, this.ident);
else
isPkgMod = PKG.package_;
}
}
/***********************************************************
*/
extern (C++) final class Module : Package
{
extern (C++) __gshared Module rootModule;
extern (C++) __gshared DsymbolTable modules; // symbol table of all modules
extern (C++) __gshared Modules amodules; // array of all modules
extern (C++) __gshared Dsymbols deferred; // deferred Dsymbol's needing semantic() run on them
extern (C++) __gshared Dsymbols deferred2; // deferred Dsymbol's needing semantic2() run on them
extern (C++) __gshared Dsymbols deferred3; // deferred Dsymbol's needing semantic3() run on them
extern (C++) __gshared uint dprogress; // progress resolving the deferred list
static void _init()
{
modules = new DsymbolTable();
}
/**
* Deinitializes the global state of the compiler.
*
* This can be used to restore the state set by `_init` to its original
* state.
*/
static void deinitialize()
{
modules = modules.init;
}
extern (C++) __gshared AggregateDeclaration moduleinfo;
const(char)[] arg; // original argument name
ModuleDeclaration* md; // if !=null, the contents of the ModuleDeclaration declaration
const FileName srcfile; // input source file
const FileName objfile; // output .obj file
const FileName hdrfile; // 'header' file
FileName docfile; // output documentation file
FileBuffer* srcBuffer; // set during load(), free'd in parse()
uint errors; // if any errors in file
uint numlines; // number of lines in source file
bool isHdrFile; // if it is a header (.di) file
bool isCFile; // if it is a C (.c) file
bool isDocFile; // if it is a documentation input file, not D source
bool hasAlwaysInlines; // contains references to functions that must be inlined
bool isPackageFile; // if it is a package.d
Package pkg; // if isPackageFile is true, the Package that contains this package.d
Strings contentImportedFiles; // array of files whose content was imported
int needmoduleinfo;
int selfimports; // 0: don't know, 1: does not, 2: does
Dsymbol[void*] tagSymTab; /// ImportC: tag symbols that conflict with other symbols used as the index
/*************************************
* Return true if module imports itself.
*/
bool selfImports()
{
//printf("Module::selfImports() %s\n", toChars());
if (selfimports == 0)
{
foreach (Module m; amodules)
m.insearch = 0;
selfimports = imports(this) + 1;
foreach (Module m; amodules)
m.insearch = 0;
}
return selfimports == 2;
}
int rootimports; // 0: don't know, 1: does not, 2: does
/*************************************
* Return true if module imports root module.
*/
bool rootImports()
{
//printf("Module::rootImports() %s\n", toChars());
if (rootimports == 0)
{
foreach (Module m; amodules)
m.insearch = 0;
rootimports = 1;
foreach (Module m; amodules)
{
if (m.isRoot() && imports(m))
{
rootimports = 2;
break;
}
}
foreach (Module m; amodules)
m.insearch = 0;
}
return rootimports == 2;
}
int insearch;
Identifier searchCacheIdent;
Dsymbol searchCacheSymbol; // cached value of search
int searchCacheFlags; // cached flags
/**
* A root module is one that will be compiled all the way to
* object code. This field holds the root module that caused
* this module to be loaded. If this module is a root module,
* then it will be set to `this`. This is used to determine
* ownership of template instantiation.
*/
Module importedFrom;
Dsymbols* decldefs; // top level declarations for this Module
Modules aimports; // all imported modules
uint debuglevel; // debug level
Identifiers* debugids; // debug identifiers
Identifiers* debugidsNot; // forward referenced debug identifiers
uint versionlevel; // version level
Identifiers* versionids; // version identifiers
Identifiers* versionidsNot; // forward referenced version identifiers
MacroTable macrotable; // document comment macros
Escape* _escapetable; // document comment escapes
size_t nameoffset; // offset of module name from start of ModuleInfo
size_t namelen; // length of module name in characters
extern (D) this(const ref Loc loc, const(char)[] filename, Identifier ident, int doDocComment, int doHdrGen)
{
super(loc, ident);
const(char)[] srcfilename;
//printf("Module::Module(filename = '%.*s', ident = '%s')\n", cast(int)filename.length, filename.ptr, ident.toChars());
this.arg = filename;
srcfilename = FileName.defaultExt(filename, mars_ext);
if (target.run_noext && global.params.run &&
!FileName.ext(filename) &&
FileName.exists(srcfilename) == 0 &&
FileName.exists(filename) == 1)
{
FileName.free(srcfilename.ptr);
srcfilename = FileName.removeExt(filename); // just does a mem.strdup(filename)
}
else if (!FileName.equalsExt(srcfilename, mars_ext) &&
!FileName.equalsExt(srcfilename, hdr_ext) &&
!FileName.equalsExt(srcfilename, c_ext) &&
!FileName.equalsExt(srcfilename, i_ext) &&
!FileName.equalsExt(srcfilename, dd_ext))
{
error("source file name '%.*s' must have .%.*s extension",
cast(int)srcfilename.length, srcfilename.ptr,
cast(int)mars_ext.length, mars_ext.ptr);
fatal();
}
srcfile = FileName(srcfilename);
objfile = setOutfilename(global.params.objname, global.params.objdir, filename, target.obj_ext);
if (doDocComment)
setDocfile();
if (doHdrGen)
hdrfile = setOutfilename(global.params.hdrname, global.params.hdrdir, arg, hdr_ext);
}
extern (D) this(const(char)[] filename, Identifier ident, int doDocComment, int doHdrGen)
{
this(Loc.initial, filename, ident, doDocComment, doHdrGen);
}
static Module create(const(char)* filename, Identifier ident, int doDocComment, int doHdrGen)
{
return create(filename.toDString, ident, doDocComment, doHdrGen);
}
extern (D) static Module create(const(char)[] filename, Identifier ident, int doDocComment, int doHdrGen)
{
return new Module(Loc.initial, filename, ident, doDocComment, doHdrGen);
}
extern (C++) static Module load(Loc loc, Identifiers* packages, Identifier ident)
{
return load(loc, packages ? (*packages)[] : null, ident);
}
extern (D) static Module load(Loc loc, Identifier[] packages, Identifier ident)
{
//printf("Module::load(ident = '%s')\n", ident.toChars());
// Build module filename by turning:
// foo.bar.baz
// into:
// foo\bar\baz
const(char)[] filename = getFilename(packages, ident);
// Look for the source file
if (const result = lookForSourceFile(filename, global.path ? (*global.path)[] : null))
filename = result; // leaks
auto m = new Module(loc, filename, ident, 0, 0);
if (!m.read(loc))
return null;
if (global.params.verbose)
{
OutBuffer buf;
foreach (pid; packages)
{
buf.writestring(pid.toString());
buf.writeByte('.');
}
buf.printf("%s\t(%s)", ident.toChars(), m.srcfile.toChars());
message("import %s", buf.peekChars());
}
m = m.parse();
// Call onImport here because if the module is going to be compiled then we
// need to determine it early because it affects semantic analysis. This is
// being done after parsing the module so the full module name can be taken
// from whatever was declared in the file.
if (!m.isRoot() && Compiler.onImport(m))
{
m.importedFrom = m;
assert(m.isRoot());
}
return m;
}
override const(char)* kind() const
{
return "module";
}
/*********************************************
* Combines things into output file name for .html and .di files.
* Input:
* name Command line name given for the file, NULL if none
* dir Command line directory given for the file, NULL if none
* arg Name of the source file
* ext File name extension to use if 'name' is NULL
* global.params.preservePaths get output path from arg
* srcfile Input file - output file name must not match input file
*/
extern(D) FileName setOutfilename(const(char)[] name, const(char)[] dir, const(char)[] arg, const(char)[] ext)
{
const(char)[] docfilename;
if (name)
{
docfilename = name;
}
else
{
const(char)[] argdoc;
OutBuffer buf;
if (arg == "__stdin.d")
{
version (Posix)
import core.sys.posix.unistd : getpid;
else version (Windows)
import core.sys.windows.winbase : getpid = GetCurrentProcessId;
buf.printf("__stdin_%d.d", getpid());
arg = buf[];
}
if (global.params.preservePaths)
argdoc = arg;
else
argdoc = FileName.name(arg);
// If argdoc doesn't have an absolute path, make it relative to dir
if (!FileName.absolute(argdoc))
{
//FileName::ensurePathExists(dir);
argdoc = FileName.combine(dir, argdoc);
}
docfilename = FileName.forceExt(argdoc, ext);
}
if (FileName.equals(docfilename, srcfile.toString()))
{
error("source file and output file have same name '%s'", srcfile.toChars());
fatal();
}
return FileName(docfilename);
}
extern (D) void setDocfile()
{
docfile = setOutfilename(global.params.docname, global.params.docdir, arg, doc_ext);
}
/**
* Loads the source buffer from the given read result into `this.srcBuffer`.
*
* Will take ownership of the buffer located inside `readResult`.
*
* Params:
* loc = the location
* readResult = the result of reading a file containing the source code
*
* Returns: `true` if successful
*/
bool loadSourceBuffer(const ref Loc loc, ref File.ReadResult readResult)
{
//printf("Module::loadSourceBuffer('%s') file '%s'\n", toChars(), srcfile.toChars());
// take ownership of buffer
srcBuffer = new FileBuffer(readResult.extractSlice());
if (readResult.success)
return true;
if (FileName.equals(srcfile.toString(), "object.d"))
{
.error(loc, "cannot find source code for runtime library file 'object.d'");
errorSupplemental(loc, "dmd might not be correctly installed. Run 'dmd -man' for installation instructions.");
const dmdConfFile = global.inifilename.length ? FileName.canonicalName(global.inifilename) : "not found";
errorSupplemental(loc, "config file: %.*s", cast(int)dmdConfFile.length, dmdConfFile.ptr);
}
else
{
// if module is not named 'package' but we're trying to read 'package.d', we're looking for a package module
bool isPackageMod = (strcmp(toChars(), "package") != 0) && (strcmp(srcfile.name(), package_d) == 0 || (strcmp(srcfile.name(), package_di) == 0));
if (isPackageMod)
.error(loc, "importing package '%s' requires a 'package.d' file which cannot be found in '%s'", toChars(), srcfile.toChars());
else
error(loc, "is in file '%s' which cannot be read", srcfile.toChars());
}
if (!global.gag)
{
/* Print path
*/
if (global.path)
{
foreach (i, p; *global.path)
fprintf(stderr, "import path[%llu] = %s\n", cast(ulong)i, p);
}
else
{
fprintf(stderr, "Specify path to file '%s' with -I switch\n", srcfile.toChars());
}
removeHdrFilesAndFail(global.params, Module.amodules);
}
return false;
}
/**
* Reads the file from `srcfile` and loads the source buffer.
*
* If makefile module dependency is requested, we add this module
* to the list of dependencies from here.
*
* Params:
* loc = the location
*
* Returns: `true` if successful
* See_Also: loadSourceBuffer
*/
bool read(const ref Loc loc)
{
if (srcBuffer)
return true; // already read
//printf("Module::read('%s') file '%s'\n", toChars(), srcfile.toChars());
auto readResult = File.read(srcfile.toChars());
if (global.params.emitMakeDeps)
{
global.params.makeDeps.push(srcfile.toChars());
}
return loadSourceBuffer(loc, readResult);
}
/// syntactic parse
Module parse()
{
return parseModule!ASTCodegen();
}
/// ditto
extern (D) Module parseModule(AST)()
{
enum Endian { little, big}
enum SourceEncoding { utf16, utf32}
/*
* Convert a buffer from UTF32 to UTF8
* Params:
* Endian = is the buffer big/little endian
* buf = buffer of UTF32 data
* Returns:
* input buffer reencoded as UTF8
*/
char[] UTF32ToUTF8(Endian endian)(const(char)[] buf)
{
static if (endian == Endian.little)
alias readNext = Port.readlongLE;
else
alias readNext = Port.readlongBE;
if (buf.length & 3)
{
error("odd length of UTF-32 char source %llu", cast(ulong) buf.length);
fatal();
}
const (uint)[] eBuf = cast(const(uint)[])buf;
OutBuffer dbuf;
dbuf.reserve(eBuf.length);
foreach (i; 0 .. eBuf.length)
{
const u = readNext(&eBuf[i]);
if (u & ~0x7F)
{
if (u > 0x10FFFF)
{
error("UTF-32 value %08x greater than 0x10FFFF", u);
fatal();
}
dbuf.writeUTF8(u);
}
else
dbuf.writeByte(u);
}
dbuf.writeByte(0); //add null terminator
return dbuf.extractSlice();
}
/*
* Convert a buffer from UTF16 to UTF8
* Params:
* Endian = is the buffer big/little endian
* buf = buffer of UTF16 data
* Returns:
* input buffer reencoded as UTF8
*/
char[] UTF16ToUTF8(Endian endian)(const(char)[] buf)
{
static if (endian == Endian.little)
alias readNext = Port.readwordLE;
else
alias readNext = Port.readwordBE;
if (buf.length & 1)
{
error("odd length of UTF-16 char source %llu", cast(ulong) buf.length);
fatal();
}
const (ushort)[] eBuf = cast(const(ushort)[])buf;
OutBuffer dbuf;
dbuf.reserve(eBuf.length);
//i will be incremented in the loop for high codepoints
foreach (ref i; 0 .. eBuf.length)
{
uint u = readNext(&eBuf[i]);
if (u & ~0x7F)
{
if (0xD800 <= u && u < 0xDC00)
{
i++;
if (i >= eBuf.length)
{
error("surrogate UTF-16 high value %04x at end of file", u);
fatal();
}
const u2 = readNext(&eBuf[i]);
if (u2 < 0xDC00 || 0xE000 <= u2)
{
error("surrogate UTF-16 low value %04x out of range", u2);
fatal();
}
u = (u - 0xD7C0) << 10;
u |= (u2 - 0xDC00);
}
else if (u >= 0xDC00 && u <= 0xDFFF)
{
error("unpaired surrogate UTF-16 value %04x", u);
fatal();
}
else if (u == 0xFFFE || u == 0xFFFF)
{
error("illegal UTF-16 value %04x", u);
fatal();
}
dbuf.writeUTF8(u);
}
else
dbuf.writeByte(u);
}
dbuf.writeByte(0); //add a terminating null byte
return dbuf.extractSlice();
}
const(char)* srcname = srcfile.toChars();
//printf("Module::parse(srcname = '%s')\n", srcname);
isPackageFile = (strcmp(srcfile.name(), package_d) == 0 ||
strcmp(srcfile.name(), package_di) == 0);
const(char)[] buf = cast(const(char)[]) srcBuffer.data;
bool needsReencoding = true;
bool hasBOM = true; //assume there's a BOM
Endian endian;
SourceEncoding sourceEncoding;
if (buf.length >= 2)
{
/* Convert all non-UTF-8 formats to UTF-8.
* BOM : http://www.unicode.org/faq/utf_bom.html
* 00 00 FE FF UTF-32BE, big-endian
* FF FE 00 00 UTF-32LE, little-endian
* FE FF UTF-16BE, big-endian
* FF FE UTF-16LE, little-endian
* EF BB BF UTF-8
*/
if (buf[0] == 0xFF && buf[1] == 0xFE)
{
endian = Endian.little;
sourceEncoding = buf.length >= 4 && buf[2] == 0 && buf[3] == 0
? SourceEncoding.utf32
: SourceEncoding.utf16;
}
else if (buf[0] == 0xFE && buf[1] == 0xFF)
{
endian = Endian.big;
sourceEncoding = SourceEncoding.utf16;
}
else if (buf.length >= 4 && buf[0] == 0 && buf[1] == 0 && buf[2] == 0xFE && buf[3] == 0xFF)
{
endian = Endian.big;
sourceEncoding = SourceEncoding.utf32;
}
else if (buf.length >= 3 && buf[0] == 0xEF && buf[1] == 0xBB && buf[2] == 0xBF)
{
needsReencoding = false;//utf8 with BOM
}
else
{
/* There is no BOM. Make use of Arcane Jill's insight that
* the first char of D source must be ASCII to
* figure out the encoding.
*/
hasBOM = false;
if (buf.length >= 4 && buf[1] == 0 && buf[2] == 0 && buf[3] == 0)
{
endian = Endian.little;
sourceEncoding = SourceEncoding.utf32;
}
else if (buf.length >= 4 && buf[0] == 0 && buf[1] == 0 && buf[2] == 0)
{
endian = Endian.big;
sourceEncoding = SourceEncoding.utf32;
}
else if (buf.length >= 2 && buf[1] == 0) //try to check for UTF-16
{
endian = Endian.little;
sourceEncoding = SourceEncoding.utf16;
}
else if (buf[0] == 0)
{
endian = Endian.big;
sourceEncoding = SourceEncoding.utf16;
}
else {
// It's UTF-8
needsReencoding = false;
if (buf[0] >= 0x80)
{
error("source file must start with BOM or ASCII character, not \\x%02X", buf[0]);
fatal();
}
}
}
//throw away BOM
if (hasBOM)
{
if (!needsReencoding) buf = buf[3..$];// utf-8 already
else if (sourceEncoding == SourceEncoding.utf32) buf = buf[4..$];
else buf = buf[2..$]; //utf 16
}
}
// Assume the buffer is from memory and has not be read from disk. Assume UTF-8.
else if (buf.length >= 1 && (buf[0] == '\0' || buf[0] == 0x1A))
needsReencoding = false;
//printf("%s, %d, %d, %d\n", srcfile.name.toChars(), needsReencoding, endian == Endian.little, sourceEncoding == SourceEncoding.utf16);
if (needsReencoding)
{
if (sourceEncoding == SourceEncoding.utf16)
{
buf = endian == Endian.little
? UTF16ToUTF8!(Endian.little)(buf)
: UTF16ToUTF8!(Endian.big)(buf);
}
else
{
buf = endian == Endian.little
? UTF32ToUTF8!(Endian.little)(buf)
: UTF32ToUTF8!(Endian.big)(buf);
}
}
/* If it starts with the string "Ddoc", then it's a documentation
* source file.
*/
if (buf.length>= 4 && buf[0..4] == "Ddoc")
{
comment = buf.ptr + 4;
isDocFile = true;
if (!docfile)
setDocfile();
return this;
}
/* If it has the extension ".dd", it is also a documentation
* source file. Documentation source files may begin with "Ddoc"
* but do not have to if they have the .dd extension.
* https://issues.dlang.org/show_bug.cgi?id=15465
*/
if (FileName.equalsExt(arg, dd_ext))
{
comment = buf.ptr; // the optional Ddoc, if present, is handled above.
isDocFile = true;
if (!docfile)
setDocfile();
return this;
}
/* If it has the extension ".di", it is a "header" file.
*/
if (FileName.equalsExt(arg, hdr_ext))
{
isHdrFile = true;
}
/* If it has the extension ".c", it is a "C" file.
* If it has the extension ".i", it is a preprocessed "C" file.
*/
if (FileName.equalsExt(arg, c_ext) || FileName.equalsExt(arg, i_ext))
{
isCFile = true;
scope p = new CParser!AST(this, buf, cast(bool) docfile, target.c);
p.nextToken();
members = p.parseModule();
md = p.md;
numlines = p.scanloc.linnum;
}
else
{
scope p = new Parser!AST(this, buf, cast(bool) docfile);
p.nextToken();
members = p.parseModule();
md = p.md;
numlines = p.scanloc.linnum;
}
srcBuffer.destroy();
srcBuffer = null;
/* The symbol table into which the module is to be inserted.
*/
DsymbolTable dst;
if (md)
{
/* A ModuleDeclaration, md, was provided.
* The ModuleDeclaration sets the packages this module appears in, and
* the name of this module.
*/
this.ident = md.id;
Package ppack = null;
dst = Package.resolve(md.packages, &this.parent, &ppack);
// Mark the package path as accessible from the current module
// https://issues.dlang.org/show_bug.cgi?id=21661
// Code taken from Import.addPackageAccess()
if (md.packages.length > 0)
{
// module a.b.c.d;
auto p = ppack; // a
addAccessiblePackage(p, Visibility(Visibility.Kind.private_));
foreach (id; md.packages[1 .. $]) // [b, c]
{
p = cast(Package) p.symtab.lookup(id);
if (p is null)
break;
addAccessiblePackage(p, Visibility(Visibility.Kind.private_));
}
}
assert(dst);
Module m = ppack ? ppack.isModule() : null;
if (m && (strcmp(m.srcfile.name(), package_d) != 0 &&
strcmp(m.srcfile.name(), package_di) != 0))
{
.error(md.loc, "package name '%s' conflicts with usage as a module name in file %s", ppack.toPrettyChars(), m.srcfile.toChars());
}
}
else
{
/* The name of the module is set to the source file name.
* There are no packages.
*/
dst = modules; // and so this module goes into global module symbol table
/* Check to see if module name is a valid identifier
*/
if (!Identifier.isValidIdentifier(this.ident.toChars()))
error("has non-identifier characters in filename, use module declaration instead");
}
// Insert module into the symbol table
Dsymbol s = this;
if (isPackageFile)
{
/* If the source tree is as follows:
* pkg/
* +- package.d
* +- common.d
* the 'pkg' will be incorporated to the internal package tree in two ways:
* import pkg;
* and:
* import pkg.common;
*
* If both are used in one compilation, 'pkg' as a module (== pkg/package.d)
* and a package name 'pkg' will conflict each other.
*
* To avoid the conflict:
* 1. If preceding package name insertion had occurred by Package::resolve,
* reuse the previous wrapping 'Package' if it exists
* 2. Otherwise, 'package.d' wrapped by 'Package' is inserted to the internal tree in here.
*
* Then change Package::isPkgMod to PKG.module_ and set Package::mod.
*
* Note that the 'wrapping Package' is the Package that contains package.d and other submodules,
* the one inserted to the symbol table.
*/
auto ps = dst.lookup(ident);
Package p = ps ? ps.isPackage() : null;
if (p is null)
{
p = new Package(Loc.initial, ident);
p.tag = this.tag; // reuse the same package tag
p.symtab = new DsymbolTable();
}
this.tag = p.tag; // reuse the 'older' package tag
this.pkg = p;
p.parent = this.parent;
p.isPkgMod = PKG.module_;
p.mod = this;
s = p;
}
if (!dst.insert(s))
{
/* It conflicts with a name that is already in the symbol table.
* Figure out what went wrong, and issue error message.
*/
Dsymbol prev = dst.lookup(ident);
assert(prev);
if (Module mprev = prev.isModule())
{
if (!FileName.equals(srcname, mprev.srcfile.toChars()))
error(loc, "from file %s conflicts with another module %s from file %s", srcname, mprev.toChars(), mprev.srcfile.toChars());
else if (isRoot() && mprev.isRoot())
error(loc, "from file %s is specified twice on the command line", srcname);
else
error(loc, "from file %s must be imported with 'import %s;'", srcname, toPrettyChars());
// https://issues.dlang.org/show_bug.cgi?id=14446
// Return previously parsed module to avoid AST duplication ICE.
return mprev;
}
else if (Package pkg = prev.isPackage())
{
// 'package.d' loaded after a previous 'Package' insertion
if (isPackageFile)
amodules.push(this); // Add to global array of all modules
else
error(md ? md.loc : loc, "from file %s conflicts with package name %s", srcname, pkg.toChars());
}
else
assert(global.errors);
}
else
{
// Add to global array of all modules
amodules.push(this);
}
Compiler.onParseModule(this);
return this;
}
override void importAll(Scope* prevsc)
{
//printf("+Module::importAll(this = %p, '%s'): parent = %p\n", this, toChars(), parent);
if (_scope)
return; // already done
if (isDocFile)
{
error("is a Ddoc file, cannot import it");
return;
}
/* Note that modules get their own scope, from scratch.
* This is so regardless of where in the syntax a module
* gets imported, it is unaffected by context.
* Ignore prevsc.
*/
Scope* sc = Scope.createGlobal(this); // create root scope
if (md && md.msg)
md.msg = semanticString(sc, md.msg, "deprecation message");
// Add import of "object", even for the "object" module.
// If it isn't there, some compiler rewrites, like
// classinst == classinst -> .object.opEquals(classinst, classinst)
// would fail inside object.d.
if (members.dim == 0 || (*members)[0].ident != Id.object ||
(*members)[0].isImport() is null)
{
auto im = new Import(Loc.initial, null, Id.object, null, 0);
members.shift(im);
}
if (!symtab)
{
// Add all symbols into module's symbol table
symtab = new DsymbolTable();
for (size_t i = 0; i < members.dim; i++)
{
Dsymbol s = (*members)[i];
s.addMember(sc, sc.scopesym);
}
}
// anything else should be run after addMember, so version/debug symbols are defined
/* Set scope for the symbols so that if we forward reference
* a symbol, it can possibly be resolved on the spot.
* If this works out well, it can be extended to all modules
* before any semantic() on any of them.
*/
setScope(sc); // remember module scope for semantic
for (size_t i = 0; i < members.dim; i++)
{
Dsymbol s = (*members)[i];
s.setScope(sc);
}
for (size_t i = 0; i < members.dim; i++)
{
Dsymbol s = (*members)[i];
s.importAll(sc);
}
sc = sc.pop();
sc.pop(); // 2 pops because Scope.createGlobal() created 2
}
/**********************************
* Determine if we need to generate an instance of ModuleInfo
* for this Module.
*/
int needModuleInfo()
{
//printf("needModuleInfo() %s, %d, %d\n", toChars(), needmoduleinfo, global.params.cov);
return needmoduleinfo || global.params.cov;
}
/*******************************************
* Print deprecation warning if we're deprecated, when
* this module is imported from scope sc.
*
* Params:
* sc = the scope into which we are imported
* loc = the location of the import statement
*/
void checkImportDeprecation(const ref Loc loc, Scope* sc)
{
if (md && md.isdeprecated && !sc.isDeprecated)
{
Expression msg = md.msg;
if (StringExp se = msg ? msg.toStringExp() : null)
{
const slice = se.peekString();
deprecation(loc, "is deprecated - %.*s", cast(int)slice.length, slice.ptr);
}
else
deprecation(loc, "is deprecated");
}
}
override Dsymbol search(const ref Loc loc, Identifier ident, int flags = SearchLocalsOnly)
{
/* Since modules can be circularly referenced,
* need to stop infinite recursive searches.
* This is done with the cache.
*/
//printf("%s Module.search('%s', flags = x%x) insearch = %d\n", toChars(), ident.toChars(), flags, insearch);
if (insearch)
return null;
/* Qualified module searches always search their imports,
* even if SearchLocalsOnly
*/
if (!(flags & SearchUnqualifiedModule))
flags &= ~(SearchUnqualifiedModule | SearchLocalsOnly);
if (searchCacheIdent == ident && searchCacheFlags == flags)
{
//printf("%s Module::search('%s', flags = %d) insearch = %d searchCacheSymbol = %s\n",
// toChars(), ident.toChars(), flags, insearch, searchCacheSymbol ? searchCacheSymbol.toChars() : "null");
return searchCacheSymbol;
}
uint errors = global.errors;
insearch = 1;
Dsymbol s = ScopeDsymbol.search(loc, ident, flags);
insearch = 0;
if (errors == global.errors)
{
// https://issues.dlang.org/show_bug.cgi?id=10752
// Can cache the result only when it does not cause
// access error so the side-effect should be reproduced in later search.
searchCacheIdent = ident;
searchCacheSymbol = s;
searchCacheFlags = flags;
}
return s;
}
override bool isPackageAccessible(Package p, Visibility visibility, int flags = 0)
{
if (insearch) // don't follow import cycles
return false;
insearch = true;
scope (exit)
insearch = false;
if (flags & IgnorePrivateImports)
visibility = Visibility(Visibility.Kind.public_); // only consider public imports
return super.isPackageAccessible(p, visibility);
}
override Dsymbol symtabInsert(Dsymbol s)
{
searchCacheIdent = null; // symbol is inserted, so invalidate cache
return Package.symtabInsert(s);
}
void deleteObjFile()
{
if (global.params.obj)
File.remove(objfile.toChars());
if (docfile)
File.remove(docfile.toChars());
}
/*******************************************
* Can't run semantic on s now, try again later.
*/
extern (D) static void addDeferredSemantic(Dsymbol s)
{
//printf("Module::addDeferredSemantic('%s')\n", s.toChars());
deferred.push(s);
}
extern (D) static void addDeferredSemantic2(Dsymbol s)
{
//printf("Module::addDeferredSemantic2('%s')\n", s.toChars());
deferred2.push(s);
}
extern (D) static void addDeferredSemantic3(Dsymbol s)
{
//printf("Module::addDeferredSemantic3('%s')\n", s.toChars());
deferred3.push(s);
}
/******************************************
* Run semantic() on deferred symbols.
*/
static void runDeferredSemantic()
{
if (dprogress == 0)
return;
__gshared int nested;
if (nested)
return;
//if (deferred.dim) printf("+Module::runDeferredSemantic(), len = %d\n", deferred.dim);
nested++;
size_t len;
do
{
dprogress = 0;
len = deferred.dim;
if (!len)
break;
Dsymbol* todo;
Dsymbol* todoalloc = null;
Dsymbol tmp;
if (len == 1)
{
todo = &tmp;
}
else
{
todo = cast(Dsymbol*)Mem.check(malloc(len * Dsymbol.sizeof));
todoalloc = todo;
}
memcpy(todo, deferred.tdata(), len * Dsymbol.sizeof);
deferred.setDim(0);
foreach (i; 0..len)
{
Dsymbol s = todo[i];
s.dsymbolSemantic(null);
//printf("deferred: %s, parent = %s\n", s.toChars(), s.parent.toChars());
}
//printf("\tdeferred.dim = %d, len = %d, dprogress = %d\n", deferred.dim, len, dprogress);
if (todoalloc)
free(todoalloc);
}
while (deferred.dim < len || dprogress); // while making progress
nested--;
//printf("-Module::runDeferredSemantic(), len = %d\n", deferred.dim);
}
static void runDeferredSemantic2()
{
Module.runDeferredSemantic();
Dsymbols* a = &Module.deferred2;
for (size_t i = 0; i < a.dim; i++)
{
Dsymbol s = (*a)[i];
//printf("[%d] %s semantic2a\n", i, s.toPrettyChars());
s.semantic2(null);
if (global.errors)
break;
}
a.setDim(0);
}
static void runDeferredSemantic3()
{
Module.runDeferredSemantic2();
Dsymbols* a = &Module.deferred3;
for (size_t i = 0; i < a.dim; i++)
{
Dsymbol s = (*a)[i];
//printf("[%d] %s semantic3a\n", i, s.toPrettyChars());
s.semantic3(null);
if (global.errors)
break;
}
a.setDim(0);
}
extern (D) static void clearCache()
{
foreach (Module m; amodules)
m.searchCacheIdent = null;
}
/************************************
* Recursively look at every module this module imports,
* return true if it imports m.
* Can be used to detect circular imports.
*/
int imports(Module m)
{
//printf("%s Module::imports(%s)\n", toChars(), m.toChars());
version (none)
{
foreach (i, Module mi; aimports)
printf("\t[%d] %s\n", cast(int) i, mi.toChars());
}
foreach (Module mi; aimports)
{
if (mi == m)
return true;
if (!mi.insearch)
{
mi.insearch = 1;
int r = mi.imports(m);
if (r)
return r;
}
}
return false;
}
bool isRoot()
{
return this.importedFrom == this;
}
// true if the module source file is directly
// listed in command line.
bool isCoreModule(Identifier ident)
{
return this.ident == ident && parent && parent.ident == Id.core && !parent.parent;
}
// Back end
int doppelganger; // sub-module
Symbol* cov; // private uint[] __coverage;
uint* covb; // bit array of valid code line numbers
Symbol* sictor; // module order independent constructor
Symbol* sctor; // module constructor
Symbol* sdtor; // module destructor
Symbol* ssharedctor; // module shared constructor
Symbol* sshareddtor; // module shared destructor
Symbol* stest; // module unit test
Symbol* sfilename; // symbol for filename
uint[uint] ctfe_cov; /// coverage information from ctfe execution_count[line]
override inout(Module) isModule() inout
{
return this;
}
override void accept(Visitor v)
{
v.visit(this);
}
/***********************************************
* Writes this module's fully-qualified name to buf
* Params:
* buf = The buffer to write to
*/
void fullyQualifiedName(ref OutBuffer buf)
{
buf.writestring(ident.toString());
for (auto package_ = parent; package_ !is null; package_ = package_.parent)
{
buf.prependstring(".");
buf.prependstring(package_.ident.toChars());
}
}
/** Lazily initializes and returns the escape table.
Turns out it eats a lot of memory.
*/
extern(D) Escape* escapetable()
{
if (!_escapetable)
_escapetable = new Escape();
return _escapetable;
}
}
/***********************************************************
*/
extern (C++) struct ModuleDeclaration
{
Loc loc;
Identifier id;
Identifier[] packages; // array of Identifier's representing packages
bool isdeprecated; // if it is a deprecated module
Expression msg;
extern (D) this(const ref Loc loc, Identifier[] packages, Identifier id, Expression msg, bool isdeprecated)
{
this.loc = loc;
this.packages = packages;
this.id = id;
this.msg = msg;
this.isdeprecated = isdeprecated;
}
extern (C++) const(char)* toChars() const
{
OutBuffer buf;
foreach (pid; packages)
{
buf.writestring(pid.toString());
buf.writeByte('.');
}
buf.writestring(id.toString());
return buf.extractChars();
}
/// Provide a human readable representation
extern (D) const(char)[] toString() const
{
return this.toChars().toDString;
}
}
|
D
|
/Users/augustomachado/github/rust_sudoku/sudoku/target/debug/build/num-rational-40c73385b6669cce/build_script_build-40c73385b6669cce: /Users/augustomachado/.cargo/registry/src/github.com-1ecc6299db9ec823/num-rational-0.3.2/build.rs
/Users/augustomachado/github/rust_sudoku/sudoku/target/debug/build/num-rational-40c73385b6669cce/build_script_build-40c73385b6669cce.d: /Users/augustomachado/.cargo/registry/src/github.com-1ecc6299db9ec823/num-rational-0.3.2/build.rs
/Users/augustomachado/.cargo/registry/src/github.com-1ecc6299db9ec823/num-rational-0.3.2/build.rs:
|
D
|
module cruft;
import std.stdio;
import derelict.util.exception;
import gl;
private ShouldThrow handleDerelictsProblems(string symbolName) {
writeln("Failed to load ", symbolName, ", ignoring this.");
return ShouldThrow.No;
}
private SDL_Window* win = null;
private SDL_GLContext glctx = null;
private GLuint vao = 0;
private enum {
Width = 800,
Height = 600
}
void InitCruft(){
DerelictSDL2.missingSymbolCallback = &handleDerelictsProblems;
DerelictSDL2ttf.load();
DerelictSDL2.load();
DerelictGL3.load();
scope(failure) SDL_Quit();
if(SDL_Init(SDL_INIT_EVERYTHING) < 0){
throw new Exception("SDL Init failed");
}
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
win = SDL_CreateWindow("ProcSphere", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, Width, Height,
SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS*0);
scope(failure) SDL_DestroyWindow(win);
if(!win){
throw new Exception("Window create failed");
}
scope(failure) SDL_GL_DeleteContext(glctx);
glctx = SDL_GL_CreateContext(win);
if(!glctx) throw new Exception("GL context creation failed");
DerelictGL3.reload();
glGenVertexArrays(1, &vao);
glBindVertexArray(vao);
assert(CheckGLError());
glEnable(GL_CULL_FACE);
glEnable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
assert(CheckGLError());
if(TTF_Init() < 0){
throw new Exception("SDL_TTF init failed");
}
}
void DeinitCruft(){
glDeleteVertexArrays(1, &vao);
SDL_GL_DeleteContext(glctx);
SDL_DestroyWindow(win);
SDL_Quit();
}
void Swap(){
SDL_GL_SwapWindow(win);
}
bool CheckGLError(){
GLuint error = glGetError();
switch(error){
case GL_INVALID_ENUM:
writeln("InvalidEnum");
break;
case GL_INVALID_VALUE:
writeln("InvalidValue");
break;
case GL_INVALID_OPERATION:
writeln("InvalidOperation");
break;
case GL_INVALID_FRAMEBUFFER_OPERATION:
writeln("InvalidFramebufferOperation");
break;
case GL_OUT_OF_MEMORY:
writeln("OutOfMemory");
break;
case GL_NO_ERROR:
default:
return true;
}
stdout.flush();
return false;
}
void WarpToCenter(){
SDL_WarpMouseInWindow(win, Width/2, Height/2);
}
|
D
|
#!/usr/bin/env rdmd
/**
DMD builder
Usage:
./build.d dmd
TODO:
- add all posix.mak Makefile targets
- support 32-bit builds
- test on OSX
- test on Windows
- allow appending DFLAGS via the environment
- test the script with LDC or GDC as host compiler
*/
version(CoreDdoc) {} else:
import std.algorithm, std.conv, std.datetime, std.exception, std.file, std.format, std.functional,
std.getopt, std.parallelism, std.path, std.process, std.range, std.stdio, std.string;
import core.stdc.stdlib : exit;
const thisBuildScript = __FILE_FULL_PATH__;
const srcDir = thisBuildScript.dirName.buildNormalizedPath;
shared bool verbose; // output verbose logging
shared bool force; // always build everything (ignores timestamp checking)
__gshared string[string] env;
__gshared string[][string] flags;
__gshared typeof(sourceFiles()) sources;
/// Array of dependencies through which all other dependencies can be reached
immutable rootDeps = [
&dmdDefault,
&runDmdUnittest,
&clean,
];
void main(string[] args)
{
int jobs = totalCPUs;
auto res = getopt(args,
"j|jobs", "Specifies the number of jobs (commands) to run simultaneously (default: %d)".format(totalCPUs), &jobs,
"v", "Verbose command output", (cast(bool*) &verbose),
"f", "Force run (ignore timestamps and always run all tests)", (cast(bool*) &force),
);
void showHelp()
{
defaultGetoptPrinter(`./build.d <targets>...
Examples
--------
./build.d dmd # build DMD
./build.d unittest # runs internal unittests
./build.d clean # remove all generated files
./build.d generated/linux/release/64/dmd.conf
Important variables:
--------------------
HOST_DMD: Host D compiler to use for bootstrapping
AUTO_BOOTSTRAP: Enable auto-boostrapping by downloading a stable DMD binary
MODEL: Target architecture to build for (32,64) - defaults to the host architecture
Build modes:
------------
BUILD: release (default) | debug (enabled a build with debug instructions)
Opt-in build features:
ENABLE_RELEASE: Optimized release built
ENABLE_DEBUG: Add debug instructions and symbols (set if ENABLE_RELEASE isn't set)
ENABLE_LTO: Enable link-time optimizations
ENABLE_UNITTEST: Build dmd with unittests (sets ENABLE_COVERAGE=1)
ENABLE_PROFILE: Build dmd with a profiling recorder (D)
ENABLE_COVERAGE Build dmd with coverage counting
ENABLE_SANITIZERS Build dmd with sanitizer (e.g. ENABLE_SANITIZERS=address,undefined)
Targets
-------
` ~ targetsHelp ~ `
The generated files will be in generated/$(OS)/$(BUILD)/$(MODEL)
Command-line parameters
-----------------------
`, res.options);
return;
}
// parse arguments
args.popFront;
args2Environment(args);
parseEnvironment;
processEnvironment;
sources = sourceFiles;
if (res.helpWanted)
return showHelp;
// default target
if (!args.length)
args = ["dmd"];
auto targets = args
.predefinedTargets // preprocess
.array;
if (targets.length == 0)
return showHelp;
if (verbose)
{
log("================================================================================");
foreach (key, value; env)
log("%s=%s", key, value);
log("================================================================================");
}
foreach (target; targets.parallel(1))
target();
writeln("Success");
}
/// Generate list of targets for use in the help message
string targetsHelp()
{
string result = "";
foreach (dep; DependencyRange(rootDeps.map!(a => a()).array))
{
if (dep.name)
{
enum defaultPrefix = "\n ";
result ~= dep.name;
string prefix = defaultPrefix[1 + dep.name.length .. $];
void add(string msg)
{
result ~= format("%s%s", prefix, msg);
prefix = defaultPrefix;
}
if (dep.description)
add(dep.description);
else if (dep.targets)
{
foreach (target; dep.targets)
{
add(target.relativePath);
}
}
result ~= "\n";
}
}
return result;
}
/**
D build dependencies
====================
The strategy of this script is to emulate what the Makefile is doing,
but without a complicated dependency and dependency system.
The "dependency system" used here is rather naive and only parallelizes the
build of the backend and lexer (writing a few config files doesn't take much time).
However, it does skip steps when the source files are younger than the target
and thus supports partial rebuilds.
Below all individual dependencies of DMD are defined.
They have a target path, sources paths and an optional name.
When a dependency is needed either its command or custom commandFunction is executed.
A dependency will be skipped if all targets are older than all sources.
This script is by default part of the sources and thus any change to the build script,
will trigger a full rebuild.
The function buildDMD defines the build order of its dependencies.
*/
/// Returns: the dependency that builds the lexer
alias lexer = memoize!defineLexer;
auto defineLexer()
{
Dependency dependency = {
name: "lexer",
target: env["G"].buildPath("lexer").libName,
sources: sources.lexer,
deps: [versionFile, sysconfDirFile],
msg: "(DC) D_LEXER_OBJ %-(%s, %)".format(sources.lexer.map!(e => e.baseName).array),
command: [
env["HOST_DMD_RUN"],
"-of$@",
"-lib",
"-J"~env["G"], "-J../res",
].chain(flags["DFLAGS"], "$<".only).array
};
return new DependencyRef(dependency);
}
/// Returns: the dependency that generates the dmd.conf file in the output folder
alias dmdConf = memoize!defineDmdConf;
auto defineDmdConf()
{
// TODO: add support for Windows
string exportDynamic;
version(OSX) {} else
exportDynamic = " -L--export-dynamic";
auto conf = `[Environment32]
DFLAGS=-I%@P%/../../../../../druntime/import -I%@P%/../../../../../phobos -L-L%@P%/../../../../../phobos/generated/{OS}/{BUILD}/32{exportDynamic}
[Environment64]
DFLAGS=-I%@P%/../../../../../druntime/import -I%@P%/../../../../../phobos -L-L%@P%/../../../../../phobos/generated/{OS}/{BUILD}/64{exportDynamic} -fPIC`
.replace("{exportDynamic}", exportDynamic)
.replace("{BUILD}", env["BUILD"])
.replace("{OS}", env["OS"]);
auto target = env["G"].buildPath("dmd.conf");
auto commandFunction = (){
conf.toFile(target);
}; // defined separately to support older D compilers
Dependency dependency = {
name: "dmdconf",
target: target,
msg: "(TX) DMD_CONF",
commandFunction: commandFunction,
};
return new DependencyRef(dependency);
}
/// Returns: the dependency that builds and executes the optabgen utility
alias opTabGen = memoize!defineOpTabGen;
auto defineOpTabGen()
{
auto opTabFiles = ["debtab.d", "optab.d", "cdxxx.d", "elxxx.d", "fltables.d", "tytab.d"];
auto opTabFilesBin = opTabFiles.map!(e => env["G"].buildPath(e)).array;
auto opTabBin = env["G"].buildPath("optabgen").exeName;
auto opTabSourceFile = env["C"].buildPath("optabgen.d");
auto commandFunction = (){
auto args = [env["HOST_DMD_RUN"], opTabSourceFile, "-of" ~ opTabBin];
args ~= flags["DFLAGS"];
writefln("(DC) OPTABGEN %s", opTabSourceFile.baseName);
args.runCanThrow;
writefln("(RUN) OPTABBIN %-(%s, %)", opTabFiles);
[opTabBin].runCanThrow;
// move the generated files to the generated folder
opTabFiles.map!(a => srcDir.buildPath(a)).zip(opTabFilesBin).each!(a => a.expand.rename);
}; // defined separately to support older D compilers
Dependency dependency = {
name: "optabgen",
description: "Generate source files for the backend",
targets: opTabFilesBin,
sources: [opTabSourceFile],
commandFunction: commandFunction,
};
return new DependencyRef(dependency);
}
/// Returns: the dependencies that build the D backend
alias dBackend = memoize!defineDBackend;
auto defineDBackend()
{
Dependency dependency = {
name: "dbackend",
target: env["G"].buildPath("dbackend").objName,
sources: sources.backend,
msg: "(DC) D_BACK_OBJS %-(%s, %)".format(sources.backend.map!(e => e.baseName).array),
deps: [opTabGen],
command: [
env["HOST_DMD_RUN"],
"-c",
"-of$@",
"-betterC",
].chain(flags["DFLAGS"], "$<".only).array
};
return new DependencyRef(dependency);
}
/// Execute the sub-dependencies of the backend and pack everything into one object file
alias backend = memoize!defineBackend;
auto defineBackend()
{
// Pack the backend
Dependency dependency = {
name: "backend",
msg: "(LIB) %s".format("BACKEND".libName),
sources: [ env["G"].buildPath("dbackend").objName ],
target: env["G"].buildPath("backend").libName,
deps: [opTabGen, dBackend],
command: [env["HOST_DMD_RUN"], env["MODEL_FLAG"], "-lib", "-of$@", "$<"]
};
return new DependencyRef(dependency);
}
/// Returns: the dependencies that generate required string files: VERSION and SYSCONFDIR.imp
alias versionFile = memoize!defineVersionFile;
auto defineVersionFile()
{
const versionFile = env["G"].buildPath("VERSION");
auto commandFunction = (){
"(TX) VERSION".writeln;
["git", "describe", "--dirty"].runCanThrow.toFile(versionFile);
};
Dependency dependency = {
target: versionFile,
commandFunction: commandFunction,
};
return new DependencyRef(dependency);
}
alias sysconfDirFile = memoize!defineSysconfDirFile;
auto defineSysconfDirFile()
{
const sysconfDirFile = env["G"].buildPath("SYSCONFDIR.imp");
auto commandFunction = (){
"(TX) SYSCONFDIR".writeln;
env["SYSCONFDIR"].toFile(sysconfDirFile);
};
Dependency dependency = {
sources: [thisBuildScript],
target: sysconfDirFile,
commandFunction: commandFunction,
};
return new DependencyRef(dependency);
}
/**
Dependency for the DMD executable.
Params:
extra_flags = Flags to apply to the main build but not the dependencies
*/
auto defineDmdExe(string targetSuffix, string[] extraFlags...)
{
// Main DMD build dependency
Dependency dependency = {
// newdelete.o + lexer.a + backend.a
sources: sources.dmd.chain(sources.root, lexer.targets, backend.targets).array,
target: env["DMD_PATH"] ~ targetSuffix,
msg: "(DC) DMD%s %-(%s, %)".format(targetSuffix, sources.dmd.map!(e => e.baseName).array),
deps: [versionFile, sysconfDirFile, lexer, backend],
command: [
env["HOST_DMD_RUN"],
"-of$@",
"-vtls",
"-J"~env["G"],
"-J../res",
].chain(extraFlags).chain(flags["DFLAGS"], "$<".only).array
};
return new DependencyRef(dependency);
}
auto dmdDefault() { return memoize!defineDmdDefault(); }
auto defineDmdDefault()
{
Dependency dependency = {
name: "dmd",
description: "Build dmd",
deps: [dmdConf, memoize!defineDmdExe(null, null)],
};
return new DependencyRef(dependency);
}
/// Dependency for the DMD unittest executable
auto dmdUnittestExe()
{
return memoize!defineDmdExe("-unittest", ["-version=NoMain", "-unittest", "-main"]);
}
/// Dependency to run the DMD unittest executable.
alias runDmdUnittest = memoize!defineRunDmdUnittest;
auto defineRunDmdUnittest()
{
auto commandFunction = (){
spawnProcess(dmdUnittestExe.targets[0]);
};
Dependency dependency = {
name: "unittest",
description: "Run the dmd unittests",
msg: "(RUN) DMD-UNITTEST",
deps: [dmdUnittestExe],
commandFunction: commandFunction.toDelegate,
};
return new DependencyRef(dependency);
}
alias clean = memoize!defineClean;
auto defineClean()
{
auto commandFunction = (){
if (env["G"].exists)
env["G"].rmdirRecurse;
};
Dependency dependency = {
name: "clean",
description: "Remove the generated directory",
msg: "(RM) " ~ env["G"],
commandFunction: commandFunction.toDelegate,
};
return new DependencyRef(dependency);
}
/**
Goes through the target list and replaces short-hand targets with their expanded version.
Special targets:
- clean -> removes generated directory + immediately stops the builder
Params:
targets = the target list to process
Returns:
the expanded targets
*/
auto predefinedTargets(string[] targets)
{
import std.functional : toDelegate;
Appender!(void delegate()[]) newTargets;
LtargetsLoop:
foreach (t; targets)
{
t = t.buildNormalizedPath; // remove trailing slashes
// check if `t` matches any dependency names first
foreach (dep; DependencyRange(rootDeps.map!(a => a()).array))
{
if (t == dep.name)
{
newTargets.put(&dep.run);
continue LtargetsLoop;
}
}
switch (t)
{
case "auto-tester-build":
"TODO: auto-tester-all".writeln; // TODO
break;
case "toolchain-info":
"TODO: info".writeln; // TODO
break;
case "cxx-unittest":
"TODO: cxx-unittest".writeln; // TODO
break;
case "check-examples":
"TODO: cxx-unittest".writeln; // TODO
break;
case "build-examples":
"TODO: build-examples".writeln; // TODO
break;
case "checkwhitespace":
"TODO: checkwhitespace".writeln; // TODO
break;
case "html":
"TODO: html".writeln; // TODO
break;
case "install":
"TODO: install".writeln; // TODO
break;
case "man":
"TODO: man".writeln; // TODO
break;
default:
// check this last, target paths should be checked after predefined names
foreach (dep; DependencyRange(rootDeps.map!(a => a()).array))
{
foreach (depTarget; dep.targets)
{
if (depTarget.endsWith(t))
{
newTargets.put(&dep.run);
continue LtargetsLoop;
}
}
}
writefln("ERROR: Target `%s` is unknown.", t);
writeln;
break;
}
}
return newTargets.data;
}
/// An input range for a recursive set of dependencies
struct DependencyRange
{
private DependencyRef[] next;
private bool[DependencyRef] added;
this(DependencyRef[] deps) { addDeps(deps); }
bool empty() const { return next.length == 0; }
auto front() inout { return next[0]; }
void popFront()
{
auto save = next[0];
next = next[1 .. $];
addDeps(save.deps);
}
void addDeps(DependencyRef[] deps)
{
foreach (dep; deps)
{
if (!added.get(dep, false))
{
next ~= dep;
added[dep] = true;
}
}
}
}
/// Sets the environment variables
void parseEnvironment()
{
env.getDefault("TARGET_CPU", "X86");
version (Windows)
{
// On windows, the OS environment variable is already being used by the system.
// For example, on a default Windows7 system it's configured by the system
// to be "Windows_NT".
//
// However, there are a good number of components in this repo and the other
// repos that set this environment variable to "windows" without checking whether
// it's already configured, i.e.
// dmd\src\win32.mak (OS=windows)
// druntime\win32.mak (OS=windows)
// phobos\win32.mak (OS=windows)
//
// It's necessary to emulate the same behavior in this tool in order to make this
// new tool compatible with existing tools. We can do this by also setting the
// environment variable to "windows" whether or not it already has a value.
//
const os = env["OS"] = "windows";
}
else
const os = env.getDefault("OS", detectOS);
auto build = env.getDefault("BUILD", "release");
enforce(build.among("release", "debug"), "BUILD must be 'debug' or 'release'");
// detect Model
auto model = env.getDefault("MODEL", detectModel);
env["MODEL_FLAG"] = "-m" ~ env["MODEL"];
// detect PIC
version(Posix)
{
// default to PIC on x86_64, use PIC=1/0 to en-/disable PIC.
// Note that shared libraries and C files are always compiled with PIC.
bool pic;
version(X86_64)
pic = true;
else version(X86)
pic = false;
if (environment.get("PIC", "0") == "1")
pic = true;
env["PIC_FLAG"] = pic ? "-fPIC" : "";
}
else
{
env["PIC_FLAG"] = "";
}
env.getDefault("GIT", "git");
env.getDefault("GIT_HOME", "https://github.com/dlang");
env.getDefault("SYSCONFDIR", "/etc");
env.getDefault("TMP", tempDir);
auto d = env.getDefault("D", srcDir.buildPath("dmd"));
env.getDefault("C", d.buildPath("backend"));
env.getDefault("ROOT", d.buildPath("root"));
env.getDefault("EX", d.buildPath("examples"));
auto generated = env.getDefault("GENERATED", srcDir.dirName.buildPath("generated"));
auto g = env.getDefault("G", generated.buildPath(os, build, model));
mkdirRecurse(g);
env.getDefault("HOST_DMD", "dmd");
// Auto-bootstrapping of a specific host compiler
if (env.getDefault("AUTO_BOOTSTRAP", "0") != "0")
{
auto hostDMDVer = "2.074.1";
writefln("Using Bootstrap compiler: %s", hostDMDVer);
auto hostDMDRoot = env["G"].buildPath("host_dmd-"~hostDMDVer);
auto hostDMDBase = hostDMDVer~"."~os;
auto hostDMDURL = "http://downloads.dlang.org/releases/2.x/"~hostDMDVer~"/dmd."~hostDMDBase;
env["HOST_DMD"] = hostDMDRoot.buildPath("dmd2", os, os == "osx" ? "bin" : "bin"~model, "dmd");
env["HOST_DMD_PATH"] = env["HOST_DMD"];
// TODO: use dmd.conf from the host too (in case there's a global or user-level dmd.conf)
env["HOST_DMD_RUN"] = env["HOST_DMD"];
if (!env["HOST_DMD"].exists)
{
writefln("Downloading DMD %s", hostDMDVer);
auto curlFlags = "-fsSL --retry 5 --retry-max-time 120 --connect-timeout 5 --speed-time 30 --speed-limit 1024";
hostDMDRoot.mkdirRecurse;
("curl " ~ curlFlags ~ " " ~ hostDMDURL~".tar.xz | tar -C "~hostDMDRoot~" -Jxf - || rm -rf "~hostDMDRoot).spawnShell.wait;
}
}
else
{
env["HOST_DMD_PATH"] = getHostDMDPath(env["HOST_DMD"]).strip.absolutePath;
env["HOST_DMD_RUN"] = env["HOST_DMD_PATH"];
}
if (!env["HOST_DMD_PATH"].exists)
{
stderr.writefln("No DMD compiler is installed. Try AUTO_BOOTSTRAP=1 or manually set the D host compiler with HOST_DMD");
exit(1);
}
}
/// Checks the environment variables and flags
void processEnvironment()
{
const os = env["OS"];
auto hostDMDVersion = [env["HOST_DMD_RUN"], "--version"].execute.output;
if (hostDMDVersion.find("DMD"))
env["HOST_DMD_KIND"] = "dmd";
else if (hostDMDVersion.find("LDC"))
env["HOST_DMD_KIND"] = "ldc";
else if (!hostDMDVersion.find("GDC", "gdmd")[0].empty)
env["HOST_DMD_KIND"] = "gdc";
else
enforce(0, "Invalid Host DMD found: " ~ hostDMDVersion);
env["DMD_PATH"] = env["G"].buildPath("dmd").exeName;
env.getDefault("ENABLE_WARNINGS", "0");
string[] warnings;
// TODO: allow adding new flags from the environment
string[] dflags = ["-version=MARS", "-w", "-de", "-dip25", env["PIC_FLAG"], env["MODEL_FLAG"], "-J"~env["G"]];
flags["BACK_FLAGS"] = ["-I"~env["ROOT"], "-I"~env["C"], "-I"~env["G"], "-I"~env["D"], "-DDMDV2=1"];
// TODO: add support for dObjc
auto dObjc = false;
version(OSX) version(X86_64)
dObjc = true;
if (env.getDefault("ENABLE_DEBUG", "0") != "0")
{
dflags ~= ["-g", "-debug"];
}
if (env.getDefault("ENABLE_RELEASE", "0") != "0")
{
dflags ~= ["-O", "-release", "-inline"];
}
else
{
// add debug symbols for all non-release builds
if (!dflags.canFind("-g"))
dflags ~= ["-g"];
}
if (env.getDefault("ENABLE_LTO", "0") != "0")
{
dflags ~= ["-flto=full"];
}
if (env.getDefault("ENABLE_UNITTEST", "0") != "0")
{
dflags ~= ["-unittest", "-cov"];
}
if (env.getDefault("ENABLE_PROFILE", "0") != "0")
{
dflags ~= ["-profile"];
}
if (env.getDefault("ENABLE_COVERAGE", "0") != "0")
{
dflags ~= ["-cov", "-L-lgcov"];
}
if (env.getDefault("ENABLE_SANITIZERS", "0") != "0")
{
dflags ~= ["-fsanitize="~env["ENABLE_SANITIZERS"]];
}
flags["DFLAGS"] ~= dflags;
}
////////////////////////////////////////////////////////////////////////////////
// D source files
////////////////////////////////////////////////////////////////////////////////
/// Returns: all source files for the compiler
auto sourceFiles()
{
struct Sources
{
string[] frontend, lexer, root, glue, dmd, backend;
string[] backendHeaders, backendObjects;
}
string targetCH;
string[] targetObjs;
if (env["TARGET_CPU"] == "X86")
{
targetCH = "code_x86.h";
}
else if (env["TARGET_CPU"] == "stub")
{
targetCH = "code_stub.h";
targetObjs = ["platform_stub"];
}
else
{
assert(0, "Unknown TARGET_CPU: " ~ env["TARGET_CPU"]);
}
Sources sources = {
frontend:
dirEntries(env["D"], "*.d", SpanMode.shallow)
.map!(e => e.name)
.filter!(e => !e.canFind("asttypename.d", "frontend.d"))
.array,
lexer: [
"console",
"entity",
"errors",
"globals",
"id",
"identifier",
"lexer",
"tokens",
"utf",
].map!(e => env["D"].buildPath(e ~ ".d")).chain([
"array",
"ctfloat",
"file",
"filename",
"hash",
"outbuffer",
"port",
"rmem",
"rootobject",
"stringtable",
].map!(e => env["ROOT"].buildPath(e ~ ".d"))).array,
root:
dirEntries(env["ROOT"], "*.d", SpanMode.shallow)
.map!(e => e.name)
.array,
backend:
dirEntries(env["C"], "*.d", SpanMode.shallow)
.map!(e => e.name)
.filter!(e => !e.baseName.among("dt.d", "obj.d", "optabgen.d"))
.array,
backendHeaders: [
// can't be built with -betterC
"dt",
"obj",
].map!(e => env["C"].buildPath(e ~ ".d")).array,
};
sources.dmd = sources.frontend ~ sources.backendHeaders;
return sources;
}
/**
Downloads a file from a given URL
Params:
to = Location to store the file downloaded
from = The URL to the file to download
tries = The number of times to try if an attempt to download fails
Returns: `true` if download succeeded
*/
bool download(string to, string from, uint tries = 3)
{
import std.net.curl : download, HTTPStatusException;
foreach(i; 0..tries)
{
try
{
log("Downloading %s ...", from);
download(from, to);
return true;
}
catch(HTTPStatusException e)
{
if (e.status == 404) throw e;
else
{
log("Failed to download %s (Attempt %s of %s)", from, i + 1, tries);
continue;
}
}
}
return false;
}
/**
Detects the host OS.
Returns: a string from `{windows, osx,linux,freebsd,openbsd,netbsd,dragonflybsd,solaris}`
*/
string detectOS()
{
version(Windows)
return "windows";
else version(OSX)
return "osx";
else version(linux)
return "linux";
else version(FreeBSD)
return "freebsd";
else version(OpenBSD)
return "openbsd";
else version(NetBSD)
return "netbsd";
else version(DragonFlyBSD)
return "dragonflybsd";
else version(Solaris)
return "solaris";
else
static assert(0, "Unrecognized or unsupported OS.");
}
/**
Detects the host model
Returns: 32, 64 or throws an Exception
*/
auto detectModel()
{
string uname;
if (detectOS == "solaris")
uname = ["isainfo", "-n"].execute.output;
else if (detectOS == "windows")
uname = ["wmic", "OS", "get", "OSArchitecture"].execute.output;
else
uname = ["uname", "-m"].execute.output;
if (!uname.find("x86_64", "amd64", "64-bit", "64 bit")[0].empty)
return "64";
if (!uname.find("i386", "i586", "i686", "32-bit", "32 bit")[0].empty)
return "32";
throw new Exception(`Cannot figure 32/64 model from "` ~ uname ~ `"`);
}
/**
Gets the absolute path of the host's dmd executable
Params:
hostDmd = the command used to launch the host's dmd executable
Returns: a string that is the absolute path of the host's dmd executable
*/
auto getHostDMDPath(string hostDmd)
{
version(Posix)
return ["which", hostDmd].execute.output;
else version(Windows)
return ["where", hostDmd].execute.output.lineSplitter.front;
else
static assert(false, "Unrecognized or unsupported OS.");
}
/**
Add the executable filename extension to the given `name` for the current OS.
Params:
name = the name to append the file extention to
*/
auto exeName(T)(T name)
{
version(Windows)
return name ~ ".exe";
return name;
}
/**
Add the object file extension to the given `name` for the current OS.
Params:
name = the name to append the file extention to
*/
auto objName(T)(T name)
{
version(Windows)
return name ~ ".obj";
return name ~ ".o";
}
/**
Add the library file extension to the given `name` for the current OS.
Params:
name = the name to append the file extention to
*/
auto libName(T)(T name)
{
version(Windows)
return name ~ ".lib";
return name ~ ".a";
}
/**
Add additional make-like assignments to the environment
e.g. ./build.d ARGS=foo -> sets the "ARGS" internal environment variable to "foo"
Params:
args = the command-line arguments from which the assignments will be parsed
*/
void args2Environment(ref string[] args)
{
bool tryToAdd(string arg)
{
if (!arg.canFind("="))
return false;
auto sp = arg.splitter("=");
environment[sp.front] = sp.dropOne.front;
return true;
}
args = args.filter!(a => !tryToAdd(a)).array;
}
/**
Checks whether the environment already contains a value for key and if so, sets
the found value to the new environment object.
Otherwise uses the `default_` value as fallback.
Params:
env = environment to write the check to
key = key to check for existence and write into the new env
default_ = fallback value if the key doesn't exist in the global environment
*/
auto getDefault(ref string[string] env, string key, string default_)
{
if (key in environment)
env[key] = environment[key];
else
env[key] = default_;
return env[key];
}
////////////////////////////////////////////////////////////////////////////////
// Mini build system
////////////////////////////////////////////////////////////////////////////////
/**
Determines if a target is up to date with respect to its source files
Params:
target = the target to check
source = the source file to check against
Returns: `true` if the target is up to date
*/
auto isUpToDate(string target, string source)
{
return isUpToDate(target, [source]);
}
/**
Determines if a target is up to date with respect to its source files
Params:
target = the target to check
source = the source files to check against
Returns: `true` if the target is up to date
*/
auto isUpToDate(string target, string[][] sources...)
{
return isUpToDate([target], sources);
}
/**
Checks whether any of the targets are older than the sources
Params:
targets = the targets to check
sources = the source files to check against
Returns:
`true` if the target is up to date
*/
auto isUpToDate(string[] targets, string[][] sources...)
{
if (force)
return false;
foreach (target; targets)
{
auto sourceTime = target.timeLastModified.ifThrown(SysTime.init);
// if a target has no sources, it only needs to be built once
if (sources.empty || sources.length == 1 && sources.front.empty)
return sourceTime > SysTime.init;
foreach (arg; sources)
foreach (a; arg)
if (sourceTime < a.timeLastModified.ifThrown(SysTime.init + 1.seconds))
return false;
}
return true;
}
/**
A dependency has one or more sources and yields one or more targets.
It knows how to build these target by invoking either the external command or
the commandFunction.
If a run fails, the entire build stops.
Command strings support the Make-like $@ (target path) and $< (source path)
shortcut variables.
*/
struct Dependency
{
string target; // path to the resulting target file (if target is used, it will set targets)
string[] targets; // list of all target files
string[] sources; // list of all source files
string[] rebuildSources; // Optional list of files that trigger a rebuild of this dependency
DependencyRef[] deps; // dependencies to build before this one
string[] command; // the dependency command
void delegate() commandFunction; // a custom dependency command which gets called instead of command
string msg; // msg of the dependency that is e.g. written to the CLI when it's executed
string name; /// optional string that can be used to identify this dependency
string description; /// optional string to describe this dependency rather than printing the target files
string[] trackSources;
}
class DependencyRef
{
Dependency dep;
alias dep this;
private bool executed;
this(ref Dependency dep)
{
this.dep = dep;
if (dep.target)
{
assert(!dep.targets, "target and targets cannot both be set");
this.dep.targets = [dep.target];
}
}
/// Executes the dependency
void run()
{
synchronized (this)
runSynchronized();
}
private void runSynchronized()
{
if (executed)
return;
scope (exit) executed = true;
bool depUpdated = false;
foreach (dep; deps.parallel(1))
{
dep.run();
}
if (targets && targets.isUpToDate(dep.sources, [thisBuildScript], rebuildSources))
{
if (dep.sources !is null)
log("Skipping build of %-(%s%) as it's newer than %-(%s%)", targets, dep.sources);
return;
}
// Display the execution of the dependency
if (msg)
msg.writeln;
if (commandFunction !is null)
return commandFunction();
if (command)
{
resolveShorthands();
command.runCanThrow;
}
}
/**
Resolves variables shorthands like $@ (target) and $< (source)
*/
void resolveShorthands()
{
// Support $@ (shortcut for the target path)
foreach (i, c; command)
command[i] = c.replace("$@", target);
// Support $< (shortcut for the source path)
if (!command[$ - 1].find("$<").empty)
command = command.remove(command.length - 1) ~ dep.sources;
}
}
/**
Logging primitive
Params:
args = the data to write to the log
*/
auto log(T...)(T args)
{
if (verbose)
writefln(args);
}
/**
Run a command and optionally log the invocation
Params:
args = the command and command arguments to execute
*/
auto run(T)(T args)
{
args = args.filter!(a => !a.empty).array;
log("Run: %s", args.join(" "));
return execute(args, null, Config.none, size_t.max, srcDir);
}
/**
Wrapper around execute that logs the execution
and throws an exception for a non-zero exit code.
Params:
args = the command and command arguments to execute
*/
auto runCanThrow(T)(T args)
{
auto res = run(args);
enforce(!res.status, res.output);
return res.output;
}
version (CRuntime_DigitalMars)
{
// workaround issue https://issues.dlang.org/show_bug.cgi?id=13727
auto parallel(R)(R range, size_t workUnitSize) { return range; }
}
|
D
|
template X(){}
template D(string str){}
template A(string str)
{
static if (D!(str[str]))
{}
else const string A = .X!();
}
template M(alias B)
{
const string M = A!("a");
}
void main()
{
int q = 3;
pragma(msg, M!(q));
}
|
D
|
module kasm.register;
enum Register {
r0 = "r0",
r1 = "r1",
r2 = "r2",
r3 = "r3",
r4 = "r4",
r5 = "r5",
r6 = "r6",
r7 = "r7",
r8 = "r8",
r9 = "r9",
r10 = "r10",
r11 = "r11",
r12 = "r12",
r13 = "r13",
r14 = "r14",
r15 = "r15",
}
ubyte reg_to_byte(Register reg) {
final switch (reg) with (Register) {
case r0:
return 0;
case r1:
return 1;
case r2:
return 2;
case r3:
return 3;
case r4:
return 4;
case r5:
return 5;
case r6:
return 6;
case r7:
return 7;
case r8:
return 8;
case r9:
return 9;
case r10:
return 10;
case r11:
return 11;
case r12:
return 12;
case r13:
return 13;
case r14:
return 14;
case r15:
return 15;
}
}
|
D
|
import std.stdio : writefln;
import cl = dcltk;
import derelict.opencl.cl : cl_event;
void main() {
auto platformId = cl.loadOpenCl();
writefln("loaded: %s %s %s(%s) %s [%s]",
cl.getPlatformProfile(platformId),
cl.getPlatformName(platformId),
cl.getPlatformVersion(platformId),
cl.getPlatformCLVersion(platformId),
cl.getPlatformVendor(platformId),
cl.getPlatformExtensions(platformId));
auto deviceIds = cl.getAllDeviceIds(platformId);
writefln("devices:");
foreach(i, d; deviceIds) {
writefln("%d: %s %s gmem: %d, lmem: %d, cu: %d, w: %d, dim: %d %s",
i,
cl.getDeviceName(d),
cl.getDeviceVersion(d),
cl.getDeviceGlobalMemorySize(d),
cl.getDeviceLocalMemorySize(d),
cl.getDeviceMaxComputeUnits(d),
cl.getDeviceMaxWorkGroupSize(d),
cl.getDeviceMaxWorkItemDimensions(d),
cl.getDeviceMaxWorkItemSizes(d));
}
auto context = cl.createDefaultContext(platformId);
scope(exit) cl.releaseContext(context);
auto device = deviceIds[0];
auto commandQueue = cl.createCommandQueue(context, device);
scope(exit) cl.releaseCommandQueue(commandQueue);
auto data = [100.0f];
auto buffer = cl.createBuffer(context, data);
scope(exit) cl.releaseBuffer(buffer);
auto writeBuffer = cl.createWriteBuffer(context, 100);
scope(exit) cl.releaseBuffer(writeBuffer);
auto readBuffer = cl.createReadBuffer(context, data);
scope(exit) cl.releaseBuffer(readBuffer);
cl.enqueueWriteBuffer(commandQueue, buffer, 0, [200.0f]);
cl_event event;
cl.enqueueReadBuffer(commandQueue, buffer, 0, data, event);
cl.waitAndReleaseEvents(event);
assert(data[0] == 200.0f);
cl.enqueueWriteBuffer(commandQueue, buffer, 0, [300.0f], event);
cl.waitAndReleaseEvents(event);
cl.enqueueReadBuffer(commandQueue, buffer, 0, data, event);
cl.waitAndReleaseEvents(event);
assert(data[0] == 300.0f);
auto program = cl.createProgramFromSource(context, `
__kernel void k(float value) {
printf("value:%g\n", value);
}
`);
scope(exit) cl.releaseProgram(program);
cl.buildProgram(program, deviceIds);
auto kernel = cl.createKernel(program, "k");
scope(exit) cl.releaseKernel(kernel);
cl.setKernelArg(kernel, 0, 100.0f);
cl.enqueueKernel(commandQueue, kernel, [1], [1], event);
cl.waitAndReleaseEvents(event);
cl.flushCommandQueue(commandQueue);
cl.finishCommandQueue(commandQueue);
}
|
D
|
/Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIO.build/FileDescriptor.swift.o : /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/IO.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/NonBlockingFileIO.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/IOData.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Codec.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Thread.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Selectable.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/FileHandle.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ChannelPipeline.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/AddressedEnvelope.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/PriorityQueue.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Channel.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/DeadChannel.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/SocketChannel.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/BaseSocketChannel.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/MulticastChannel.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/BlockingIOThreadPool.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/System.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/FileRegion.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ContiguousCollection.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ChannelOption.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Heap.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Bootstrap.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/SocketOptionProvider.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/CircularBuffer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/MarkedCircularBuffer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/PendingWritesManager.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/PendingDatagramWritesManager.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ChannelInvoker.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ChannelHandler.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/TypeAssistedChannelHandler.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Resolver.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/GetaddrinfoResolver.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/CompositeError.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/RecvByteBufferAllocator.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Selector.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/FileDescriptor.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Interfaces.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Utilities.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/IntegerTypes.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/SocketAddresses.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/HappyEyeballs.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ChannelHandlers.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-views.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/LinuxCPUSet.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Socket.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/BaseSocket.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ServerSocket.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-int.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-aux.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Linux.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/NIOAny.swift /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 /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.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/SwiftOnoneSupport.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.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
/Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIO.build/FileDescriptor~partial.swiftmodule : /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/IO.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/NonBlockingFileIO.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/IOData.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Codec.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Thread.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Selectable.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/FileHandle.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ChannelPipeline.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/AddressedEnvelope.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/PriorityQueue.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Channel.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/DeadChannel.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/SocketChannel.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/BaseSocketChannel.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/MulticastChannel.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/BlockingIOThreadPool.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/System.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/FileRegion.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ContiguousCollection.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ChannelOption.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Heap.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Bootstrap.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/SocketOptionProvider.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/CircularBuffer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/MarkedCircularBuffer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/PendingWritesManager.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/PendingDatagramWritesManager.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ChannelInvoker.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ChannelHandler.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/TypeAssistedChannelHandler.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Resolver.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/GetaddrinfoResolver.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/CompositeError.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/RecvByteBufferAllocator.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Selector.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/FileDescriptor.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Interfaces.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Utilities.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/IntegerTypes.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/SocketAddresses.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/HappyEyeballs.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ChannelHandlers.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-views.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/LinuxCPUSet.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Socket.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/BaseSocket.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ServerSocket.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-int.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-aux.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Linux.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/NIOAny.swift /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 /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.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/SwiftOnoneSupport.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.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
/Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIO.build/FileDescriptor~partial.swiftdoc : /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/IO.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/NonBlockingFileIO.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/IOData.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Codec.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Thread.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Selectable.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/FileHandle.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ChannelPipeline.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/AddressedEnvelope.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/PriorityQueue.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Channel.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/DeadChannel.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/SocketChannel.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/BaseSocketChannel.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/MulticastChannel.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/BlockingIOThreadPool.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/System.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/FileRegion.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ContiguousCollection.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ChannelOption.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Heap.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Bootstrap.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/SocketOptionProvider.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/CircularBuffer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/MarkedCircularBuffer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/PendingWritesManager.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/PendingDatagramWritesManager.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ChannelInvoker.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ChannelHandler.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/TypeAssistedChannelHandler.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Resolver.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/GetaddrinfoResolver.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/CompositeError.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/RecvByteBufferAllocator.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Selector.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/FileDescriptor.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Interfaces.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Utilities.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/IntegerTypes.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/SocketAddresses.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/HappyEyeballs.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ChannelHandlers.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-views.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/LinuxCPUSet.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Socket.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/BaseSocket.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ServerSocket.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-int.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-aux.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/Linux.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/NIO/NIOAny.swift /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 /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.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/SwiftOnoneSupport.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.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
|
D
|
/* lilySV100 - Casio Loopy emulator written in D. */
/* Copyright (c) 2020, Lady Starbreeze */
import std.stdio : writeln;
import bus, cpu;
/** ROM path for debugging purposes */
const auto ROM_PATH = "Loopy/ROMs/Dream_Change.bin";
void main(string[] args)
{
bus.init(ROM_PATH);
cpu.init();
auto counter = 0;
while (true)
{
cpu.run();
++counter;
if (counter == 200_000)
{
bus.dump_video_memory();
counter = 0;
}
}
}
|
D
|
in a polite manner
|
D
|
// URL: https://atcoder.jp/contests/abc047/tasks/arc063_b
import std.algorithm, std.container, std.conv, std.math, std.range, std.typecons, std.stdio, std.string;
auto rdsp(){return readln.splitter;}
void pick(R,T)(ref R r,ref T t){t=r.front.to!T;r.popFront;}
void pickV(R,T...)(ref R r,ref T t){foreach(ref v;t)pick(r,v);}
void readV(T...)(ref T t){auto r=rdsp;foreach(ref v;t)pick(r,v);}
void readA(T)(size_t n,ref T[]t){t=new T[](n);auto r=rdsp;foreach(ref v;t)pick(r,v);}
void readM(T)(size_t r,size_t c,ref T[][]t){t=new T[][](r);foreach(ref v;t)readA(c,v);}
void readC(T...)(size_t n,ref T t){foreach(ref v;t)v=new typeof(v)(n);foreach(i;0..n){auto r=rdsp;foreach(ref v;t)pick(r,v[i]);}}
void readS(T)(size_t n,ref T t){t=new T(n);foreach(ref v;t){auto r=rdsp;foreach(ref j;v.tupleof)pick(r,j);}}
void writeA(T)(size_t n,T t){foreach(i,v;t.enumerate){write(v);if(i<n-1)write(" ");}writeln;}
version(unittest) {} else
void main()
{
int n, t; readV(n, t);
int[] a; readA(n, a);
auto m = new int[](n);
m[$-1] = a[$-1];
foreach_reverse (i; 0..n-1) m[i] = max(m[i+1], a[i]);
auto r = 0;
foreach (i; 0..n-1) r = max(r, m[i+1]-a[i]);
auto c = 0;
foreach (i; 0..n-1)
if (m[i+1]-a[i] == r) ++c;
writeln(c);
}
|
D
|
func int Spell_ProcessMana_Release(var int manaInvested)
{
if(Npc_GetActiveSpell(self) == SPL_FIREBALL)
{
return SPL_SENDCAST;
};
if(Npc_GetActiveSpell(self) == SPL_FIRESTORM)
{
return SPL_SENDCAST;
};
if(Npc_GetActiveSpell(self) == SPL_THUNDERBALL)
{
return SPL_SENDCAST;
};
if(Npc_GetActiveSpell(self) == SPL_WINDFIST)
{
return SPL_SENDCAST;
};
if(Npc_GetActiveSpell(self) == SPL_STORMFIST)
{
return SPL_SENDCAST;
};
if(Npc_GetActiveSpell(self) == SPL_TELEKINESIS)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_HEAL)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_CHAINLIGHTNING)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_PYROKINESIS)
{
Npc_SendSinglePerc(self,other,PERC_ASSESSSTOPMAGIC);
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_LIGHT)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_FIREBOLT)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_FIRERAIN)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_THUNDERBOLT)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_BREATHOFDEATH)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_NEW1)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_Teleport1)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_Teleport2)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_Teleport3)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_Teleport4)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_Teleport5)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_TRF_BLOODFLY)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_TRF_CRAWLER)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_TRF_LURKER)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_TRF_MEATBUG)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_TRF_MOLERAT)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_TRF_ORCDOG)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_TRF_SCAVENGER)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_TRF_SHADOWBEAST)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_TRF_SNAPPER)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_TRF_WARAN)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_TRF_WOLF)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_ICECUBE)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_ICEWAVE)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_SUMMONDEMON)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_SUMMONSKELETON)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_SUMMONGOLEM)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_ARMYOFDARKNESS)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_DESTROYUNDEAD)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_CHARM)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_SLEEP)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_CONTROL)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_BERZERK)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_SHRINK)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_MASSDEATH)
{
return SPL_SENDSTOP;
};
if(Npc_GetActiveSpell(self) == SPL_FEAR)
{
return SPL_SENDSTOP;
};
return 0;
};
|
D
|
/*******************************************************************************
* Copyright (c) 2000, 2007 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 dwtx.ui.internal.forms.widgets.ObjectSegment;
import dwtx.ui.internal.forms.widgets.ParagraphSegment;
import dwtx.ui.internal.forms.widgets.Locator;
import dwtx.ui.internal.forms.widgets.SelectionData;
import dwt.DWT;
import dwt.graphics.GC;
import dwt.graphics.Point;
import dwt.graphics.Rectangle;
import dwt.dwthelper.utils;
import dwtx.dwtxhelper.Collection;
public abstract class ObjectSegment : ParagraphSegment {
public static const int TOP = 1;
public static const int MIDDLE = 2;
public static const int BOTTOM = 3;
private int alignment = BOTTOM;
private bool nowrap=false;
private Rectangle bounds;
private String objectId;
public int getVerticalAlignment() {
return alignment;
}
void setVerticalAlignment(int alignment) {
this.alignment = alignment;
}
public String getObjectId() {
return objectId;
}
void setObjectId(String objectId) {
this.objectId = objectId;
}
protected abstract Point getObjectSize(Hashtable resourceTable, int wHint);
public bool advanceLocator(GC gc, int wHint, Locator loc,
Hashtable objectTable, bool computeHeightOnly) {
Point objectSize = getObjectSize(objectTable, wHint);
int iwidth = 0;
int iheight = 0;
bool newLine = false;
if (objectSize !is null) {
iwidth = objectSize.x + (isSelectable()?2:0);
iheight = objectSize.y + (isSelectable()?2:0);
}
if (wHint !is DWT.DEFAULT && !nowrap && loc.x + iwidth > wHint) {
// new line
if (computeHeightOnly)
loc.collectHeights();
loc.x = loc.indent;
loc.x += iwidth;
loc.y += loc.rowHeight;
loc.width = loc.indent + iwidth;
loc.rowHeight = iheight;
loc.leading = 0;
newLine = true;
} else {
loc.x += iwidth;
loc.width += iwidth;
loc.rowHeight = Math.max(loc.rowHeight, iheight);
}
return newLine;
}
public bool contains(int x, int y) {
if (bounds is null)
return false;
return bounds.contains(x, y);
}
public bool intersects(Rectangle rect) {
if (bounds is null)
return false;
return bounds.intersects(rect);
}
public Rectangle getBounds() {
return bounds;
}
public bool isSelectable() {
return false;
}
/**
* @return Returns the nowrap.
*/
public bool isNowrap() {
return nowrap;
}
/**
* @param nowrap The nowrap to set.
*/
public void setNowrap(bool nowrap) {
this.nowrap = nowrap;
}
public void paint(GC gc, bool hover, Hashtable resourceTable, bool selected, SelectionData selData, Rectangle repaintRegion) {
}
/* (non-Javadoc)
* @see dwtx.ui.internal.forms.widgets.ParagraphSegment#layout(dwt.graphics.GC, int, dwtx.ui.internal.forms.widgets.Locator, java.util.Hashtable, bool, dwtx.ui.internal.forms.widgets.SelectionData)
*/
public void layout(GC gc, int width, Locator loc, Hashtable resourceTable,
bool selected) {
Point size = getObjectSize(resourceTable, width);
int objWidth = 0;
int objHeight = 0;
if (size !is null) {
objWidth = size.x + (isSelectable()?2:0);
objHeight = size.y + (isSelectable()?2:0);
} else
return;
loc.width = objWidth;
if (!nowrap && loc.x + objWidth > width) {
// new row
loc.newLine();
loc.rowCounter++;
}
int ix = loc.x;
int iy = loc.y;
if (alignment is MIDDLE)
iy = loc.getMiddle(objHeight, false);
else if (alignment is BOTTOM)
iy = loc.getBaseline(objHeight, false);
loc.x += objWidth;
loc.rowHeight = Math.max(loc.rowHeight, objHeight);
bounds = new Rectangle(ix, iy, objWidth, objHeight);
}
/* (non-Javadoc)
* @see dwtx.ui.internal.forms.widgets.ParagraphSegment#computeSelection(dwt.graphics.GC, java.util.Hashtable, bool, dwtx.ui.internal.forms.widgets.SelectionData)
*/
public void computeSelection(GC gc, Hashtable resourceTable, SelectionData selData) {
// TODO we should add this to the selection
// if we want to support rich text
}
}
|
D
|
/Users/lidiomarfernandomachado/dev/swift/f1Project/DerivedData/f1Project/Build/Intermediates.noindex/f1Project.build/Debug-iphoneos/f1Project.build/Objects-normal/arm64/StandingsTable.o : /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Models/MRData.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Models/StandingsTable.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/AppDelegate.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Models/DriverStanding.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Workers/DriverStandingsWorker.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Scenes/DriverStandings/DriverStandingsViewController.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Scenes/DriverStandings/DriverStandingsPresenter.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Models/Driver.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Scenes/DriverStandings/DriverStandingsInteractor.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Scenes/DriverStandings/DriverStandingsModels.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Models/BaseObject.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Models/StandingsList.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/lidiomarfernandomachado/dev/swift/f1Project/DerivedData/f1Project/Build/Intermediates.noindex/f1Project.build/Debug-iphoneos/f1Project.build/Objects-normal/arm64/StandingsTable~partial.swiftmodule : /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Models/MRData.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Models/StandingsTable.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/AppDelegate.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Models/DriverStanding.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Workers/DriverStandingsWorker.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Scenes/DriverStandings/DriverStandingsViewController.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Scenes/DriverStandings/DriverStandingsPresenter.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Models/Driver.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Scenes/DriverStandings/DriverStandingsInteractor.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Scenes/DriverStandings/DriverStandingsModels.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Models/BaseObject.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Models/StandingsList.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/lidiomarfernandomachado/dev/swift/f1Project/DerivedData/f1Project/Build/Intermediates.noindex/f1Project.build/Debug-iphoneos/f1Project.build/Objects-normal/arm64/StandingsTable~partial.swiftdoc : /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Models/MRData.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Models/StandingsTable.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/AppDelegate.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Models/DriverStanding.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Workers/DriverStandingsWorker.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Scenes/DriverStandings/DriverStandingsViewController.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Scenes/DriverStandings/DriverStandingsPresenter.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Models/Driver.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Scenes/DriverStandings/DriverStandingsInteractor.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Scenes/DriverStandings/DriverStandingsModels.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Models/BaseObject.swift /Users/lidiomarfernandomachado/dev/swift/f1Project/f1Project/Models/StandingsList.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
var int alchemy_1_permanent;
var int alchemy_2_permanent;
var int alchemy_3_permanent;
func void use_bookstandalchemy1_s1()
{
var C_NPC her;
var int ndocid;
her = Hlp_GetNpc(pc_hero);
if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(her))
{
ndocid = Doc_Create();
Doc_SetPages(ndocid,2);
Doc_SetPage(ndocid,0,"Book_Mage_L.tga",0);
Doc_SetPage(ndocid,1,"Book_Mage_R.tga",0);
Doc_SetFont(ndocid,-1,FONT_BOOK);
Doc_SetMargins(ndocid,0,275,20,30,20,1);
Doc_PrintLine(ndocid,0,"");
Doc_PrintLine(ndocid,0,"");
Doc_PrintLines(ndocid,0,"Mikstury o mocy magicznej");
Doc_PrintLine(ndocid,0,"i ich składniki");
Doc_PrintLine(ndocid,0,"");
Doc_PrintLine(ndocid,0,"");
Doc_PrintLine(ndocid,0,"Esencja many");
Doc_PrintLine(ndocid,0,"2 ogniste pokrzywy");
Doc_PrintLine(ndocid,0,"");
Doc_PrintLine(ndocid,0,"Ekstrakt many");
Doc_PrintLine(ndocid,0,"2 ogniste ziela");
Doc_PrintLine(ndocid,0,"");
Doc_PrintLine(ndocid,0,"Eliksir many");
Doc_PrintLine(ndocid,0,"2 ogniste korzenie");
Doc_PrintLine(ndocid,0,"");
Doc_SetMargins(ndocid,-1,30,20,275,20,1);
Doc_PrintLine(ndocid,1,"");
Doc_PrintLine(ndocid,1,"");
Doc_PrintLines(ndocid,1,"Każda praca wykonywana przy stole alchemicznym wymaga zużycia menzurki.");
Doc_PrintLine(ndocid,1,"");
Doc_PrintLines(ndocid,1,"Warzenie każdej mikstury mającej stały i określony wpływ na ciało lub umysł wymaga użycia rośliny, jaką jest w tym wypadku:");
Doc_PrintLines(ndocid,1,"Szczaw królewski");
Doc_PrintLine(ndocid,1,"");
Doc_PrintLine(ndocid,1,"");
Doc_PrintLine(ndocid,1,"");
Doc_Show(ndocid);
if(ALCHEMY_1_PERMANENT == FALSE)
{
b_giveplayerxp(XP_BOOKSTAND);
ALCHEMY_1_PERMANENT = TRUE;
};
};
};
func void use_bookstandalchemy2_s1()
{
var C_NPC her;
var int ndocid;
her = Hlp_GetNpc(pc_hero);
if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(her))
{
ndocid = Doc_Create();
Doc_SetPages(ndocid,2);
Doc_SetPage(ndocid,0,"Book_Mage_L.tga",0);
Doc_SetPage(ndocid,1,"Book_Mage_R.tga",0);
Doc_SetFont(ndocid,-1,FONT_BOOK);
Doc_SetMargins(ndocid,0,275,20,30,20,1);
Doc_PrintLine(ndocid,0,"");
Doc_PrintLine(ndocid,0,"");
Doc_PrintLine(ndocid,0,"Mikstury lecznicze");
Doc_PrintLine(ndocid,0,"i ich składniki");
Doc_PrintLine(ndocid,0,"");
Doc_PrintLine(ndocid,0,"");
Doc_PrintLine(ndocid,0,"Esencja lecznicza");
Doc_PrintLine(ndocid,0,"2 rośliny lecznicze");
Doc_PrintLine(ndocid,0,"");
Doc_PrintLine(ndocid,0,"Ekstrakt leczniczy");
Doc_PrintLine(ndocid,0,"2 zioła lecznicze");
Doc_PrintLine(ndocid,0,"");
Doc_PrintLine(ndocid,0,"Eliksir leczniczy");
Doc_PrintLine(ndocid,0,"2 korzenie lecznicze");
Doc_PrintLine(ndocid,0,"");
Doc_SetMargins(ndocid,-1,30,20,275,20,1);
Doc_PrintLine(ndocid,1,"");
Doc_PrintLine(ndocid,1,"");
Doc_PrintLines(ndocid,1,"Każda praca wykonywana przy stole alchemicznym wymaga zużycia menzurki.");
Doc_PrintLine(ndocid,1,"");
Doc_PrintLines(ndocid,1,"Warzenie każdej mikstury mającej stały i określony wpływ na ciało lub umysł wymaga użycia rośliny, jaką jest w tym wypadku:");
Doc_PrintLines(ndocid,1,"Szczaw królewski");
Doc_PrintLine(ndocid,1,"");
Doc_PrintLine(ndocid,1,"");
Doc_PrintLine(ndocid,1,"");
Doc_Show(ndocid);
if(ALCHEMY_2_PERMANENT == FALSE)
{
b_giveplayerxp(XP_BOOKSTAND);
ALCHEMY_2_PERMANENT = TRUE;
};
};
};
func void use_bookstandalchemy3_s1()
{
var C_NPC her;
var int ndocid;
her = Hlp_GetNpc(pc_hero);
if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(her))
{
ndocid = Doc_Create();
Doc_SetPages(ndocid,2);
Doc_SetPage(ndocid,0,"Book_Mage_L.tga",0);
Doc_SetPage(ndocid,1,"Book_Mage_R.tga",0);
Doc_SetFont(ndocid,-1,FONT_BOOK);
Doc_SetMargins(ndocid,0,275,20,30,20,1);
Doc_PrintLine(ndocid,0,"");
Doc_PrintLines(ndocid,0,"Mikstury powodujące stałe zmiany");
Doc_PrintLine(ndocid,0,"i ich składniki");
Doc_PrintLine(ndocid,0,"");
Doc_PrintLine(ndocid,0,"Eliksir zręczności");
Doc_PrintLine(ndocid,0,"1 goblinie jagody");
Doc_PrintLine(ndocid,0,"");
Doc_PrintLine(ndocid,0,"Mikstura szybkości");
Doc_PrintLines(ndocid,0,"1 zębate ziele - ta mikstura zamiast szczawiu królewskiego wymaga rdestu polnego.");
Doc_PrintLine(ndocid,0,"");
Doc_PrintLine(ndocid,0,"Eliksir siły");
Doc_PrintLine(ndocid,0,"1 smoczy korzeń");
Doc_PrintLine(ndocid,0,"");
Doc_PrintLines(ndocid,0,"Eliksir życia");
Doc_PrintLine(ndocid,0,"3 mikstury pełni życia");
Doc_PrintLine(ndocid,0,"");
Doc_PrintLines(ndocid,0,"Eliksir ducha");
Doc_PrintLine(ndocid,0,"3 mikstury pełni many");
Doc_SetMargins(ndocid,-1,30,20,275,20,1);
Doc_PrintLine(ndocid,1,"");
Doc_PrintLines(ndocid,1,"Uwarzenie tych mikstur to najwyższy stopień alchemicznego wtajemniczenia. Każda z tych mikstur wymaga użycia szczawiu królewskiego.");
Doc_PrintLine(ndocid,1,"");
Doc_PrintLines(ndocid,1,"Mikstura szybkości ma mniej skomplikowaną recepturę (nie wymaga użycia szczawiu królewskiego).");
Doc_PrintLine(ndocid,1,"");
Doc_Show(ndocid);
if(ALCHEMY_3_PERMANENT == FALSE)
{
b_giveplayerxp(XP_BOOKSTAND);
ALCHEMY_3_PERMANENT = TRUE;
};
};
};
|
D
|
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtLocation module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QGEOMANEUVER_H
#define QGEOMANEUVER_H
public import qt.QtCore.qshareddata;
public import qt.QtLocation.qlocationglobal;
QT_BEGIN_NAMESPACE
class QString;
class QGeoCoordinate;
class QGeoManeuverPrivate;
class Q_LOCATION_EXPORT QGeoManeuver
{
public:
enum InstructionDirection {
NoDirection,
DirectionForward,
DirectionBearRight,
DirectionLightRight,
DirectionRight,
DirectionHardRight,
DirectionUTurnRight,
DirectionUTurnLeft,
DirectionHardLeft,
DirectionLeft,
DirectionLightLeft,
DirectionBearLeft
};
QGeoManeuver();
QGeoManeuver(ref const(QGeoManeuver) other);
~QGeoManeuver();
QGeoManeuver &operator= (ref const(QGeoManeuver) other);
bool operator== (ref const(QGeoManeuver) other) const;
bool operator!= (ref const(QGeoManeuver) other) const;
bool isValid() const;
void setPosition(ref const(QGeoCoordinate) position);
QGeoCoordinate position() const;
void setInstructionText(ref const(QString) instructionText);
QString instructionText() const;
void setDirection(InstructionDirection direction);
InstructionDirection direction() const;
void setTimeToNextInstruction(int secs);
int timeToNextInstruction() const;
void setDistanceToNextInstruction(qreal distance);
qreal distanceToNextInstruction() const;
void setWaypoint(ref const(QGeoCoordinate) coordinate);
QGeoCoordinate waypoint() const;
private:
QSharedDataPointer<QGeoManeuverPrivate> d_ptr;
};
QT_END_NAMESPACE
#endif
|
D
|
// hopefully consoled from robik (http://github.com/robik/consoled) will work!
//public import core.sys.posix.sys.ioctl;
module consoled_test1;
import std.stdio;
import std.typetuple;
import std.typecons;
void terminald_main()
{
import tio = terminal;
tio.Terminal term = tio.Terminal(tio.ConsoleOutputType.cellular);
//tio.RealTimeConsoleInput rtci = tio.RealTimeConsoleInput(&term, tio.ConsoleInputFlags.raw);
//term.color(tio.Color.white, tio.Color.red);
term.writeln();
term.write ("HELLO WORLD");
stdout.flush();
term.moveTo(term.cursorX + 30, term.cursorY - 4, tio.ForceOption.alwaysSend);
term.showCursor();
term.write ("FORWARD?");
term.writeln();
term.reset();
//writeln("AGAIN AGAIN AGAIN");
}
void doreset()
{
import consoled;
resetColors();
stdout.flush();
writeln();
}
void consoled_main()
{
import consoled;
foreground = Color.blue;
background = Color.green;
write("hello world"); doreset();
foreground = Color.white;
background = Color.black;
write("again.... you get it"); doreset();
foreground = Color.red; background = Color.initial;
writeln("now for something more fun"); doreset();
fillArea(ConsolePoint(0,0), ConsolePoint(40,20), '*');
setCursorPos(20, 10);
writec("$");
// RealTimeConsoleInput rtci = RealTimeConsoleInput(
char[1] inbuf;
while(stdin.rawRead(inbuf) != "q")
{
writeln(inbuf);
}
scope(exit) { doreset(); }
setCursorPos(0,40);
}
void main()
{
terminald_main();
//consoled_main();
writeln("hello world");
}
|
D
|
; Copyright (C) 2008 The Android Open Source Project
;
; 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.
.source T_add_int_lit8_7.java
.class public dot.junit.opcodes.add_int_lit8.d.T_add_int_lit8_7
.super java/lang/Object
.method public <init>()V
.limit regs 1
invoke-direct {v0}, java/lang/Object/<init>()V
return-void
.end method
.method public run()I
.limit regs 3
const v1, 0
add-int/lit8 v0, v1, 127
return v0
.end method
|
D
|
/home/sriharikapu/substrate-node-template/target/release/build/libp2p-core-5b5efcdc98c2ab9c/build_script_build-5b5efcdc98c2ab9c: /home/sriharikapu/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-core-0.18.0/build.rs
/home/sriharikapu/substrate-node-template/target/release/build/libp2p-core-5b5efcdc98c2ab9c/build_script_build-5b5efcdc98c2ab9c.d: /home/sriharikapu/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-core-0.18.0/build.rs
/home/sriharikapu/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-core-0.18.0/build.rs:
|
D
|
food cooked and served in a casserole
large deep dish in which food can be cooked and served
|
D
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.