code
stringlengths 3
10M
| language
stringclasses 31
values |
|---|---|
/Users/lukamessina/work/reactor_app/RTS/DerivedData/MAXSIMA Simulator/Build/Intermediates/MAXSIMA Simulator.build/Debug-iphoneos/MAXSIMA Simulator.build/Objects-normal/arm64/WelcomeViewController.o : /Users/lukamessina/work/reactor_app/RTS/Observables.swift /Users/lukamessina/work/reactor_app/RTS/Material.swift /Users/lukamessina/work/reactor_app/RTS/RTS/WelcomeViewController.swift /Users/lukamessina/work/reactor_app/RTS/RTS/AppDelegate.swift /Users/lukamessina/work/reactor_app/RTS/RTS/UlohsViewController.swift /Users/lukamessina/work/reactor_app/RTS/Reactor.swift /Users/lukamessina/work/reactor_app/RTS/RTS/ResultsViewController.swift /Users/lukamessina/work/reactor_app/RTS/UserSettings.swift /Users/lukamessina/work/reactor_app/RTS/RTS/AccidentsTableViewController.swift /Users/lukamessina/work/reactor_app/RTS/Fuel.swift /Users/lukamessina/work/reactor_app/RTS/RTS/OvercoolingViewController.swift /Users/lukamessina/work/reactor_app/RTS/RTS/SimulationViewController.swift /Users/lukamessina/work/reactor_app/RTS/GapGas.swift /Users/lukamessina/work/reactor_app/RTS/RTS/AccidentsTableViewCell.swift /Users/lukamessina/work/reactor_app/RTS/Coolant.swift /Users/lukamessina/work/reactor_app/RTS/RTS/ReactivityViewController.swift /Users/lukamessina/work/reactor_app/RTS/RTS/UtopViewController.swift /Users/lukamessina/work/reactor_app/RTS/Constants.swift /Users/lukamessina/work/reactor_app/RTS/Cladding.swift /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/Foundation.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/Dispatch.swiftmodule /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/CoreGraphics.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/CoreImage.swiftmodule
/Users/lukamessina/work/reactor_app/RTS/DerivedData/MAXSIMA Simulator/Build/Intermediates/MAXSIMA Simulator.build/Debug-iphoneos/MAXSIMA Simulator.build/Objects-normal/arm64/WelcomeViewController~partial.swiftmodule : /Users/lukamessina/work/reactor_app/RTS/Observables.swift /Users/lukamessina/work/reactor_app/RTS/Material.swift /Users/lukamessina/work/reactor_app/RTS/RTS/WelcomeViewController.swift /Users/lukamessina/work/reactor_app/RTS/RTS/AppDelegate.swift /Users/lukamessina/work/reactor_app/RTS/RTS/UlohsViewController.swift /Users/lukamessina/work/reactor_app/RTS/Reactor.swift /Users/lukamessina/work/reactor_app/RTS/RTS/ResultsViewController.swift /Users/lukamessina/work/reactor_app/RTS/UserSettings.swift /Users/lukamessina/work/reactor_app/RTS/RTS/AccidentsTableViewController.swift /Users/lukamessina/work/reactor_app/RTS/Fuel.swift /Users/lukamessina/work/reactor_app/RTS/RTS/OvercoolingViewController.swift /Users/lukamessina/work/reactor_app/RTS/RTS/SimulationViewController.swift /Users/lukamessina/work/reactor_app/RTS/GapGas.swift /Users/lukamessina/work/reactor_app/RTS/RTS/AccidentsTableViewCell.swift /Users/lukamessina/work/reactor_app/RTS/Coolant.swift /Users/lukamessina/work/reactor_app/RTS/RTS/ReactivityViewController.swift /Users/lukamessina/work/reactor_app/RTS/RTS/UtopViewController.swift /Users/lukamessina/work/reactor_app/RTS/Constants.swift /Users/lukamessina/work/reactor_app/RTS/Cladding.swift /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/Foundation.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/Dispatch.swiftmodule /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/CoreGraphics.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/CoreImage.swiftmodule
/Users/lukamessina/work/reactor_app/RTS/DerivedData/MAXSIMA Simulator/Build/Intermediates/MAXSIMA Simulator.build/Debug-iphoneos/MAXSIMA Simulator.build/Objects-normal/arm64/WelcomeViewController~partial.swiftdoc : /Users/lukamessina/work/reactor_app/RTS/Observables.swift /Users/lukamessina/work/reactor_app/RTS/Material.swift /Users/lukamessina/work/reactor_app/RTS/RTS/WelcomeViewController.swift /Users/lukamessina/work/reactor_app/RTS/RTS/AppDelegate.swift /Users/lukamessina/work/reactor_app/RTS/RTS/UlohsViewController.swift /Users/lukamessina/work/reactor_app/RTS/Reactor.swift /Users/lukamessina/work/reactor_app/RTS/RTS/ResultsViewController.swift /Users/lukamessina/work/reactor_app/RTS/UserSettings.swift /Users/lukamessina/work/reactor_app/RTS/RTS/AccidentsTableViewController.swift /Users/lukamessina/work/reactor_app/RTS/Fuel.swift /Users/lukamessina/work/reactor_app/RTS/RTS/OvercoolingViewController.swift /Users/lukamessina/work/reactor_app/RTS/RTS/SimulationViewController.swift /Users/lukamessina/work/reactor_app/RTS/GapGas.swift /Users/lukamessina/work/reactor_app/RTS/RTS/AccidentsTableViewCell.swift /Users/lukamessina/work/reactor_app/RTS/Coolant.swift /Users/lukamessina/work/reactor_app/RTS/RTS/ReactivityViewController.swift /Users/lukamessina/work/reactor_app/RTS/RTS/UtopViewController.swift /Users/lukamessina/work/reactor_app/RTS/Constants.swift /Users/lukamessina/work/reactor_app/RTS/Cladding.swift /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/Foundation.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/Dispatch.swiftmodule /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/CoreGraphics.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/CoreImage.swiftmodule
|
D
|
module gui.overview_window;
import imports.all;
import main;
import project_info;
/**
オーバービューウインドウ
マップ全体の縮小表示。
*/
class OverviewWindow : MainWindow{
static const int ZOOM_MIN = 10;
static const int ZOOM_MAX = 100;
int zoomRate = 50;
OverviewWindowViewArea viewArea = null;
Statusbar statusbar = null;
void delegate(double centerX, double cneterY) onScrollCenterChangedFunction;
void delegate(EWindowType) onWindowFocusChangedFunction;
Cursor cursorNormal = null;
Cursor cursorDragging = null;
this(){
super("オーバービュー");
// setSizeRequest(320, 320);
setDefaultSize(baseInfo.overviewWindowInfo.width, baseInfo.overviewWindowInfo.height);
setIcon(new Pixbuf("dat/icon/picture-sunset.png"));
VBox mainBox = new VBox(false,0);
mainBox.packStart(new OverviewWindowToolArea(),false,false,0);
viewArea = new OverviewWindowViewArea();
mainBox.packStart(viewArea,true,true,0);
add(mainBox);
statusbar = new Statusbar();
statusbar.push(1, format("表示倍率:%d%%",zoomRate));
mainBox.packStart(statusbar,false,false,0);
setDeletable(false);
addOnRealize((Widget widget){
cursorNormal = new Cursor(widget.getDisplay() , new Pixbuf("dat/cursor/hand.png"), 0, 0);
//cursorNormal = new Cursor(widget.getDisplay(), GdkCursorType.HAND2);
cursorDragging = new Cursor(widget.getDisplay() , new Pixbuf("dat/cursor/hand2.png"), 0, 0);
setCursor(cursorNormal);
});
addOnRealize((Widget widget){
move(baseInfo.overviewWindowInfo.x, baseInfo.overviewWindowInfo.y);
});
addOnKeyPress((GdkEventKey* event, Widget widget){
switch(event.keyval){
case GdkKeysyms.GDK_F1: // EditWindow
case GdkKeysyms.GDK_F2: // PartsWindow
case GdkKeysyms.GDK_F3: // LayerWindow
case GdkKeysyms.GDK_F4: // OverviewWindow
EWindowType windowType;
switch(event.keyval){
case GdkKeysyms.GDK_F1: // EditWindow
windowType = EWindowType.EDIT;
break;
case GdkKeysyms.GDK_F2: // PartsWindow
windowType = EWindowType.PARTS;
break;
case GdkKeysyms.GDK_F3: // LayerWindow
windowType = EWindowType.LAYER;
break;
case GdkKeysyms.GDK_F4: // OverviewWindow
windowType = EWindowType.OVERVIEW;
break;
}
if(onWindowFocusChangedFunction){
onWindowFocusChangedFunction(windowType);
}
return true;
break;
default:
break;
}
return false;
});
}
void Reload(){
viewArea.Reload();
}
/**
オーバービュー用ウインドウ上部のツールボタン郡表示領域
ここの領域のボタンを押すといろいろ処理する。
*/
class OverviewWindowToolArea : HBox{
this(){
super(false,0);
setBorderWidth(2);
// 拡大縮小
Button zoomPlusButton = new Button();
zoomPlusButton.setImage(new Image(new Pixbuf("dat/icon/magnifier-zoom-in.png")));
zoomPlusButton.addOnClicked((Button button){
zoomRate = min(zoomRate + 10, ZOOM_MAX);
statusbar.pop(1);
statusbar.push(1, format("表示倍率:%d%%",zoomRate));
viewArea.Reload();
});
packStart(zoomPlusButton , false, false, 2 );
Button zoomMinusButton = new Button();
zoomMinusButton.addOnClicked((Button button){
zoomRate = max(zoomRate - 10, ZOOM_MIN);
statusbar.pop(1);
statusbar.push(1, format("表示倍率:%d%%",zoomRate));
viewArea.Reload();
});
zoomMinusButton.setImage(new Image(new Pixbuf("dat/icon/magnifier-zoom-out.png")));
packStart(zoomMinusButton , false, false, 2 );
}
}
/**
オーバービュー用ウインドウメインの表示領域
エディットウインドウの表示領域と同じ内容を表示。拡大縮小ができるのと、ここで視界の矩形を移動するとエディットウインドウのスクロールも移動するように。
*/
class OverviewWindowViewArea : ScrolledWindow{
class EditDrawingArea : DrawingArea{
enum EMode{
NORMAL,
DRAGGING,
}
EMode mode = EMode.NORMAL;
this(){
super();
addOnButtonPress(&onButtonPress);
addOnButtonRelease(&onButtonRelease);
addOnMotionNotify(&onMotionNotify);
addOnExpose(&exposeCallback);
double width = cast(double)projectInfo.partsSizeH * cast(double)projectInfo.mapSizeH * (cast(double)zoomRate / 100.0);
double height = cast(double)projectInfo.partsSizeV * cast(double)projectInfo.mapSizeV * (cast(double)zoomRate / 100.0);
setSizeRequest(cast(int)width, cast(int)height);
}
bool exposeCallback(GdkEventExpose* event, Widget widget){
printf("OverviewWindow.exposeCallback 1\n");
Drawable dr = getWindow();
// 全てのレイヤーに対して
foreach(layerInfo;projectInfo.layerInfos){
if(!layerInfo.visible){
continue;
}
if(layerInfo.layoutPixbuf !is null){
Pixbuf scaledPixbuf = layerInfo.layoutPixbuf.scaleSimple(cast(int)getWidth(), cast(int)getHeight(), GdkInterpType.NEAREST/*,TILES,BILINEAR,HYPER*/);
dr.drawPixbuf(scaledPixbuf, 0, 0);
scaledPixbuf.unref();
delete scaledPixbuf;
}
}
// 視界表示
double x1,y1,x2,y2;
projectInfo.editWindow.GetViewPortInfo(x1,y1,x2,y2);
GC gc = new GC(dr);
gdk.RGB.RGB.rgbGcSetForeground(gc, 0xFF0000);
// gc.setForeground(new Color(255,0,0));
dr.drawRectangle(gc, false,
cast(int)(x1 * getWidth()),
cast(int)(y1 * getHeight()),
cast(int)(x2 * getWidth() - x1 * getWidth()) ,
cast(int)(y2 * getHeight() - y1 * getHeight()));
printf("OverviewWindow.exposeCallback 2\n");
return true;
}
bool onButtonPress(GdkEventButton* event, Widget widget){
getWindow().setCursor(cursorDragging);
mode = EMode.DRAGGING;
if(this.outer.outer.onScrollCenterChangedFunction !is null){
this.outer.outer.onScrollCenterChangedFunction(event.x / getWidth(), event.y / getHeight());
}
return true;
}
bool onButtonRelease(GdkEventButton* event, Widget widget){
getWindow().setCursor(cursorNormal);
mode = EMode.NORMAL;
return true;
}
bool onMotionNotify(GdkEventMotion* event, Widget widget){
if(mode == EMode.DRAGGING){
if(this.outer.outer.onScrollCenterChangedFunction !is null){
this.outer.outer.onScrollCenterChangedFunction(event.x / getWidth(), event.y / getHeight());
}
}
return true;
}
}
EditDrawingArea drawingArea = null;
this(){
super();
setPolicy(GtkPolicyType.AUTOMATIC, GtkPolicyType.AUTOMATIC);
drawingArea = new EditDrawingArea();
addWithViewport(drawingArea);
}
void Reload(){
double width = cast(double)projectInfo.partsSizeH * cast(double)projectInfo.mapSizeH * (cast(double)zoomRate / 100.0);
double height = cast(double)projectInfo.partsSizeV * cast(double)projectInfo.mapSizeV * (cast(double)zoomRate / 100.0);
drawingArea.setSizeRequest(cast(int)width, cast(int)height);
queueDraw();
}
}
}
|
D
|
/**
* Semantic analysis of expressions.
*
* Specification: ($LINK2 https://dlang.org/spec/expression.html, Expressions)
*
* Copyright: Copyright (C) 1999-2020 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/expressionsem.d, _expressionsem.d)
* Documentation: https://dlang.org/phobos/dmd_expressionsem.html
* Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/expressionsem.d
*/
module dmd.expressionsem;
import core.stdc.stdio;
import dmd.access;
import dmd.aggregate;
import dmd.aliasthis;
import dmd.arrayop;
import dmd.arraytypes;
import dmd.attrib;
import dmd.astcodegen;
import dmd.canthrow;
import dmd.chkformat;
import dmd.ctorflow;
import dmd.dscope;
import dmd.dsymbol;
import dmd.declaration;
import dmd.dclass;
import dmd.dcast;
import dmd.delegatize;
import dmd.denum;
import dmd.dimport;
import dmd.dinterpret;
import dmd.dmangle;
import dmd.dmodule;
import dmd.dstruct;
import dmd.dsymbolsem;
import dmd.dtemplate;
import dmd.errors;
import dmd.escape;
import dmd.expression;
import dmd.func;
import dmd.globals;
import dmd.hdrgen;
import dmd.id;
import dmd.identifier;
import dmd.imphint;
import dmd.init;
import dmd.initsem;
import dmd.inline;
import dmd.intrange;
import dmd.mtype;
import dmd.nspace;
import dmd.opover;
import dmd.optimize;
import dmd.parse;
import dmd.root.ctfloat;
import dmd.root.file;
import dmd.root.filename;
import dmd.root.outbuffer;
import dmd.root.rootobject;
import dmd.root.string;
import dmd.semantic2;
import dmd.semantic3;
import dmd.sideeffect;
import dmd.safe;
import dmd.target;
import dmd.tokens;
import dmd.traits;
import dmd.typesem;
import dmd.typinf;
import dmd.utf;
import dmd.utils;
import dmd.visitor;
enum LOGSEMANTIC = false;
/********************************************************
* Perform semantic analysis and CTFE on expressions to produce
* a string.
* Params:
* buf = append generated string to buffer
* sc = context
* exps = array of Expressions
* Returns:
* true on error
*/
bool expressionsToString(ref OutBuffer buf, Scope* sc, Expressions* exps)
{
if (!exps)
return false;
foreach (ex; *exps)
{
if (!ex)
continue;
auto sc2 = sc.startCTFE();
auto e2 = ex.expressionSemantic(sc2);
auto e3 = resolveProperties(sc2, e2);
sc2.endCTFE();
// allowed to contain types as well as expressions
auto e4 = ctfeInterpretForPragmaMsg(e3);
if (!e4 || e4.op == TOK.error)
return true;
// expand tuple
if (auto te = e4.isTupleExp())
{
if (expressionsToString(buf, sc, te.exps))
return true;
continue;
}
// char literals exp `.toStringExp` return `null` but we cant override it
// because in most contexts we don't want the conversion to succeed.
IntegerExp ie = e4.isIntegerExp();
const ty = (ie && ie.type) ? ie.type.ty : Terror;
if (ty.isSomeChar)
{
auto tsa = new TypeSArray(ie.type, IntegerExp.literal!1);
e4 = new ArrayLiteralExp(ex.loc, tsa, ie);
}
if (StringExp se = e4.toStringExp())
buf.writestring(se.toUTF8(sc).peekString());
else
buf.writestring(e4.toString());
}
return false;
}
/***********************************************************
* Resolve `exp` as a compile-time known string.
* Params:
* sc = scope
* exp = Expression which expected as a string
* s = What the string is expected for, will be used in error diagnostic.
* Returns:
* String literal, or `null` if error happens.
*/
StringExp semanticString(Scope *sc, Expression exp, const char* s)
{
sc = sc.startCTFE();
exp = exp.expressionSemantic(sc);
exp = resolveProperties(sc, exp);
sc = sc.endCTFE();
if (exp.op == TOK.error)
return null;
auto e = exp;
if (exp.type.isString())
{
e = e.ctfeInterpret();
if (e.op == TOK.error)
return null;
}
auto se = e.toStringExp();
if (!se)
{
exp.error("`string` expected for %s, not `(%s)` of type `%s`",
s, exp.toChars(), exp.type.toChars());
return null;
}
return se;
}
private Expression extractOpDollarSideEffect(Scope* sc, UnaExp ue)
{
Expression e0;
Expression e1 = Expression.extractLast(ue.e1, e0);
// https://issues.dlang.org/show_bug.cgi?id=12585
// Extract the side effect part if ue.e1 is comma.
if ((sc.flags & SCOPE.ctfe) ? hasSideEffect(e1) : !isTrivialExp(e1)) // match logic in extractSideEffect()
{
/* Even if opDollar is needed, 'e1' should be evaluate only once. So
* Rewrite:
* e1.opIndex( ... use of $ ... )
* e1.opSlice( ... use of $ ... )
* as:
* (ref __dop = e1, __dop).opIndex( ... __dop.opDollar ...)
* (ref __dop = e1, __dop).opSlice( ... __dop.opDollar ...)
*/
e1 = extractSideEffect(sc, "__dop", e0, e1, false);
assert(e1.op == TOK.variable);
VarExp ve = cast(VarExp)e1;
ve.var.storage_class |= STC.exptemp; // lifetime limited to expression
}
ue.e1 = e1;
return e0;
}
/**************************************
* Runs semantic on ae.arguments. Declares temporary variables
* if '$' was used.
*/
Expression resolveOpDollar(Scope* sc, ArrayExp ae, Expression* pe0)
{
assert(!ae.lengthVar);
*pe0 = null;
AggregateDeclaration ad = isAggregate(ae.e1.type);
Dsymbol slice = search_function(ad, Id.slice);
//printf("slice = %s %s\n", slice.kind(), slice.toChars());
foreach (i, e; *ae.arguments)
{
if (i == 0)
*pe0 = extractOpDollarSideEffect(sc, ae);
if (e.op == TOK.interval && !(slice && slice.isTemplateDeclaration()))
{
Lfallback:
if (ae.arguments.dim == 1)
return null;
ae.error("multi-dimensional slicing requires template `opSlice`");
return ErrorExp.get();
}
//printf("[%d] e = %s\n", i, e.toChars());
// Create scope for '$' variable for this dimension
auto sym = new ArrayScopeSymbol(sc, ae);
sym.parent = sc.scopesym;
sc = sc.push(sym);
ae.lengthVar = null; // Create it only if required
ae.currentDimension = i; // Dimension for $, if required
e = e.expressionSemantic(sc);
e = resolveProperties(sc, e);
if (ae.lengthVar && sc.func)
{
// If $ was used, declare it now
Expression de = new DeclarationExp(ae.loc, ae.lengthVar);
de = de.expressionSemantic(sc);
*pe0 = Expression.combine(*pe0, de);
}
sc = sc.pop();
if (e.op == TOK.interval)
{
IntervalExp ie = cast(IntervalExp)e;
auto tiargs = new Objects();
Expression edim = new IntegerExp(ae.loc, i, Type.tsize_t);
edim = edim.expressionSemantic(sc);
tiargs.push(edim);
auto fargs = new Expressions(2);
(*fargs)[0] = ie.lwr;
(*fargs)[1] = ie.upr;
uint xerrors = global.startGagging();
sc = sc.push();
FuncDeclaration fslice = resolveFuncCall(ae.loc, sc, slice, tiargs, ae.e1.type, fargs, FuncResolveFlag.quiet);
sc = sc.pop();
global.endGagging(xerrors);
if (!fslice)
goto Lfallback;
e = new DotTemplateInstanceExp(ae.loc, ae.e1, slice.ident, tiargs);
e = new CallExp(ae.loc, e, fargs);
e = e.expressionSemantic(sc);
}
if (!e.type)
{
ae.error("`%s` has no value", e.toChars());
e = ErrorExp.get();
}
if (e.op == TOK.error)
return e;
(*ae.arguments)[i] = e;
}
return ae;
}
/**************************************
* Runs semantic on se.lwr and se.upr. Declares a temporary variable
* if '$' was used.
* Returns:
* ae, or ErrorExp if errors occurred
*/
Expression resolveOpDollar(Scope* sc, ArrayExp ae, IntervalExp ie, Expression* pe0)
{
//assert(!ae.lengthVar);
if (!ie)
return ae;
VarDeclaration lengthVar = ae.lengthVar;
bool errors = false;
// create scope for '$'
auto sym = new ArrayScopeSymbol(sc, ae);
sym.parent = sc.scopesym;
sc = sc.push(sym);
Expression sem(Expression e)
{
e = e.expressionSemantic(sc);
e = resolveProperties(sc, e);
if (!e.type)
{
ae.error("`%s` has no value", e.toChars());
errors = true;
}
return e;
}
ie.lwr = sem(ie.lwr);
ie.upr = sem(ie.upr);
if (lengthVar != ae.lengthVar && sc.func)
{
// If $ was used, declare it now
Expression de = new DeclarationExp(ae.loc, ae.lengthVar);
de = de.expressionSemantic(sc);
*pe0 = Expression.combine(*pe0, de);
}
sc = sc.pop();
return errors ? ErrorExp.get() : ae;
}
/******************************
* Perform semantic() on an array of Expressions.
*/
bool arrayExpressionSemantic(Expressions* exps, Scope* sc, bool preserveErrors = false)
{
bool err = false;
if (exps)
{
foreach (ref e; *exps)
{
if (e)
{
auto e2 = e.expressionSemantic(sc);
if (e2.op == TOK.error)
err = true;
if (preserveErrors || e2.op != TOK.error)
e = e2;
}
}
}
return err;
}
/******************************
* Check the tail CallExp is really property function call.
* Bugs:
* This doesn't appear to do anything.
*/
private bool checkPropertyCall(Expression e)
{
e = lastComma(e);
if (e.op == TOK.call)
{
CallExp ce = cast(CallExp)e;
TypeFunction tf;
if (ce.f)
{
tf = cast(TypeFunction)ce.f.type;
/* If a forward reference to ce.f, try to resolve it
*/
if (!tf.deco && ce.f.semanticRun < PASS.semanticdone)
{
ce.f.dsymbolSemantic(null);
tf = cast(TypeFunction)ce.f.type;
}
}
else if (ce.e1.type.ty == Tfunction)
tf = cast(TypeFunction)ce.e1.type;
else if (ce.e1.type.ty == Tdelegate)
tf = cast(TypeFunction)ce.e1.type.nextOf();
else if (ce.e1.type.ty == Tpointer && ce.e1.type.nextOf().ty == Tfunction)
tf = cast(TypeFunction)ce.e1.type.nextOf();
else
assert(0);
}
return false;
}
/******************************
* Find symbol in accordance with the UFCS name look up rule
*/
private Expression searchUFCS(Scope* sc, UnaExp ue, Identifier ident)
{
//printf("searchUFCS(ident = %s)\n", ident.toChars());
Loc loc = ue.loc;
// TODO: merge with Scope.search.searchScopes()
Dsymbol searchScopes(int flags)
{
Dsymbol s = null;
for (Scope* scx = sc; scx; scx = scx.enclosing)
{
if (!scx.scopesym)
continue;
if (scx.scopesym.isModule())
flags |= SearchUnqualifiedModule; // tell Module.search() that SearchLocalsOnly is to be obeyed
s = scx.scopesym.search(loc, ident, flags);
if (s)
{
// overload set contains only module scope symbols.
if (s.isOverloadSet())
break;
// selective/renamed imports also be picked up
if (AliasDeclaration ad = s.isAliasDeclaration())
{
if (ad._import)
break;
}
// See only module scope symbols for UFCS target.
Dsymbol p = s.toParent2();
if (p && p.isModule())
break;
}
s = null;
// Stop when we hit a module, but keep going if that is not just under the global scope
if (scx.scopesym.isModule() && !(scx.enclosing && !scx.enclosing.enclosing))
break;
}
return s;
}
int flags = 0;
Dsymbol s;
if (sc.flags & SCOPE.ignoresymbolvisibility)
flags |= IgnoreSymbolVisibility;
// First look in local scopes
s = searchScopes(flags | SearchLocalsOnly);
if (!s)
{
// Second look in imported modules
s = searchScopes(flags | SearchImportsOnly);
}
if (!s)
return ue.e1.type.Type.getProperty(sc, loc, ident, 0);
FuncDeclaration f = s.isFuncDeclaration();
if (f)
{
TemplateDeclaration td = getFuncTemplateDecl(f);
if (td)
{
if (td.overroot)
td = td.overroot;
s = td;
}
}
if (ue.op == TOK.dotTemplateInstance)
{
DotTemplateInstanceExp dti = cast(DotTemplateInstanceExp)ue;
auto ti = new TemplateInstance(loc, s.ident, dti.ti.tiargs);
if (!ti.updateTempDecl(sc, s))
return ErrorExp.get();
return new ScopeExp(loc, ti);
}
else
{
//printf("-searchUFCS() %s\n", s.toChars());
return new DsymbolExp(loc, s);
}
}
/******************************
* Pull out callable entity with UFCS.
*/
private Expression resolveUFCS(Scope* sc, CallExp ce)
{
Loc loc = ce.loc;
Expression eleft;
Expression e;
if (ce.e1.op == TOK.dotIdentifier)
{
DotIdExp die = cast(DotIdExp)ce.e1;
Identifier ident = die.ident;
Expression ex = die.semanticX(sc);
if (ex != die)
{
ce.e1 = ex;
return null;
}
eleft = die.e1;
Type t = eleft.type.toBasetype();
if (t.ty == Tarray || t.ty == Tsarray || t.ty == Tnull || (t.isTypeBasic() && t.ty != Tvoid))
{
/* Built-in types and arrays have no callable properties, so do shortcut.
* It is necessary in: e.init()
*/
}
else if (t.ty == Taarray)
{
if (ident == Id.remove)
{
/* Transform:
* aa.remove(arg) into delete aa[arg]
*/
if (!ce.arguments || ce.arguments.dim != 1)
{
ce.error("expected key as argument to `aa.remove()`");
return ErrorExp.get();
}
if (!eleft.type.isMutable())
{
ce.error("cannot remove key from `%s` associative array `%s`", MODtoChars(t.mod), eleft.toChars());
return ErrorExp.get();
}
Expression key = (*ce.arguments)[0];
key = key.expressionSemantic(sc);
key = resolveProperties(sc, key);
TypeAArray taa = cast(TypeAArray)t;
key = key.implicitCastTo(sc, taa.index);
if (key.checkValue() || key.checkSharedAccess(sc))
return ErrorExp.get();
semanticTypeInfo(sc, taa.index);
return new RemoveExp(loc, eleft, key);
}
}
else
{
if (Expression ey = die.semanticY(sc, 1))
{
if (ey.op == TOK.error)
return ey;
ce.e1 = ey;
if (isDotOpDispatch(ey))
{
uint errors = global.startGagging();
e = ce.syntaxCopy().expressionSemantic(sc);
if (!global.endGagging(errors))
return e;
// even opDispatch and UFCS must have valid arguments,
// so now that we've seen indication of a problem,
// check them for issues.
Expressions* originalArguments = Expression.arraySyntaxCopy(ce.arguments);
if (arrayExpressionSemantic(originalArguments, sc))
return ErrorExp.get();
/* fall down to UFCS */
}
else
return null;
}
}
/* https://issues.dlang.org/show_bug.cgi?id=13953
*
* If a struct has an alias this to an associative array
* and remove is used on a struct instance, we have to
* check first if there is a remove function that can be called
* on the struct. If not we must check the alias this.
*
* struct A
* {
* string[string] a;
* alias a this;
* }
*
* void fun()
* {
* A s;
* s.remove("foo");
* }
*/
const errors = global.startGagging();
e = searchUFCS(sc, die, ident);
// if there were any errors and the identifier was remove
if (global.endGagging(errors))
{
if (ident == Id.remove)
{
// check alias this
Expression alias_e = resolveAliasThis(sc, die.e1, 1);
if (alias_e && alias_e != die.e1)
{
die.e1 = alias_e;
CallExp ce2 = cast(CallExp)ce.syntaxCopy();
ce2.e1 = die;
e = cast(CallExp)ce2.trySemantic(sc);
if (e)
return e;
}
}
// if alias this did not work out, print the initial errors
searchUFCS(sc, die, ident);
}
}
else if (ce.e1.op == TOK.dotTemplateInstance)
{
DotTemplateInstanceExp dti = cast(DotTemplateInstanceExp)ce.e1;
if (Expression ey = dti.semanticY(sc, 1))
{
ce.e1 = ey;
return null;
}
eleft = dti.e1;
e = searchUFCS(sc, dti, dti.ti.name);
}
else
return null;
// Rewrite
ce.e1 = e;
if (!ce.arguments)
ce.arguments = new Expressions();
ce.arguments.shift(eleft);
return null;
}
/******************************
* Pull out property with UFCS.
*/
private Expression resolveUFCSProperties(Scope* sc, Expression e1, Expression e2 = null)
{
Loc loc = e1.loc;
Expression eleft;
Expression e;
if (e1.op == TOK.dotIdentifier)
{
DotIdExp die = cast(DotIdExp)e1;
eleft = die.e1;
e = searchUFCS(sc, die, die.ident);
}
else if (e1.op == TOK.dotTemplateInstance)
{
DotTemplateInstanceExp dti;
dti = cast(DotTemplateInstanceExp)e1;
eleft = dti.e1;
e = searchUFCS(sc, dti, dti.ti.name);
}
else
return null;
if (e is null)
return null;
// Rewrite
if (e2)
{
// run semantic without gagging
e2 = e2.expressionSemantic(sc);
/* f(e1) = e2
*/
Expression ex = e.copy();
auto a1 = new Expressions(1);
(*a1)[0] = eleft;
ex = new CallExp(loc, ex, a1);
auto e1PassSemantic = ex.trySemantic(sc);
/* f(e1, e2)
*/
auto a2 = new Expressions(2);
(*a2)[0] = eleft;
(*a2)[1] = e2;
e = new CallExp(loc, e, a2);
e = e.trySemantic(sc);
if (!e1PassSemantic && !e)
{
/* https://issues.dlang.org/show_bug.cgi?id=20448
*
* If both versions have failed to pass semantic,
* f(e1) = e2 gets priority in error printing
* because f might be a templated function that
* failed to instantiate and we have to print
* the instantiation errors.
*/
return e1.expressionSemantic(sc);
}
else if (ex && !e)
{
checkPropertyCall(ex);
ex = new AssignExp(loc, ex, e2);
return ex.expressionSemantic(sc);
}
else
{
// strict setter prints errors if fails
e = e.expressionSemantic(sc);
}
checkPropertyCall(e);
return e;
}
else
{
/* f(e1)
*/
auto arguments = new Expressions(1);
(*arguments)[0] = eleft;
e = new CallExp(loc, e, arguments);
e = e.expressionSemantic(sc);
checkPropertyCall(e);
return e.expressionSemantic(sc);
}
}
/******************************
* If e1 is a property function (template), resolve it.
*/
Expression resolvePropertiesOnly(Scope* sc, Expression e1)
{
//printf("e1 = %s %s\n", Token::toChars(e1.op), e1.toChars());
Expression handleOverloadSet(OverloadSet os)
{
assert(os);
foreach (s; os.a)
{
auto fd = s.isFuncDeclaration();
auto td = s.isTemplateDeclaration();
if (fd)
{
if ((cast(TypeFunction)fd.type).isproperty)
return resolveProperties(sc, e1);
}
else if (td && td.onemember && (fd = td.onemember.isFuncDeclaration()) !is null)
{
if ((cast(TypeFunction)fd.type).isproperty ||
(fd.storage_class2 & STC.property) ||
(td._scope.stc & STC.property))
return resolveProperties(sc, e1);
}
}
return e1;
}
Expression handleTemplateDecl(TemplateDeclaration td)
{
assert(td);
if (td.onemember)
{
if (auto fd = td.onemember.isFuncDeclaration())
{
if ((cast(TypeFunction)fd.type).isproperty ||
(fd.storage_class2 & STC.property) ||
(td._scope.stc & STC.property))
return resolveProperties(sc, e1);
}
}
return e1;
}
Expression handleFuncDecl(FuncDeclaration fd)
{
assert(fd);
if ((cast(TypeFunction)fd.type).isproperty)
return resolveProperties(sc, e1);
return e1;
}
if (auto de = e1.isDotExp())
{
if (auto os = de.e2.isOverExp())
return handleOverloadSet(os.vars);
}
else if (auto oe = e1.isOverExp())
return handleOverloadSet(oe.vars);
else if (auto dti = e1.isDotTemplateInstanceExp())
{
if (dti.ti.tempdecl)
if (auto td = dti.ti.tempdecl.isTemplateDeclaration())
return handleTemplateDecl(td);
}
else if (auto dte = e1.isDotTemplateExp())
return handleTemplateDecl(dte.td);
else if (e1.op == TOK.scope_)
{
Dsymbol s = (cast(ScopeExp)e1).sds;
TemplateInstance ti = s.isTemplateInstance();
if (ti && !ti.semanticRun && ti.tempdecl)
if (auto td = ti.tempdecl.isTemplateDeclaration())
return handleTemplateDecl(td);
}
else if (e1.op == TOK.template_)
return handleTemplateDecl((cast(TemplateExp)e1).td);
else if (e1.op == TOK.dotVariable && e1.type.ty == Tfunction)
{
DotVarExp dve = cast(DotVarExp)e1;
return handleFuncDecl(dve.var.isFuncDeclaration());
}
else if (e1.op == TOK.variable && e1.type && e1.type.ty == Tfunction && (sc.intypeof || !(cast(VarExp)e1).var.needThis()))
return handleFuncDecl((cast(VarExp)e1).var.isFuncDeclaration());
return e1;
}
/****************************************
* Turn symbol `s` into the expression it represents.
*
* Params:
* s = symbol to resolve
* loc = location of use of `s`
* sc = context
* hasOverloads = applies if `s` represents a function.
* true means it's overloaded and will be resolved later,
* false means it's the exact function symbol.
* Returns:
* `s` turned into an expression, `ErrorExp` if an error occurred
*/
Expression symbolToExp(Dsymbol s, const ref Loc loc, Scope *sc, bool hasOverloads)
{
static if (LOGSEMANTIC)
{
printf("DsymbolExp::resolve(%s %s)\n", s.kind(), s.toChars());
}
Lagain:
Expression e;
//printf("DsymbolExp:: %p '%s' is a symbol\n", this, toChars());
//printf("s = '%s', s.kind = '%s'\n", s.toChars(), s.kind());
Dsymbol olds = s;
Declaration d = s.isDeclaration();
if (d && (d.storage_class & STC.templateparameter))
{
s = s.toAlias();
}
else
{
if (!s.isFuncDeclaration()) // functions are checked after overloading
{
s.checkDeprecated(loc, sc);
if (d)
d.checkDisabled(loc, sc);
}
// https://issues.dlang.org/show_bug.cgi?id=12023
// if 's' is a tuple variable, the tuple is returned.
s = s.toAlias();
//printf("s = '%s', s.kind = '%s', s.needThis() = %p\n", s.toChars(), s.kind(), s.needThis());
if (s != olds && !s.isFuncDeclaration())
{
s.checkDeprecated(loc, sc);
if (d)
d.checkDisabled(loc, sc);
}
}
if (auto em = s.isEnumMember())
{
return em.getVarExp(loc, sc);
}
if (auto v = s.isVarDeclaration())
{
//printf("Identifier '%s' is a variable, type '%s'\n", s.toChars(), v.type.toChars());
if (sc.intypeof == 1 && !v.inuse)
v.dsymbolSemantic(sc);
if (!v.type || // during variable type inference
!v.type.deco && v.inuse) // during variable type semantic
{
if (v.inuse) // variable type depends on the variable itself
error(loc, "circular reference to %s `%s`", v.kind(), v.toPrettyChars());
else // variable type cannot be determined
error(loc, "forward reference to %s `%s`", v.kind(), v.toPrettyChars());
return ErrorExp.get();
}
if (v.type.ty == Terror)
return ErrorExp.get();
if ((v.storage_class & STC.manifest) && v._init)
{
if (v.inuse)
{
error(loc, "circular initialization of %s `%s`", v.kind(), v.toPrettyChars());
return ErrorExp.get();
}
e = v.expandInitializer(loc);
v.inuse++;
e = e.expressionSemantic(sc);
v.inuse--;
return e;
}
// Change the ancestor lambdas to delegate before hasThis(sc) call.
if (v.checkNestedReference(sc, loc))
return ErrorExp.get();
if (v.needThis() && hasThis(sc))
e = new DotVarExp(loc, new ThisExp(loc), v);
else
e = new VarExp(loc, v);
e = e.expressionSemantic(sc);
return e;
}
if (auto fld = s.isFuncLiteralDeclaration())
{
//printf("'%s' is a function literal\n", fld.toChars());
e = new FuncExp(loc, fld);
return e.expressionSemantic(sc);
}
if (auto f = s.isFuncDeclaration())
{
f = f.toAliasFunc();
if (!f.functionSemantic())
return ErrorExp.get();
if (!hasOverloads && f.checkForwardRef(loc))
return ErrorExp.get();
auto fd = s.isFuncDeclaration();
fd.type = f.type;
return new VarExp(loc, fd, hasOverloads);
}
if (OverDeclaration od = s.isOverDeclaration())
{
e = new VarExp(loc, od, true);
e.type = Type.tvoid;
return e;
}
if (OverloadSet o = s.isOverloadSet())
{
//printf("'%s' is an overload set\n", o.toChars());
return new OverExp(loc, o);
}
if (Import imp = s.isImport())
{
if (!imp.pkg)
{
.error(loc, "forward reference of import `%s`", imp.toChars());
return ErrorExp.get();
}
auto ie = new ScopeExp(loc, imp.pkg);
return ie.expressionSemantic(sc);
}
if (Package pkg = s.isPackage())
{
auto ie = new ScopeExp(loc, pkg);
return ie.expressionSemantic(sc);
}
if (Module mod = s.isModule())
{
auto ie = new ScopeExp(loc, mod);
return ie.expressionSemantic(sc);
}
if (Nspace ns = s.isNspace())
{
auto ie = new ScopeExp(loc, ns);
return ie.expressionSemantic(sc);
}
if (Type t = s.getType())
{
return (new TypeExp(loc, t)).expressionSemantic(sc);
}
if (TupleDeclaration tup = s.isTupleDeclaration())
{
if (tup.needThis() && hasThis(sc))
e = new DotVarExp(loc, new ThisExp(loc), tup);
else
e = new TupleExp(loc, tup);
e = e.expressionSemantic(sc);
return e;
}
if (TemplateInstance ti = s.isTemplateInstance())
{
ti.dsymbolSemantic(sc);
if (!ti.inst || ti.errors)
return ErrorExp.get();
s = ti.toAlias();
if (!s.isTemplateInstance())
goto Lagain;
e = new ScopeExp(loc, ti);
e = e.expressionSemantic(sc);
return e;
}
if (TemplateDeclaration td = s.isTemplateDeclaration())
{
Dsymbol p = td.toParentLocal();
FuncDeclaration fdthis = hasThis(sc);
AggregateDeclaration ad = p ? p.isAggregateDeclaration() : null;
if (fdthis && ad && fdthis.isMemberLocal() == ad && (td._scope.stc & STC.static_) == 0)
{
e = new DotTemplateExp(loc, new ThisExp(loc), td);
}
else
e = new TemplateExp(loc, td);
e = e.expressionSemantic(sc);
return e;
}
.error(loc, "%s `%s` is not a variable", s.kind(), s.toChars());
return ErrorExp.get();
}
/*************************************************************
* Given var, get the
* right `this` pointer if var is in an outer class, but our
* existing `this` pointer is in an inner class.
* Params:
* loc = location to use for error messages
* sc = context
* ad = struct or class we need the correct `this` for
* e1 = existing `this`
* var = the specific member of ad we're accessing
* flag = if true, return `null` instead of throwing an error
* Returns:
* Expression representing the `this` for the var
*/
private Expression getRightThis(const ref Loc loc, Scope* sc, AggregateDeclaration ad, Expression e1, Dsymbol var, int flag = 0)
{
//printf("\ngetRightThis(e1 = %s, ad = %s, var = %s)\n", e1.toChars(), ad.toChars(), var.toChars());
L1:
Type t = e1.type.toBasetype();
//printf("e1.type = %s, var.type = %s\n", e1.type.toChars(), var.type.toChars());
if (e1.op == TOK.objcClassReference)
{
// We already have an Objective-C class reference, just use that as 'this'.
return e1;
}
else if (ad && ad.isClassDeclaration && ad.isClassDeclaration.classKind == ClassKind.objc &&
var.isFuncDeclaration && var.isFuncDeclaration.isStatic &&
var.isFuncDeclaration.objc.selector)
{
return new ObjcClassReferenceExp(e1.loc, cast(ClassDeclaration) ad);
}
/* Access of a member which is a template parameter in dual-scope scenario
* class A { inc(alias m)() { ++m; } } // `m` needs `this` of `B`
* class B {int m; inc() { new A().inc!m(); } }
*/
if (e1.op == TOK.this_)
{
FuncDeclaration f = hasThis(sc);
if (f && f.isThis2)
{
if (f.followInstantiationContext(ad))
{
e1 = new VarExp(loc, f.vthis);
e1 = new PtrExp(loc, e1);
e1 = new IndexExp(loc, e1, IntegerExp.literal!1);
e1 = getThisSkipNestedFuncs(loc, sc, f.toParent2(), ad, e1, t, var);
if (e1.op == TOK.error)
return e1;
goto L1;
}
}
}
/* If e1 is not the 'this' pointer for ad
*/
if (ad &&
!(t.ty == Tpointer && t.nextOf().ty == Tstruct && (cast(TypeStruct)t.nextOf()).sym == ad) &&
!(t.ty == Tstruct && (cast(TypeStruct)t).sym == ad))
{
ClassDeclaration cd = ad.isClassDeclaration();
ClassDeclaration tcd = t.isClassHandle();
/* e1 is the right this if ad is a base class of e1
*/
if (!cd || !tcd || !(tcd == cd || cd.isBaseOf(tcd, null)))
{
/* Only classes can be inner classes with an 'outer'
* member pointing to the enclosing class instance
*/
if (tcd && tcd.isNested())
{
/* e1 is the 'this' pointer for an inner class: tcd.
* Rewrite it as the 'this' pointer for the outer class.
*/
auto vthis = tcd.followInstantiationContext(ad) ? tcd.vthis2 : tcd.vthis;
e1 = new DotVarExp(loc, e1, vthis);
e1.type = vthis.type;
e1.type = e1.type.addMod(t.mod);
// Do not call ensureStaticLinkTo()
//e1 = e1.semantic(sc);
// Skip up over nested functions, and get the enclosing
// class type.
e1 = getThisSkipNestedFuncs(loc, sc, tcd.toParentP(ad), ad, e1, t, var);
if (e1.op == TOK.error)
return e1;
goto L1;
}
/* Can't find a path from e1 to ad
*/
if (flag)
return null;
e1.error("`this` for `%s` needs to be type `%s` not type `%s`", var.toChars(), ad.toChars(), t.toChars());
return ErrorExp.get();
}
}
return e1;
}
/***************************************
* Pull out any properties.
*/
private Expression resolvePropertiesX(Scope* sc, Expression e1, Expression e2 = null)
{
//printf("resolvePropertiesX, e1 = %s %s, e2 = %s\n", Token.toChars(e1.op), e1.toChars(), e2 ? e2.toChars() : null);
Loc loc = e1.loc;
OverloadSet os;
Dsymbol s;
Objects* tiargs;
Type tthis;
if (e1.op == TOK.dot)
{
DotExp de = cast(DotExp)e1;
if (de.e2.op == TOK.overloadSet)
{
tiargs = null;
tthis = de.e1.type;
os = (cast(OverExp)de.e2).vars;
goto Los;
}
}
else if (e1.op == TOK.overloadSet)
{
tiargs = null;
tthis = null;
os = (cast(OverExp)e1).vars;
Los:
assert(os);
FuncDeclaration fd = null;
if (e2)
{
e2 = e2.expressionSemantic(sc);
if (e2.op == TOK.error)
return ErrorExp.get();
e2 = resolveProperties(sc, e2);
Expressions a;
a.push(e2);
for (size_t i = 0; i < os.a.dim; i++)
{
if (FuncDeclaration f = resolveFuncCall(loc, sc, os.a[i], tiargs, tthis, &a, FuncResolveFlag.quiet))
{
if (f.errors)
return ErrorExp.get();
fd = f;
assert(fd.type.ty == Tfunction);
}
}
if (fd)
{
Expression e = new CallExp(loc, e1, e2);
return e.expressionSemantic(sc);
}
}
{
for (size_t i = 0; i < os.a.dim; i++)
{
if (FuncDeclaration f = resolveFuncCall(loc, sc, os.a[i], tiargs, tthis, null, FuncResolveFlag.quiet))
{
if (f.errors)
return ErrorExp.get();
fd = f;
assert(fd.type.ty == Tfunction);
TypeFunction tf = cast(TypeFunction)fd.type;
if (!tf.isref && e2)
{
error(loc, "%s is not an lvalue", e1.toChars());
return ErrorExp.get();
}
}
}
if (fd)
{
Expression e = new CallExp(loc, e1);
if (e2)
e = new AssignExp(loc, e, e2);
return e.expressionSemantic(sc);
}
}
if (e2)
goto Leprop;
}
else if (e1.op == TOK.dotTemplateInstance)
{
DotTemplateInstanceExp dti = cast(DotTemplateInstanceExp)e1;
if (!dti.findTempDecl(sc))
goto Leprop;
if (!dti.ti.semanticTiargs(sc))
goto Leprop;
tiargs = dti.ti.tiargs;
tthis = dti.e1.type;
if ((os = dti.ti.tempdecl.isOverloadSet()) !is null)
goto Los;
if ((s = dti.ti.tempdecl) !is null)
goto Lfd;
}
else if (e1.op == TOK.dotTemplateDeclaration)
{
DotTemplateExp dte = cast(DotTemplateExp)e1;
s = dte.td;
tiargs = null;
tthis = dte.e1.type;
goto Lfd;
}
else if (e1.op == TOK.scope_)
{
s = (cast(ScopeExp)e1).sds;
TemplateInstance ti = s.isTemplateInstance();
if (ti && !ti.semanticRun && ti.tempdecl)
{
//assert(ti.needsTypeInference(sc));
if (!ti.semanticTiargs(sc))
goto Leprop;
tiargs = ti.tiargs;
tthis = null;
if ((os = ti.tempdecl.isOverloadSet()) !is null)
goto Los;
if ((s = ti.tempdecl) !is null)
goto Lfd;
}
}
else if (e1.op == TOK.template_)
{
s = (cast(TemplateExp)e1).td;
tiargs = null;
tthis = null;
goto Lfd;
}
else if (e1.op == TOK.dotVariable && e1.type && e1.type.toBasetype().ty == Tfunction)
{
DotVarExp dve = cast(DotVarExp)e1;
s = dve.var.isFuncDeclaration();
tiargs = null;
tthis = dve.e1.type;
goto Lfd;
}
else if (e1.op == TOK.variable && e1.type && e1.type.toBasetype().ty == Tfunction)
{
s = (cast(VarExp)e1).var.isFuncDeclaration();
tiargs = null;
tthis = null;
Lfd:
assert(s);
if (e2)
{
e2 = e2.expressionSemantic(sc);
if (e2.op == TOK.error)
return ErrorExp.get();
e2 = resolveProperties(sc, e2);
Expressions a;
a.push(e2);
FuncDeclaration fd = resolveFuncCall(loc, sc, s, tiargs, tthis, &a, FuncResolveFlag.quiet);
if (fd && fd.type)
{
if (fd.errors)
return ErrorExp.get();
if (!checkSymbolAccess(sc, fd))
{
// @@@DEPRECATED_2020-10@@@
// When turning into error, uncomment the return statement
TypeFunction tf = cast(TypeFunction)fd.type;
deprecation(loc, "Function `%s` of type `%s` is not accessible from module `%s`",
fd.toPrettyChars(), tf.toChars, sc._module.toChars);
//return ErrorExp.get();
}
assert(fd.type.ty == Tfunction);
Expression e = new CallExp(loc, e1, e2);
return e.expressionSemantic(sc);
}
}
{
FuncDeclaration fd = resolveFuncCall(loc, sc, s, tiargs, tthis, null, FuncResolveFlag.quiet);
if (fd && fd.type)
{
if (fd.errors)
return ErrorExp.get();
assert(fd.type.ty == Tfunction);
TypeFunction tf = cast(TypeFunction)fd.type;
if (!e2 || tf.isref)
{
if (!checkSymbolAccess(sc, fd))
{
// @@@DEPRECATED_2020-10@@@
// When turning into error, uncomment the return statement
deprecation(loc, "Function `%s` of type `%s` is not accessible from module `%s`",
fd.toPrettyChars(), tf.toChars, sc._module.toChars);
//return ErrorExp.get();
}
Expression e = new CallExp(loc, e1);
if (e2)
e = new AssignExp(loc, e, e2);
return e.expressionSemantic(sc);
}
}
}
if (FuncDeclaration fd = s.isFuncDeclaration())
{
// Keep better diagnostic message for invalid property usage of functions
assert(fd.type.ty == Tfunction);
Expression e = new CallExp(loc, e1, e2);
return e.expressionSemantic(sc);
}
if (e2)
goto Leprop;
}
if (e1.op == TOK.variable)
{
VarExp ve = cast(VarExp)e1;
VarDeclaration v = ve.var.isVarDeclaration();
if (v && ve.checkPurity(sc, v))
return ErrorExp.get();
}
if (e2)
return null;
if (e1.type && e1.op != TOK.type) // function type is not a property
{
/* Look for e1 being a lazy parameter; rewrite as delegate call
* only if the symbol wasn't already treated as a delegate
*/
auto ve = e1.isVarExp();
if (ve && ve.var.storage_class & STC.lazy_ && !ve.delegateWasExtracted)
{
Expression e = new CallExp(loc, e1);
return e.expressionSemantic(sc);
}
else if (e1.op == TOK.dotVariable)
{
// Check for reading overlapped pointer field in @safe code.
if (checkUnsafeAccess(sc, e1, true, true))
return ErrorExp.get();
}
else if (e1.op == TOK.dot)
{
e1.error("expression has no value");
return ErrorExp.get();
}
else if (e1.op == TOK.call)
{
CallExp ce = cast(CallExp)e1;
// Check for reading overlapped pointer field in @safe code.
if (checkUnsafeAccess(sc, ce.e1, true, true))
return ErrorExp.get();
}
}
if (!e1.type)
{
error(loc, "cannot resolve type for %s", e1.toChars());
e1 = ErrorExp.get();
}
return e1;
Leprop:
error(loc, "not a property %s", e1.toChars());
return ErrorExp.get();
}
extern (C++) Expression resolveProperties(Scope* sc, Expression e)
{
//printf("resolveProperties(%s)\n", e.toChars());
e = resolvePropertiesX(sc, e);
if (e.checkRightThis(sc))
return ErrorExp.get();
return e;
}
/****************************************
* The common type is determined by applying ?: to each pair.
* Output:
* exps[] properties resolved, implicitly cast to common type, rewritten in place
* *pt if pt is not NULL, set to the common type
* Returns:
* true a semantic error was detected
*/
private bool arrayExpressionToCommonType(Scope* sc, Expressions* exps, Type* pt)
{
/* Still have a problem with:
* ubyte[][] = [ cast(ubyte[])"hello", [1]];
* which works if the array literal is initialized top down with the ubyte[][]
* type, but fails with this function doing bottom up typing.
*/
//printf("arrayExpressionToCommonType()\n");
scope IntegerExp integerexp = IntegerExp.literal!0;
scope CondExp condexp = new CondExp(Loc.initial, integerexp, null, null);
Type t0 = null;
Expression e0 = null;
size_t j0 = ~0;
bool foundType;
for (size_t i = 0; i < exps.dim; i++)
{
Expression e = (*exps)[i];
if (!e)
continue;
e = resolveProperties(sc, e);
if (!e.type)
{
e.error("`%s` has no value", e.toChars());
t0 = Type.terror;
continue;
}
if (e.op == TOK.type)
{
foundType = true; // do not break immediately, there might be more errors
e.checkValue(); // report an error "type T has no value"
t0 = Type.terror;
continue;
}
if (e.type.ty == Tvoid)
{
// void expressions do not concur to the determination of the common
// type.
continue;
}
if (checkNonAssignmentArrayOp(e))
{
t0 = Type.terror;
continue;
}
e = doCopyOrMove(sc, e);
if (!foundType && t0 && !t0.equals(e.type))
{
/* This applies ?: to merge the types. It's backwards;
* ?: should call this function to merge types.
*/
condexp.type = null;
condexp.e1 = e0;
condexp.e2 = e;
condexp.loc = e.loc;
Expression ex = condexp.expressionSemantic(sc);
if (ex.op == TOK.error)
e = ex;
else if (e.op == TOK.function_ || e.op == TOK.delegate_)
{
// https://issues.dlang.org/show_bug.cgi?id=21285
// Functions and delegates don't convert correctly with castTo below
(*exps)[j0] = condexp.e1;
e = condexp.e2;
}
else
{
// Convert to common type
(*exps)[j0] = condexp.e1.castTo(sc, condexp.type);
e = condexp.e2.castTo(sc, condexp.type);
}
}
j0 = i;
e0 = e;
t0 = e.type;
if (e.op != TOK.error)
(*exps)[i] = e;
}
if (!t0)
t0 = Type.tvoid; // [] is typed as void[]
else if (t0.ty != Terror)
{
for (size_t i = 0; i < exps.dim; i++)
{
Expression e = (*exps)[i];
if (!e)
continue;
e = e.implicitCastTo(sc, t0);
//assert(e.op != TOK.error);
if (e.op == TOK.error)
{
/* https://issues.dlang.org/show_bug.cgi?id=13024
* a workaround for the bug in typeMerge -
* it should paint e1 and e2 by deduced common type,
* but doesn't in this particular case.
*/
t0 = Type.terror;
break;
}
(*exps)[i] = e;
}
}
if (pt)
*pt = t0;
return (t0 == Type.terror);
}
private Expression opAssignToOp(const ref Loc loc, TOK op, Expression e1, Expression e2)
{
Expression e;
switch (op)
{
case TOK.addAssign:
e = new AddExp(loc, e1, e2);
break;
case TOK.minAssign:
e = new MinExp(loc, e1, e2);
break;
case TOK.mulAssign:
e = new MulExp(loc, e1, e2);
break;
case TOK.divAssign:
e = new DivExp(loc, e1, e2);
break;
case TOK.modAssign:
e = new ModExp(loc, e1, e2);
break;
case TOK.andAssign:
e = new AndExp(loc, e1, e2);
break;
case TOK.orAssign:
e = new OrExp(loc, e1, e2);
break;
case TOK.xorAssign:
e = new XorExp(loc, e1, e2);
break;
case TOK.leftShiftAssign:
e = new ShlExp(loc, e1, e2);
break;
case TOK.rightShiftAssign:
e = new ShrExp(loc, e1, e2);
break;
case TOK.unsignedRightShiftAssign:
e = new UshrExp(loc, e1, e2);
break;
default:
assert(0);
}
return e;
}
/*********************
* Rewrite:
* array.length op= e2
* as:
* array.length = array.length op e2
* or:
* auto tmp = &array;
* (*tmp).length = (*tmp).length op e2
*/
private Expression rewriteOpAssign(BinExp exp)
{
Expression e;
assert(exp.e1.op == TOK.arrayLength);
ArrayLengthExp ale = cast(ArrayLengthExp)exp.e1;
if (ale.e1.op == TOK.variable)
{
e = opAssignToOp(exp.loc, exp.op, ale, exp.e2);
e = new AssignExp(exp.loc, ale.syntaxCopy(), e);
}
else
{
/* auto tmp = &array;
* (*tmp).length = (*tmp).length op e2
*/
auto tmp = copyToTemp(0, "__arraylength", new AddrExp(ale.loc, ale.e1));
Expression e1 = new ArrayLengthExp(ale.loc, new PtrExp(ale.loc, new VarExp(ale.loc, tmp)));
Expression elvalue = e1.syntaxCopy();
e = opAssignToOp(exp.loc, exp.op, e1, exp.e2);
e = new AssignExp(exp.loc, elvalue, e);
e = new CommaExp(exp.loc, new DeclarationExp(ale.loc, tmp), e);
}
return e;
}
/****************************************
* Preprocess arguments to function.
* Input:
* reportErrors whether or not to report errors here. Some callers are not
* checking actual function params, so they'll do their own error reporting
* Output:
* exps[] tuples expanded, properties resolved, rewritten in place
* Returns:
* true a semantic error occurred
*/
private bool preFunctionParameters(Scope* sc, Expressions* exps, const bool reportErrors = true)
{
bool err = false;
if (exps)
{
expandTuples(exps);
for (size_t i = 0; i < exps.dim; i++)
{
Expression arg = (*exps)[i];
arg = resolveProperties(sc, arg);
if (arg.op == TOK.type)
{
// for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684
arg = resolveAliasThis(sc, arg);
if (arg.op == TOK.type)
{
if (reportErrors)
{
arg.error("cannot pass type `%s` as a function argument", arg.toChars());
arg = ErrorExp.get();
}
err = true;
}
}
else if (arg.type.toBasetype().ty == Tfunction)
{
if (reportErrors)
{
arg.error("cannot pass function `%s` as a function argument", arg.toChars());
arg = ErrorExp.get();
}
err = true;
}
else if (checkNonAssignmentArrayOp(arg))
{
arg = ErrorExp.get();
err = true;
}
(*exps)[i] = arg;
}
}
return err;
}
/********************************************
* Issue an error if default construction is disabled for type t.
* Default construction is required for arrays and 'out' parameters.
* Returns:
* true an error was issued
*/
private bool checkDefCtor(Loc loc, Type t)
{
t = t.baseElemOf();
if (t.ty == Tstruct)
{
StructDeclaration sd = (cast(TypeStruct)t).sym;
if (sd.noDefaultCtor)
{
sd.error(loc, "default construction is disabled");
return true;
}
}
return false;
}
/****************************************
* Now that we know the exact type of the function we're calling,
* the arguments[] need to be adjusted:
* 1. implicitly convert argument to the corresponding parameter type
* 2. add default arguments for any missing arguments
* 3. do default promotions on arguments corresponding to ...
* 4. add hidden _arguments[] argument
* 5. call copy constructor for struct value arguments
* Params:
* loc = location of function call
* sc = context
* tf = type of the function
* ethis = `this` argument, `null` if none or not known
* tthis = type of `this` argument, `null` if no `this` argument
* arguments = array of actual arguments to function call
* fd = the function being called, `null` if called indirectly
* prettype = set to return type of function
* peprefix = set to expression to execute before `arguments[]` are evaluated, `null` if none
* Returns:
* true errors happened
*/
private bool functionParameters(const ref Loc loc, Scope* sc,
TypeFunction tf, Expression ethis, Type tthis, Expressions* arguments, FuncDeclaration fd,
Type* prettype, Expression* peprefix)
{
//printf("functionParameters() %s\n", fd ? fd.toChars() : "");
assert(arguments);
assert(fd || tf.next);
size_t nargs = arguments ? arguments.dim : 0;
const size_t nparams = tf.parameterList.length;
const olderrors = global.errors;
bool err = false;
*prettype = Type.terror;
Expression eprefix = null;
*peprefix = null;
if (nargs > nparams && tf.parameterList.varargs == VarArg.none)
{
error(loc, "expected %llu arguments, not %llu for non-variadic function type `%s`", cast(ulong)nparams, cast(ulong)nargs, tf.toChars());
return true;
}
// If inferring return type, and semantic3() needs to be run if not already run
if (!tf.next && fd.inferRetType)
{
fd.functionSemantic();
}
else if (fd && fd.parent)
{
TemplateInstance ti = fd.parent.isTemplateInstance();
if (ti && ti.tempdecl)
{
fd.functionSemantic3();
}
}
/* If calling a pragma(inline, true) function,
* set flag to later scan for inlines.
*/
if (fd && fd.inlining == PINLINE.always)
{
if (sc._module)
sc._module.hasAlwaysInlines = true;
if (sc.func)
sc.func.hasAlwaysInlines = true;
}
const isCtorCall = fd && fd.needThis() && fd.isCtorDeclaration();
const size_t n = (nargs > nparams) ? nargs : nparams; // n = max(nargs, nparams)
/* If the function return type has wildcards in it, we'll need to figure out the actual type
* based on the actual argument types.
* Start with the `this` argument, later on merge into wildmatch the mod bits of the rest
* of the arguments.
*/
MOD wildmatch = (tthis && !isCtorCall) ? tthis.Type.deduceWild(tf, false) : 0;
bool done = false;
foreach (const i; 0 .. n)
{
Expression arg = (i < nargs) ? (*arguments)[i] : null;
if (i < nparams)
{
bool errorArgs()
{
error(loc, "expected %llu function arguments, not %llu", cast(ulong)nparams, cast(ulong)nargs);
return true;
}
Parameter p = tf.parameterList[i];
if (!arg)
{
if (!p.defaultArg)
{
if (tf.parameterList.varargs == VarArg.typesafe && i + 1 == nparams)
goto L2;
return errorArgs();
}
arg = p.defaultArg;
arg = inlineCopy(arg, sc);
// __FILE__, __LINE__, __MODULE__, __FUNCTION__, and __PRETTY_FUNCTION__
arg = arg.resolveLoc(loc, sc);
arguments.push(arg);
nargs++;
}
else
{
if (isDefaultInitOp(arg.op))
{
arg = arg.resolveLoc(loc, sc);
(*arguments)[i] = arg;
}
}
if (tf.parameterList.varargs == VarArg.typesafe && i + 1 == nparams) // https://dlang.org/spec/function.html#variadic
{
//printf("\t\tvarargs == 2, p.type = '%s'\n", p.type.toChars());
{
MATCH m;
if ((m = arg.implicitConvTo(p.type)) > MATCH.nomatch)
{
if (p.type.nextOf() && arg.implicitConvTo(p.type.nextOf()) >= m)
goto L2;
else if (nargs != nparams)
return errorArgs();
goto L1;
}
}
L2:
Type tb = p.type.toBasetype();
switch (tb.ty)
{
case Tsarray:
case Tarray:
{
/* Create a static array variable v of type arg.type:
* T[dim] __arrayArg = [ arguments[i], ..., arguments[nargs-1] ];
*
* The array literal in the initializer of the hidden variable
* is now optimized.
* https://issues.dlang.org/show_bug.cgi?id=2356
*/
Type tbn = (cast(TypeArray)tb).next; // array element type
Type tret = p.isLazyArray();
auto elements = new Expressions(nargs - i);
foreach (u; 0 .. elements.dim)
{
Expression a = (*arguments)[i + u];
if (tret && a.implicitConvTo(tret))
{
// p is a lazy array of delegates, tret is return type of the delegates
a = a.implicitCastTo(sc, tret)
.optimize(WANTvalue)
.toDelegate(tret, sc);
}
else
a = a.implicitCastTo(sc, tbn);
a = a.addDtorHook(sc);
(*elements)[u] = a;
}
// https://issues.dlang.org/show_bug.cgi?id=14395
// Convert to a static array literal, or its slice.
arg = new ArrayLiteralExp(loc, tbn.sarrayOf(nargs - i), elements);
if (tb.ty == Tarray)
{
arg = new SliceExp(loc, arg, null, null);
arg.type = p.type;
}
break;
}
case Tclass:
{
/* Set arg to be:
* new Tclass(arg0, arg1, ..., argn)
*/
auto args = new Expressions(nargs - i);
foreach (u; i .. nargs)
(*args)[u - i] = (*arguments)[u];
arg = new NewExp(loc, null, null, p.type, args);
break;
}
default:
if (!arg)
{
error(loc, "not enough arguments");
return true;
}
break;
}
arg = arg.expressionSemantic(sc);
//printf("\targ = '%s'\n", arg.toChars());
arguments.setDim(i + 1);
(*arguments)[i] = arg;
nargs = i + 1;
done = true;
}
L1:
if (!(p.storageClass & STC.lazy_ && p.type.ty == Tvoid))
{
const isRef = (p.storageClass & (STC.ref_ | STC.out_)) != 0;
if (ubyte wm = arg.type.deduceWild(p.type, isRef))
{
wildmatch = wildmatch ? MODmerge(wildmatch, wm) : wm;
//printf("[%d] p = %s, a = %s, wm = %d, wildmatch = %d\n", i, p.type.toChars(), arg.type.toChars(), wm, wildmatch);
}
}
}
if (done)
break;
}
if ((wildmatch == MODFlags.mutable || wildmatch == MODFlags.immutable_) &&
tf.next && tf.next.hasWild() &&
(tf.isref || !tf.next.implicitConvTo(tf.next.immutableOf())))
{
bool errorInout(MOD wildmatch)
{
const(char)* s = wildmatch == MODFlags.mutable ? "mutable" : MODtoChars(wildmatch);
error(loc, "modify `inout` to `%s` is not allowed inside `inout` function", s);
return true;
}
if (fd)
{
/* If the called function may return the reference to
* outer inout data, it should be rejected.
*
* void foo(ref inout(int) x) {
* ref inout(int) bar(inout(int)) { return x; }
* struct S {
* ref inout(int) bar() inout { return x; }
* ref inout(int) baz(alias a)() inout { return x; }
* }
* bar(int.init) = 1; // bad!
* S().bar() = 1; // bad!
* }
* void test() {
* int a;
* auto s = foo(a);
* s.baz!a() = 1; // bad!
* }
*
*/
bool checkEnclosingWild(Dsymbol s)
{
bool checkWild(Dsymbol s)
{
if (!s)
return false;
if (auto ad = s.isAggregateDeclaration())
{
if (ad.isNested())
return checkEnclosingWild(s);
}
else if (auto ff = s.isFuncDeclaration())
{
if ((cast(TypeFunction)ff.type).iswild)
return errorInout(wildmatch);
if (ff.isNested() || ff.isThis())
return checkEnclosingWild(s);
}
return false;
}
Dsymbol ctx0 = s.toParent2();
Dsymbol ctx1 = s.toParentLocal();
if (checkWild(ctx0))
return true;
if (ctx0 != ctx1)
return checkWild(ctx1);
return false;
}
if ((fd.isThis() || fd.isNested()) && checkEnclosingWild(fd))
return true;
}
else if (tf.isWild())
return errorInout(wildmatch);
}
Expression firstArg = ((tf.next && tf.next.ty == Tvoid || isCtorCall) &&
tthis &&
tthis.isMutable() && tthis.toBasetype().ty == Tstruct &&
tthis.hasPointers())
? ethis : null;
assert(nargs >= nparams);
foreach (const i, arg; (*arguments)[0 .. nargs])
{
assert(arg);
if (i < nparams)
{
Parameter p = tf.parameterList[i];
Type targ = arg.type; // keep original type for isCopyable() because alias this
// resolution may hide an uncopyable type
if (!(p.storageClass & STC.lazy_ && p.type.ty == Tvoid))
{
Type tprm = p.type.hasWild()
? p.type.substWildTo(wildmatch)
: p.type;
const hasCopyCtor = (arg.type.ty == Tstruct) && (cast(TypeStruct)arg.type).sym.hasCopyCtor;
const typesMatch = arg.type.mutableOf().unSharedOf().equals(tprm.mutableOf().unSharedOf());
if (!((hasCopyCtor && typesMatch) || tprm.equals(arg.type)))
{
//printf("arg.type = %s, p.type = %s\n", arg.type.toChars(), p.type.toChars());
arg = arg.implicitCastTo(sc, tprm);
arg = arg.optimize(WANTvalue, p.isReference());
}
}
// Support passing rvalue to `in` parameters
if ((p.storageClass & (STC.in_ | STC.ref_)) == (STC.in_ | STC.ref_))
{
if (!arg.isLvalue())
{
auto v = copyToTemp(STC.exptemp, "__rvalue", arg);
Expression ev = new DeclarationExp(arg.loc, v);
ev = new CommaExp(arg.loc, ev, new VarExp(arg.loc, v));
arg = ev.expressionSemantic(sc);
}
arg = arg.toLvalue(sc, arg);
// Look for mutable misaligned pointer, etc., in @safe mode
err |= checkUnsafeAccess(sc, arg, false, true);
}
else if (p.storageClass & STC.ref_)
{
if (global.params.rvalueRefParam &&
!arg.isLvalue() &&
targ.isCopyable())
{ /* allow rvalues to be passed to ref parameters by copying
* them to a temp, then pass the temp as the argument
*/
auto v = copyToTemp(0, "__rvalue", arg);
Expression ev = new DeclarationExp(arg.loc, v);
ev = new CommaExp(arg.loc, ev, new VarExp(arg.loc, v));
arg = ev.expressionSemantic(sc);
}
arg = arg.toLvalue(sc, arg);
// Look for mutable misaligned pointer, etc., in @safe mode
err |= checkUnsafeAccess(sc, arg, false, true);
}
else if (p.storageClass & STC.out_)
{
Type t = arg.type;
if (!t.isMutable() || !t.isAssignable()) // check blit assignable
{
arg.error("cannot modify struct `%s` with immutable members", arg.toChars());
err = true;
}
else
{
// Look for misaligned pointer, etc., in @safe mode
err |= checkUnsafeAccess(sc, arg, false, true);
err |= checkDefCtor(arg.loc, t); // t must be default constructible
}
arg = arg.toLvalue(sc, arg);
}
else if (p.storageClass & STC.lazy_)
{
// Convert lazy argument to a delegate
auto t = (p.type.ty == Tvoid) ? p.type : arg.type;
arg = toDelegate(arg, t, sc);
}
//printf("arg: %s\n", arg.toChars());
//printf("type: %s\n", arg.type.toChars());
//printf("param: %s\n", p.toChars());
if (firstArg && p.storageClass & STC.return_)
{
/* Argument value can be assigned to firstArg.
* Check arg to see if it matters.
*/
if (global.params.vsafe)
err |= checkParamArgumentReturn(sc, firstArg, arg, false);
}
else if (tf.parameterEscapes(tthis, p))
{
/* Argument value can escape from the called function.
* Check arg to see if it matters.
*/
if (global.params.vsafe)
err |= checkParamArgumentEscape(sc, fd, p, arg, false, false);
}
else
{
/* Argument value cannot escape from the called function.
*/
Expression a = arg;
if (a.op == TOK.cast_)
a = (cast(CastExp)a).e1;
ArrayLiteralExp ale;
if (p.type.toBasetype().ty == Tarray && !(p.storageClass & STC.return_) &&
(ale = a.isArrayLiteralExp()) !is null)
{
// allocate the array literal as temporary static array on the stack
ale.type = ale.type.nextOf().sarrayOf(ale.elements ? ale.elements.length : 0);
auto tmp = copyToTemp(0, "__arrayliteral_on_stack", ale);
auto declareTmp = new DeclarationExp(ale.loc, tmp);
auto castToSlice = new CastExp(ale.loc, new VarExp(ale.loc, tmp), p.type);
arg = CommaExp.combine(declareTmp, castToSlice);
arg = arg.expressionSemantic(sc);
}
else if (a.op == TOK.function_)
{
/* Function literals can only appear once, so if this
* appearance was scoped, there cannot be any others.
*/
FuncExp fe = cast(FuncExp)a;
fe.fd.tookAddressOf = 0;
}
else if (a.op == TOK.delegate_)
{
/* For passing a delegate to a scoped parameter,
* this doesn't count as taking the address of it.
* We only worry about 'escaping' references to the function.
*/
DelegateExp de = cast(DelegateExp)a;
if (de.e1.op == TOK.variable)
{
VarExp ve = cast(VarExp)de.e1;
FuncDeclaration f = ve.var.isFuncDeclaration();
if (f)
{
if (f.tookAddressOf)
--f.tookAddressOf;
//printf("--tookAddressOf = %d\n", f.tookAddressOf);
}
}
}
}
if (!p.isReference())
err |= arg.checkSharedAccess(sc);
arg = arg.optimize(WANTvalue, p.isReference());
/* Determine if this parameter is the "first reference" parameter through which
* later "return" arguments can be stored.
*/
if (i == 0 && !tthis && p.isReference() && p.type &&
(tf.next && tf.next.ty == Tvoid || isCtorCall))
{
Type tb = p.type.baseElemOf();
if (tb.isMutable() && tb.hasPointers())
{
firstArg = arg;
}
}
}
else
{
// These will be the trailing ... arguments
// If not D linkage, do promotions
if (tf.linkage != LINK.d)
{
// Promote bytes, words, etc., to ints
arg = integralPromotions(arg, sc);
// Promote floats to doubles
switch (arg.type.ty)
{
case Tfloat32:
arg = arg.castTo(sc, Type.tfloat64);
break;
case Timaginary32:
arg = arg.castTo(sc, Type.timaginary64);
break;
default:
break;
}
if (tf.parameterList.varargs == VarArg.variadic)
{
const(char)* p = tf.linkage == LINK.c ? "extern(C)" : "extern(C++)";
if (arg.type.ty == Tarray)
{
arg.error("cannot pass dynamic arrays to `%s` vararg functions", p);
err = true;
}
if (arg.type.ty == Tsarray)
{
arg.error("cannot pass static arrays to `%s` vararg functions", p);
err = true;
}
}
}
// Do not allow types that need destructors or copy constructors.
if (arg.type.needsDestruction())
{
arg.error("cannot pass types that need destruction as variadic arguments");
err = true;
}
if (arg.type.needsCopyOrPostblit())
{
arg.error("cannot pass types with postblits or copy constructors as variadic arguments");
err = true;
}
// Convert static arrays to dynamic arrays
// BUG: I don't think this is right for D2
Type tb = arg.type.toBasetype();
if (tb.ty == Tsarray)
{
TypeSArray ts = cast(TypeSArray)tb;
Type ta = ts.next.arrayOf();
if (ts.size(arg.loc) == 0)
arg = new NullExp(arg.loc, ta);
else
arg = arg.castTo(sc, ta);
}
if (tb.ty == Tstruct)
{
//arg = callCpCtor(sc, arg);
}
// Give error for overloaded function addresses
if (arg.op == TOK.symbolOffset)
{
SymOffExp se = cast(SymOffExp)arg;
if (se.hasOverloads && !se.var.isFuncDeclaration().isUnique())
{
arg.error("function `%s` is overloaded", arg.toChars());
err = true;
}
}
err |= arg.checkValue();
err |= arg.checkSharedAccess(sc);
arg = arg.optimize(WANTvalue);
}
(*arguments)[i] = arg;
}
/* If calling C scanf(), printf(), or any variants, check the format string against the arguments
*/
const isVa_list = tf.parameterList.varargs == VarArg.none;
if (fd && fd.flags & FUNCFLAG.printf)
{
if (auto se = (*arguments)[nparams - 1 - isVa_list].isStringExp())
{
checkPrintfFormat(se.loc, se.peekString(), (*arguments)[nparams .. nargs], isVa_list);
}
}
else if (fd && fd.flags & FUNCFLAG.scanf)
{
if (auto se = (*arguments)[nparams - 1 - isVa_list].isStringExp())
{
checkScanfFormat(se.loc, se.peekString(), (*arguments)[nparams .. nargs], isVa_list);
}
}
else
{
// TODO: not checking the "v" functions yet (for those, check format string only, not args)
}
/* Remaining problems:
* 1. order of evaluation - some function push L-to-R, others R-to-L. Until we resolve what array assignment does (which is
* implemented by calling a function) we'll defer this for now.
* 2. value structs (or static arrays of them) that need to be copy constructed
* 3. value structs (or static arrays of them) that have destructors, and subsequent arguments that may throw before the
* function gets called (functions normally destroy their parameters)
* 2 and 3 are handled by doing the argument construction in 'eprefix' so that if a later argument throws, they are cleaned
* up properly. Pushing arguments on the stack then cannot fail.
*/
{
/* TODO: tackle problem 1)
*/
const bool leftToRight = true; // TODO: Any cases that need rightToLeft?
if (!leftToRight)
assert(nargs == nparams); // no variadics for RTL order, as they would probably be evaluated LTR and so add complexity
const ptrdiff_t start = (leftToRight ? 0 : cast(ptrdiff_t)nargs - 1);
const ptrdiff_t end = (leftToRight ? cast(ptrdiff_t)nargs : -1);
const ptrdiff_t step = (leftToRight ? 1 : -1);
/* Compute indices of last throwing argument and first arg needing destruction.
* Used to not set up destructors unless an arg needs destruction on a throw
* in a later argument.
*/
ptrdiff_t lastthrow = -1;
ptrdiff_t firstdtor = -1;
for (ptrdiff_t i = start; i != end; i += step)
{
Expression arg = (*arguments)[i];
if (canThrow(arg, sc.func, false))
lastthrow = i;
if (firstdtor == -1 && arg.type.needsDestruction())
{
Parameter p = (i >= nparams ? null : tf.parameterList[i]);
if (!(p && (p.storageClass & (STC.lazy_ | STC.ref_ | STC.out_))))
firstdtor = i;
}
}
/* Does problem 3) apply to this call?
*/
const bool needsPrefix = (firstdtor >= 0 && lastthrow >= 0
&& (lastthrow - firstdtor) * step > 0);
/* If so, initialize 'eprefix' by declaring the gate
*/
VarDeclaration gate = null;
if (needsPrefix)
{
// eprefix => bool __gate [= false]
Identifier idtmp = Identifier.generateId("__gate");
gate = new VarDeclaration(loc, Type.tbool, idtmp, null);
gate.storage_class |= STC.temp | STC.ctfe | STC.volatile_;
gate.dsymbolSemantic(sc);
auto ae = new DeclarationExp(loc, gate);
eprefix = ae.expressionSemantic(sc);
}
for (ptrdiff_t i = start; i != end; i += step)
{
Expression arg = (*arguments)[i];
Parameter parameter = (i >= nparams ? null : tf.parameterList[i]);
const bool isRef = parameter && parameter.isReference();
const bool isLazy = (parameter && (parameter.storageClass & STC.lazy_));
/* Skip lazy parameters
*/
if (isLazy)
continue;
/* Do we have a gate? Then we have a prefix and we're not yet past the last throwing arg.
* Declare a temporary variable for this arg and append that declaration to 'eprefix',
* which will implicitly take care of potential problem 2) for this arg.
* 'eprefix' will therefore finally contain all args up to and including the last
* potentially throwing arg, excluding all lazy parameters.
*/
if (gate)
{
const bool needsDtor = (!isRef && arg.type.needsDestruction() && i != lastthrow);
/* Declare temporary 'auto __pfx = arg' (needsDtor) or 'auto __pfy = arg' (!needsDtor)
*/
auto tmp = copyToTemp(0,
needsDtor ? "__pfx" : "__pfy",
!isRef ? arg : arg.addressOf());
tmp.dsymbolSemantic(sc);
/* Modify the destructor so it only runs if gate==false, i.e.,
* only if there was a throw while constructing the args
*/
if (!needsDtor)
{
if (tmp.edtor)
{
assert(i == lastthrow);
tmp.edtor = null;
}
}
else
{
// edtor => (__gate || edtor)
assert(tmp.edtor);
Expression e = tmp.edtor;
e = new LogicalExp(e.loc, TOK.orOr, new VarExp(e.loc, gate), e);
tmp.edtor = e.expressionSemantic(sc);
//printf("edtor: %s\n", tmp.edtor.toChars());
}
// eprefix => (eprefix, auto __pfx/y = arg)
auto ae = new DeclarationExp(loc, tmp);
eprefix = Expression.combine(eprefix, ae.expressionSemantic(sc));
// arg => __pfx/y
arg = new VarExp(loc, tmp);
arg = arg.expressionSemantic(sc);
if (isRef)
{
arg = new PtrExp(loc, arg);
arg = arg.expressionSemantic(sc);
}
/* Last throwing arg? Then finalize eprefix => (eprefix, gate = true),
* i.e., disable the dtors right after constructing the last throwing arg.
* From now on, the callee will take care of destructing the args because
* the args are implicitly moved into function parameters.
*
* Set gate to null to let the next iterations know they don't need to
* append to eprefix anymore.
*/
if (i == lastthrow)
{
auto e = new AssignExp(gate.loc, new VarExp(gate.loc, gate), IntegerExp.createBool(true));
eprefix = Expression.combine(eprefix, e.expressionSemantic(sc));
gate = null;
}
}
else
{
/* No gate, no prefix to append to.
* Handle problem 2) by calling the copy constructor for value structs
* (or static arrays of them) if appropriate.
*/
Type tv = arg.type.baseElemOf();
if (!isRef && tv.ty == Tstruct)
arg = doCopyOrMove(sc, arg, parameter ? parameter.type : null);
}
(*arguments)[i] = arg;
}
}
//if (eprefix) printf("eprefix: %s\n", eprefix.toChars());
/* Test compliance with DIP1021
*/
if (global.params.useDIP1021 &&
tf.trust != TRUST.system && tf.trust != TRUST.trusted)
err |= checkMutableArguments(sc, fd, tf, ethis, arguments, false);
// If D linkage and variadic, add _arguments[] as first argument
if (tf.isDstyleVariadic())
{
assert(arguments.dim >= nparams);
auto args = new Parameters(arguments.dim - nparams);
for (size_t i = 0; i < arguments.dim - nparams; i++)
{
auto arg = new Parameter(STC.in_, (*arguments)[nparams + i].type, null, null, null);
(*args)[i] = arg;
}
auto tup = new TypeTuple(args);
Expression e = (new TypeidExp(loc, tup)).expressionSemantic(sc);
arguments.insert(0, e);
}
/* Determine function return type: tret
*/
Type tret = tf.next;
if (isCtorCall)
{
//printf("[%s] fd = %s %s, %d %d %d\n", loc.toChars(), fd.toChars(), fd.type.toChars(),
// wildmatch, tf.isWild(), fd.isReturnIsolated());
if (!tthis)
{
assert(sc.intypeof || global.errors);
tthis = fd.isThis().type.addMod(fd.type.mod);
}
if (tf.isWild() && !fd.isReturnIsolated())
{
if (wildmatch)
tret = tret.substWildTo(wildmatch);
int offset;
if (!tret.implicitConvTo(tthis) && !(MODimplicitConv(tret.mod, tthis.mod) && tret.isBaseOf(tthis, &offset) && offset == 0))
{
const(char)* s1 = tret.isNaked() ? " mutable" : tret.modToChars();
const(char)* s2 = tthis.isNaked() ? " mutable" : tthis.modToChars();
.error(loc, "`inout` constructor `%s` creates%s object, not%s", fd.toPrettyChars(), s1, s2);
err = true;
}
}
tret = tthis;
}
else if (wildmatch && tret)
{
/* Adjust function return type based on wildmatch
*/
//printf("wildmatch = x%x, tret = %s\n", wildmatch, tret.toChars());
tret = tret.substWildTo(wildmatch);
}
*prettype = tret;
*peprefix = eprefix;
return (err || olderrors != global.errors);
}
/**
* Determines whether a symbol represents a module or package
* (Used as a helper for is(type == module) and is(type == package))
*
* Params:
* sym = the symbol to be checked
*
* Returns:
* the symbol which `sym` represents (or `null` if it doesn't represent a `Package`)
*/
Package resolveIsPackage(Dsymbol sym)
{
Package pkg;
if (Import imp = sym.isImport())
{
if (imp.pkg is null)
{
.error(sym.loc, "Internal Compiler Error: unable to process forward-referenced import `%s`",
imp.toChars());
assert(0);
}
pkg = imp.pkg;
}
else if (auto mod = sym.isModule())
pkg = mod.isPackageFile ? mod.pkg : sym.isPackage();
else
pkg = sym.isPackage();
if (pkg)
pkg.resolvePKGunknown();
return pkg;
}
private Module loadStdMath()
{
__gshared Import impStdMath = null;
if (!impStdMath)
{
auto a = new Identifiers();
a.push(Id.std);
auto s = new Import(Loc.initial, a, Id.math, null, false);
// Module.load will call fatal() if there's no std.math available.
// Gag the error here, pushing the error handling to the caller.
uint errors = global.startGagging();
s.load(null);
if (s.mod)
{
s.mod.importAll(null);
s.mod.dsymbolSemantic(null);
}
global.endGagging(errors);
impStdMath = s;
}
return impStdMath.mod;
}
private extern (C++) final class ExpressionSemanticVisitor : Visitor
{
alias visit = Visitor.visit;
Scope* sc;
Expression result;
this(Scope* sc)
{
this.sc = sc;
}
private void setError()
{
result = ErrorExp.get();
}
/**************************
* Semantically analyze Expression.
* Determine types, fold constants, etc.
*/
override void visit(Expression e)
{
static if (LOGSEMANTIC)
{
printf("Expression::semantic() %s\n", e.toChars());
}
if (e.type)
e.type = e.type.typeSemantic(e.loc, sc);
else
e.type = Type.tvoid;
result = e;
}
override void visit(IntegerExp e)
{
assert(e.type);
if (e.type.ty == Terror)
return setError();
assert(e.type.deco);
e.setInteger(e.getInteger());
result = e;
}
override void visit(RealExp e)
{
if (!e.type)
e.type = Type.tfloat64;
else
e.type = e.type.typeSemantic(e.loc, sc);
result = e;
}
override void visit(ComplexExp e)
{
if (!e.type)
e.type = Type.tcomplex80;
else
e.type = e.type.typeSemantic(e.loc, sc);
result = e;
}
override void visit(IdentifierExp exp)
{
static if (LOGSEMANTIC)
{
printf("IdentifierExp::semantic('%s')\n", exp.ident.toChars());
}
if (exp.type) // This is used as the dummy expression
{
result = exp;
return;
}
Dsymbol scopesym;
Dsymbol s = sc.search(exp.loc, exp.ident, &scopesym);
if (s)
{
if (s.errors)
return setError();
Expression e;
/* See if the symbol was a member of an enclosing 'with'
*/
WithScopeSymbol withsym = scopesym.isWithScopeSymbol();
if (withsym && withsym.withstate.wthis && symbolIsVisible(sc, s))
{
/* Disallow shadowing
*/
// First find the scope of the with
Scope* scwith = sc;
while (scwith.scopesym != scopesym)
{
scwith = scwith.enclosing;
assert(scwith);
}
// Look at enclosing scopes for symbols with the same name,
// in the same function
for (Scope* scx = scwith; scx && scx.func == scwith.func; scx = scx.enclosing)
{
Dsymbol s2;
if (scx.scopesym && scx.scopesym.symtab && (s2 = scx.scopesym.symtab.lookup(s.ident)) !is null && s != s2)
{
exp.error("with symbol `%s` is shadowing local symbol `%s`", s.toPrettyChars(), s2.toPrettyChars());
return setError();
}
}
s = s.toAlias();
// Same as wthis.ident
// TODO: DotIdExp.semantic will find 'ident' from 'wthis' again.
// The redudancy should be removed.
e = new VarExp(exp.loc, withsym.withstate.wthis);
e = new DotIdExp(exp.loc, e, exp.ident);
e = e.expressionSemantic(sc);
}
else
{
if (withsym)
{
if (withsym.withstate.exp.type.ty != Tvoid)
{
// 'with (exp)' is a type expression
// or 's' is not visible there (for error message)
e = new TypeExp(exp.loc, withsym.withstate.exp.type);
}
else
{
// 'with (exp)' is a Package/Module
e = withsym.withstate.exp;
}
e = new DotIdExp(exp.loc, e, exp.ident);
result = e.expressionSemantic(sc);
return;
}
/* If f is really a function template,
* then replace f with the function template declaration.
*/
FuncDeclaration f = s.isFuncDeclaration();
if (f)
{
TemplateDeclaration td = getFuncTemplateDecl(f);
if (td)
{
if (td.overroot) // if not start of overloaded list of TemplateDeclaration's
td = td.overroot; // then get the start
e = new TemplateExp(exp.loc, td, f);
e = e.expressionSemantic(sc);
result = e;
return;
}
}
if (global.params.fixAliasThis)
{
ExpressionDsymbol expDsym = scopesym.isExpressionDsymbol();
if (expDsym)
{
//printf("expDsym = %s\n", expDsym.exp.toChars());
result = expDsym.exp.expressionSemantic(sc);
return;
}
}
// Haven't done overload resolution yet, so pass 1
e = symbolToExp(s, exp.loc, sc, true);
}
result = e;
return;
}
if (!global.params.fixAliasThis && hasThis(sc))
{
for (AggregateDeclaration ad = sc.getStructClassScope(); ad;)
{
if (ad.aliasthis)
{
Expression e;
e = new ThisExp(exp.loc);
e = new DotIdExp(exp.loc, e, ad.aliasthis.ident);
e = new DotIdExp(exp.loc, e, exp.ident);
e = e.trySemantic(sc);
if (e)
{
result = e;
return;
}
}
auto cd = ad.isClassDeclaration();
if (cd && cd.baseClass && cd.baseClass != ClassDeclaration.object)
{
ad = cd.baseClass;
continue;
}
break;
}
}
if (exp.ident == Id.ctfe)
{
if (sc.flags & SCOPE.ctfe)
{
exp.error("variable `__ctfe` cannot be read at compile time");
return setError();
}
// Create the magic __ctfe bool variable
auto vd = new VarDeclaration(exp.loc, Type.tbool, Id.ctfe, null);
vd.storage_class |= STC.temp;
vd.semanticRun = PASS.semanticdone;
Expression e = new VarExp(exp.loc, vd);
e = e.expressionSemantic(sc);
result = e;
return;
}
// If we've reached this point and are inside a with() scope then we may
// try one last attempt by checking whether the 'wthis' object supports
// dynamic dispatching via opDispatch.
// This is done by rewriting this expression as wthis.ident.
// The innermost with() scope of the hierarchy to satisfy the condition
// above wins.
// https://issues.dlang.org/show_bug.cgi?id=6400
for (Scope* sc2 = sc; sc2; sc2 = sc2.enclosing)
{
if (!sc2.scopesym)
continue;
if (auto ss = sc2.scopesym.isWithScopeSymbol())
{
if (ss.withstate.wthis)
{
Expression e;
e = new VarExp(exp.loc, ss.withstate.wthis);
e = new DotIdExp(exp.loc, e, exp.ident);
e = e.trySemantic(sc);
if (e)
{
result = e;
return;
}
}
// Try Type.opDispatch (so the static version)
else if (ss.withstate.exp && ss.withstate.exp.op == TOK.type)
{
if (Type t = ss.withstate.exp.isTypeExp().type)
{
Expression e;
e = new TypeExp(exp.loc, t);
e = new DotIdExp(exp.loc, e, exp.ident);
e = e.trySemantic(sc);
if (e)
{
result = e;
return;
}
}
}
}
}
/* Look for what user might have meant
*/
if (const n = importHint(exp.ident.toString()))
exp.error("`%s` is not defined, perhaps `import %.*s;` is needed?", exp.ident.toChars(), cast(int)n.length, n.ptr);
else if (auto s2 = sc.search_correct(exp.ident))
exp.error("undefined identifier `%s`, did you mean %s `%s`?", exp.ident.toChars(), s2.kind(), s2.toChars());
else if (const p = Scope.search_correct_C(exp.ident))
exp.error("undefined identifier `%s`, did you mean `%s`?", exp.ident.toChars(), p);
else
exp.error("undefined identifier `%s`", exp.ident.toChars());
result = ErrorExp.get();
}
override void visit(DsymbolExp e)
{
result = symbolToExp(e.s, e.loc, sc, e.hasOverloads);
}
override void visit(ThisExp e)
{
static if (LOGSEMANTIC)
{
printf("ThisExp::semantic()\n");
}
if (e.type)
{
result = e;
return;
}
FuncDeclaration fd = hasThis(sc); // fd is the uplevel function with the 'this' variable
AggregateDeclaration ad;
/* Special case for typeof(this) and typeof(super) since both
* should work even if they are not inside a non-static member function
*/
if (!fd && sc.intypeof == 1)
{
// Find enclosing struct or class
for (Dsymbol s = sc.getStructClassScope(); 1; s = s.parent)
{
if (!s)
{
e.error("`%s` is not in a class or struct scope", e.toChars());
goto Lerr;
}
ClassDeclaration cd = s.isClassDeclaration();
if (cd)
{
e.type = cd.type;
result = e;
return;
}
StructDeclaration sd = s.isStructDeclaration();
if (sd)
{
e.type = sd.type;
result = e;
return;
}
}
}
if (!fd)
goto Lerr;
assert(fd.vthis);
e.var = fd.vthis;
assert(e.var.parent);
ad = fd.isMemberLocal();
if (!ad)
ad = fd.isMember2();
assert(ad);
e.type = ad.type.addMod(e.var.type.mod);
if (e.var.checkNestedReference(sc, e.loc))
return setError();
result = e;
return;
Lerr:
e.error("`this` is only defined in non-static member functions, not `%s`", sc.parent.toChars());
result = ErrorExp.get();
}
override void visit(SuperExp e)
{
static if (LOGSEMANTIC)
{
printf("SuperExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
FuncDeclaration fd = hasThis(sc);
ClassDeclaration cd;
Dsymbol s;
/* Special case for typeof(this) and typeof(super) since both
* should work even if they are not inside a non-static member function
*/
if (!fd && sc.intypeof == 1)
{
// Find enclosing class
for (s = sc.getStructClassScope(); 1; s = s.parent)
{
if (!s)
{
e.error("`%s` is not in a class scope", e.toChars());
goto Lerr;
}
cd = s.isClassDeclaration();
if (cd)
{
cd = cd.baseClass;
if (!cd)
{
e.error("class `%s` has no `super`", s.toChars());
goto Lerr;
}
e.type = cd.type;
result = e;
return;
}
}
}
if (!fd)
goto Lerr;
e.var = fd.vthis;
assert(e.var && e.var.parent);
s = fd.toParentDecl();
if (s.isTemplateDeclaration()) // allow inside template constraint
s = s.toParent();
assert(s);
cd = s.isClassDeclaration();
//printf("parent is %s %s\n", fd.toParent().kind(), fd.toParent().toChars());
if (!cd)
goto Lerr;
if (!cd.baseClass)
{
e.error("no base class for `%s`", cd.toChars());
e.type = cd.type.addMod(e.var.type.mod);
}
else
{
e.type = cd.baseClass.type;
e.type = e.type.castMod(e.var.type.mod);
}
if (e.var.checkNestedReference(sc, e.loc))
return setError();
result = e;
return;
Lerr:
e.error("`super` is only allowed in non-static class member functions");
result = ErrorExp.get();
}
override void visit(NullExp e)
{
static if (LOGSEMANTIC)
{
printf("NullExp::semantic('%s')\n", e.toChars());
}
// NULL is the same as (void *)0
if (e.type)
{
result = e;
return;
}
e.type = Type.tnull;
result = e;
}
override void visit(StringExp e)
{
static if (LOGSEMANTIC)
{
printf("StringExp::semantic() %s\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
OutBuffer buffer;
size_t newlen = 0;
size_t u;
dchar c;
switch (e.postfix)
{
case 'd':
for (u = 0; u < e.len;)
{
if (const p = utf_decodeChar(e.peekString(), u, c))
{
e.error("%.*s", cast(int)p.length, p.ptr);
return setError();
}
else
{
buffer.write4(c);
newlen++;
}
}
buffer.write4(0);
e.setData(buffer.extractData(), newlen, 4);
e.type = new TypeDArray(Type.tdchar.immutableOf());
e.committed = 1;
break;
case 'w':
for (u = 0; u < e.len;)
{
if (const p = utf_decodeChar(e.peekString(), u, c))
{
e.error("%.*s", cast(int)p.length, p.ptr);
return setError();
}
else
{
buffer.writeUTF16(c);
newlen++;
if (c >= 0x10000)
newlen++;
}
}
buffer.writeUTF16(0);
e.setData(buffer.extractData(), newlen, 2);
e.type = new TypeDArray(Type.twchar.immutableOf());
e.committed = 1;
break;
case 'c':
e.committed = 1;
goto default;
default:
e.type = new TypeDArray(Type.tchar.immutableOf());
break;
}
e.type = e.type.typeSemantic(e.loc, sc);
//type = type.immutableOf();
//printf("type = %s\n", type.toChars());
result = e;
}
override void visit(TupleExp exp)
{
static if (LOGSEMANTIC)
{
printf("+TupleExp::semantic(%s)\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (exp.e0)
exp.e0 = exp.e0.expressionSemantic(sc);
// Run semantic() on each argument
bool err = false;
for (size_t i = 0; i < exp.exps.dim; i++)
{
Expression e = (*exp.exps)[i];
e = e.expressionSemantic(sc);
if (!e.type)
{
exp.error("`%s` has no value", e.toChars());
err = true;
}
else if (e.op == TOK.error)
err = true;
else
(*exp.exps)[i] = e;
}
if (err)
return setError();
expandTuples(exp.exps);
exp.type = new TypeTuple(exp.exps);
exp.type = exp.type.typeSemantic(exp.loc, sc);
//printf("-TupleExp::semantic(%s)\n", toChars());
result = exp;
}
override void visit(ArrayLiteralExp e)
{
static if (LOGSEMANTIC)
{
printf("ArrayLiteralExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
/* Perhaps an empty array literal [ ] should be rewritten as null?
*/
if (e.basis)
e.basis = e.basis.expressionSemantic(sc);
if (arrayExpressionSemantic(e.elements, sc) || (e.basis && e.basis.op == TOK.error))
return setError();
expandTuples(e.elements);
Type t0;
if (e.basis)
e.elements.push(e.basis);
bool err = arrayExpressionToCommonType(sc, e.elements, &t0);
if (e.basis)
e.basis = e.elements.pop();
if (err)
return setError();
e.type = t0.arrayOf();
e.type = e.type.typeSemantic(e.loc, sc);
/* Disallow array literals of type void being used.
*/
if (e.elements.dim > 0 && t0.ty == Tvoid)
{
e.error("`%s` of type `%s` has no value", e.toChars(), e.type.toChars());
return setError();
}
if (global.params.useTypeInfo && Type.dtypeinfo)
semanticTypeInfo(sc, e.type);
result = e;
}
override void visit(AssocArrayLiteralExp e)
{
static if (LOGSEMANTIC)
{
printf("AssocArrayLiteralExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
// Run semantic() on each element
bool err_keys = arrayExpressionSemantic(e.keys, sc);
bool err_vals = arrayExpressionSemantic(e.values, sc);
if (err_keys || err_vals)
return setError();
expandTuples(e.keys);
expandTuples(e.values);
if (e.keys.dim != e.values.dim)
{
e.error("number of keys is %llu, must match number of values %llu",
cast(ulong) e.keys.dim, cast(ulong) e.values.dim);
return setError();
}
Type tkey = null;
Type tvalue = null;
err_keys = arrayExpressionToCommonType(sc, e.keys, &tkey);
err_vals = arrayExpressionToCommonType(sc, e.values, &tvalue);
if (err_keys || err_vals)
return setError();
if (tkey == Type.terror || tvalue == Type.terror)
return setError();
e.type = new TypeAArray(tvalue, tkey);
e.type = e.type.typeSemantic(e.loc, sc);
semanticTypeInfo(sc, e.type);
if (global.params.vsafe)
{
if (checkAssocArrayLiteralEscape(sc, e, false))
return setError();
}
result = e;
}
override void visit(StructLiteralExp e)
{
static if (LOGSEMANTIC)
{
printf("StructLiteralExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
e.sd.size(e.loc);
if (e.sd.sizeok != Sizeok.done)
return setError();
// run semantic() on each element
if (arrayExpressionSemantic(e.elements, sc))
return setError();
expandTuples(e.elements);
/* Fit elements[] to the corresponding type of field[].
*/
if (!e.sd.fit(e.loc, sc, e.elements, e.stype))
return setError();
/* Fill out remainder of elements[] with default initializers for fields[]
*/
if (!e.sd.fill(e.loc, e.elements, false))
{
/* An error in the initializer needs to be recorded as an error
* in the enclosing function or template, since the initializer
* will be part of the stuct declaration.
*/
global.increaseErrorCount();
return setError();
}
if (checkFrameAccess(e.loc, sc, e.sd, e.elements.dim))
return setError();
e.type = e.stype ? e.stype : e.sd.type;
result = e;
}
override void visit(TypeExp exp)
{
if (exp.type.ty == Terror)
return setError();
//printf("TypeExp::semantic(%s)\n", exp.type.toChars());
Expression e;
Type t;
Dsymbol s;
dmd.typesem.resolve(exp.type, exp.loc, sc, e, t, s, true);
if (e)
{
// `(Type)` is actually `(var)` so if `(var)` is a member requiring `this`
// then rewrite as `(this.var)` in case it would be followed by a DotVar
// to fix https://issues.dlang.org/show_bug.cgi?id=9490
VarExp ve = e.isVarExp();
if (ve && ve.var && exp.parens && !ve.var.isStatic() && !(sc.stc & STC.static_) &&
sc.func && sc.func.needThis && ve.var.toParent2().isAggregateDeclaration())
{
// printf("apply fix for issue 9490: add `this.` to `%s`...\n", e.toChars());
e = new DotVarExp(exp.loc, new ThisExp(exp.loc), ve.var, false);
}
//printf("e = %s %s\n", Token::toChars(e.op), e.toChars());
e = e.expressionSemantic(sc);
}
else if (t)
{
//printf("t = %d %s\n", t.ty, t.toChars());
exp.type = t.typeSemantic(exp.loc, sc);
e = exp;
}
else if (s)
{
//printf("s = %s %s\n", s.kind(), s.toChars());
e = symbolToExp(s, exp.loc, sc, true);
}
else
assert(0);
if (global.params.vcomplex)
exp.type.checkComplexTransition(exp.loc, sc);
result = e;
}
override void visit(ScopeExp exp)
{
static if (LOGSEMANTIC)
{
printf("+ScopeExp::semantic(%p '%s')\n", exp, exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
ScopeDsymbol sds2 = exp.sds;
TemplateInstance ti = sds2.isTemplateInstance();
while (ti)
{
WithScopeSymbol withsym;
if (!ti.findTempDecl(sc, &withsym) || !ti.semanticTiargs(sc))
return setError();
if (withsym && withsym.withstate.wthis)
{
Expression e = new VarExp(exp.loc, withsym.withstate.wthis);
e = new DotTemplateInstanceExp(exp.loc, e, ti);
result = e.expressionSemantic(sc);
return;
}
if (ti.needsTypeInference(sc))
{
if (TemplateDeclaration td = ti.tempdecl.isTemplateDeclaration())
{
Dsymbol p = td.toParentLocal();
FuncDeclaration fdthis = hasThis(sc);
AggregateDeclaration ad = p ? p.isAggregateDeclaration() : null;
if (fdthis && ad && fdthis.isMemberLocal() == ad && (td._scope.stc & STC.static_) == 0)
{
Expression e = new DotTemplateInstanceExp(exp.loc, new ThisExp(exp.loc), ti);
result = e.expressionSemantic(sc);
return;
}
}
else if (OverloadSet os = ti.tempdecl.isOverloadSet())
{
FuncDeclaration fdthis = hasThis(sc);
AggregateDeclaration ad = os.parent.isAggregateDeclaration();
if (fdthis && ad && fdthis.isMemberLocal() == ad)
{
Expression e = new DotTemplateInstanceExp(exp.loc, new ThisExp(exp.loc), ti);
result = e.expressionSemantic(sc);
return;
}
}
// ti is an instance which requires IFTI.
exp.sds = ti;
exp.type = Type.tvoid;
result = exp;
return;
}
ti.dsymbolSemantic(sc);
if (!ti.inst || ti.errors)
return setError();
Dsymbol s = ti.toAlias();
if (s == ti)
{
exp.sds = ti;
exp.type = Type.tvoid;
result = exp;
return;
}
sds2 = s.isScopeDsymbol();
if (sds2)
{
ti = sds2.isTemplateInstance();
//printf("+ sds2 = %s, '%s'\n", sds2.kind(), sds2.toChars());
continue;
}
if (auto v = s.isVarDeclaration())
{
if (!v.type)
{
exp.error("forward reference of %s `%s`", v.kind(), v.toChars());
return setError();
}
if ((v.storage_class & STC.manifest) && v._init)
{
/* When an instance that will be converted to a constant exists,
* the instance representation "foo!tiargs" is treated like a
* variable name, and its recursive appearance check (note that
* it's equivalent with a recursive instantiation of foo) is done
* separately from the circular initialization check for the
* eponymous enum variable declaration.
*
* template foo(T) {
* enum bool foo = foo; // recursive definition check (v.inuse)
* }
* template bar(T) {
* enum bool bar = bar!T; // recursive instantiation check (ti.inuse)
* }
*/
if (ti.inuse)
{
exp.error("recursive expansion of %s `%s`", ti.kind(), ti.toPrettyChars());
return setError();
}
v.checkDeprecated(exp.loc, sc);
auto e = v.expandInitializer(exp.loc);
ti.inuse++;
e = e.expressionSemantic(sc);
ti.inuse--;
result = e;
return;
}
}
//printf("s = %s, '%s'\n", s.kind(), s.toChars());
auto e = symbolToExp(s, exp.loc, sc, true);
//printf("-1ScopeExp::semantic()\n");
result = e;
return;
}
//printf("sds2 = %s, '%s'\n", sds2.kind(), sds2.toChars());
//printf("\tparent = '%s'\n", sds2.parent.toChars());
sds2.dsymbolSemantic(sc);
// (Aggregate|Enum)Declaration
if (auto t = sds2.getType())
{
result = (new TypeExp(exp.loc, t)).expressionSemantic(sc);
return;
}
if (auto td = sds2.isTemplateDeclaration())
{
result = (new TemplateExp(exp.loc, td)).expressionSemantic(sc);
return;
}
exp.sds = sds2;
exp.type = Type.tvoid;
//printf("-2ScopeExp::semantic() %s\n", toChars());
result = exp;
}
override void visit(NewExp exp)
{
static if (LOGSEMANTIC)
{
printf("NewExp::semantic() %s\n", exp.toChars());
if (exp.thisexp)
printf("\tthisexp = %s\n", exp.thisexp.toChars());
printf("\tnewtype: %s\n", exp.newtype.toChars());
}
if (exp.type) // if semantic() already run
{
result = exp;
return;
}
//for error messages if the argument in [] is not convertible to size_t
const originalNewtype = exp.newtype;
// https://issues.dlang.org/show_bug.cgi?id=11581
// With the syntax `new T[edim]` or `thisexp.new T[edim]`,
// T should be analyzed first and edim should go into arguments iff it's
// not a tuple.
Expression edim = null;
if (!exp.arguments && exp.newtype.ty == Tsarray)
{
edim = (cast(TypeSArray)exp.newtype).dim;
exp.newtype = (cast(TypeNext)exp.newtype).next;
}
ClassDeclaration cdthis = null;
if (exp.thisexp)
{
exp.thisexp = exp.thisexp.expressionSemantic(sc);
if (exp.thisexp.op == TOK.error)
return setError();
cdthis = exp.thisexp.type.isClassHandle();
if (!cdthis)
{
exp.error("`this` for nested class must be a class type, not `%s`", exp.thisexp.type.toChars());
return setError();
}
sc = sc.push(cdthis);
exp.type = exp.newtype.typeSemantic(exp.loc, sc);
sc = sc.pop();
}
else
{
exp.type = exp.newtype.typeSemantic(exp.loc, sc);
}
if (exp.type.ty == Terror)
return setError();
if (edim)
{
if (exp.type.toBasetype().ty == Ttuple)
{
// --> new T[edim]
exp.type = new TypeSArray(exp.type, edim);
exp.type = exp.type.typeSemantic(exp.loc, sc);
if (exp.type.ty == Terror)
return setError();
}
else
{
// --> new T[](edim)
exp.arguments = new Expressions();
exp.arguments.push(edim);
exp.type = exp.type.arrayOf();
}
}
exp.newtype = exp.type; // in case type gets cast to something else
Type tb = exp.type.toBasetype();
//printf("tb: %s, deco = %s\n", tb.toChars(), tb.deco);
if (arrayExpressionSemantic(exp.newargs, sc) ||
preFunctionParameters(sc, exp.newargs))
{
return setError();
}
if (arrayExpressionSemantic(exp.arguments, sc))
{
return setError();
}
//https://issues.dlang.org/show_bug.cgi?id=20547
//exp.arguments are the "parameters" to [], not to a real function
//so the errors that come from preFunctionParameters are misleading
if (originalNewtype.ty == Tsarray)
{
if (preFunctionParameters(sc, exp.arguments, false))
{
exp.error("cannot create a `%s` with `new`", originalNewtype.toChars());
return setError();
}
}
else if (preFunctionParameters(sc, exp.arguments))
{
return setError();
}
if (exp.thisexp && tb.ty != Tclass)
{
exp.error("`.new` is only for allocating nested classes, not `%s`", tb.toChars());
return setError();
}
const size_t nargs = exp.arguments ? exp.arguments.dim : 0;
Expression newprefix = null;
if (tb.ty == Tclass)
{
auto cd = (cast(TypeClass)tb).sym;
cd.size(exp.loc);
if (cd.sizeok != Sizeok.done)
return setError();
if (!cd.ctor)
cd.ctor = cd.searchCtor();
if (cd.noDefaultCtor && !nargs && !cd.defaultCtor)
{
exp.error("default construction is disabled for type `%s`", cd.type.toChars());
return setError();
}
if (cd.isInterfaceDeclaration())
{
exp.error("cannot create instance of interface `%s`", cd.toChars());
return setError();
}
if (cd.isAbstract())
{
exp.error("cannot create instance of abstract class `%s`", cd.toChars());
for (size_t i = 0; i < cd.vtbl.dim; i++)
{
FuncDeclaration fd = cd.vtbl[i].isFuncDeclaration();
if (fd && fd.isAbstract())
{
errorSupplemental(exp.loc, "function `%s` is not implemented",
fd.toFullSignature());
}
}
return setError();
}
// checkDeprecated() is already done in newtype.typeSemantic().
if (cd.isNested())
{
/* We need a 'this' pointer for the nested class.
* Ensure we have the right one.
*/
Dsymbol s = cd.toParentLocal();
//printf("cd isNested, parent = %s '%s'\n", s.kind(), s.toPrettyChars());
if (auto cdn = s.isClassDeclaration())
{
if (!cdthis)
{
// Supply an implicit 'this' and try again
exp.thisexp = new ThisExp(exp.loc);
for (Dsymbol sp = sc.parent; 1; sp = sp.toParentLocal())
{
if (!sp)
{
exp.error("outer class `%s` `this` needed to `new` nested class `%s`",
cdn.toChars(), cd.toChars());
return setError();
}
ClassDeclaration cdp = sp.isClassDeclaration();
if (!cdp)
continue;
if (cdp == cdn || cdn.isBaseOf(cdp, null))
break;
// Add a '.outer' and try again
exp.thisexp = new DotIdExp(exp.loc, exp.thisexp, Id.outer);
}
exp.thisexp = exp.thisexp.expressionSemantic(sc);
if (exp.thisexp.op == TOK.error)
return setError();
cdthis = exp.thisexp.type.isClassHandle();
}
if (cdthis != cdn && !cdn.isBaseOf(cdthis, null))
{
//printf("cdthis = %s\n", cdthis.toChars());
exp.error("`this` for nested class must be of type `%s`, not `%s`",
cdn.toChars(), exp.thisexp.type.toChars());
return setError();
}
if (!MODimplicitConv(exp.thisexp.type.mod, exp.newtype.mod))
{
exp.error("nested type `%s` should have the same or weaker constancy as enclosing type `%s`",
exp.newtype.toChars(), exp.thisexp.type.toChars());
return setError();
}
}
else if (exp.thisexp)
{
exp.error("`.new` is only for allocating nested classes");
return setError();
}
else if (auto fdn = s.isFuncDeclaration())
{
// make sure the parent context fdn of cd is reachable from sc
if (!ensureStaticLinkTo(sc.parent, fdn))
{
exp.error("outer function context of `%s` is needed to `new` nested class `%s`",
fdn.toPrettyChars(), cd.toPrettyChars());
return setError();
}
}
else
assert(0);
}
else if (exp.thisexp)
{
exp.error("`.new` is only for allocating nested classes");
return setError();
}
if (cd.vthis2)
{
if (AggregateDeclaration ad2 = cd.isMember2())
{
Expression te = new ThisExp(exp.loc).expressionSemantic(sc);
if (te.op != TOK.error)
te = getRightThis(exp.loc, sc, ad2, te, cd);
if (te.op == TOK.error)
{
exp.error("need `this` of type `%s` needed to `new` nested class `%s`", ad2.toChars(), cd.toChars());
return setError();
}
}
}
if (cd.aggNew)
{
// Prepend the size argument to newargs[]
Expression e = new IntegerExp(exp.loc, cd.size(exp.loc), Type.tsize_t);
if (!exp.newargs)
exp.newargs = new Expressions();
exp.newargs.shift(e);
FuncDeclaration f = resolveFuncCall(exp.loc, sc, cd.aggNew, null, tb, exp.newargs, FuncResolveFlag.standard);
if (!f || f.errors)
return setError();
checkFunctionAttributes(exp, sc, f);
checkAccess(cd, exp.loc, sc, f);
TypeFunction tf = cast(TypeFunction)f.type;
Type rettype;
if (functionParameters(exp.loc, sc, tf, null, null, exp.newargs, f, &rettype, &newprefix))
return setError();
exp.allocator = f.isNewDeclaration();
assert(exp.allocator);
}
else
{
if (exp.newargs && exp.newargs.dim)
{
exp.error("no allocator for `%s`", cd.toChars());
return setError();
}
}
if (cd.ctor)
{
FuncDeclaration f = resolveFuncCall(exp.loc, sc, cd.ctor, null, tb, exp.arguments, FuncResolveFlag.standard);
if (!f || f.errors)
return setError();
checkFunctionAttributes(exp, sc, f);
checkAccess(cd, exp.loc, sc, f);
TypeFunction tf = cast(TypeFunction)f.type;
if (!exp.arguments)
exp.arguments = new Expressions();
if (functionParameters(exp.loc, sc, tf, null, exp.type, exp.arguments, f, &exp.type, &exp.argprefix))
return setError();
exp.member = f.isCtorDeclaration();
assert(exp.member);
}
else
{
if (nargs)
{
exp.error("no constructor for `%s`", cd.toChars());
return setError();
}
// https://issues.dlang.org/show_bug.cgi?id=19941
// Run semantic on all field initializers to resolve any forward
// references. This is the same as done for structs in sd.fill().
for (ClassDeclaration c = cd; c; c = c.baseClass)
{
foreach (v; c.fields)
{
if (v.inuse || v._scope is null || v._init is null ||
v._init.isVoidInitializer())
continue;
v.inuse++;
v._init = v._init.initializerSemantic(v._scope, v.type, INITinterpret);
v.inuse--;
}
}
}
}
else if (tb.ty == Tstruct)
{
auto sd = (cast(TypeStruct)tb).sym;
sd.size(exp.loc);
if (sd.sizeok != Sizeok.done)
return setError();
if (!sd.ctor)
sd.ctor = sd.searchCtor();
if (sd.noDefaultCtor && !nargs)
{
exp.error("default construction is disabled for type `%s`", sd.type.toChars());
return setError();
}
// checkDeprecated() is already done in newtype.typeSemantic().
if (sd.aggNew)
{
// Prepend the uint size argument to newargs[]
Expression e = new IntegerExp(exp.loc, sd.size(exp.loc), Type.tsize_t);
if (!exp.newargs)
exp.newargs = new Expressions();
exp.newargs.shift(e);
FuncDeclaration f = resolveFuncCall(exp.loc, sc, sd.aggNew, null, tb, exp.newargs, FuncResolveFlag.standard);
if (!f || f.errors)
return setError();
checkFunctionAttributes(exp, sc, f);
checkAccess(sd, exp.loc, sc, f);
TypeFunction tf = cast(TypeFunction)f.type;
Type rettype;
if (functionParameters(exp.loc, sc, tf, null, null, exp.newargs, f, &rettype, &newprefix))
return setError();
exp.allocator = f.isNewDeclaration();
assert(exp.allocator);
}
else
{
if (exp.newargs && exp.newargs.dim)
{
exp.error("no allocator for `%s`", sd.toChars());
return setError();
}
}
if (sd.ctor && nargs)
{
FuncDeclaration f = resolveFuncCall(exp.loc, sc, sd.ctor, null, tb, exp.arguments, FuncResolveFlag.standard);
if (!f || f.errors)
return setError();
checkFunctionAttributes(exp, sc, f);
checkAccess(sd, exp.loc, sc, f);
TypeFunction tf = cast(TypeFunction)f.type;
if (!exp.arguments)
exp.arguments = new Expressions();
if (functionParameters(exp.loc, sc, tf, null, exp.type, exp.arguments, f, &exp.type, &exp.argprefix))
return setError();
exp.member = f.isCtorDeclaration();
assert(exp.member);
if (checkFrameAccess(exp.loc, sc, sd, sd.fields.dim))
return setError();
}
else
{
if (!exp.arguments)
exp.arguments = new Expressions();
if (!sd.fit(exp.loc, sc, exp.arguments, tb))
return setError();
if (!sd.fill(exp.loc, exp.arguments, false))
return setError();
if (checkFrameAccess(exp.loc, sc, sd, exp.arguments ? exp.arguments.dim : 0))
return setError();
/* Since a `new` allocation may escape, check each of the arguments for escaping
*/
if (global.params.vsafe)
{
foreach (arg; *exp.arguments)
{
if (arg && checkNewEscape(sc, arg, false))
return setError();
}
}
}
exp.type = exp.type.pointerTo();
}
else if (tb.ty == Tarray)
{
if (!nargs)
{
// https://issues.dlang.org/show_bug.cgi?id=20422
// Without this check the compiler would give a misleading error
exp.error("missing length argument for array");
return setError();
}
Type tn = tb.nextOf().baseElemOf();
Dsymbol s = tn.toDsymbol(sc);
AggregateDeclaration ad = s ? s.isAggregateDeclaration() : null;
if (ad && ad.noDefaultCtor)
{
exp.error("default construction is disabled for type `%s`", tb.nextOf().toChars());
return setError();
}
for (size_t i = 0; i < nargs; i++)
{
if (tb.ty != Tarray)
{
exp.error("too many arguments for array");
return setError();
}
Expression arg = (*exp.arguments)[i];
arg = resolveProperties(sc, arg);
arg = arg.implicitCastTo(sc, Type.tsize_t);
if (arg.op == TOK.error)
return setError();
arg = arg.optimize(WANTvalue);
if (arg.op == TOK.int64 && cast(sinteger_t)arg.toInteger() < 0)
{
exp.error("negative array index `%s`", arg.toChars());
return setError();
}
(*exp.arguments)[i] = arg;
tb = (cast(TypeDArray)tb).next.toBasetype();
}
}
else if (tb.isscalar())
{
if (!nargs)
{
}
else if (nargs == 1)
{
Expression e = (*exp.arguments)[0];
e = e.implicitCastTo(sc, tb);
(*exp.arguments)[0] = e;
}
else
{
exp.error("more than one argument for construction of `%s`", exp.type.toChars());
return setError();
}
exp.type = exp.type.pointerTo();
}
else
{
exp.error("cannot create a `%s` with `new`", exp.type.toChars());
return setError();
}
//printf("NewExp: '%s'\n", toChars());
//printf("NewExp:type '%s'\n", type.toChars());
semanticTypeInfo(sc, exp.type);
if (newprefix)
{
result = Expression.combine(newprefix, exp);
return;
}
result = exp;
}
override void visit(NewAnonClassExp e)
{
static if (LOGSEMANTIC)
{
printf("NewAnonClassExp::semantic() %s\n", e.toChars());
//printf("thisexp = %p\n", thisexp);
//printf("type: %s\n", type.toChars());
}
Expression d = new DeclarationExp(e.loc, e.cd);
sc = sc.push(); // just create new scope
sc.flags &= ~SCOPE.ctfe; // temporary stop CTFE
d = d.expressionSemantic(sc);
sc = sc.pop();
if (!e.cd.errors && sc.intypeof && !sc.parent.inNonRoot())
{
ScopeDsymbol sds = sc.tinst ? cast(ScopeDsymbol)sc.tinst : sc._module;
if (!sds.members)
sds.members = new Dsymbols();
sds.members.push(e.cd);
}
Expression n = new NewExp(e.loc, e.thisexp, e.newargs, e.cd.type, e.arguments);
Expression c = new CommaExp(e.loc, d, n);
result = c.expressionSemantic(sc);
}
override void visit(SymOffExp e)
{
static if (LOGSEMANTIC)
{
printf("SymOffExp::semantic('%s')\n", e.toChars());
}
//var.dsymbolSemantic(sc);
if (!e.type)
e.type = e.var.type.pointerTo();
if (auto v = e.var.isVarDeclaration())
{
if (v.checkNestedReference(sc, e.loc))
return setError();
}
else if (auto f = e.var.isFuncDeclaration())
{
if (f.checkNestedReference(sc, e.loc))
return setError();
}
result = e;
}
override void visit(VarExp e)
{
static if (LOGSEMANTIC)
{
printf("VarExp::semantic(%s)\n", e.toChars());
}
auto vd = e.var.isVarDeclaration();
auto fd = e.var.isFuncDeclaration();
if (fd)
{
//printf("L%d fd = %s\n", __LINE__, f.toChars());
if (!fd.functionSemantic())
return setError();
}
if (!e.type)
e.type = e.var.type;
if (e.type && !e.type.deco)
{
auto decl = e.var.isDeclaration();
if (decl)
decl.inuse++;
e.type = e.type.typeSemantic(e.loc, sc);
if (decl)
decl.inuse--;
}
/* Fix for 1161 doesn't work because it causes protection
* problems when instantiating imported templates passing private
* variables as alias template parameters.
*/
//checkAccess(loc, sc, NULL, var);
if (vd)
{
if (vd.checkNestedReference(sc, e.loc))
return setError();
// https://issues.dlang.org/show_bug.cgi?id=12025
// If the variable is not actually used in runtime code,
// the purity violation error is redundant.
//checkPurity(sc, vd);
}
else if (fd)
{
// TODO: If fd isn't yet resolved its overload, the checkNestedReference
// call would cause incorrect validation.
// Maybe here should be moved in CallExp, or AddrExp for functions.
if (fd.checkNestedReference(sc, e.loc))
return setError();
}
else if (auto od = e.var.isOverDeclaration())
{
e.type = Type.tvoid; // ambiguous type?
}
result = e;
}
override void visit(FuncExp exp)
{
static if (LOGSEMANTIC)
{
printf("FuncExp::semantic(%s)\n", exp.toChars());
if (exp.fd.treq)
printf(" treq = %s\n", exp.fd.treq.toChars());
}
if (exp.type)
{
result = exp;
return;
}
Expression e = exp;
uint olderrors;
sc = sc.push(); // just create new scope
sc.flags &= ~SCOPE.ctfe; // temporary stop CTFE
sc.protection = Prot(Prot.Kind.public_); // https://issues.dlang.org/show_bug.cgi?id=12506
/* fd.treq might be incomplete type,
* so should not semantic it.
* void foo(T)(T delegate(int) dg){}
* foo(a=>a); // in IFTI, treq == T delegate(int)
*/
//if (fd.treq)
// fd.treq = fd.treq.dsymbolSemantic(loc, sc);
exp.genIdent(sc);
// Set target of return type inference
if (exp.fd.treq && !exp.fd.type.nextOf())
{
TypeFunction tfv = null;
if (exp.fd.treq.ty == Tdelegate || (exp.fd.treq.ty == Tpointer && exp.fd.treq.nextOf().ty == Tfunction))
tfv = cast(TypeFunction)exp.fd.treq.nextOf();
if (tfv)
{
TypeFunction tfl = cast(TypeFunction)exp.fd.type;
tfl.next = tfv.nextOf();
}
}
//printf("td = %p, treq = %p\n", td, fd.treq);
if (exp.td)
{
assert(exp.td.parameters && exp.td.parameters.dim);
exp.td.dsymbolSemantic(sc);
exp.type = Type.tvoid; // temporary type
if (exp.fd.treq) // defer type determination
{
FuncExp fe;
if (exp.matchType(exp.fd.treq, sc, &fe) > MATCH.nomatch)
e = fe;
else
e = ErrorExp.get();
}
goto Ldone;
}
olderrors = global.errors;
exp.fd.dsymbolSemantic(sc);
if (olderrors == global.errors)
{
exp.fd.semantic2(sc);
if (olderrors == global.errors)
exp.fd.semantic3(sc);
}
if (olderrors != global.errors)
{
if (exp.fd.type && exp.fd.type.ty == Tfunction && !exp.fd.type.nextOf())
(cast(TypeFunction)exp.fd.type).next = Type.terror;
e = ErrorExp.get();
goto Ldone;
}
// Type is a "delegate to" or "pointer to" the function literal
if ((exp.fd.isNested() && exp.fd.tok == TOK.delegate_) || (exp.tok == TOK.reserved && exp.fd.treq && exp.fd.treq.ty == Tdelegate))
{
exp.type = new TypeDelegate(exp.fd.type);
exp.type = exp.type.typeSemantic(exp.loc, sc);
exp.fd.tok = TOK.delegate_;
}
else
{
exp.type = new TypePointer(exp.fd.type);
exp.type = exp.type.typeSemantic(exp.loc, sc);
//type = fd.type.pointerTo();
/* A lambda expression deduced to function pointer might become
* to a delegate literal implicitly.
*
* auto foo(void function() fp) { return 1; }
* assert(foo({}) == 1);
*
* So, should keep fd.tok == TOKreserve if fd.treq == NULL.
*/
if (exp.fd.treq && exp.fd.treq.ty == Tpointer)
{
// change to non-nested
exp.fd.tok = TOK.function_;
exp.fd.vthis = null;
}
}
exp.fd.tookAddressOf++;
Ldone:
sc = sc.pop();
result = e;
}
/**
* Perform semantic analysis on function literals
*
* Test the following construct:
* ---
* (x, y, z) { return x + y + z; }(42, 84, 1992);
* ---
*/
Expression callExpSemantic(FuncExp exp, Scope* sc, Expressions* arguments)
{
if ((!exp.type || exp.type == Type.tvoid) && exp.td && arguments && arguments.dim)
{
for (size_t k = 0; k < arguments.dim; k++)
{
Expression checkarg = (*arguments)[k];
if (checkarg.op == TOK.error)
return checkarg;
}
exp.genIdent(sc);
assert(exp.td.parameters && exp.td.parameters.dim);
exp.td.dsymbolSemantic(sc);
TypeFunction tfl = cast(TypeFunction)exp.fd.type;
size_t dim = tfl.parameterList.length;
if (arguments.dim < dim)
{
// Default arguments are always typed, so they don't need inference.
Parameter p = tfl.parameterList[arguments.dim];
if (p.defaultArg)
dim = arguments.dim;
}
if ((tfl.parameterList.varargs == VarArg.none && arguments.dim > dim) ||
arguments.dim < dim)
{
OutBuffer buf;
foreach (idx, ref arg; *arguments)
buf.printf("%s%s", (idx ? ", ".ptr : "".ptr), arg.type.toChars());
exp.error("function literal `%s%s` is not callable using argument types `(%s)`",
exp.fd.toChars(), parametersTypeToChars(tfl.parameterList),
buf.peekChars());
exp.errorSupplemental("too %s arguments, expected `%d`, got `%d`",
arguments.dim < dim ? "few".ptr : "many".ptr,
cast(int)dim, cast(int)arguments.dim);
return ErrorExp.get();
}
auto tiargs = new Objects();
tiargs.reserve(exp.td.parameters.dim);
for (size_t i = 0; i < exp.td.parameters.dim; i++)
{
TemplateParameter tp = (*exp.td.parameters)[i];
assert(dim <= tfl.parameterList.length);
foreach (u, p; tfl.parameterList)
{
if (u == dim)
break;
if (p.type.ty == Tident && (cast(TypeIdentifier)p.type).ident == tp.ident)
{
Expression e = (*arguments)[u];
tiargs.push(e.type);
break;
}
}
}
auto ti = new TemplateInstance(exp.loc, exp.td, tiargs);
return (new ScopeExp(exp.loc, ti)).expressionSemantic(sc);
}
return exp.expressionSemantic(sc);
}
override void visit(CallExp exp)
{
static if (LOGSEMANTIC)
{
printf("CallExp::semantic() %s\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return; // semantic() already run
}
Objects* tiargs = null; // initial list of template arguments
Expression ethis = null;
Type tthis = null;
Expression e1org = exp.e1;
if (exp.e1.op == TOK.comma)
{
/* Rewrite (a,b)(args) as (a,(b(args)))
*/
auto ce = cast(CommaExp)exp.e1;
exp.e1 = ce.e2;
ce.e2 = exp;
result = ce.expressionSemantic(sc);
return;
}
if (exp.e1.op == TOK.delegate_)
{
DelegateExp de = cast(DelegateExp)exp.e1;
exp.e1 = new DotVarExp(de.loc, de.e1, de.func, de.hasOverloads);
visit(exp);
return;
}
if (exp.e1.op == TOK.function_)
{
if (arrayExpressionSemantic(exp.arguments, sc) || preFunctionParameters(sc, exp.arguments))
return setError();
// Run e1 semantic even if arguments have any errors
FuncExp fe = cast(FuncExp)exp.e1;
exp.e1 = callExpSemantic(fe, sc, exp.arguments);
if (exp.e1.op == TOK.error)
{
result = exp.e1;
return;
}
}
if (Expression ex = resolveUFCS(sc, exp))
{
result = ex;
return;
}
/* This recognizes:
* foo!(tiargs)(funcargs)
*/
if (exp.e1.op == TOK.scope_)
{
ScopeExp se = cast(ScopeExp)exp.e1;
TemplateInstance ti = se.sds.isTemplateInstance();
if (ti)
{
/* Attempt to instantiate ti. If that works, go with it.
* If not, go with partial explicit specialization.
*/
WithScopeSymbol withsym;
if (!ti.findTempDecl(sc, &withsym) || !ti.semanticTiargs(sc))
return setError();
if (withsym && withsym.withstate.wthis)
{
exp.e1 = new VarExp(exp.e1.loc, withsym.withstate.wthis);
exp.e1 = new DotTemplateInstanceExp(exp.e1.loc, exp.e1, ti);
goto Ldotti;
}
if (ti.needsTypeInference(sc, 1))
{
/* Go with partial explicit specialization
*/
tiargs = ti.tiargs;
assert(ti.tempdecl);
if (TemplateDeclaration td = ti.tempdecl.isTemplateDeclaration())
exp.e1 = new TemplateExp(exp.loc, td);
else if (OverDeclaration od = ti.tempdecl.isOverDeclaration())
exp.e1 = new VarExp(exp.loc, od);
else
exp.e1 = new OverExp(exp.loc, ti.tempdecl.isOverloadSet());
}
else
{
Expression e1x = exp.e1.expressionSemantic(sc);
if (e1x.op == TOK.error)
{
result = e1x;
return;
}
exp.e1 = e1x;
}
}
}
/* This recognizes:
* expr.foo!(tiargs)(funcargs)
*/
Ldotti:
if (exp.e1.op == TOK.dotTemplateInstance && !exp.e1.type)
{
DotTemplateInstanceExp se = cast(DotTemplateInstanceExp)exp.e1;
TemplateInstance ti = se.ti;
{
/* Attempt to instantiate ti. If that works, go with it.
* If not, go with partial explicit specialization.
*/
if (!se.findTempDecl(sc) || !ti.semanticTiargs(sc))
return setError();
if (ti.needsTypeInference(sc, 1))
{
/* Go with partial explicit specialization
*/
tiargs = ti.tiargs;
assert(ti.tempdecl);
if (TemplateDeclaration td = ti.tempdecl.isTemplateDeclaration())
exp.e1 = new DotTemplateExp(exp.loc, se.e1, td);
else if (OverDeclaration od = ti.tempdecl.isOverDeclaration())
{
exp.e1 = new DotVarExp(exp.loc, se.e1, od, true);
}
else
exp.e1 = new DotExp(exp.loc, se.e1, new OverExp(exp.loc, ti.tempdecl.isOverloadSet()));
}
else
{
Expression e1x = exp.e1.expressionSemantic(sc);
if (e1x.op == TOK.error)
{
result = e1x;
return;
}
exp.e1 = e1x;
}
}
}
Lagain:
//printf("Lagain: %s\n", toChars());
exp.f = null;
if (exp.e1.op == TOK.this_ || exp.e1.op == TOK.super_)
{
// semantic() run later for these
}
else
{
if (exp.e1.op == TOK.dotIdentifier)
{
DotIdExp die = cast(DotIdExp)exp.e1;
exp.e1 = die.expressionSemantic(sc);
/* Look for e1 having been rewritten to expr.opDispatch!(string)
* We handle such earlier, so go back.
* Note that in the rewrite, we carefully did not run semantic() on e1
*/
if (exp.e1.op == TOK.dotTemplateInstance && !exp.e1.type)
{
goto Ldotti;
}
}
else
{
__gshared int nest;
if (++nest > global.recursionLimit)
{
exp.error("recursive evaluation of `%s`", exp.toChars());
--nest;
return setError();
}
Expression ex = unaSemantic(exp, sc);
--nest;
if (ex)
{
result = ex;
return;
}
}
/* Look for e1 being a lazy parameter
*/
if (exp.e1.op == TOK.variable)
{
VarExp ve = cast(VarExp)exp.e1;
if (ve.var.storage_class & STC.lazy_)
{
// lazy parameters can be called without violating purity and safety
Type tw = ve.var.type;
Type tc = ve.var.type.substWildTo(MODFlags.const_);
auto tf = new TypeFunction(ParameterList(), tc, LINK.d, STC.safe | STC.pure_);
(tf = cast(TypeFunction)tf.typeSemantic(exp.loc, sc)).next = tw; // hack for bug7757
auto t = new TypeDelegate(tf);
ve.type = t.typeSemantic(exp.loc, sc);
}
VarDeclaration v = ve.var.isVarDeclaration();
if (v && ve.checkPurity(sc, v))
return setError();
}
if (exp.e1.op == TOK.symbolOffset && (cast(SymOffExp)exp.e1).hasOverloads)
{
SymOffExp se = cast(SymOffExp)exp.e1;
exp.e1 = new VarExp(se.loc, se.var, true);
exp.e1 = exp.e1.expressionSemantic(sc);
}
else if (exp.e1.op == TOK.dot)
{
DotExp de = cast(DotExp)exp.e1;
if (de.e2.op == TOK.overloadSet)
{
ethis = de.e1;
tthis = de.e1.type;
exp.e1 = de.e2;
}
}
else if (exp.e1.op == TOK.star && exp.e1.type.ty == Tfunction)
{
// Rewrite (*fp)(arguments) to fp(arguments)
exp.e1 = (cast(PtrExp)exp.e1).e1;
}
}
Type t1 = exp.e1.type ? exp.e1.type.toBasetype() : null;
if (exp.e1.op == TOK.error)
{
result = exp.e1;
return;
}
if (arrayExpressionSemantic(exp.arguments, sc) || preFunctionParameters(sc, exp.arguments))
return setError();
// Check for call operator overload
if (t1)
{
if (t1.ty == Tstruct)
{
auto sd = (cast(TypeStruct)t1).sym;
sd.size(exp.loc); // Resolve forward references to construct object
if (sd.sizeok != Sizeok.done)
return setError();
if (!sd.ctor)
sd.ctor = sd.searchCtor();
/* If `sd.ctor` is a generated copy constructor, this means that it
is the single constructor that this struct has. In order to not
disable default construction, the ctor is nullified. The side effect
of this is that the generated copy constructor cannot be called
explicitly, but that is ok, because when calling a constructor the
default constructor should have priority over the generated copy
constructor.
*/
if (sd.ctor)
{
auto ctor = sd.ctor.isCtorDeclaration();
if (ctor && ctor.isCpCtor && ctor.generated)
sd.ctor = null;
}
// First look for constructor
if (exp.e1.op == TOK.type && sd.ctor)
{
if (!sd.noDefaultCtor && !(exp.arguments && exp.arguments.dim))
goto Lx;
auto sle = new StructLiteralExp(exp.loc, sd, null, exp.e1.type);
if (!sd.fill(exp.loc, sle.elements, true))
return setError();
if (checkFrameAccess(exp.loc, sc, sd, sle.elements.dim))
return setError();
// https://issues.dlang.org/show_bug.cgi?id=14556
// Set concrete type to avoid further redundant semantic().
sle.type = exp.e1.type;
/* Constructor takes a mutable object, so don't use
* the immutable initializer symbol.
*/
sle.useStaticInit = false;
Expression e = sle;
if (auto cf = sd.ctor.isCtorDeclaration())
{
e = new DotVarExp(exp.loc, e, cf, true);
}
else if (auto td = sd.ctor.isTemplateDeclaration())
{
e = new DotIdExp(exp.loc, e, td.ident);
}
else if (auto os = sd.ctor.isOverloadSet())
{
e = new DotExp(exp.loc, e, new OverExp(exp.loc, os));
}
else
assert(0);
e = new CallExp(exp.loc, e, exp.arguments);
e = e.expressionSemantic(sc);
result = e;
return;
}
// No constructor, look for overload of opCall
if (search_function(sd, Id.call))
goto L1;
// overload of opCall, therefore it's a call
if (exp.e1.op != TOK.type)
{
if (sd.aliasthis && exp.e1.type != exp.att1)
{
if (!exp.att1 && exp.e1.type.checkAliasThisRec())
exp.att1 = exp.e1.type;
exp.e1 = resolveAliasThis(sc, exp.e1);
goto Lagain;
}
exp.error("%s `%s` does not overload ()", sd.kind(), sd.toChars());
return setError();
}
/* It's a struct literal
*/
Lx:
Expression e = new StructLiteralExp(exp.loc, sd, exp.arguments, exp.e1.type);
e = e.expressionSemantic(sc);
result = e;
return;
}
else if (t1.ty == Tclass)
{
L1:
// Rewrite as e1.call(arguments)
Expression e = new DotIdExp(exp.loc, exp.e1, Id.call);
e = new CallExp(exp.loc, e, exp.arguments);
e = e.expressionSemantic(sc);
result = e;
return;
}
else if (exp.e1.op == TOK.type && t1.isscalar())
{
Expression e;
// Make sure to use the the enum type itself rather than its
// base type
// https://issues.dlang.org/show_bug.cgi?id=16346
if (exp.e1.type.ty == Tenum)
{
t1 = exp.e1.type;
}
if (!exp.arguments || exp.arguments.dim == 0)
{
e = t1.defaultInitLiteral(exp.loc);
}
else if (exp.arguments.dim == 1)
{
e = (*exp.arguments)[0];
e = e.implicitCastTo(sc, t1);
e = new CastExp(exp.loc, e, t1);
}
else
{
exp.error("more than one argument for construction of `%s`", t1.toChars());
return setError();
}
e = e.expressionSemantic(sc);
result = e;
return;
}
}
static FuncDeclaration resolveOverloadSet(Loc loc, Scope* sc,
OverloadSet os, Objects* tiargs, Type tthis, Expressions* arguments)
{
FuncDeclaration f = null;
foreach (s; os.a)
{
if (tiargs && s.isFuncDeclaration())
continue;
if (auto f2 = resolveFuncCall(loc, sc, s, tiargs, tthis, arguments, FuncResolveFlag.quiet))
{
if (f2.errors)
return null;
if (f)
{
/* Error if match in more than one overload set,
* even if one is a 'better' match than the other.
*/
ScopeDsymbol.multiplyDefined(loc, f, f2);
}
else
f = f2;
}
}
if (!f)
.error(loc, "no overload matches for `%s`", os.toChars());
else if (f.errors)
f = null;
return f;
}
bool isSuper = false;
if (exp.e1.op == TOK.dotVariable && t1.ty == Tfunction || exp.e1.op == TOK.dotTemplateDeclaration)
{
UnaExp ue = cast(UnaExp)exp.e1;
Expression ue1 = ue.e1;
Expression ue1old = ue1; // need for 'right this' check
VarDeclaration v;
if (ue1.op == TOK.variable && (v = (cast(VarExp)ue1).var.isVarDeclaration()) !is null && v.needThis())
{
ue.e1 = new TypeExp(ue1.loc, ue1.type);
ue1 = null;
}
DotVarExp dve;
DotTemplateExp dte;
Dsymbol s;
if (exp.e1.op == TOK.dotVariable)
{
dve = cast(DotVarExp)exp.e1;
dte = null;
s = dve.var;
tiargs = null;
}
else
{
dve = null;
dte = cast(DotTemplateExp)exp.e1;
s = dte.td;
}
// Do overload resolution
exp.f = resolveFuncCall(exp.loc, sc, s, tiargs, ue1 ? ue1.type : null, exp.arguments, FuncResolveFlag.standard);
if (!exp.f || exp.f.errors || exp.f.type.ty == Terror)
return setError();
if (exp.f.interfaceVirtual)
{
/* Cast 'this' to the type of the interface, and replace f with the interface's equivalent
*/
auto b = exp.f.interfaceVirtual;
auto ad2 = b.sym;
ue.e1 = ue.e1.castTo(sc, ad2.type.addMod(ue.e1.type.mod));
ue.e1 = ue.e1.expressionSemantic(sc);
ue1 = ue.e1;
auto vi = exp.f.findVtblIndex(&ad2.vtbl, cast(int)ad2.vtbl.dim);
assert(vi >= 0);
exp.f = ad2.vtbl[vi].isFuncDeclaration();
assert(exp.f);
}
if (exp.f.needThis())
{
AggregateDeclaration ad = exp.f.toParentLocal().isAggregateDeclaration();
ue.e1 = getRightThis(exp.loc, sc, ad, ue.e1, exp.f);
if (ue.e1.op == TOK.error)
{
result = ue.e1;
return;
}
ethis = ue.e1;
tthis = ue.e1.type;
if (!(exp.f.type.ty == Tfunction && (cast(TypeFunction)exp.f.type).isScopeQual))
{
if (global.params.vsafe && checkParamArgumentEscape(sc, exp.f, null, ethis, false, false))
return setError();
}
}
/* Cannot call public functions from inside invariant
* (because then the invariant would have infinite recursion)
*/
if (sc.func && sc.func.isInvariantDeclaration() && ue.e1.op == TOK.this_ && exp.f.addPostInvariant())
{
exp.error("cannot call `public`/`export` function `%s` from invariant", exp.f.toChars());
return setError();
}
checkFunctionAttributes(exp, sc, exp.f);
checkAccess(exp.loc, sc, ue.e1, exp.f);
if (!exp.f.needThis())
{
exp.e1 = Expression.combine(ue.e1, new VarExp(exp.loc, exp.f, false));
}
else
{
if (ue1old.checkRightThis(sc))
return setError();
if (exp.e1.op == TOK.dotVariable)
{
dve.var = exp.f;
exp.e1.type = exp.f.type;
}
else
{
exp.e1 = new DotVarExp(exp.loc, dte.e1, exp.f, false);
exp.e1 = exp.e1.expressionSemantic(sc);
if (exp.e1.op == TOK.error)
return setError();
ue = cast(UnaExp)exp.e1;
}
version (none)
{
printf("ue.e1 = %s\n", ue.e1.toChars());
printf("f = %s\n", exp.f.toChars());
printf("t1 = %s\n", t1.toChars());
printf("e1 = %s\n", exp.e1.toChars());
printf("e1.type = %s\n", exp.e1.type.toChars());
}
// See if we need to adjust the 'this' pointer
AggregateDeclaration ad = exp.f.isThis();
ClassDeclaration cd = ue.e1.type.isClassHandle();
if (ad && cd && ad.isClassDeclaration())
{
if (ue.e1.op == TOK.dotType)
{
ue.e1 = (cast(DotTypeExp)ue.e1).e1;
exp.directcall = true;
}
else if (ue.e1.op == TOK.super_)
exp.directcall = true;
else if ((cd.storage_class & STC.final_) != 0) // https://issues.dlang.org/show_bug.cgi?id=14211
exp.directcall = true;
if (ad != cd)
{
ue.e1 = ue.e1.castTo(sc, ad.type.addMod(ue.e1.type.mod));
ue.e1 = ue.e1.expressionSemantic(sc);
}
}
}
// If we've got a pointer to a function then deference it
// https://issues.dlang.org/show_bug.cgi?id=16483
if (exp.e1.type.ty == Tpointer && exp.e1.type.nextOf().ty == Tfunction)
{
Expression e = new PtrExp(exp.loc, exp.e1);
e.type = exp.e1.type.nextOf();
exp.e1 = e;
}
t1 = exp.e1.type;
}
else if (exp.e1.op == TOK.super_ || exp.e1.op == TOK.this_)
{
auto ad = sc.func ? sc.func.isThis() : null;
auto cd = ad ? ad.isClassDeclaration() : null;
isSuper = exp.e1.op == TOK.super_;
if (isSuper)
{
// Base class constructor call
if (!cd || !cd.baseClass || !sc.func.isCtorDeclaration())
{
exp.error("super class constructor call must be in a constructor");
return setError();
}
if (!cd.baseClass.ctor)
{
exp.error("no super class constructor for `%s`", cd.baseClass.toChars());
return setError();
}
}
else
{
// `this` call expression must be inside a
// constructor
if (!ad || !sc.func.isCtorDeclaration())
{
exp.error("constructor call must be in a constructor");
return setError();
}
// https://issues.dlang.org/show_bug.cgi?id=18719
// If `exp` is a call expression to another constructor
// then it means that all struct/class fields will be
// initialized after this call.
foreach (ref field; sc.ctorflow.fieldinit)
{
field.csx |= CSX.this_ctor;
}
}
if (!sc.intypeof && !(sc.ctorflow.callSuper & CSX.halt))
{
if (sc.inLoop || sc.ctorflow.callSuper & CSX.label)
exp.error("constructor calls not allowed in loops or after labels");
if (sc.ctorflow.callSuper & (CSX.super_ctor | CSX.this_ctor))
exp.error("multiple constructor calls");
if ((sc.ctorflow.callSuper & CSX.return_) && !(sc.ctorflow.callSuper & CSX.any_ctor))
exp.error("an earlier `return` statement skips constructor");
sc.ctorflow.callSuper |= CSX.any_ctor | (isSuper ? CSX.super_ctor : CSX.this_ctor);
}
tthis = ad.type.addMod(sc.func.type.mod);
auto ctor = isSuper ? cd.baseClass.ctor : ad.ctor;
if (auto os = ctor.isOverloadSet())
exp.f = resolveOverloadSet(exp.loc, sc, os, null, tthis, exp.arguments);
else
exp.f = resolveFuncCall(exp.loc, sc, ctor, null, tthis, exp.arguments, FuncResolveFlag.standard);
if (!exp.f || exp.f.errors)
return setError();
checkFunctionAttributes(exp, sc, exp.f);
checkAccess(exp.loc, sc, null, exp.f);
exp.e1 = new DotVarExp(exp.e1.loc, exp.e1, exp.f, false);
exp.e1 = exp.e1.expressionSemantic(sc);
// https://issues.dlang.org/show_bug.cgi?id=21095
if (exp.e1.op == TOK.error)
return setError();
t1 = exp.e1.type;
// BUG: this should really be done by checking the static
// call graph
if (exp.f == sc.func)
{
exp.error("cyclic constructor call");
return setError();
}
}
else if (exp.e1.op == TOK.overloadSet)
{
auto os = (cast(OverExp)exp.e1).vars;
exp.f = resolveOverloadSet(exp.loc, sc, os, tiargs, tthis, exp.arguments);
if (!exp.f)
return setError();
if (ethis)
exp.e1 = new DotVarExp(exp.loc, ethis, exp.f, false);
else
exp.e1 = new VarExp(exp.loc, exp.f, false);
goto Lagain;
}
else if (!t1)
{
exp.error("function expected before `()`, not `%s`", exp.e1.toChars());
return setError();
}
else if (t1.ty == Terror)
{
return setError();
}
else if (t1.ty != Tfunction)
{
TypeFunction tf;
const(char)* p;
Dsymbol s;
exp.f = null;
if (exp.e1.op == TOK.function_)
{
// function literal that direct called is always inferred.
assert((cast(FuncExp)exp.e1).fd);
exp.f = (cast(FuncExp)exp.e1).fd;
tf = cast(TypeFunction)exp.f.type;
p = "function literal";
}
else if (t1.ty == Tdelegate)
{
TypeDelegate td = cast(TypeDelegate)t1;
assert(td.next.ty == Tfunction);
tf = cast(TypeFunction)td.next;
p = "delegate";
}
else if (t1.ty == Tpointer && (cast(TypePointer)t1).next.ty == Tfunction)
{
tf = cast(TypeFunction)(cast(TypePointer)t1).next;
p = "function pointer";
}
else if (exp.e1.op == TOK.dotVariable && (cast(DotVarExp)exp.e1).var.isOverDeclaration())
{
DotVarExp dve = cast(DotVarExp)exp.e1;
exp.f = resolveFuncCall(exp.loc, sc, dve.var, tiargs, dve.e1.type, exp.arguments, FuncResolveFlag.overloadOnly);
if (!exp.f)
return setError();
if (exp.f.needThis())
{
dve.var = exp.f;
dve.type = exp.f.type;
dve.hasOverloads = false;
goto Lagain;
}
exp.e1 = new VarExp(dve.loc, exp.f, false);
Expression e = new CommaExp(exp.loc, dve.e1, exp);
result = e.expressionSemantic(sc);
return;
}
else if (exp.e1.op == TOK.variable && (cast(VarExp)exp.e1).var.isOverDeclaration())
{
s = (cast(VarExp)exp.e1).var;
goto L2;
}
else if (exp.e1.op == TOK.template_)
{
s = (cast(TemplateExp)exp.e1).td;
L2:
exp.f = resolveFuncCall(exp.loc, sc, s, tiargs, null, exp.arguments, FuncResolveFlag.standard);
if (!exp.f || exp.f.errors)
return setError();
if (exp.f.needThis())
{
if (hasThis(sc))
{
// Supply an implicit 'this', as in
// this.ident
exp.e1 = new DotVarExp(exp.loc, (new ThisExp(exp.loc)).expressionSemantic(sc), exp.f, false);
goto Lagain;
}
else if (isNeedThisScope(sc, exp.f))
{
exp.error("need `this` for `%s` of type `%s`", exp.f.toChars(), exp.f.type.toChars());
return setError();
}
}
exp.e1 = new VarExp(exp.e1.loc, exp.f, false);
goto Lagain;
}
else
{
exp.error("function expected before `()`, not `%s` of type `%s`", exp.e1.toChars(), exp.e1.type.toChars());
return setError();
}
const(char)* failMessage;
Expression[] fargs = exp.arguments ? (*exp.arguments)[] : null;
if (!tf.callMatch(null, fargs, 0, &failMessage, sc))
{
OutBuffer buf;
buf.writeByte('(');
argExpTypesToCBuffer(&buf, exp.arguments);
buf.writeByte(')');
if (tthis)
tthis.modToBuffer(&buf);
//printf("tf = %s, args = %s\n", tf.deco, (*arguments)[0].type.deco);
.error(exp.loc, "%s `%s%s` is not callable using argument types `%s`",
p, exp.e1.toChars(), parametersTypeToChars(tf.parameterList), buf.peekChars());
if (failMessage)
errorSupplemental(exp.loc, "%s", failMessage);
return setError();
}
// Purity and safety check should run after testing arguments matching
if (exp.f)
{
exp.checkPurity(sc, exp.f);
exp.checkSafety(sc, exp.f);
exp.checkNogc(sc, exp.f);
if (exp.f.checkNestedReference(sc, exp.loc))
return setError();
}
else if (sc.func && sc.intypeof != 1 && !(sc.flags & (SCOPE.ctfe | SCOPE.debug_)))
{
bool err = false;
if (!tf.purity && sc.func.setImpure())
{
exp.error("`pure` %s `%s` cannot call impure %s `%s`",
sc.func.kind(), sc.func.toPrettyChars(), p, exp.e1.toChars());
err = true;
}
if (!tf.isnogc && sc.func.setGC())
{
exp.error("`@nogc` %s `%s` cannot call non-@nogc %s `%s`",
sc.func.kind(), sc.func.toPrettyChars(), p, exp.e1.toChars());
err = true;
}
if (tf.trust <= TRUST.system && sc.func.setUnsafe())
{
exp.error("`@safe` %s `%s` cannot call `@system` %s `%s`",
sc.func.kind(), sc.func.toPrettyChars(), p, exp.e1.toChars());
err = true;
}
if (err)
return setError();
}
if (t1.ty == Tpointer)
{
Expression e = new PtrExp(exp.loc, exp.e1);
e.type = tf;
exp.e1 = e;
}
t1 = tf;
}
else if (exp.e1.op == TOK.variable)
{
// Do overload resolution
VarExp ve = cast(VarExp)exp.e1;
exp.f = ve.var.isFuncDeclaration();
assert(exp.f);
tiargs = null;
if (exp.f.overnext)
exp.f = resolveFuncCall(exp.loc, sc, exp.f, tiargs, null, exp.arguments, FuncResolveFlag.overloadOnly);
else
{
exp.f = exp.f.toAliasFunc();
TypeFunction tf = cast(TypeFunction)exp.f.type;
const(char)* failMessage;
Expression[] fargs = exp.arguments ? (*exp.arguments)[] : null;
if (!tf.callMatch(null, fargs, 0, &failMessage, sc))
{
OutBuffer buf;
buf.writeByte('(');
argExpTypesToCBuffer(&buf, exp.arguments);
buf.writeByte(')');
//printf("tf = %s, args = %s\n", tf.deco, (*arguments)[0].type.deco);
.error(exp.loc, "%s `%s%s` is not callable using argument types `%s`",
exp.f.kind(), exp.f.toPrettyChars(), parametersTypeToChars(tf.parameterList), buf.peekChars());
if (failMessage)
errorSupplemental(exp.loc, "%s", failMessage);
exp.f = null;
}
}
if (!exp.f || exp.f.errors)
return setError();
if (exp.f.needThis())
{
// Change the ancestor lambdas to delegate before hasThis(sc) call.
if (exp.f.checkNestedReference(sc, exp.loc))
return setError();
if (hasThis(sc))
{
// Supply an implicit 'this', as in
// this.ident
exp.e1 = new DotVarExp(exp.loc, (new ThisExp(exp.loc)).expressionSemantic(sc), ve.var);
// Note: we cannot use f directly, because further overload resolution
// through the supplied 'this' may cause different result.
goto Lagain;
}
else if (isNeedThisScope(sc, exp.f))
{
exp.error("need `this` for `%s` of type `%s`", exp.f.toChars(), exp.f.type.toChars());
return setError();
}
}
checkFunctionAttributes(exp, sc, exp.f);
checkAccess(exp.loc, sc, null, exp.f);
if (exp.f.checkNestedReference(sc, exp.loc))
return setError();
ethis = null;
tthis = null;
if (ve.hasOverloads)
{
exp.e1 = new VarExp(ve.loc, exp.f, false);
exp.e1.type = exp.f.type;
}
t1 = exp.f.type;
}
assert(t1.ty == Tfunction);
Expression argprefix;
if (!exp.arguments)
exp.arguments = new Expressions();
if (functionParameters(exp.loc, sc, cast(TypeFunction)t1, ethis, tthis, exp.arguments, exp.f, &exp.type, &argprefix))
return setError();
if (!exp.type)
{
exp.e1 = e1org; // https://issues.dlang.org/show_bug.cgi?id=10922
// avoid recursive expression printing
exp.error("forward reference to inferred return type of function call `%s`", exp.toChars());
return setError();
}
if (exp.f && exp.f.tintro)
{
Type t = exp.type;
int offset = 0;
TypeFunction tf = cast(TypeFunction)exp.f.tintro;
if (tf.next.isBaseOf(t, &offset) && offset)
{
exp.type = tf.next;
result = Expression.combine(argprefix, exp.castTo(sc, t));
return;
}
}
// Handle the case of a direct lambda call
if (exp.f && exp.f.isFuncLiteralDeclaration() && sc.func && !sc.intypeof)
{
exp.f.tookAddressOf = 0;
}
result = Expression.combine(argprefix, exp);
if (isSuper)
{
auto ad = sc.func ? sc.func.isThis() : null;
auto cd = ad ? ad.isClassDeclaration() : null;
if (cd && cd.classKind == ClassKind.cpp && exp.f && !exp.f.fbody)
{
// if super is defined in C++, it sets the vtable pointer to the base class
// so we have to restore it, but still return 'this' from super() call:
// (auto __vptrTmp = this.__vptr, auto __superTmp = super()), (this.__vptr = __vptrTmp, __superTmp)
Loc loc = exp.loc;
auto vptr = new DotIdExp(loc, new ThisExp(loc), Id.__vptr);
auto vptrTmpDecl = copyToTemp(0, "__vptrTmp", vptr);
auto declareVptrTmp = new DeclarationExp(loc, vptrTmpDecl);
auto superTmpDecl = copyToTemp(0, "__superTmp", result);
auto declareSuperTmp = new DeclarationExp(loc, superTmpDecl);
auto declareTmps = new CommaExp(loc, declareVptrTmp, declareSuperTmp);
auto restoreVptr = new AssignExp(loc, vptr.syntaxCopy(), new VarExp(loc, vptrTmpDecl));
Expression e = new CommaExp(loc, declareTmps, new CommaExp(loc, restoreVptr, new VarExp(loc, superTmpDecl)));
result = e.expressionSemantic(sc);
}
}
// declare dual-context container
if (exp.f && exp.f.isThis2 && !sc.intypeof && sc.func)
{
// check access to second `this`
if (AggregateDeclaration ad2 = exp.f.isMember2())
{
Expression te = new ThisExp(exp.loc).expressionSemantic(sc);
if (te.op != TOK.error)
te = getRightThis(exp.loc, sc, ad2, te, exp.f);
if (te.op == TOK.error)
{
exp.error("need `this` of type `%s` to call function `%s`", ad2.toChars(), exp.f.toChars());
return setError();
}
}
VarDeclaration vthis2 = makeThis2Argument(exp.loc, sc, exp.f); exp.vthis2 = vthis2;
Expression de = new DeclarationExp(exp.loc, vthis2);
result = Expression.combine(de, result);
result = result.expressionSemantic(sc);
}
}
override void visit(DeclarationExp e)
{
if (e.type)
{
result = e;
return;
}
static if (LOGSEMANTIC)
{
printf("DeclarationExp::semantic() %s\n", e.toChars());
}
uint olderrors = global.errors;
/* This is here to support extern(linkage) declaration,
* where the extern(linkage) winds up being an AttribDeclaration
* wrapper.
*/
Dsymbol s = e.declaration;
while (1)
{
AttribDeclaration ad = s.isAttribDeclaration();
if (ad)
{
if (ad.decl && ad.decl.dim == 1)
{
s = (*ad.decl)[0];
continue;
}
}
break;
}
VarDeclaration v = s.isVarDeclaration();
if (v)
{
// Do semantic() on initializer first, so:
// int a = a;
// will be illegal.
e.declaration.dsymbolSemantic(sc);
s.parent = sc.parent;
}
//printf("inserting '%s' %p into sc = %p\n", s.toChars(), s, sc);
// Insert into both local scope and function scope.
// Must be unique in both.
if (s.ident)
{
if (!sc.insert(s))
{
auto conflict = sc.search(Loc.initial, s.ident, null);
e.error("declaration `%s` is already defined", s.toPrettyChars());
errorSupplemental(conflict.loc, "`%s` `%s` is defined here",
conflict.kind(), conflict.toChars());
return setError();
}
else if (sc.func)
{
// https://issues.dlang.org/show_bug.cgi?id=11720
// include Dataseg variables
if ((s.isFuncDeclaration() ||
s.isAggregateDeclaration() ||
s.isEnumDeclaration() ||
v && v.isDataseg()) && !sc.func.localsymtab.insert(s))
{
// https://issues.dlang.org/show_bug.cgi?id=18266
// set parent so that type semantic does not assert
s.parent = sc.parent;
Dsymbol originalSymbol = sc.func.localsymtab.lookup(s.ident);
assert(originalSymbol);
e.error("declaration `%s` is already defined in another scope in `%s` at line `%d`", s.toPrettyChars(), sc.func.toChars(), originalSymbol.loc.linnum);
return setError();
}
else
{
/* https://issues.dlang.org/show_bug.cgi?id=21272
* If we are in a foreach body we need to extract the
* function containing the foreach
*/
FuncDeclaration fes_enclosing_func;
if (sc.func && sc.func.fes)
fes_enclosing_func = sc.enclosing.enclosing.func;
// Disallow shadowing
for (Scope* scx = sc.enclosing; scx && (scx.func == sc.func || (fes_enclosing_func && scx.func == fes_enclosing_func)); scx = scx.enclosing)
{
Dsymbol s2;
if (scx.scopesym && scx.scopesym.symtab && (s2 = scx.scopesym.symtab.lookup(s.ident)) !is null && s != s2)
{
// allow STC.local symbols to be shadowed
// TODO: not really an optimal design
auto decl = s2.isDeclaration();
if (!decl || !(decl.storage_class & STC.local))
{
if (sc.func.fes)
{
e.deprecation("%s `%s` is shadowing %s `%s`. Rename the `foreach` variable.", s.kind(), s.ident.toChars(), s2.kind(), s2.toPrettyChars());
}
else
{
e.error("%s `%s` is shadowing %s `%s`", s.kind(), s.ident.toChars(), s2.kind(), s2.toPrettyChars());
return setError();
}
}
}
}
}
}
}
if (!s.isVarDeclaration())
{
Scope* sc2 = sc;
if (sc2.stc & (STC.pure_ | STC.nothrow_ | STC.nogc))
sc2 = sc.push();
sc2.stc &= ~(STC.pure_ | STC.nothrow_ | STC.nogc);
e.declaration.dsymbolSemantic(sc2);
if (sc2 != sc)
sc2.pop();
s.parent = sc.parent;
}
if (global.errors == olderrors)
{
e.declaration.semantic2(sc);
if (global.errors == olderrors)
{
e.declaration.semantic3(sc);
}
}
// todo: error in declaration should be propagated.
e.type = Type.tvoid;
result = e;
}
override void visit(TypeidExp exp)
{
static if (LOGSEMANTIC)
{
printf("TypeidExp::semantic() %s\n", exp.toChars());
}
Type ta = isType(exp.obj);
Expression ea = isExpression(exp.obj);
Dsymbol sa = isDsymbol(exp.obj);
//printf("ta %p ea %p sa %p\n", ta, ea, sa);
if (ta)
{
dmd.typesem.resolve(ta, exp.loc, sc, ea, ta, sa, true);
}
if (ea)
{
if (auto sym = getDsymbol(ea))
ea = symbolToExp(sym, exp.loc, sc, false);
else
ea = ea.expressionSemantic(sc);
ea = resolveProperties(sc, ea);
ta = ea.type;
if (ea.op == TOK.type)
ea = null;
}
if (!ta)
{
//printf("ta %p ea %p sa %p\n", ta, ea, sa);
exp.error("no type for `typeid(%s)`", ea ? ea.toChars() : (sa ? sa.toChars() : ""));
return setError();
}
if (global.params.vcomplex)
ta.checkComplexTransition(exp.loc, sc);
Expression e;
auto tb = ta.toBasetype();
if (ea && tb.ty == Tclass)
{
if (tb.toDsymbol(sc).isClassDeclaration().classKind == ClassKind.cpp)
{
error(exp.loc, "Runtime type information is not supported for `extern(C++)` classes");
e = ErrorExp.get();
}
else if (!Type.typeinfoclass)
{
error(exp.loc, "`object.TypeInfo_Class` could not be found, but is implicitly used");
e = ErrorExp.get();
}
else
{
/* Get the dynamic type, which is .classinfo
*/
ea = ea.expressionSemantic(sc);
e = new TypeidExp(ea.loc, ea);
e.type = Type.typeinfoclass.type;
}
}
else if (ta.ty == Terror)
{
e = ErrorExp.get();
}
else
{
// Handle this in the glue layer
e = new TypeidExp(exp.loc, ta);
e.type = getTypeInfoType(exp.loc, ta, sc);
semanticTypeInfo(sc, ta);
if (ea)
{
e = new CommaExp(exp.loc, ea, e); // execute ea
e = e.expressionSemantic(sc);
}
}
result = e;
}
override void visit(TraitsExp e)
{
result = semanticTraits(e, sc);
}
override void visit(HaltExp e)
{
static if (LOGSEMANTIC)
{
printf("HaltExp::semantic()\n");
}
e.type = Type.tvoid;
result = e;
}
override void visit(IsExp e)
{
/* is(targ id tok tspec)
* is(targ id : tok2)
* is(targ id == tok2)
*/
Type tded = null;
void yes()
{
//printf("yes\n");
if (!e.id)
{
result = IntegerExp.createBool(true);
return;
}
Dsymbol s;
Tuple tup = isTuple(tded);
if (tup)
s = new TupleDeclaration(e.loc, e.id, &tup.objects);
else
s = new AliasDeclaration(e.loc, e.id, tded);
s.dsymbolSemantic(sc);
/* The reason for the !tup is unclear. It fails Phobos unittests if it is not there.
* More investigation is needed.
*/
if (!tup && !sc.insert(s))
{
auto conflict = sc.search(Loc.initial, s.ident, null);
e.error("declaration `%s` is already defined", s.toPrettyChars());
errorSupplemental(conflict.loc, "`%s` `%s` is defined here",
conflict.kind(), conflict.toChars());
}
unSpeculative(sc, s);
result = IntegerExp.createBool(true);
}
void no()
{
result = IntegerExp.createBool(false);
//printf("no\n");
}
static if (LOGSEMANTIC)
{
printf("IsExp::semantic(%s)\n", e.toChars());
}
if (e.id && !(sc.flags & SCOPE.condition))
{
e.error("can only declare type aliases within `static if` conditionals or `static assert`s");
return setError();
}
if (e.tok2 == TOK.package_ || e.tok2 == TOK.module_) // These is() expressions are special because they can work on modules, not just types.
{
const oldErrors = global.startGagging();
Dsymbol sym = e.targ.toDsymbol(sc);
global.endGagging(oldErrors);
if (sym is null)
return no();
Package p = resolveIsPackage(sym);
if (p is null)
return no();
if (e.tok2 == TOK.package_ && p.isModule()) // Note that isModule() will return null for package modules because they're not actually instances of Module.
return no();
else if(e.tok2 == TOK.module_ && !(p.isModule() || p.isPackageMod()))
return no();
tded = e.targ;
return yes();
}
{
Scope* sc2 = sc.copy(); // keep sc.flags
sc2.tinst = null;
sc2.minst = null;
sc2.flags |= SCOPE.fullinst;
Type t = e.targ.trySemantic(e.loc, sc2);
sc2.pop();
if (!t) // errors, so condition is false
return no();
e.targ = t;
}
if (e.tok2 != TOK.reserved)
{
switch (e.tok2)
{
case TOK.struct_:
if (e.targ.ty != Tstruct)
return no();
if ((cast(TypeStruct)e.targ).sym.isUnionDeclaration())
return no();
tded = e.targ;
break;
case TOK.union_:
if (e.targ.ty != Tstruct)
return no();
if (!(cast(TypeStruct)e.targ).sym.isUnionDeclaration())
return no();
tded = e.targ;
break;
case TOK.class_:
if (e.targ.ty != Tclass)
return no();
if ((cast(TypeClass)e.targ).sym.isInterfaceDeclaration())
return no();
tded = e.targ;
break;
case TOK.interface_:
if (e.targ.ty != Tclass)
return no();
if (!(cast(TypeClass)e.targ).sym.isInterfaceDeclaration())
return no();
tded = e.targ;
break;
case TOK.const_:
if (!e.targ.isConst())
return no();
tded = e.targ;
break;
case TOK.immutable_:
if (!e.targ.isImmutable())
return no();
tded = e.targ;
break;
case TOK.shared_:
if (!e.targ.isShared())
return no();
tded = e.targ;
break;
case TOK.inout_:
if (!e.targ.isWild())
return no();
tded = e.targ;
break;
case TOK.super_:
// If class or interface, get the base class and interfaces
if (e.targ.ty != Tclass)
return no();
else
{
ClassDeclaration cd = (cast(TypeClass)e.targ).sym;
auto args = new Parameters();
args.reserve(cd.baseclasses.dim);
if (cd.semanticRun < PASS.semanticdone)
cd.dsymbolSemantic(null);
for (size_t i = 0; i < cd.baseclasses.dim; i++)
{
BaseClass* b = (*cd.baseclasses)[i];
args.push(new Parameter(STC.in_, b.type, null, null, null));
}
tded = new TypeTuple(args);
}
break;
case TOK.enum_:
if (e.targ.ty != Tenum)
return no();
if (e.id)
tded = (cast(TypeEnum)e.targ).sym.getMemtype(e.loc);
else
tded = e.targ;
if (tded.ty == Terror)
return setError();
break;
case TOK.delegate_:
if (e.targ.ty != Tdelegate)
return no();
tded = (cast(TypeDelegate)e.targ).next; // the underlying function type
break;
case TOK.function_:
case TOK.parameters:
{
if (e.targ.ty != Tfunction)
return no();
tded = e.targ;
/* Generate tuple from function parameter types.
*/
assert(tded.ty == Tfunction);
auto tdedf = tded.isTypeFunction();
auto args = new Parameters();
foreach (i, arg; tdedf.parameterList)
{
assert(arg && arg.type);
/* If one of the default arguments was an error,
don't return an invalid tuple
*/
if (e.tok2 == TOK.parameters && arg.defaultArg && arg.defaultArg.op == TOK.error)
return setError();
args.push(new Parameter(arg.storageClass, arg.type, (e.tok2 == TOK.parameters) ? arg.ident : null, (e.tok2 == TOK.parameters) ? arg.defaultArg : null, arg.userAttribDecl));
}
tded = new TypeTuple(args);
break;
}
case TOK.return_:
/* Get the 'return type' for the function,
* delegate, or pointer to function.
*/
if (e.targ.ty == Tfunction)
tded = (cast(TypeFunction)e.targ).next;
else if (e.targ.ty == Tdelegate)
{
tded = (cast(TypeDelegate)e.targ).next;
tded = (cast(TypeFunction)tded).next;
}
else if (e.targ.ty == Tpointer && (cast(TypePointer)e.targ).next.ty == Tfunction)
{
tded = (cast(TypePointer)e.targ).next;
tded = (cast(TypeFunction)tded).next;
}
else
return no();
break;
case TOK.argumentTypes:
/* Generate a type tuple of the equivalent types used to determine if a
* function argument of this type can be passed in registers.
* The results of this are highly platform dependent, and intended
* primarly for use in implementing va_arg().
*/
tded = target.toArgTypes(e.targ);
if (!tded)
return no();
// not valid for a parameter
break;
case TOK.vector:
if (e.targ.ty != Tvector)
return no();
tded = (cast(TypeVector)e.targ).basetype;
break;
default:
assert(0);
}
// https://issues.dlang.org/show_bug.cgi?id=18753
if (tded)
return yes();
return no();
}
else if (e.tspec && !e.id && !(e.parameters && e.parameters.dim))
{
/* Evaluate to true if targ matches tspec
* is(targ == tspec)
* is(targ : tspec)
*/
e.tspec = e.tspec.typeSemantic(e.loc, sc);
//printf("targ = %s, %s\n", e.targ.toChars(), e.targ.deco);
//printf("tspec = %s, %s\n", e.tspec.toChars(), e.tspec.deco);
if (e.tok == TOK.colon)
{
// current scope is itself deprecated, or deprecations are not errors
const bool deprecationAllowed = sc.isDeprecated
|| global.params.useDeprecated != DiagnosticReporting.error;
const bool preventAliasThis = e.targ.hasDeprecatedAliasThis && !deprecationAllowed;
if (preventAliasThis && e.targ.ty == Tstruct)
{
if ((cast(TypeStruct) e.targ).implicitConvToWithoutAliasThis(e.tspec))
return yes();
else
return no();
}
else if (preventAliasThis && e.targ.ty == Tclass)
{
if ((cast(TypeClass) e.targ).implicitConvToWithoutAliasThis(e.tspec))
return yes();
else
return no();
}
else if (e.targ.implicitConvTo(e.tspec))
return yes();
else
return no();
}
else /* == */
{
if (e.targ.equals(e.tspec))
return yes();
else
return no();
}
}
else if (e.tspec)
{
/* Evaluate to true if targ matches tspec.
* If true, declare id as an alias for the specialized type.
* is(targ == tspec, tpl)
* is(targ : tspec, tpl)
* is(targ id == tspec)
* is(targ id : tspec)
* is(targ id == tspec, tpl)
* is(targ id : tspec, tpl)
*/
Identifier tid = e.id ? e.id : Identifier.generateId("__isexp_id");
e.parameters.insert(0, new TemplateTypeParameter(e.loc, tid, null, null));
Objects dedtypes = Objects(e.parameters.dim);
dedtypes.zero();
MATCH m = deduceType(e.targ, sc, e.tspec, e.parameters, &dedtypes, null, 0, e.tok == TOK.equal);
//printf("targ: %s\n", targ.toChars());
//printf("tspec: %s\n", tspec.toChars());
if (m <= MATCH.nomatch || (m != MATCH.exact && e.tok == TOK.equal))
{
return no();
}
else
{
tded = cast(Type)dedtypes[0];
if (!tded)
tded = e.targ;
Objects tiargs = Objects(1);
tiargs[0] = e.targ;
/* Declare trailing parameters
*/
for (size_t i = 1; i < e.parameters.dim; i++)
{
TemplateParameter tp = (*e.parameters)[i];
Declaration s = null;
m = tp.matchArg(e.loc, sc, &tiargs, i, e.parameters, &dedtypes, &s);
if (m <= MATCH.nomatch)
return no();
s.dsymbolSemantic(sc);
if (!sc.insert(s))
{
auto conflict = sc.search(Loc.initial, s.ident, null);
e.error("declaration `%s` is already defined", s.toPrettyChars());
errorSupplemental(conflict.loc, "`%s` `%s` is defined here",
conflict.kind(), conflict.toChars());
}
unSpeculative(sc, s);
}
return yes();
}
}
else if (e.id)
{
/* Declare id as an alias for type targ. Evaluate to true
* is(targ id)
*/
tded = e.targ;
}
return yes();
}
override void visit(BinAssignExp exp)
{
if (exp.type)
{
result = exp;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.op == TOK.arrayLength)
{
// arr.length op= e2;
e = rewriteOpAssign(exp);
e = e.expressionSemantic(sc);
result = e;
return;
}
if (exp.e1.op == TOK.slice || exp.e1.type.ty == Tarray || exp.e1.type.ty == Tsarray)
{
if (checkNonAssignmentArrayOp(exp.e1))
return setError();
if (exp.e1.op == TOK.slice)
(cast(SliceExp)exp.e1).arrayop = true;
// T[] op= ...
if (exp.e2.implicitConvTo(exp.e1.type.nextOf()))
{
// T[] op= T
exp.e2 = exp.e2.castTo(sc, exp.e1.type.nextOf());
}
else if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
exp.type = exp.e1.type;
result = arrayOp(exp, sc);
return;
}
exp.e1 = exp.e1.expressionSemantic(sc);
exp.e1 = exp.e1.optimize(WANTvalue, /*keepLvalue*/ true);
exp.e1 = exp.e1.modifiableLvalue(sc, exp.e1);
exp.type = exp.e1.type;
if (auto ad = isAggregate(exp.e1.type))
{
if (const s = search_function(ad, Id.opOpAssign))
{
error(exp.loc, "none of the `opOpAssign` overloads of `%s` are callable for `%s` of type `%s`", ad.toChars(), exp.e1.toChars(), exp.e1.type.toChars());
return setError();
}
}
if (exp.e1.checkScalar() ||
exp.e1.checkReadModifyWrite(exp.op, exp.e2) ||
exp.e1.checkSharedAccess(sc))
return setError();
int arith = (exp.op == TOK.addAssign || exp.op == TOK.minAssign || exp.op == TOK.mulAssign || exp.op == TOK.divAssign || exp.op == TOK.modAssign || exp.op == TOK.powAssign);
int bitwise = (exp.op == TOK.andAssign || exp.op == TOK.orAssign || exp.op == TOK.xorAssign);
int shift = (exp.op == TOK.leftShiftAssign || exp.op == TOK.rightShiftAssign || exp.op == TOK.unsignedRightShiftAssign);
if (bitwise && exp.type.toBasetype().ty == Tbool)
exp.e2 = exp.e2.implicitCastTo(sc, exp.type);
else if (exp.checkNoBool())
return setError();
if ((exp.op == TOK.addAssign || exp.op == TOK.minAssign) && exp.e1.type.toBasetype().ty == Tpointer && exp.e2.type.toBasetype().isintegral())
{
result = scaleFactor(exp, sc);
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
if (arith && (exp.checkArithmeticBin() || exp.checkSharedAccessBin(sc)))
return setError();
if ((bitwise || shift) && (exp.checkIntegralBin() || exp.checkSharedAccessBin(sc)))
return setError();
if (shift)
{
if (exp.e2.type.toBasetype().ty != Tvector)
exp.e2 = exp.e2.castTo(sc, Type.tshiftcnt);
}
if (!target.isVectorOpSupported(exp.type.toBasetype(), exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
if (exp.e1.op == TOK.error || exp.e2.op == TOK.error)
return setError();
e = exp.checkOpAssignTypes(sc);
if (e.op == TOK.error)
{
result = e;
return;
}
assert(e.op == TOK.assign || e == exp);
result = (cast(BinExp)e).reorderSettingAAElem(sc);
}
private Expression compileIt(MixinExp exp)
{
OutBuffer buf;
if (expressionsToString(buf, sc, exp.exps))
return null;
uint errors = global.errors;
const len = buf.length;
const str = buf.extractChars()[0 .. len];
scope p = new Parser!ASTCodegen(exp.loc, sc._module, str, false);
p.nextToken();
//printf("p.loc.linnum = %d\n", p.loc.linnum);
Expression e = p.parseExpression();
if (global.errors != errors)
return null;
if (p.token.value != TOK.endOfFile)
{
exp.error("incomplete mixin expression `%s`", str.ptr);
return null;
}
return e;
}
override void visit(MixinExp exp)
{
/* https://dlang.org/spec/expression.html#mixin_expressions
*/
static if (LOGSEMANTIC)
{
printf("MixinExp::semantic('%s')\n", exp.toChars());
}
auto e = compileIt(exp);
if (!e)
return setError();
result = e.expressionSemantic(sc);
}
override void visit(ImportExp e)
{
static if (LOGSEMANTIC)
{
printf("ImportExp::semantic('%s')\n", e.toChars());
}
auto se = semanticString(sc, e.e1, "file name argument");
if (!se)
return setError();
se = se.toUTF8(sc);
auto namez = se.toStringz().ptr;
if (!global.filePath)
{
e.error("need `-J` switch to import text file `%s`", namez);
return setError();
}
/* Be wary of CWE-22: Improper Limitation of a Pathname to a Restricted Directory
* ('Path Traversal') attacks.
* http://cwe.mitre.org/data/definitions/22.html
*/
if (FileName.absolute(namez))
{
e.error("absolute path is not allowed in import expression: `%s`", se.toChars());
return setError();
}
auto idxReserved = FileName.findReservedChar(namez);
if (idxReserved != size_t.max)
{
e.error("`%s` is not a valid filename on this platform", se.toChars());
e.errorSupplemental("Character `'%c'` is reserved and cannot be used", namez[idxReserved]);
return setError();
}
if (FileName.refersToParentDir(namez))
{
e.error("path refers to parent (`..`) directory: `%s`", se.toChars());
return setError();
}
auto name = FileName.searchPath(global.filePath, namez, false);
if (!name)
{
e.error("file `%s` cannot be found or not in a path specified with `-J`", se.toChars());
e.errorSupplemental("Path(s) searched (as provided by `-J`):");
foreach (idx, path; *global.filePath)
{
const attr = FileName.exists(path);
const(char)* err = attr == 2 ? "" :
(attr == 1 ? " (not a directory)" : " (path not found)");
e.errorSupplemental("[%zu]: `%s`%s", idx, path, err);
}
return setError();
}
sc._module.contentImportedFiles.push(name);
if (global.params.verbose)
{
const slice = se.peekString();
message("file %.*s\t(%s)", cast(int)slice.length, slice.ptr, name);
}
if (global.params.moduleDeps !is null)
{
OutBuffer* ob = global.params.moduleDeps;
Module imod = sc.instantiatingModule();
if (!global.params.moduleDepsFile)
ob.writestring("depsFile ");
ob.writestring(imod.toPrettyChars());
ob.writestring(" (");
escapePath(ob, imod.srcfile.toChars());
ob.writestring(") : ");
if (global.params.moduleDepsFile)
ob.writestring("string : ");
ob.write(se.peekString());
ob.writestring(" (");
escapePath(ob, name);
ob.writestring(")");
ob.writenl();
}
{
auto readResult = File.read(name);
if (!readResult.success)
{
e.error("cannot read file `%s`", name);
return setError();
}
else
{
// take ownership of buffer (probably leaking)
auto data = readResult.extractSlice();
se = new StringExp(e.loc, data);
}
}
result = se.expressionSemantic(sc);
}
override void visit(AssertExp exp)
{
// https://dlang.org/spec/expression.html#assert_expressions
static if (LOGSEMANTIC)
{
printf("AssertExp::semantic('%s')\n", exp.toChars());
}
const generateMsg = !exp.msg && global.params.checkAction == CHECKACTION.context;
Expression temporariesPrefix;
if (generateMsg)
// no message - use assert expression as msg
{
if (!verifyHookExist(exp.loc, *sc, Id._d_assert_fail, "generating assert messages"))
return setError();
/*
{
auto a = e1, b = e2;
assert(a == b, _d_assert_fail!"=="(a, b));
}()
*/
/*
Stores the result of an operand expression into a temporary
if necessary, e.g. if it is an impure fuction call containing side
effects as in https://issues.dlang.org/show_bug.cgi?id=20114
Params:
op = an expression which may require a temporary (added to
`temporariesPrefix`: `auto tmp = op`) and will be replaced
by `tmp` if necessary
Returns: (possibly replaced) `op`
*/
Expression maybePromoteToTmp(ref Expression op)
{
// https://issues.dlang.org/show_bug.cgi?id=20989
// Flag that _d_assert_fail will never dereference `array.ptr` to avoid safety
// errors for `assert(!array.ptr)` => `_d_assert_fail!"!"(array.ptr)`
{
auto die = op.isDotIdExp();
if (die && die.ident == Id.ptr)
die.noderef = true;
}
op = op.expressionSemantic(sc);
op = resolveProperties(sc, op);
if (op.hasSideEffect)
{
const stc = op.isLvalue() ? STC.ref_ : 0;
auto tmp = copyToTemp(stc, "__assertOp", op);
tmp.dsymbolSemantic(sc);
auto decl = new DeclarationExp(op.loc, tmp);
temporariesPrefix = Expression.combine(temporariesPrefix, decl);
op = new VarExp(op.loc, tmp);
op = op.expressionSemantic(sc);
}
return op;
}
// if the assert condition is a mixin expression, try to compile it
if (auto ce = exp.e1.isMixinExp())
{
if (auto e1 = compileIt(ce))
exp.e1 = e1;
}
Expressions* es;
Objects* tiargs;
Loc loc = exp.e1.loc;
const tok = exp.e1.op;
bool isEqualsCallExpression;
if (tok == TOK.call)
{
const callExp = cast(CallExp) exp.e1;
// https://issues.dlang.org/show_bug.cgi?id=20331
// callExp.f may be null if the assert contains a call to
// a function pointer or literal
if (const callExpFunc = callExp.f)
{
const callExpIdent = callExpFunc.ident;
isEqualsCallExpression = callExpIdent == Id.__equals ||
callExpIdent == Id.eq;
}
}
if (tok == TOK.equal || tok == TOK.notEqual ||
tok == TOK.lessThan || tok == TOK.greaterThan ||
tok == TOK.lessOrEqual || tok == TOK.greaterOrEqual ||
tok == TOK.identity || tok == TOK.notIdentity ||
tok == TOK.in_ ||
isEqualsCallExpression)
{
es = new Expressions(2);
tiargs = new Objects(3);
if (isEqualsCallExpression)
{
auto callExp = cast(CallExp) exp.e1;
auto args = callExp.arguments;
// structs with opEquals get rewritten to a DotVarExp:
// a.opEquals(b)
// https://issues.dlang.org/show_bug.cgi?id=20100
if (args.length == 1)
{
auto dv = callExp.e1.isDotVarExp();
assert(dv);
// runtime args
(*es)[0] = maybePromoteToTmp(dv.e1);
(*es)[1] = maybePromoteToTmp((*args)[0]);
}
else
{
// runtime args
(*es)[0] = maybePromoteToTmp((*args)[0]);
(*es)[1] = maybePromoteToTmp((*args)[1]);
}
}
else
{
auto binExp = cast(EqualExp) exp.e1;
// runtime args
(*es)[0] = maybePromoteToTmp(binExp.e1);
(*es)[1] = maybePromoteToTmp(binExp.e2);
}
// template args
Expression comp = new StringExp(loc, isEqualsCallExpression ? "==" : Token.toString(exp.e1.op));
comp = comp.expressionSemantic(sc);
(*tiargs)[0] = comp;
(*tiargs)[1] = (*es)[0].type;
(*tiargs)[2] = (*es)[1].type;
}
// Format exp.e1 before any additional boolean conversion
// Ignore &&/|| because "assert(...) failed" is more informative than "false != true"
else if (tok != TOK.andAnd && tok != TOK.orOr)
{
es = new Expressions(1);
tiargs = new Objects(2);
if (auto ne = exp.e1.isNotExp())
{
// Fetch the (potential non-bool) expression and fold
// (n) negations into (n % 2) negations, e.g. !!a => a
for (bool neg = true; ; neg = !neg)
{
if (auto ne2 = ne.e1.isNotExp())
ne = ne2;
else
{
(*es)[0] = maybePromoteToTmp(ne.e1);
(*tiargs)[0] = new StringExp(loc, neg ? "!" : "");
break;
}
}
}
else
{ // Simply format exp.e1
(*es)[0] = maybePromoteToTmp(exp.e1);
// No special treatment for other operators to avoid redundant template instantions
(*tiargs)[0] = new StringExp(loc, "");
}
(*tiargs)[1] = (*es)[0].type;
// Passing __ctfe to auto ref infers ref and aborts compilation:
// "cannot modify compiler-generated variable __ctfe"
auto ve = (*es)[0].isVarExp();
if (ve && ve.var.ident == Id.ctfe)
{
exp.msg = new StringExp(loc, "assert(__ctfe) failed!");
goto LSkip;
}
}
else
{
OutBuffer buf;
buf.printf("%s failed", exp.toChars());
exp.msg = new StringExp(Loc.initial, buf.extractSlice());
goto LSkip;
}
Expression __assertFail = new IdentifierExp(exp.loc, Id.empty);
auto assertFail = new DotIdExp(loc, __assertFail, Id.object);
auto dt = new DotTemplateInstanceExp(loc, assertFail, Id._d_assert_fail, tiargs);
auto ec = CallExp.create(loc, dt, es);
exp.msg = ec;
}
LSkip:
if (Expression ex = unaSemantic(exp, sc))
{
result = ex;
return;
}
exp.e1 = resolveProperties(sc, exp.e1);
// BUG: see if we can do compile time elimination of the Assert
exp.e1 = exp.e1.optimize(WANTvalue);
exp.e1 = exp.e1.toBoolean(sc);
if (exp.msg)
{
exp.msg = expressionSemantic(exp.msg, sc);
exp.msg = resolveProperties(sc, exp.msg);
exp.msg = exp.msg.implicitCastTo(sc, Type.tchar.constOf().arrayOf());
exp.msg = exp.msg.optimize(WANTvalue);
checkParamArgumentEscape(sc, null, null, exp.msg, true, false);
}
if (exp.e1.op == TOK.error)
{
result = exp.e1;
return;
}
if (exp.msg && exp.msg.op == TOK.error)
{
result = exp.msg;
return;
}
auto f1 = checkNonAssignmentArrayOp(exp.e1);
auto f2 = exp.msg && checkNonAssignmentArrayOp(exp.msg);
if (f1 || f2)
return setError();
if (exp.e1.isBool(false))
{
/* This is an `assert(0)` which means halt program execution
*/
FuncDeclaration fd = sc.parent.isFuncDeclaration();
if (fd)
fd.hasReturnExp |= 4;
sc.ctorflow.orCSX(CSX.halt);
if (global.params.useAssert == CHECKENABLE.off)
{
Expression e = new HaltExp(exp.loc);
e = e.expressionSemantic(sc);
result = e;
return;
}
}
exp.type = Type.tvoid;
result = !temporariesPrefix
? exp
: Expression.combine(temporariesPrefix, exp).expressionSemantic(sc);
}
override void visit(DotIdExp exp)
{
static if (LOGSEMANTIC)
{
printf("DotIdExp::semantic(this = %p, '%s')\n", exp, exp.toChars());
//printf("e1.op = %d, '%s'\n", e1.op, Token::toChars(e1.op));
}
Expression e = exp.semanticY(sc, 1);
if (e && isDotOpDispatch(e))
{
uint errors = global.startGagging();
e = resolvePropertiesX(sc, e);
if (global.endGagging(errors))
e = null; /* fall down to UFCS */
else
{
result = e;
return;
}
}
if (!e) // if failed to find the property
{
/* If ident is not a valid property, rewrite:
* e1.ident
* as:
* .ident(e1)
*/
e = resolveUFCSProperties(sc, exp);
}
result = e;
}
override void visit(DotTemplateExp e)
{
if (Expression ex = unaSemantic(e, sc))
{
result = ex;
return;
}
result = e;
}
override void visit(DotVarExp exp)
{
static if (LOGSEMANTIC)
{
printf("DotVarExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
exp.var = exp.var.toAlias().isDeclaration();
exp.e1 = exp.e1.expressionSemantic(sc);
if (auto tup = exp.var.isTupleDeclaration())
{
/* Replace:
* e1.tuple(a, b, c)
* with:
* tuple(e1.a, e1.b, e1.c)
*/
Expression e0;
Expression ev = sc.func ? extractSideEffect(sc, "__tup", e0, exp.e1) : exp.e1;
auto exps = new Expressions();
exps.reserve(tup.objects.dim);
for (size_t i = 0; i < tup.objects.dim; i++)
{
RootObject o = (*tup.objects)[i];
Expression e;
Declaration var;
if (o.dyncast() == DYNCAST.expression)
{
e = cast(Expression)o;
if (auto se = e.isDsymbolExp())
var = se.s.isDeclaration();
else if (auto ve = e.isVarExp())
if (!ve.var.isFuncDeclaration())
// Exempt functions for backwards compatibility reasons.
// See: https://issues.dlang.org/show_bug.cgi?id=20470#c1
var = ve.var;
}
else if (o.dyncast() == DYNCAST.dsymbol)
{
Dsymbol s = cast(Dsymbol) o;
Declaration d = s.isDeclaration();
if (!d || d.isFuncDeclaration())
// Exempt functions for backwards compatibility reasons.
// See: https://issues.dlang.org/show_bug.cgi?id=20470#c1
e = new DsymbolExp(exp.loc, s);
else
var = d;
}
else if (o.dyncast() == DYNCAST.type)
{
e = new TypeExp(exp.loc, cast(Type)o);
}
else
{
exp.error("`%s` is not an expression", o.toChars());
return setError();
}
if (var)
e = new DotVarExp(exp.loc, ev, var);
exps.push(e);
}
Expression e = new TupleExp(exp.loc, e0, exps);
e = e.expressionSemantic(sc);
result = e;
return;
}
exp.e1 = exp.e1.addDtorHook(sc);
Type t1 = exp.e1.type;
if (FuncDeclaration fd = exp.var.isFuncDeclaration())
{
// for functions, do checks after overload resolution
if (!fd.functionSemantic())
return setError();
/* https://issues.dlang.org/show_bug.cgi?id=13843
* If fd obviously has no overloads, we should
* normalize AST, and it will give a chance to wrap fd with FuncExp.
*/
if ((fd.isNested() && !fd.isThis()) || fd.isFuncLiteralDeclaration())
{
// (e1, fd)
auto e = symbolToExp(fd, exp.loc, sc, false);
result = Expression.combine(exp.e1, e);
return;
}
exp.type = fd.type;
assert(exp.type);
}
else if (OverDeclaration od = exp.var.isOverDeclaration())
{
exp.type = Type.tvoid; // ambiguous type?
}
else
{
exp.type = exp.var.type;
if (!exp.type && global.errors) // var is goofed up, just return error.
return setError();
assert(exp.type);
if (t1.ty == Tpointer)
t1 = t1.nextOf();
exp.type = exp.type.addMod(t1.mod);
Dsymbol vparent = exp.var.toParent();
AggregateDeclaration ad = vparent ? vparent.isAggregateDeclaration() : null;
if (Expression e1x = getRightThis(exp.loc, sc, ad, exp.e1, exp.var, 1))
exp.e1 = e1x;
else
{
/* Later checkRightThis will report correct error for invalid field variable access.
*/
Expression e = new VarExp(exp.loc, exp.var);
e = e.expressionSemantic(sc);
result = e;
return;
}
checkAccess(exp.loc, sc, exp.e1, exp.var);
VarDeclaration v = exp.var.isVarDeclaration();
if (v && (v.isDataseg() || (v.storage_class & STC.manifest)))
{
Expression e = expandVar(WANTvalue, v);
if (e)
{
result = e;
return;
}
}
if (v && (v.isDataseg() || // fix https://issues.dlang.org/show_bug.cgi?id=8238
(!v.needThis() && v.semanticRun > PASS.init))) // fix https://issues.dlang.org/show_bug.cgi?id=17258
{
// (e1, v)
checkAccess(exp.loc, sc, exp.e1, v);
Expression e = new VarExp(exp.loc, v);
e = new CommaExp(exp.loc, exp.e1, e);
e = e.expressionSemantic(sc);
result = e;
return;
}
}
//printf("-DotVarExp::semantic('%s')\n", toChars());
result = exp;
}
override void visit(DotTemplateInstanceExp exp)
{
static if (LOGSEMANTIC)
{
printf("DotTemplateInstanceExp::semantic('%s')\n", exp.toChars());
}
// Indicate we need to resolve by UFCS.
Expression e = exp.semanticY(sc, 1);
if (!e)
e = resolveUFCSProperties(sc, exp);
result = e;
}
override void visit(DelegateExp e)
{
static if (LOGSEMANTIC)
{
printf("DelegateExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
e.e1 = e.e1.expressionSemantic(sc);
e.type = new TypeDelegate(e.func.type);
e.type = e.type.typeSemantic(e.loc, sc);
FuncDeclaration f = e.func.toAliasFunc();
AggregateDeclaration ad = f.toParentLocal().isAggregateDeclaration();
if (f.needThis())
e.e1 = getRightThis(e.loc, sc, ad, e.e1, f);
if (e.e1.op == TOK.error)
return setError();
/* A delegate takes the address of e.e1 in order to set the .ptr field
* https://issues.dlang.org/show_bug.cgi?id=18575
*/
if (global.params.vsafe && e.e1.type.toBasetype().ty == Tstruct)
{
if (auto v = expToVariable(e.e1))
{
if (!checkAddressVar(sc, e.e1, v))
return setError();
}
}
if (f.type.ty == Tfunction)
{
TypeFunction tf = cast(TypeFunction)f.type;
if (!MODmethodConv(e.e1.type.mod, f.type.mod))
{
OutBuffer thisBuf, funcBuf;
MODMatchToBuffer(&thisBuf, e.e1.type.mod, tf.mod);
MODMatchToBuffer(&funcBuf, tf.mod, e.e1.type.mod);
e.error("%smethod `%s` is not callable using a %s`%s`",
funcBuf.peekChars(), f.toPrettyChars(), thisBuf.peekChars(), e.e1.toChars());
return setError();
}
}
if (ad && ad.isClassDeclaration() && ad.type != e.e1.type)
{
// A downcast is required for interfaces
// https://issues.dlang.org/show_bug.cgi?id=3706
e.e1 = new CastExp(e.loc, e.e1, ad.type);
e.e1 = e.e1.expressionSemantic(sc);
}
result = e;
// declare dual-context container
if (f.isThis2 && !sc.intypeof && sc.func)
{
// check access to second `this`
if (AggregateDeclaration ad2 = f.isMember2())
{
Expression te = new ThisExp(e.loc).expressionSemantic(sc);
if (te.op != TOK.error)
te = getRightThis(e.loc, sc, ad2, te, f);
if (te.op == TOK.error)
{
e.error("need `this` of type `%s` to make delegate from function `%s`", ad2.toChars(), f.toChars());
return setError();
}
}
VarDeclaration vthis2 = makeThis2Argument(e.loc, sc, f);
e.vthis2 = vthis2;
Expression de = new DeclarationExp(e.loc, vthis2);
result = Expression.combine(de, result);
result = result.expressionSemantic(sc);
}
}
override void visit(DotTypeExp exp)
{
static if (LOGSEMANTIC)
{
printf("DotTypeExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (auto e = unaSemantic(exp, sc))
{
result = e;
return;
}
exp.type = exp.sym.getType().addMod(exp.e1.type.mod);
result = exp;
}
override void visit(AddrExp exp)
{
static if (LOGSEMANTIC)
{
printf("AddrExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = unaSemantic(exp, sc))
{
result = ex;
return;
}
int wasCond = exp.e1.op == TOK.question;
if (exp.e1.op == TOK.dotTemplateInstance)
{
DotTemplateInstanceExp dti = cast(DotTemplateInstanceExp)exp.e1;
TemplateInstance ti = dti.ti;
{
//assert(ti.needsTypeInference(sc));
ti.dsymbolSemantic(sc);
if (!ti.inst || ti.errors) // if template failed to expand
return setError();
Dsymbol s = ti.toAlias();
FuncDeclaration f = s.isFuncDeclaration();
if (f)
{
exp.e1 = new DotVarExp(exp.e1.loc, dti.e1, f);
exp.e1 = exp.e1.expressionSemantic(sc);
}
}
}
else if (exp.e1.op == TOK.scope_)
{
TemplateInstance ti = (cast(ScopeExp)exp.e1).sds.isTemplateInstance();
if (ti)
{
//assert(ti.needsTypeInference(sc));
ti.dsymbolSemantic(sc);
if (!ti.inst || ti.errors) // if template failed to expand
return setError();
Dsymbol s = ti.toAlias();
FuncDeclaration f = s.isFuncDeclaration();
if (f)
{
exp.e1 = new VarExp(exp.e1.loc, f);
exp.e1 = exp.e1.expressionSemantic(sc);
}
}
}
/* https://issues.dlang.org/show_bug.cgi?id=809
*
* If the address of a lazy variable is taken,
* the expression is rewritten so that the type
* of it is the delegate type. This means that
* the symbol is not going to represent a call
* to the delegate anymore, but rather, the
* actual symbol.
*/
if (auto ve = exp.e1.isVarExp())
{
if (ve.var.storage_class & STC.lazy_)
{
exp.e1 = exp.e1.expressionSemantic(sc);
exp.e1 = resolveProperties(sc, exp.e1);
if (auto callExp = exp.e1.isCallExp())
{
if (callExp.e1.type.toBasetype().ty == Tdelegate)
{
/* https://issues.dlang.org/show_bug.cgi?id=20551
*
* Cannot take address of lazy parameter in @safe code
* because it might end up being a pointer to undefined
* memory.
*/
if (sc.func && !sc.intypeof && !(sc.flags & SCOPE.debug_) && sc.func.setUnsafe())
{
exp.error("cannot take address of lazy parameter `%s` in `@safe` function `%s`",
ve.toChars(), sc.func.toChars());
setError();
}
else
{
VarExp ve2 = callExp.e1.isVarExp();
ve2.delegateWasExtracted = true;
ve2.var.storage_class |= STC.scope_;
result = ve2;
}
return;
}
}
}
}
exp.e1 = exp.e1.toLvalue(sc, null);
if (exp.e1.op == TOK.error)
{
result = exp.e1;
return;
}
if (checkNonAssignmentArrayOp(exp.e1))
return setError();
if (!exp.e1.type)
{
exp.error("cannot take address of `%s`", exp.e1.toChars());
return setError();
}
bool hasOverloads;
if (auto f = isFuncAddress(exp, &hasOverloads))
{
if (!hasOverloads && f.checkForwardRef(exp.loc))
return setError();
}
else if (!exp.e1.type.deco)
{
if (exp.e1.op == TOK.variable)
{
VarExp ve = cast(VarExp)exp.e1;
Declaration d = ve.var;
exp.error("forward reference to %s `%s`", d.kind(), d.toChars());
}
else
exp.error("forward reference to `%s`", exp.e1.toChars());
return setError();
}
exp.type = exp.e1.type.pointerTo();
// See if this should really be a delegate
if (exp.e1.op == TOK.dotVariable)
{
DotVarExp dve = cast(DotVarExp)exp.e1;
FuncDeclaration f = dve.var.isFuncDeclaration();
if (f)
{
f = f.toAliasFunc(); // FIXME, should see overloads
// https://issues.dlang.org/show_bug.cgi?id=1983
if (!dve.hasOverloads)
f.tookAddressOf++;
Expression e;
if (f.needThis())
e = new DelegateExp(exp.loc, dve.e1, f, dve.hasOverloads);
else // It is a function pointer. Convert &v.f() --> (v, &V.f())
e = new CommaExp(exp.loc, dve.e1, new AddrExp(exp.loc, new VarExp(exp.loc, f, dve.hasOverloads)));
e = e.expressionSemantic(sc);
result = e;
return;
}
// Look for misaligned pointer in @safe mode
if (checkUnsafeAccess(sc, dve, !exp.type.isMutable(), true))
return setError();
if (global.params.vsafe)
{
if (VarDeclaration v = expToVariable(dve.e1))
{
if (!checkAddressVar(sc, exp.e1, v))
return setError();
}
}
}
else if (exp.e1.op == TOK.variable)
{
VarExp ve = cast(VarExp)exp.e1;
VarDeclaration v = ve.var.isVarDeclaration();
if (v)
{
if (!checkAddressVar(sc, exp.e1, v))
return setError();
ve.checkPurity(sc, v);
}
FuncDeclaration f = ve.var.isFuncDeclaration();
if (f)
{
/* Because nested functions cannot be overloaded,
* mark here that we took its address because castTo()
* may not be called with an exact match.
*/
if (!ve.hasOverloads || (f.isNested() && !f.needThis()))
f.tookAddressOf++;
if (f.isNested() && !f.needThis())
{
if (f.isFuncLiteralDeclaration())
{
if (!f.FuncDeclaration.isNested())
{
/* Supply a 'null' for a this pointer if no this is available
*/
Expression e = new DelegateExp(exp.loc, new NullExp(exp.loc, Type.tnull), f, ve.hasOverloads);
e = e.expressionSemantic(sc);
result = e;
return;
}
}
Expression e = new DelegateExp(exp.loc, exp.e1, f, ve.hasOverloads);
e = e.expressionSemantic(sc);
result = e;
return;
}
if (f.needThis())
{
if (hasThis(sc))
{
/* Should probably supply 'this' after overload resolution,
* not before.
*/
Expression ethis = new ThisExp(exp.loc);
Expression e = new DelegateExp(exp.loc, ethis, f, ve.hasOverloads);
e = e.expressionSemantic(sc);
result = e;
return;
}
if (sc.func && !sc.intypeof)
{
if (!(sc.flags & SCOPE.debug_) && sc.func.setUnsafe())
{
exp.error("`this` reference necessary to take address of member `%s` in `@safe` function `%s`", f.toChars(), sc.func.toChars());
}
}
}
}
}
else if ((exp.e1.op == TOK.this_ || exp.e1.op == TOK.super_) && global.params.vsafe)
{
if (VarDeclaration v = expToVariable(exp.e1))
{
if (!checkAddressVar(sc, exp.e1, v))
return setError();
}
}
else if (exp.e1.op == TOK.call)
{
CallExp ce = cast(CallExp)exp.e1;
if (ce.e1.type.ty == Tfunction)
{
TypeFunction tf = cast(TypeFunction)ce.e1.type;
if (tf.isref && sc.func && !sc.intypeof && !(sc.flags & SCOPE.debug_) && sc.func.setUnsafe())
{
exp.error("cannot take address of `ref return` of `%s()` in `@safe` function `%s`",
ce.e1.toChars(), sc.func.toChars());
}
}
}
else if (exp.e1.op == TOK.index)
{
/* For:
* int[3] a;
* &a[i]
* check 'a' the same as for a regular variable
*/
if (VarDeclaration v = expToVariable(exp.e1))
{
if (global.params.vsafe && !checkAddressVar(sc, exp.e1, v))
return setError();
exp.e1.checkPurity(sc, v);
}
}
else if (wasCond)
{
/* a ? b : c was transformed to *(a ? &b : &c), but we still
* need to do safety checks
*/
assert(exp.e1.op == TOK.star);
PtrExp pe = cast(PtrExp)exp.e1;
assert(pe.e1.op == TOK.question);
CondExp ce = cast(CondExp)pe.e1;
assert(ce.e1.op == TOK.address);
assert(ce.e2.op == TOK.address);
// Re-run semantic on the address expressions only
ce.e1.type = null;
ce.e1 = ce.e1.expressionSemantic(sc);
ce.e2.type = null;
ce.e2 = ce.e2.expressionSemantic(sc);
}
result = exp.optimize(WANTvalue);
}
override void visit(PtrExp exp)
{
static if (LOGSEMANTIC)
{
printf("PtrExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
Type tb = exp.e1.type.toBasetype();
switch (tb.ty)
{
case Tpointer:
exp.type = (cast(TypePointer)tb).next;
break;
case Tsarray:
case Tarray:
if (isNonAssignmentArrayOp(exp.e1))
goto default;
exp.error("using `*` on an array is no longer supported; use `*(%s).ptr` instead", exp.e1.toChars());
exp.type = (cast(TypeArray)tb).next;
exp.e1 = exp.e1.castTo(sc, exp.type.pointerTo());
break;
case Terror:
return setError();
default:
exp.error("can only `*` a pointer, not a `%s`", exp.e1.type.toChars());
goto case Terror;
}
if (exp.checkValue())
return setError();
result = exp;
}
override void visit(NegExp exp)
{
static if (LOGSEMANTIC)
{
printf("NegExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
fix16997(sc, exp);
exp.type = exp.e1.type;
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp.e1))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (!target.isVectorOpSupported(tb, exp.op))
{
result = exp.incompatibleTypes();
return;
}
if (exp.e1.checkNoBool())
return setError();
if (exp.e1.checkArithmetic() ||
exp.e1.checkSharedAccess(sc))
return setError();
result = exp;
}
override void visit(UAddExp exp)
{
static if (LOGSEMANTIC)
{
printf("UAddExp::semantic('%s')\n", exp.toChars());
}
assert(!exp.type);
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
fix16997(sc, exp);
if (!target.isVectorOpSupported(exp.e1.type.toBasetype(), exp.op))
{
result = exp.incompatibleTypes();
return;
}
if (exp.e1.checkNoBool())
return setError();
if (exp.e1.checkArithmetic())
return setError();
if (exp.e1.checkSharedAccess(sc))
return setError();
result = exp.e1;
}
override void visit(ComExp exp)
{
if (exp.type)
{
result = exp;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
fix16997(sc, exp);
exp.type = exp.e1.type;
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp.e1))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (!target.isVectorOpSupported(tb, exp.op))
{
result = exp.incompatibleTypes();
return;
}
if (exp.e1.checkNoBool())
return setError();
if (exp.e1.checkIntegral() ||
exp.e1.checkSharedAccess(sc))
return setError();
result = exp;
}
override void visit(NotExp e)
{
if (e.type)
{
result = e;
return;
}
e.setNoderefOperand();
// Note there is no operator overload
if (Expression ex = unaSemantic(e, sc))
{
result = ex;
return;
}
// for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684
if (e.e1.op == TOK.type)
e.e1 = resolveAliasThis(sc, e.e1);
e.e1 = resolveProperties(sc, e.e1);
e.e1 = e.e1.toBoolean(sc);
if (e.e1.type == Type.terror)
{
result = e.e1;
return;
}
if (!target.isVectorOpSupported(e.e1.type.toBasetype(), e.op))
{
result = e.incompatibleTypes();
}
// https://issues.dlang.org/show_bug.cgi?id=13910
// Today NotExp can take an array as its operand.
if (checkNonAssignmentArrayOp(e.e1))
return setError();
e.type = Type.tbool;
result = e;
}
override void visit(DeleteExp exp)
{
if (!sc.isDeprecated)
{
// @@@DEPRECATED_2019-02@@@
// 1. Deprecation for 1 year
// 2. Error for 1 year
// 3. Removal of keyword, "delete" can be used for other identities
if (!exp.isRAII)
deprecation(exp.loc, "The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.");
}
if (Expression ex = unaSemantic(exp, sc))
{
result = ex;
return;
}
exp.e1 = resolveProperties(sc, exp.e1);
exp.e1 = exp.e1.modifiableLvalue(sc, null);
if (exp.e1.op == TOK.error)
{
result = exp.e1;
return;
}
exp.type = Type.tvoid;
AggregateDeclaration ad = null;
Type tb = exp.e1.type.toBasetype();
switch (tb.ty)
{
case Tclass:
{
auto cd = (cast(TypeClass)tb).sym;
if (cd.isCOMinterface())
{
/* Because COM classes are deleted by IUnknown.Release()
*/
exp.error("cannot `delete` instance of COM interface `%s`", cd.toChars());
return setError();
}
ad = cd;
break;
}
case Tpointer:
tb = (cast(TypePointer)tb).next.toBasetype();
if (tb.ty == Tstruct)
{
ad = (cast(TypeStruct)tb).sym;
semanticTypeInfo(sc, tb);
}
break;
case Tarray:
{
Type tv = tb.nextOf().baseElemOf();
if (tv.ty == Tstruct)
{
ad = (cast(TypeStruct)tv).sym;
if (ad.dtor)
semanticTypeInfo(sc, ad.type);
}
break;
}
default:
exp.error("cannot delete type `%s`", exp.e1.type.toChars());
return setError();
}
bool err = false;
if (ad)
{
if (ad.dtor)
{
err |= !ad.dtor.functionSemantic();
err |= exp.checkPurity(sc, ad.dtor);
err |= exp.checkSafety(sc, ad.dtor);
err |= exp.checkNogc(sc, ad.dtor);
}
if (err)
return setError();
}
if (!sc.intypeof && sc.func &&
!exp.isRAII &&
!(sc.flags & SCOPE.debug_) &&
sc.func.setUnsafe())
{
exp.error("`%s` is not `@safe` but is used in `@safe` function `%s`", exp.toChars(), sc.func.toChars());
err = true;
}
if (err)
return setError();
result = exp;
}
override void visit(CastExp exp)
{
static if (LOGSEMANTIC)
{
printf("CastExp::semantic('%s')\n", exp.toChars());
}
//static int x; assert(++x < 10);
if (exp.type)
{
result = exp;
return;
}
if (exp.to)
{
exp.to = exp.to.typeSemantic(exp.loc, sc);
if (exp.to == Type.terror)
return setError();
if (!exp.to.hasPointers())
exp.setNoderefOperand();
// When e1 is a template lambda, this cast may instantiate it with
// the type 'to'.
exp.e1 = inferType(exp.e1, exp.to);
}
if (auto e = unaSemantic(exp, sc))
{
result = e;
return;
}
// for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684
if (exp.e1.op == TOK.type)
exp.e1 = resolveAliasThis(sc, exp.e1);
auto e1x = resolveProperties(sc, exp.e1);
if (e1x.op == TOK.error)
{
result = e1x;
return;
}
if (e1x.checkType())
return setError();
exp.e1 = e1x;
if (!exp.e1.type)
{
exp.error("cannot cast `%s`", exp.e1.toChars());
return setError();
}
// https://issues.dlang.org/show_bug.cgi?id=19954
if (exp.e1.type.ty == Ttuple)
{
TupleExp te = exp.e1.isTupleExp();
if (te.exps.dim == 1)
exp.e1 = (*te.exps)[0];
}
// only allow S(x) rewrite if cast specified S explicitly.
// See https://issues.dlang.org/show_bug.cgi?id=18545
const bool allowImplicitConstruction = exp.to !is null;
if (!exp.to) // Handle cast(const) and cast(immutable), etc.
{
exp.to = exp.e1.type.castMod(exp.mod);
exp.to = exp.to.typeSemantic(exp.loc, sc);
if (exp.to == Type.terror)
return setError();
}
if (exp.to.ty == Ttuple)
{
exp.error("cannot cast `%s` to tuple type `%s`", exp.e1.toChars(), exp.to.toChars());
return setError();
}
// cast(void) is used to mark e1 as unused, so it is safe
if (exp.to.ty == Tvoid)
{
exp.type = exp.to;
result = exp;
return;
}
if (!exp.to.equals(exp.e1.type) && exp.mod == cast(ubyte)~0)
{
if (Expression e = exp.op_overload(sc))
{
result = e.implicitCastTo(sc, exp.to);
return;
}
}
Type t1b = exp.e1.type.toBasetype();
Type tob = exp.to.toBasetype();
if (allowImplicitConstruction && tob.ty == Tstruct && !tob.equals(t1b))
{
/* Look to replace:
* cast(S)t
* with:
* S(t)
*/
// Rewrite as to.call(e1)
Expression e = new TypeExp(exp.loc, exp.to);
e = new CallExp(exp.loc, e, exp.e1);
e = e.trySemantic(sc);
if (e)
{
result = e;
return;
}
}
if (!t1b.equals(tob) && (t1b.ty == Tarray || t1b.ty == Tsarray))
{
if (checkNonAssignmentArrayOp(exp.e1))
return setError();
}
// Look for casting to a vector type
if (tob.ty == Tvector && t1b.ty != Tvector)
{
result = new VectorExp(exp.loc, exp.e1, exp.to);
result = result.expressionSemantic(sc);
return;
}
Expression ex = exp.e1.castTo(sc, exp.to);
if (ex.op == TOK.error)
{
result = ex;
return;
}
// Check for unsafe casts
if (!sc.intypeof &&
!(sc.flags & SCOPE.debug_) &&
!isSafeCast(ex, t1b, tob) &&
(!sc.func && sc.stc & STC.safe || sc.func && sc.func.setUnsafe()))
{
exp.error("cast from `%s` to `%s` not allowed in safe code", exp.e1.type.toChars(), exp.to.toChars());
return setError();
}
// `object.__ArrayCast` is a rewrite of an old runtime hook `_d_arraycast`. `_d_arraycast` was not built
// to handle certain casts. Those casts which `object.__ArrayCast` does not support are filtered out.
// See `e2ir.toElemCast` for other types of casts. If `object.__ArrayCast` is improved to support more
// casts these conditions and potentially some logic in `e2ir.toElemCast` can be removed.
if (tob.ty == Tarray)
{
// https://issues.dlang.org/show_bug.cgi?id=19840
if (auto ad = isAggregate(t1b))
{
if (ad.aliasthis)
{
Expression e = resolveAliasThis(sc, exp.e1);
e = new CastExp(exp.loc, e, exp.to);
result = e.expressionSemantic(sc);
return;
}
}
if(t1b.ty == Tarray && exp.e1.op != TOK.arrayLiteral && (sc.flags & SCOPE.ctfe) == 0)
{
auto tFrom = t1b.nextOf();
auto tTo = tob.nextOf();
// https://issues.dlang.org/show_bug.cgi?id=20130
if (exp.e1.op != TOK.string_ || !ex.isStringExp)
{
const uint fromSize = cast(uint)tFrom.size();
const uint toSize = cast(uint)tTo.size();
// If array element sizes do not match, we must adjust the dimensions
if (fromSize != toSize)
{
if (!verifyHookExist(exp.loc, *sc, Id.__ArrayCast, "casting array of structs"))
return setError();
// A runtime check is needed in case arrays don't line up. That check should
// be done in the implementation of `object.__ArrayCast`
if (toSize == 0 || (fromSize % toSize) != 0)
{
// lower to `object.__ArrayCast!(TFrom, TTo)(from)`
// fully qualify as `object.__ArrayCast`
Expression id = new IdentifierExp(exp.loc, Id.empty);
auto dotid = new DotIdExp(exp.loc, id, Id.object);
auto tiargs = new Objects();
tiargs.push(tFrom);
tiargs.push(tTo);
auto dt = new DotTemplateInstanceExp(exp.loc, dotid, Id.__ArrayCast, tiargs);
auto arguments = new Expressions();
arguments.push(exp.e1);
Expression ce = new CallExp(exp.loc, dt, arguments);
result = expressionSemantic(ce, sc);
return;
}
}
}
}
}
result = ex;
}
override void visit(VectorExp exp)
{
static if (LOGSEMANTIC)
{
printf("VectorExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
exp.e1 = exp.e1.expressionSemantic(sc);
exp.type = exp.to.typeSemantic(exp.loc, sc);
if (exp.e1.op == TOK.error || exp.type.ty == Terror)
{
result = exp.e1;
return;
}
Type tb = exp.type.toBasetype();
assert(tb.ty == Tvector);
TypeVector tv = cast(TypeVector)tb;
Type te = tv.elementType();
exp.dim = cast(int)(tv.size(exp.loc) / te.size(exp.loc));
bool checkElem(Expression elem)
{
if (elem.isConst() == 1)
return false;
exp.error("constant expression expected, not `%s`", elem.toChars());
return true;
}
exp.e1 = exp.e1.optimize(WANTvalue);
bool res;
if (exp.e1.op == TOK.arrayLiteral)
{
foreach (i; 0 .. exp.dim)
{
// Do not stop on first error - check all AST nodes even if error found
res |= checkElem(exp.e1.isArrayLiteralExp()[i]);
}
}
else if (exp.e1.type.ty == Tvoid)
checkElem(exp.e1);
result = res ? ErrorExp.get() : exp;
}
override void visit(VectorArrayExp e)
{
static if (LOGSEMANTIC)
{
printf("VectorArrayExp::semantic('%s')\n", e.toChars());
}
if (!e.type)
{
unaSemantic(e, sc);
e.e1 = resolveProperties(sc, e.e1);
if (e.e1.op == TOK.error)
{
result = e.e1;
return;
}
assert(e.e1.type.ty == Tvector);
e.type = e.e1.type.isTypeVector().basetype;
}
result = e;
}
override void visit(SliceExp exp)
{
static if (LOGSEMANTIC)
{
printf("SliceExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
// operator overloading should be handled in ArrayExp already.
if (Expression ex = unaSemantic(exp, sc))
{
result = ex;
return;
}
exp.e1 = resolveProperties(sc, exp.e1);
if (exp.e1.op == TOK.type && exp.e1.type.ty != Ttuple)
{
if (exp.lwr || exp.upr)
{
exp.error("cannot slice type `%s`", exp.e1.toChars());
return setError();
}
Expression e = new TypeExp(exp.loc, exp.e1.type.arrayOf());
result = e.expressionSemantic(sc);
return;
}
if (!exp.lwr && !exp.upr)
{
if (exp.e1.op == TOK.arrayLiteral)
{
// Convert [a,b,c][] to [a,b,c]
Type t1b = exp.e1.type.toBasetype();
Expression e = exp.e1;
if (t1b.ty == Tsarray)
{
e = e.copy();
e.type = t1b.nextOf().arrayOf();
}
result = e;
return;
}
if (exp.e1.op == TOK.slice)
{
// Convert e[][] to e[]
SliceExp se = cast(SliceExp)exp.e1;
if (!se.lwr && !se.upr)
{
result = se;
return;
}
}
if (isArrayOpOperand(exp.e1))
{
// Convert (a[]+b[])[] to a[]+b[]
result = exp.e1;
return;
}
}
if (exp.e1.op == TOK.error)
{
result = exp.e1;
return;
}
if (exp.e1.type.ty == Terror)
return setError();
Type t1b = exp.e1.type.toBasetype();
if (t1b.ty == Tpointer)
{
if ((cast(TypePointer)t1b).next.ty == Tfunction)
{
exp.error("cannot slice function pointer `%s`", exp.e1.toChars());
return setError();
}
if (!exp.lwr || !exp.upr)
{
exp.error("need upper and lower bound to slice pointer");
return setError();
}
if (sc.func && !sc.intypeof && !(sc.flags & SCOPE.debug_) && sc.func.setUnsafe())
{
exp.error("pointer slicing not allowed in safe functions");
return setError();
}
}
else if (t1b.ty == Tarray)
{
}
else if (t1b.ty == Tsarray)
{
if (!exp.arrayop && global.params.vsafe)
{
/* Slicing a static array is like taking the address of it.
* Perform checks as if e[] was &e
*/
if (VarDeclaration v = expToVariable(exp.e1))
{
if (exp.e1.op == TOK.dotVariable)
{
DotVarExp dve = cast(DotVarExp)exp.e1;
if ((dve.e1.op == TOK.this_ || dve.e1.op == TOK.super_) &&
!(v.storage_class & STC.ref_))
{
// because it's a class
v = null;
}
}
if (v && !checkAddressVar(sc, exp.e1, v))
return setError();
}
}
}
else if (t1b.ty == Ttuple)
{
if (!exp.lwr && !exp.upr)
{
result = exp.e1;
return;
}
if (!exp.lwr || !exp.upr)
{
exp.error("need upper and lower bound to slice tuple");
return setError();
}
}
else if (t1b.ty == Tvector)
{
// Convert e1 to corresponding static array
TypeVector tv1 = cast(TypeVector)t1b;
t1b = tv1.basetype;
t1b = t1b.castMod(tv1.mod);
exp.e1.type = t1b;
}
else
{
exp.error("`%s` cannot be sliced with `[]`", t1b.ty == Tvoid ? exp.e1.toChars() : t1b.toChars());
return setError();
}
/* Run semantic on lwr and upr.
*/
Scope* scx = sc;
if (t1b.ty == Tsarray || t1b.ty == Tarray || t1b.ty == Ttuple)
{
// Create scope for 'length' variable
ScopeDsymbol sym = new ArrayScopeSymbol(sc, exp);
sym.parent = sc.scopesym;
sc = sc.push(sym);
}
if (exp.lwr)
{
if (t1b.ty == Ttuple)
sc = sc.startCTFE();
exp.lwr = exp.lwr.expressionSemantic(sc);
exp.lwr = resolveProperties(sc, exp.lwr);
if (t1b.ty == Ttuple)
sc = sc.endCTFE();
exp.lwr = exp.lwr.implicitCastTo(sc, Type.tsize_t);
}
if (exp.upr)
{
if (t1b.ty == Ttuple)
sc = sc.startCTFE();
exp.upr = exp.upr.expressionSemantic(sc);
exp.upr = resolveProperties(sc, exp.upr);
if (t1b.ty == Ttuple)
sc = sc.endCTFE();
exp.upr = exp.upr.implicitCastTo(sc, Type.tsize_t);
}
if (sc != scx)
sc = sc.pop();
if (exp.lwr && exp.lwr.type == Type.terror || exp.upr && exp.upr.type == Type.terror)
return setError();
if (t1b.ty == Ttuple)
{
exp.lwr = exp.lwr.ctfeInterpret();
exp.upr = exp.upr.ctfeInterpret();
uinteger_t i1 = exp.lwr.toUInteger();
uinteger_t i2 = exp.upr.toUInteger();
TupleExp te;
TypeTuple tup;
size_t length;
if (exp.e1.op == TOK.tuple) // slicing an expression tuple
{
te = cast(TupleExp)exp.e1;
tup = null;
length = te.exps.dim;
}
else if (exp.e1.op == TOK.type) // slicing a type tuple
{
te = null;
tup = cast(TypeTuple)t1b;
length = Parameter.dim(tup.arguments);
}
else
assert(0);
if (i2 < i1 || length < i2)
{
exp.error("string slice `[%llu .. %llu]` is out of bounds", i1, i2);
return setError();
}
size_t j1 = cast(size_t)i1;
size_t j2 = cast(size_t)i2;
Expression e;
if (exp.e1.op == TOK.tuple)
{
auto exps = new Expressions(j2 - j1);
for (size_t i = 0; i < j2 - j1; i++)
{
(*exps)[i] = (*te.exps)[j1 + i];
}
e = new TupleExp(exp.loc, te.e0, exps);
}
else
{
auto args = new Parameters();
args.reserve(j2 - j1);
for (size_t i = j1; i < j2; i++)
{
Parameter arg = Parameter.getNth(tup.arguments, i);
args.push(arg);
}
e = new TypeExp(exp.e1.loc, new TypeTuple(args));
}
e = e.expressionSemantic(sc);
result = e;
return;
}
exp.type = t1b.nextOf().arrayOf();
// Allow typedef[] -> typedef[]
if (exp.type.equals(t1b))
exp.type = exp.e1.type;
// We might know $ now
setLengthVarIfKnown(exp.lengthVar, t1b);
if (exp.lwr && exp.upr)
{
exp.lwr = exp.lwr.optimize(WANTvalue);
exp.upr = exp.upr.optimize(WANTvalue);
IntRange lwrRange = getIntRange(exp.lwr);
IntRange uprRange = getIntRange(exp.upr);
if (t1b.ty == Tsarray || t1b.ty == Tarray)
{
Expression el = new ArrayLengthExp(exp.loc, exp.e1);
el = el.expressionSemantic(sc);
el = el.optimize(WANTvalue);
if (el.op == TOK.int64)
{
// Array length is known at compile-time. Upper is in bounds if it fits length.
dinteger_t length = el.toInteger();
auto bounds = IntRange(SignExtendedNumber(0), SignExtendedNumber(length));
exp.upperIsInBounds = bounds.contains(uprRange);
}
else if (exp.upr.op == TOK.int64 && exp.upr.toInteger() == 0)
{
// Upper slice expression is '0'. Value is always in bounds.
exp.upperIsInBounds = true;
}
else if (exp.upr.op == TOK.variable && (cast(VarExp)exp.upr).var.ident == Id.dollar)
{
// Upper slice expression is '$'. Value is always in bounds.
exp.upperIsInBounds = true;
}
}
else if (t1b.ty == Tpointer)
{
exp.upperIsInBounds = true;
}
else
assert(0);
exp.lowerIsLessThanUpper = (lwrRange.imax <= uprRange.imin);
//printf("upperIsInBounds = %d lowerIsLessThanUpper = %d\n", exp.upperIsInBounds, exp.lowerIsLessThanUpper);
}
result = exp;
}
override void visit(ArrayLengthExp e)
{
static if (LOGSEMANTIC)
{
printf("ArrayLengthExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
if (Expression ex = unaSemantic(e, sc))
{
result = ex;
return;
}
e.e1 = resolveProperties(sc, e.e1);
e.type = Type.tsize_t;
result = e;
}
override void visit(ArrayExp exp)
{
static if (LOGSEMANTIC)
{
printf("ArrayExp::semantic('%s')\n", exp.toChars());
}
assert(!exp.type);
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (isAggregate(exp.e1.type))
exp.error("no `[]` operator overload for type `%s`", exp.e1.type.toChars());
else if (exp.e1.op == TOK.type && exp.e1.type.ty != Ttuple)
exp.error("static array of `%s` with multiple lengths not allowed", exp.e1.type.toChars());
else if (isIndexableNonAggregate(exp.e1.type))
exp.error("only one index allowed to index `%s`", exp.e1.type.toChars());
else
exp.error("cannot use `[]` operator on expression of type `%s`", exp.e1.type.toChars());
result = ErrorExp.get();
}
override void visit(DotExp exp)
{
static if (LOGSEMANTIC)
{
printf("DotExp::semantic('%s')\n", exp.toChars());
if (exp.type)
printf("\ttype = %s\n", exp.type.toChars());
}
exp.e1 = exp.e1.expressionSemantic(sc);
exp.e2 = exp.e2.expressionSemantic(sc);
if (exp.e1.op == TOK.type)
{
result = exp.e2;
return;
}
if (exp.e2.op == TOK.type)
{
result = exp.e2;
return;
}
if (exp.e2.op == TOK.template_)
{
auto td = (cast(TemplateExp)exp.e2).td;
Expression e = new DotTemplateExp(exp.loc, exp.e1, td);
result = e.expressionSemantic(sc);
return;
}
if (!exp.type || exp.e1.op == TOK.this_)
exp.type = exp.e2.type;
result = exp;
}
override void visit(CommaExp e)
{
if (e.type)
{
result = e;
return;
}
// Allow `((a,b),(x,y))`
if (e.allowCommaExp)
{
CommaExp.allow(e.e1);
CommaExp.allow(e.e2);
}
if (Expression ex = binSemanticProp(e, sc))
{
result = ex;
return;
}
e.e1 = e.e1.addDtorHook(sc);
if (checkNonAssignmentArrayOp(e.e1))
return setError();
e.type = e.e2.type;
if (e.type is Type.tvoid)
discardValue(e.e1);
else if (!e.allowCommaExp && !e.isGenerated)
e.error("Using the result of a comma expression is not allowed");
result = e;
}
override void visit(IntervalExp e)
{
static if (LOGSEMANTIC)
{
printf("IntervalExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
Expression le = e.lwr;
le = le.expressionSemantic(sc);
le = resolveProperties(sc, le);
Expression ue = e.upr;
ue = ue.expressionSemantic(sc);
ue = resolveProperties(sc, ue);
if (le.op == TOK.error)
{
result = le;
return;
}
if (ue.op == TOK.error)
{
result = ue;
return;
}
e.lwr = le;
e.upr = ue;
e.type = Type.tvoid;
result = e;
}
override void visit(DelegatePtrExp e)
{
static if (LOGSEMANTIC)
{
printf("DelegatePtrExp::semantic('%s')\n", e.toChars());
}
if (!e.type)
{
unaSemantic(e, sc);
e.e1 = resolveProperties(sc, e.e1);
if (e.e1.op == TOK.error)
{
result = e.e1;
return;
}
e.type = Type.tvoidptr;
}
result = e;
}
override void visit(DelegateFuncptrExp e)
{
static if (LOGSEMANTIC)
{
printf("DelegateFuncptrExp::semantic('%s')\n", e.toChars());
}
if (!e.type)
{
unaSemantic(e, sc);
e.e1 = resolveProperties(sc, e.e1);
if (e.e1.op == TOK.error)
{
result = e.e1;
return;
}
e.type = e.e1.type.nextOf().pointerTo();
}
result = e;
}
override void visit(IndexExp exp)
{
static if (LOGSEMANTIC)
{
printf("IndexExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
// operator overloading should be handled in ArrayExp already.
if (!exp.e1.type)
exp.e1 = exp.e1.expressionSemantic(sc);
assert(exp.e1.type); // semantic() should already be run on it
if (exp.e1.op == TOK.type && exp.e1.type.ty != Ttuple)
{
exp.e2 = exp.e2.expressionSemantic(sc);
exp.e2 = resolveProperties(sc, exp.e2);
Type nt;
if (exp.e2.op == TOK.type)
nt = new TypeAArray(exp.e1.type, exp.e2.type);
else
nt = new TypeSArray(exp.e1.type, exp.e2);
Expression e = new TypeExp(exp.loc, nt);
result = e.expressionSemantic(sc);
return;
}
if (exp.e1.op == TOK.error)
{
result = exp.e1;
return;
}
if (exp.e1.type.ty == Terror)
return setError();
// Note that unlike C we do not implement the int[ptr]
Type t1b = exp.e1.type.toBasetype();
if (t1b.ty == Tvector)
{
// Convert e1 to corresponding static array
TypeVector tv1 = cast(TypeVector)t1b;
t1b = tv1.basetype;
t1b = t1b.castMod(tv1.mod);
exp.e1.type = t1b;
}
/* Run semantic on e2
*/
Scope* scx = sc;
if (t1b.ty == Tsarray || t1b.ty == Tarray || t1b.ty == Ttuple)
{
// Create scope for 'length' variable
ScopeDsymbol sym = new ArrayScopeSymbol(sc, exp);
sym.parent = sc.scopesym;
sc = sc.push(sym);
}
if (t1b.ty == Ttuple)
sc = sc.startCTFE();
exp.e2 = exp.e2.expressionSemantic(sc);
exp.e2 = resolveProperties(sc, exp.e2);
if (t1b.ty == Ttuple)
sc = sc.endCTFE();
if (exp.e2.op == TOK.tuple)
{
TupleExp te = cast(TupleExp)exp.e2;
if (te.exps && te.exps.dim == 1)
exp.e2 = Expression.combine(te.e0, (*te.exps)[0]); // bug 4444 fix
}
if (sc != scx)
sc = sc.pop();
if (exp.e2.type == Type.terror)
return setError();
if (checkNonAssignmentArrayOp(exp.e1))
return setError();
switch (t1b.ty)
{
case Tpointer:
if ((cast(TypePointer)t1b).next.ty == Tfunction)
{
exp.error("cannot index function pointer `%s`", exp.e1.toChars());
return setError();
}
exp.e2 = exp.e2.implicitCastTo(sc, Type.tsize_t);
if (exp.e2.type == Type.terror)
return setError();
exp.e2 = exp.e2.optimize(WANTvalue);
if (exp.e2.op == TOK.int64 && exp.e2.toInteger() == 0)
{
}
else if (sc.func && !(sc.flags & SCOPE.debug_) && sc.func.setUnsafe())
{
exp.error("safe function `%s` cannot index pointer `%s`", sc.func.toPrettyChars(), exp.e1.toChars());
return setError();
}
exp.type = (cast(TypeNext)t1b).next;
break;
case Tarray:
exp.e2 = exp.e2.implicitCastTo(sc, Type.tsize_t);
if (exp.e2.type == Type.terror)
return setError();
exp.type = (cast(TypeNext)t1b).next;
break;
case Tsarray:
{
exp.e2 = exp.e2.implicitCastTo(sc, Type.tsize_t);
if (exp.e2.type == Type.terror)
return setError();
exp.type = t1b.nextOf();
break;
}
case Taarray:
{
TypeAArray taa = cast(TypeAArray)t1b;
/* We can skip the implicit conversion if they differ only by
* constness
* https://issues.dlang.org/show_bug.cgi?id=2684
* see also bug https://issues.dlang.org/show_bug.cgi?id=2954 b
*/
if (!arrayTypeCompatibleWithoutCasting(exp.e2.type, taa.index))
{
exp.e2 = exp.e2.implicitCastTo(sc, taa.index); // type checking
if (exp.e2.type == Type.terror)
return setError();
}
semanticTypeInfo(sc, taa);
exp.type = taa.next;
break;
}
case Ttuple:
{
exp.e2 = exp.e2.implicitCastTo(sc, Type.tsize_t);
if (exp.e2.type == Type.terror)
return setError();
exp.e2 = exp.e2.ctfeInterpret();
uinteger_t index = exp.e2.toUInteger();
TupleExp te;
TypeTuple tup;
size_t length;
if (exp.e1.op == TOK.tuple)
{
te = cast(TupleExp)exp.e1;
tup = null;
length = te.exps.dim;
}
else if (exp.e1.op == TOK.type)
{
te = null;
tup = cast(TypeTuple)t1b;
length = Parameter.dim(tup.arguments);
}
else
assert(0);
if (length <= index)
{
exp.error("array index `[%llu]` is outside array bounds `[0 .. %llu]`", index, cast(ulong)length);
return setError();
}
Expression e;
if (exp.e1.op == TOK.tuple)
{
e = (*te.exps)[cast(size_t)index];
e = Expression.combine(te.e0, e);
}
else
e = new TypeExp(exp.e1.loc, Parameter.getNth(tup.arguments, cast(size_t)index).type);
result = e;
return;
}
default:
exp.error("`%s` must be an array or pointer type, not `%s`", exp.e1.toChars(), exp.e1.type.toChars());
return setError();
}
// We might know $ now
setLengthVarIfKnown(exp.lengthVar, t1b);
if (t1b.ty == Tsarray || t1b.ty == Tarray)
{
Expression el = new ArrayLengthExp(exp.loc, exp.e1);
el = el.expressionSemantic(sc);
el = el.optimize(WANTvalue);
if (el.op == TOK.int64)
{
exp.e2 = exp.e2.optimize(WANTvalue);
dinteger_t length = el.toInteger();
if (length)
{
auto bounds = IntRange(SignExtendedNumber(0), SignExtendedNumber(length - 1));
exp.indexIsInBounds = bounds.contains(getIntRange(exp.e2));
}
}
}
result = exp;
}
override void visit(PostExp exp)
{
static if (LOGSEMANTIC)
{
printf("PostExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemantic(exp, sc))
{
result = ex;
return;
}
Expression e1x = resolveProperties(sc, exp.e1);
if (e1x.op == TOK.error)
{
result = e1x;
return;
}
exp.e1 = e1x;
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.checkReadModifyWrite(exp.op))
return setError();
if (exp.e1.op == TOK.slice)
{
const(char)* s = exp.op == TOK.plusPlus ? "increment" : "decrement";
exp.error("cannot post-%s array slice `%s`, use pre-%s instead", s, exp.e1.toChars(), s);
return setError();
}
exp.e1 = exp.e1.optimize(WANTvalue, /*keepLvalue*/ true);
Type t1 = exp.e1.type.toBasetype();
if (t1.ty == Tclass || t1.ty == Tstruct || exp.e1.op == TOK.arrayLength)
{
/* Check for operator overloading,
* but rewrite in terms of ++e instead of e++
*/
/* If e1 is not trivial, take a reference to it
*/
Expression de = null;
if (exp.e1.op != TOK.variable && exp.e1.op != TOK.arrayLength)
{
// ref v = e1;
auto v = copyToTemp(STC.ref_, "__postref", exp.e1);
de = new DeclarationExp(exp.loc, v);
exp.e1 = new VarExp(exp.e1.loc, v);
}
/* Rewrite as:
* auto tmp = e1; ++e1; tmp
*/
auto tmp = copyToTemp(0, "__pitmp", exp.e1);
Expression ea = new DeclarationExp(exp.loc, tmp);
Expression eb = exp.e1.syntaxCopy();
eb = new PreExp(exp.op == TOK.plusPlus ? TOK.prePlusPlus : TOK.preMinusMinus, exp.loc, eb);
Expression ec = new VarExp(exp.loc, tmp);
// Combine de,ea,eb,ec
if (de)
ea = new CommaExp(exp.loc, de, ea);
e = new CommaExp(exp.loc, ea, eb);
e = new CommaExp(exp.loc, e, ec);
e = e.expressionSemantic(sc);
result = e;
return;
}
exp.e1 = exp.e1.modifiableLvalue(sc, exp.e1);
e = exp;
if (exp.e1.checkScalar() ||
exp.e1.checkSharedAccess(sc))
return setError();
if (exp.e1.checkNoBool())
return setError();
if (exp.e1.type.ty == Tpointer)
e = scaleFactor(exp, sc);
else
exp.e2 = exp.e2.castTo(sc, exp.e1.type);
e.type = exp.e1.type;
result = e;
}
override void visit(PreExp exp)
{
Expression e = exp.op_overload(sc);
// printf("PreExp::semantic('%s')\n", toChars());
if (e)
{
result = e;
return;
}
// Rewrite as e1+=1 or e1-=1
if (exp.op == TOK.prePlusPlus)
e = new AddAssignExp(exp.loc, exp.e1, IntegerExp.literal!1);
else
e = new MinAssignExp(exp.loc, exp.e1, IntegerExp.literal!1);
result = e.expressionSemantic(sc);
}
/*
* Get the expression initializer for a specific struct
*
* Params:
* sd = the struct for which the expression initializer is needed
* loc = the location of the initializer
* sc = the scope where the expression is located
* t = the type of the expression
*
* Returns:
* The expression initializer or error expression if any errors occured
*/
private Expression getInitExp(StructDeclaration sd, Loc loc, Scope* sc, Type t)
{
if (sd.zeroInit && !sd.isNested())
{
// https://issues.dlang.org/show_bug.cgi?id=14606
// Always use BlitExp for the special expression: (struct = 0)
return IntegerExp.literal!0;
}
if (sd.isNested())
{
auto sle = new StructLiteralExp(loc, sd, null, t);
if (!sd.fill(loc, sle.elements, true))
return ErrorExp.get();
if (checkFrameAccess(loc, sc, sd, sle.elements.dim))
return ErrorExp.get();
sle.type = t;
return sle;
}
return t.defaultInit(loc);
}
override void visit(AssignExp exp)
{
static if (LOGSEMANTIC)
{
printf("AssignExp::semantic('%s')\n", exp.toChars());
}
//printf("exp.e1.op = %d, '%s'\n", exp.e1.op, Token.toChars(exp.e1.op));
//printf("exp.e2.op = %d, '%s'\n", exp.e2.op, Token.toChars(exp.e2.op));
void setResult(Expression e, int line = __LINE__)
{
//printf("line %d\n", line);
result = e;
}
if (exp.type)
{
return setResult(exp);
}
Expression e1old = exp.e1;
if (auto e2comma = exp.e2.isCommaExp())
{
if (!e2comma.isGenerated)
exp.error("Using the result of a comma expression is not allowed");
/* Rewrite to get rid of the comma from rvalue
* e1=(e0,e2) => e0,(e1=e2)
*/
Expression e0;
exp.e2 = Expression.extractLast(e2comma, e0);
Expression e = Expression.combine(e0, exp);
return setResult(e.expressionSemantic(sc));
}
/* Look for operator overloading of a[arguments] = e2.
* Do it before e1.expressionSemantic() otherwise the ArrayExp will have been
* converted to unary operator overloading already.
*/
if (auto ae = exp.e1.isArrayExp())
{
Expression res;
ae.e1 = ae.e1.expressionSemantic(sc);
ae.e1 = resolveProperties(sc, ae.e1);
Expression ae1old = ae.e1;
const(bool) maybeSlice =
(ae.arguments.dim == 0 ||
ae.arguments.dim == 1 && (*ae.arguments)[0].op == TOK.interval);
IntervalExp ie = null;
if (maybeSlice && ae.arguments.dim)
{
assert((*ae.arguments)[0].op == TOK.interval);
ie = cast(IntervalExp)(*ae.arguments)[0];
}
while (true)
{
if (ae.e1.op == TOK.error)
return setResult(ae.e1);
Expression e0 = null;
Expression ae1save = ae.e1;
ae.lengthVar = null;
Type t1b = ae.e1.type.toBasetype();
AggregateDeclaration ad = isAggregate(t1b);
if (!ad)
break;
if (search_function(ad, Id.indexass))
{
// Deal with $
res = resolveOpDollar(sc, ae, &e0);
if (!res) // a[i..j] = e2 might be: a.opSliceAssign(e2, i, j)
goto Lfallback;
if (res.op == TOK.error)
return setResult(res);
res = exp.e2.expressionSemantic(sc);
if (res.op == TOK.error)
return setResult(res);
exp.e2 = res;
/* Rewrite (a[arguments] = e2) as:
* a.opIndexAssign(e2, arguments)
*/
Expressions* a = ae.arguments.copy();
a.insert(0, exp.e2);
res = new DotIdExp(exp.loc, ae.e1, Id.indexass);
res = new CallExp(exp.loc, res, a);
if (maybeSlice) // a[] = e2 might be: a.opSliceAssign(e2)
res = res.trySemantic(sc);
else
res = res.expressionSemantic(sc);
if (res)
return setResult(Expression.combine(e0, res));
}
Lfallback:
if (maybeSlice && search_function(ad, Id.sliceass))
{
// Deal with $
res = resolveOpDollar(sc, ae, ie, &e0);
if (res.op == TOK.error)
return setResult(res);
res = exp.e2.expressionSemantic(sc);
if (res.op == TOK.error)
return setResult(res);
exp.e2 = res;
/* Rewrite (a[i..j] = e2) as:
* a.opSliceAssign(e2, i, j)
*/
auto a = new Expressions();
a.push(exp.e2);
if (ie)
{
a.push(ie.lwr);
a.push(ie.upr);
}
res = new DotIdExp(exp.loc, ae.e1, Id.sliceass);
res = new CallExp(exp.loc, res, a);
res = res.expressionSemantic(sc);
return setResult(Expression.combine(e0, res));
}
// No operator overloading member function found yet, but
// there might be an alias this to try.
if (ad.aliasthis && t1b != ae.att1)
{
if (!ae.att1 && t1b.checkAliasThisRec())
ae.att1 = t1b;
/* Rewrite (a[arguments] op e2) as:
* a.aliasthis[arguments] op e2
*/
ae.e1 = resolveAliasThis(sc, ae1save, true);
if (ae.e1)
continue;
}
break;
}
ae.e1 = ae1old; // recovery
ae.lengthVar = null;
}
/* Run this.e1 semantic.
*/
{
Expression e1x = exp.e1;
/* With UFCS, e.f = value
* Could mean:
* .f(e, value)
* or:
* .f(e) = value
*/
if (auto dti = e1x.isDotTemplateInstanceExp())
{
Expression e = dti.semanticY(sc, 1);
if (!e)
{
return setResult(resolveUFCSProperties(sc, e1x, exp.e2));
}
e1x = e;
}
else if (auto die = e1x.isDotIdExp())
{
Expression e = die.semanticY(sc, 1);
if (e && isDotOpDispatch(e))
{
/* https://issues.dlang.org/show_bug.cgi?id=19687
*
* On this branch, e2 is semantically analyzed in resolvePropertiesX,
* but that call is done with gagged errors. That is the only time when
* semantic gets ran on e2, that is why the error never gets to be printed.
* In order to make sure that UFCS is tried with correct parameters, e2
* needs to have semantic ran on it.
*/
exp.e2 = exp.e2.expressionSemantic(sc);
uint errors = global.startGagging();
e = resolvePropertiesX(sc, e, exp.e2);
if (global.endGagging(errors))
e = null; /* fall down to UFCS */
else
return setResult(e);
}
if (!e)
return setResult(resolveUFCSProperties(sc, e1x, exp.e2));
e1x = e;
}
else
{
if (auto se = e1x.isSliceExp())
se.arrayop = true;
e1x = e1x.expressionSemantic(sc);
}
/* We have f = value.
* Could mean:
* f(value)
* or:
* f() = value
*/
if (Expression e = resolvePropertiesX(sc, e1x, exp.e2))
return setResult(e);
if (e1x.checkRightThis(sc))
{
return setError();
}
exp.e1 = e1x;
assert(exp.e1.type);
}
Type t1 = exp.e1.type.toBasetype();
/* Run this.e2 semantic.
* Different from other binary expressions, the analysis of e2
* depends on the result of e1 in assignments.
*/
{
Expression e2x = inferType(exp.e2, t1.baseElemOf());
e2x = e2x.expressionSemantic(sc);
e2x = resolveProperties(sc, e2x);
if (e2x.op == TOK.type)
e2x = resolveAliasThis(sc, e2x); //https://issues.dlang.org/show_bug.cgi?id=17684
if (e2x.op == TOK.error)
return setResult(e2x);
if (e2x.checkValue() || e2x.checkSharedAccess(sc))
return setError();
exp.e2 = e2x;
}
/* Rewrite tuple assignment as a tuple of assignments.
*/
{
Expression e2x = exp.e2;
Ltupleassign:
if (exp.e1.op == TOK.tuple && e2x.op == TOK.tuple)
{
TupleExp tup1 = cast(TupleExp)exp.e1;
TupleExp tup2 = cast(TupleExp)e2x;
size_t dim = tup1.exps.dim;
Expression e = null;
if (dim != tup2.exps.dim)
{
exp.error("mismatched tuple lengths, %d and %d", cast(int)dim, cast(int)tup2.exps.dim);
return setError();
}
if (dim == 0)
{
e = IntegerExp.literal!0;
e = new CastExp(exp.loc, e, Type.tvoid); // avoid "has no effect" error
e = Expression.combine(tup1.e0, tup2.e0, e);
}
else
{
auto exps = new Expressions(dim);
for (size_t i = 0; i < dim; i++)
{
Expression ex1 = (*tup1.exps)[i];
Expression ex2 = (*tup2.exps)[i];
(*exps)[i] = new AssignExp(exp.loc, ex1, ex2);
}
e = new TupleExp(exp.loc, Expression.combine(tup1.e0, tup2.e0), exps);
}
return setResult(e.expressionSemantic(sc));
}
/* Look for form: e1 = e2.aliasthis.
*/
if (exp.e1.op == TOK.tuple)
{
TupleDeclaration td = isAliasThisTuple(e2x);
if (!td)
goto Lnomatch;
assert(exp.e1.type.ty == Ttuple);
TypeTuple tt = cast(TypeTuple)exp.e1.type;
Expression e0;
Expression ev = extractSideEffect(sc, "__tup", e0, e2x);
auto iexps = new Expressions();
iexps.push(ev);
for (size_t u = 0; u < iexps.dim; u++)
{
Lexpand:
Expression e = (*iexps)[u];
Parameter arg = Parameter.getNth(tt.arguments, u);
//printf("[%d] iexps.dim = %d, ", u, iexps.dim);
//printf("e = (%s %s, %s), ", Token::tochars[e.op], e.toChars(), e.type.toChars());
//printf("arg = (%s, %s)\n", arg.toChars(), arg.type.toChars());
if (!arg || !e.type.implicitConvTo(arg.type))
{
// expand initializer to tuple
if (expandAliasThisTuples(iexps, u) != -1)
{
if (iexps.dim <= u)
break;
goto Lexpand;
}
goto Lnomatch;
}
}
e2x = new TupleExp(e2x.loc, e0, iexps);
e2x = e2x.expressionSemantic(sc);
if (e2x.op == TOK.error)
{
result = e2x;
return;
}
// Do not need to overwrite this.e2
goto Ltupleassign;
}
Lnomatch:
}
if (exp.op == TOK.assign) // skip TOK.blit and TOK.construct, which are initializations
exp.e1.checkSharedAccess(sc);
/* Inside constructor, if this is the first assignment of object field,
* rewrite this to initializing the field.
*/
if (exp.op == TOK.assign
&& exp.e1.checkModifiable(sc) == Modifiable.initialization)
{
//printf("[%s] change to init - %s\n", exp.loc.toChars(), exp.toChars());
auto t = exp.type;
exp = new ConstructExp(exp.loc, exp.e1, exp.e2);
exp.type = t;
// @@@DEPRECATED_2020-06@@@
// When removing, alter `checkModifiable` to return the correct value.
if (sc.func.isStaticCtorDeclaration() && !sc.func.isSharedStaticCtorDeclaration() &&
exp.e1.type.isImmutable())
{
deprecation(exp.loc, "initialization of `immutable` variable from `static this` is deprecated.");
deprecationSupplemental(exp.loc, "Use `shared static this` instead.");
}
// https://issues.dlang.org/show_bug.cgi?id=13515
// set Index::modifiable flag for complex AA element initialization
if (auto ie1 = exp.e1.isIndexExp())
{
Expression e1x = ie1.markSettingAAElem();
if (e1x.op == TOK.error)
{
result = e1x;
return;
}
}
}
else if (exp.op == TOK.construct && exp.e1.op == TOK.variable &&
(cast(VarExp)exp.e1).var.storage_class & (STC.out_ | STC.ref_))
{
exp.memset = MemorySet.referenceInit;
}
/* If it is an assignment from a 'foreign' type,
* check for operator overloading.
*/
if (exp.memset == MemorySet.referenceInit)
{
// If this is an initialization of a reference,
// do nothing
}
else if (t1.ty == Tstruct)
{
auto e1x = exp.e1;
auto e2x = exp.e2;
auto sd = (cast(TypeStruct)t1).sym;
if (exp.op == TOK.construct)
{
Type t2 = e2x.type.toBasetype();
if (t2.ty == Tstruct && sd == (cast(TypeStruct)t2).sym)
{
sd.size(exp.loc);
if (sd.sizeok != Sizeok.done)
return setError();
if (!sd.ctor)
sd.ctor = sd.searchCtor();
// https://issues.dlang.org/show_bug.cgi?id=15661
// Look for the form from last of comma chain.
auto e2y = lastComma(e2x);
CallExp ce = (e2y.op == TOK.call) ? cast(CallExp)e2y : null;
DotVarExp dve = (ce && ce.e1.op == TOK.dotVariable)
? cast(DotVarExp)ce.e1 : null;
if (sd.ctor && ce && dve && dve.var.isCtorDeclaration() &&
// https://issues.dlang.org/show_bug.cgi?id=19389
dve.e1.op != TOK.dotVariable &&
e2y.type.implicitConvTo(t1))
{
/* Look for form of constructor call which is:
* __ctmp.ctor(arguments...)
*/
/* Before calling the constructor, initialize
* variable with a bit copy of the default
* initializer
*/
Expression einit = getInitExp(sd, exp.loc, sc, t1);
if (einit.op == TOK.error)
{
result = einit;
return;
}
auto ae = new BlitExp(exp.loc, exp.e1, einit);
ae.type = e1x.type;
/* Replace __ctmp being constructed with e1.
* We need to copy constructor call expression,
* because it may be used in other place.
*/
auto dvx = cast(DotVarExp)dve.copy();
dvx.e1 = e1x;
auto cx = cast(CallExp)ce.copy();
cx.e1 = dvx;
if (checkConstructorEscape(sc, cx, false))
return setError();
Expression e0;
Expression.extractLast(e2x, e0);
auto e = Expression.combine(e0, ae, cx);
e = e.expressionSemantic(sc);
result = e;
return;
}
if (sd.postblit || sd.hasCopyCtor)
{
/* We have a copy constructor for this
*/
if (e2x.op == TOK.question)
{
/* Rewrite as:
* a ? e1 = b : e1 = c;
*/
CondExp econd = cast(CondExp)e2x;
Expression ea1 = new ConstructExp(econd.e1.loc, e1x, econd.e1);
Expression ea2 = new ConstructExp(econd.e1.loc, e1x, econd.e2);
Expression e = new CondExp(exp.loc, econd.econd, ea1, ea2);
result = e.expressionSemantic(sc);
return;
}
if (e2x.isLvalue())
{
if (sd.hasCopyCtor)
{
/* Rewrite as:
* e1 = init, e1.copyCtor(e2);
*/
Expression einit = new BlitExp(exp.loc, exp.e1, getInitExp(sd, exp.loc, sc, t1));
einit.type = e1x.type;
Expression e;
e = new DotIdExp(exp.loc, e1x, Id.ctor);
e = new CallExp(exp.loc, e, e2x);
e = new CommaExp(exp.loc, einit, e);
//printf("e: %s\n", e.toChars());
result = e.expressionSemantic(sc);
return;
}
else
{
if (!e2x.type.implicitConvTo(e1x.type))
{
exp.error("conversion error from `%s` to `%s`",
e2x.type.toChars(), e1x.type.toChars());
return setError();
}
/* Rewrite as:
* (e1 = e2).postblit();
*
* Blit assignment e1 = e2 returns a reference to the original e1,
* then call the postblit on it.
*/
Expression e = e1x.copy();
e.type = e.type.mutableOf();
if (e.type.isShared && !sd.type.isShared)
e.type = e.type.unSharedOf();
e = new BlitExp(exp.loc, e, e2x);
e = new DotVarExp(exp.loc, e, sd.postblit, false);
e = new CallExp(exp.loc, e);
result = e.expressionSemantic(sc);
return;
}
}
else
{
/* The struct value returned from the function is transferred
* so should not call the destructor on it.
*/
e2x = valueNoDtor(e2x);
}
}
// https://issues.dlang.org/show_bug.cgi?id=19251
// if e2 cannot be converted to e1.type, maybe there is an alias this
if (!e2x.implicitConvTo(t1))
{
AggregateDeclaration ad2 = isAggregate(e2x.type);
if (ad2 && ad2.aliasthis && !(exp.att2 && e2x.type == exp.att2))
{
if (!exp.att2 && exp.e2.type.checkAliasThisRec())
exp.att2 = exp.e2.type;
/* Rewrite (e1 op e2) as:
* (e1 op e2.aliasthis)
*/
exp.e2 = new DotIdExp(exp.e2.loc, exp.e2, ad2.aliasthis.ident);
result = exp.expressionSemantic(sc);
return;
}
}
}
else if (!e2x.implicitConvTo(t1))
{
sd.size(exp.loc);
if (sd.sizeok != Sizeok.done)
return setError();
if (!sd.ctor)
sd.ctor = sd.searchCtor();
if (sd.ctor)
{
/* Look for implicit constructor call
* Rewrite as:
* e1 = init, e1.ctor(e2)
*/
/* Fix Issue 5153 : https://issues.dlang.org/show_bug.cgi?id=5153
* Using `new` to initialize a struct object is a common mistake, but
* the error message from the compiler is not very helpful in that
* case. If exp.e2 is a NewExp and the type of new is the same as
* the type as exp.e1 (struct in this case), then we know for sure
* that the user wants to instantiate a struct. This is done to avoid
* issuing an error when the user actually wants to call a constructor
* which receives a class object.
*
* Foo f = new Foo2(0); is a valid expression if Foo has a constructor
* which receives an instance of a Foo2 class
*/
if (exp.e2.op == TOK.new_)
{
auto newExp = cast(NewExp)(exp.e2);
if (newExp.newtype && newExp.newtype == t1)
{
error(exp.loc, "cannot implicitly convert expression `%s` of type `%s` to `%s`",
newExp.toChars(), newExp.type.toChars(), t1.toChars());
errorSupplemental(exp.loc, "Perhaps remove the `new` keyword?");
return setError();
}
}
Expression einit = new BlitExp(exp.loc, e1x, getInitExp(sd, exp.loc, sc, t1));
einit.type = e1x.type;
Expression e;
e = new DotIdExp(exp.loc, e1x, Id.ctor);
e = new CallExp(exp.loc, e, e2x);
e = new CommaExp(exp.loc, einit, e);
e = e.expressionSemantic(sc);
result = e;
return;
}
if (search_function(sd, Id.call))
{
/* Look for static opCall
* https://issues.dlang.org/show_bug.cgi?id=2702
* Rewrite as:
* e1 = typeof(e1).opCall(arguments)
*/
e2x = typeDotIdExp(e2x.loc, e1x.type, Id.call);
e2x = new CallExp(exp.loc, e2x, exp.e2);
e2x = e2x.expressionSemantic(sc);
e2x = resolveProperties(sc, e2x);
if (e2x.op == TOK.error)
{
result = e2x;
return;
}
if (e2x.checkValue() || e2x.checkSharedAccess(sc))
return setError();
}
}
else // https://issues.dlang.org/show_bug.cgi?id=11355
{
AggregateDeclaration ad2 = isAggregate(e2x.type);
if (ad2 && ad2.aliasthis && !(exp.att2 && e2x.type == exp.att2))
{
if (!exp.att2 && exp.e2.type.checkAliasThisRec())
exp.att2 = exp.e2.type;
/* Rewrite (e1 op e2) as:
* (e1 op e2.aliasthis)
*/
exp.e2 = new DotIdExp(exp.e2.loc, exp.e2, ad2.aliasthis.ident);
result = exp.expressionSemantic(sc);
return;
}
}
}
else if (exp.op == TOK.assign)
{
if (e1x.op == TOK.index && (cast(IndexExp)e1x).e1.type.toBasetype().ty == Taarray)
{
/*
* Rewrite:
* aa[key] = e2;
* as:
* ref __aatmp = aa;
* ref __aakey = key;
* ref __aaval = e2;
* (__aakey in __aatmp
* ? __aatmp[__aakey].opAssign(__aaval)
* : ConstructExp(__aatmp[__aakey], __aaval));
*/
// ensure we keep the expr modifiable
Expression esetting = (cast(IndexExp)e1x).markSettingAAElem();
if (esetting.op == TOK.error)
{
result = esetting;
return;
}
assert(esetting.op == TOK.index);
IndexExp ie = cast(IndexExp) esetting;
Type t2 = e2x.type.toBasetype();
Expression e0 = null;
Expression ea = extractSideEffect(sc, "__aatmp", e0, ie.e1);
Expression ek = extractSideEffect(sc, "__aakey", e0, ie.e2);
Expression ev = extractSideEffect(sc, "__aaval", e0, e2x);
AssignExp ae = cast(AssignExp)exp.copy();
ae.e1 = new IndexExp(exp.loc, ea, ek);
ae.e1 = ae.e1.expressionSemantic(sc);
ae.e1 = ae.e1.optimize(WANTvalue);
ae.e2 = ev;
Expression e = ae.op_overload(sc);
if (e)
{
Expression ey = null;
if (t2.ty == Tstruct && sd == t2.toDsymbol(sc))
{
ey = ev;
}
else if (!ev.implicitConvTo(ie.type) && sd.ctor)
{
// Look for implicit constructor call
// Rewrite as S().ctor(e2)
ey = new StructLiteralExp(exp.loc, sd, null);
ey = new DotIdExp(exp.loc, ey, Id.ctor);
ey = new CallExp(exp.loc, ey, ev);
ey = ey.trySemantic(sc);
}
if (ey)
{
Expression ex;
ex = new IndexExp(exp.loc, ea, ek);
ex = ex.expressionSemantic(sc);
ex = ex.optimize(WANTvalue);
ex = ex.modifiableLvalue(sc, ex); // allocate new slot
ey = new ConstructExp(exp.loc, ex, ey);
ey = ey.expressionSemantic(sc);
if (ey.op == TOK.error)
{
result = ey;
return;
}
ex = e;
// https://issues.dlang.org/show_bug.cgi?id=14144
// The whole expression should have the common type
// of opAssign() return and assigned AA entry.
// Even if there's no common type, expression should be typed as void.
Type t = null;
if (!typeMerge(sc, TOK.question, &t, &ex, &ey))
{
ex = new CastExp(ex.loc, ex, Type.tvoid);
ey = new CastExp(ey.loc, ey, Type.tvoid);
}
e = new CondExp(exp.loc, new InExp(exp.loc, ek, ea), ex, ey);
}
e = Expression.combine(e0, e);
e = e.expressionSemantic(sc);
result = e;
return;
}
}
else
{
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
}
}
else
assert(exp.op == TOK.blit);
exp.e1 = e1x;
exp.e2 = e2x;
}
else if (t1.ty == Tclass)
{
// Disallow assignment operator overloads for same type
if (exp.op == TOK.assign && !exp.e2.implicitConvTo(exp.e1.type))
{
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
}
}
else if (t1.ty == Tsarray)
{
// SliceExp cannot have static array type without context inference.
assert(exp.e1.op != TOK.slice);
Expression e1x = exp.e1;
Expression e2x = exp.e2;
if (e2x.implicitConvTo(e1x.type))
{
if (exp.op != TOK.blit && (e2x.op == TOK.slice && (cast(UnaExp)e2x).e1.isLvalue() || e2x.op == TOK.cast_ && (cast(UnaExp)e2x).e1.isLvalue() || e2x.op != TOK.slice && e2x.isLvalue()))
{
if (e1x.checkPostblit(sc, t1))
return setError();
}
// e2 matches to t1 because of the implicit length match, so
if (isUnaArrayOp(e2x.op) || isBinArrayOp(e2x.op))
{
// convert e1 to e1[]
// e.g. e1[] = a[] + b[];
auto sle = new SliceExp(e1x.loc, e1x, null, null);
sle.arrayop = true;
e1x = sle.expressionSemantic(sc);
}
else
{
// convert e2 to t1 later
// e.g. e1 = [1, 2, 3];
}
}
else
{
if (e2x.implicitConvTo(t1.nextOf().arrayOf()) > MATCH.nomatch)
{
uinteger_t dim1 = (cast(TypeSArray)t1).dim.toInteger();
uinteger_t dim2 = dim1;
if (auto ale = e2x.isArrayLiteralExp())
{
dim2 = ale.elements ? ale.elements.dim : 0;
}
else if (auto se = e2x.isSliceExp())
{
Type tx = toStaticArrayType(se);
if (tx)
dim2 = (cast(TypeSArray)tx).dim.toInteger();
}
if (dim1 != dim2)
{
exp.error("mismatched array lengths, %d and %d", cast(int)dim1, cast(int)dim2);
return setError();
}
}
// May be block or element-wise assignment, so
// convert e1 to e1[]
if (exp.op != TOK.assign)
{
// If multidimensional static array, treat as one large array
//
// Find the appropriate array type depending on the assignment, e.g.
// int[3] = int => int[3]
// int[3][2] = int => int[6]
// int[3][2] = int[] => int[3][2]
// int[3][2][4] + int => int[24]
// int[3][2][4] + int[] => int[3][8]
ulong dim = t1.isTypeSArray().dim.toUInteger();
auto type = t1.nextOf();
for (TypeSArray tsa; (tsa = type.isTypeSArray()) !is null; )
{
import core.checkedint : mulu;
// Accumulate skipped dimensions
bool overflow = false;
dim = mulu(dim, tsa.dim.toUInteger(), overflow);
if (overflow || dim >= uint.max)
{
// dym exceeds maximum array size
exp.error("static array `%s` size overflowed to %llu",
e1x.type.toChars(), cast(ulong) dim);
return setError();
}
// Move to the element type
type = tsa.nextOf().toBasetype();
// Rewrite ex1 as a static array if a matching type was found
if (e2x.implicitConvTo(type) > MATCH.nomatch)
{
e1x.type = type.sarrayOf(dim);
break;
}
}
}
auto sle = new SliceExp(e1x.loc, e1x, null, null);
sle.arrayop = true;
e1x = sle.expressionSemantic(sc);
}
if (e1x.op == TOK.error)
return setResult(e1x);
if (e2x.op == TOK.error)
return setResult(e2x);
exp.e1 = e1x;
exp.e2 = e2x;
t1 = e1x.type.toBasetype();
}
/* Check the mutability of e1.
*/
if (auto ale = exp.e1.isArrayLengthExp())
{
// e1 is not an lvalue, but we let code generator handle it
auto ale1x = ale.e1.modifiableLvalue(sc, exp.e1);
if (ale1x.op == TOK.error)
return setResult(ale1x);
ale.e1 = ale1x;
Type tn = ale.e1.type.toBasetype().nextOf();
checkDefCtor(ale.loc, tn);
Identifier hook = global.params.tracegc ? Id._d_arraysetlengthTTrace : Id._d_arraysetlengthT;
if (!verifyHookExist(exp.loc, *sc, Id._d_arraysetlengthTImpl, "resizing arrays"))
return setError();
// use slice expression when arr.length = 0 to avoid runtime call
if(exp.e2.isConst() && exp.e2.toUInteger() == 0)
{
IntervalExp ie = new IntervalExp(ale.loc, exp.e2, exp.e2);
Expression se = new SliceExp(ale.loc, ale.e1, ie);
Expression as = new AssignExp(ale.loc, ale.e1, se);
auto res = as.expressionSemantic(sc);
return setResult(res);
}
// Lower to object._d_arraysetlengthTImpl!(typeof(e1))._d_arraysetlengthT{,Trace}(e1, e2)
Expression id = new IdentifierExp(ale.loc, Id.empty);
id = new DotIdExp(ale.loc, id, Id.object);
auto tiargs = new Objects();
tiargs.push(ale.e1.type);
id = new DotTemplateInstanceExp(ale.loc, id, Id._d_arraysetlengthTImpl, tiargs);
id = new DotIdExp(ale.loc, id, hook);
id = id.expressionSemantic(sc);
auto arguments = new Expressions();
arguments.reserve(5);
if (global.params.tracegc)
{
auto funcname = (sc.callsc && sc.callsc.func) ? sc.callsc.func.toPrettyChars() : sc.func.toPrettyChars();
arguments.push(new StringExp(exp.loc, exp.loc.filename.toDString()));
arguments.push(new IntegerExp(exp.loc, exp.loc.linnum, Type.tint32));
arguments.push(new StringExp(exp.loc, funcname.toDString()));
}
arguments.push(ale.e1);
arguments.push(exp.e2);
Expression ce = new CallExp(ale.loc, id, arguments);
auto res = ce.expressionSemantic(sc);
// if (global.params.verbose)
// message("lowered %s =>\n %s", exp.toChars(), res.toChars());
return setResult(res);
}
else if (auto se = exp.e1.isSliceExp())
{
Type tn = se.type.nextOf();
const fun = sc.func;
if (exp.op == TOK.assign && !tn.isMutable() &&
// allow modifiation in module ctor, see
// https://issues.dlang.org/show_bug.cgi?id=9884
(!fun || (fun && !fun.isStaticCtorDeclaration())))
{
exp.error("slice `%s` is not mutable", se.toChars());
return setError();
}
if (exp.op == TOK.assign && !tn.baseElemOf().isAssignable())
{
exp.error("slice `%s` is not mutable, struct `%s` has immutable members",
exp.e1.toChars(), tn.baseElemOf().toChars());
result = ErrorExp.get();
return;
}
// For conditional operator, both branches need conversion.
while (se.e1.op == TOK.slice)
se = cast(SliceExp)se.e1;
if (se.e1.op == TOK.question && se.e1.type.toBasetype().ty == Tsarray)
{
se.e1 = se.e1.modifiableLvalue(sc, exp.e1);
if (se.e1.op == TOK.error)
return setResult(se.e1);
}
}
else
{
if (t1.ty == Tsarray && exp.op == TOK.assign)
{
Type tn = exp.e1.type.nextOf();
if (tn && !tn.baseElemOf().isAssignable())
{
exp.error("array `%s` is not mutable, struct `%s` has immutable members",
exp.e1.toChars(), tn.baseElemOf().toChars());
result = ErrorExp.get();
return;
}
}
Expression e1x = exp.e1;
// Try to do a decent error message with the expression
// before it got constant folded
e1x = e1x.optimize(WANTvalue, /*keepLvalue*/ true);
if (exp.op == TOK.assign)
e1x = e1x.modifiableLvalue(sc, e1old);
if (e1x.op == TOK.error)
{
result = e1x;
return;
}
exp.e1 = e1x;
}
/* Tweak e2 based on the type of e1.
*/
Expression e2x = exp.e2;
Type t2 = e2x.type.toBasetype();
// If it is a array, get the element type. Note that it may be
// multi-dimensional.
Type telem = t1;
while (telem.ty == Tarray)
telem = telem.nextOf();
if (exp.e1.op == TOK.slice && t1.nextOf() &&
(telem.ty != Tvoid || e2x.op == TOK.null_) &&
e2x.implicitConvTo(t1.nextOf()))
{
// Check for block assignment. If it is of type void[], void[][], etc,
// '= null' is the only allowable block assignment (Bug 7493)
exp.memset = MemorySet.blockAssign; // make it easy for back end to tell what this is
e2x = e2x.implicitCastTo(sc, t1.nextOf());
if (exp.op != TOK.blit && e2x.isLvalue() && exp.e1.checkPostblit(sc, t1.nextOf()))
return setError();
}
else if (exp.e1.op == TOK.slice &&
(t2.ty == Tarray || t2.ty == Tsarray) &&
t2.nextOf().implicitConvTo(t1.nextOf()))
{
// Check element-wise assignment.
/* If assigned elements number is known at compile time,
* check the mismatch.
*/
SliceExp se1 = cast(SliceExp)exp.e1;
TypeSArray tsa1 = cast(TypeSArray)toStaticArrayType(se1);
TypeSArray tsa2 = null;
if (auto ale = e2x.isArrayLiteralExp())
tsa2 = cast(TypeSArray)t2.nextOf().sarrayOf(ale.elements.dim);
else if (auto se = e2x.isSliceExp())
tsa2 = cast(TypeSArray)toStaticArrayType(se);
else
tsa2 = t2.isTypeSArray();
if (tsa1 && tsa2)
{
uinteger_t dim1 = tsa1.dim.toInteger();
uinteger_t dim2 = tsa2.dim.toInteger();
if (dim1 != dim2)
{
exp.error("mismatched array lengths, %d and %d", cast(int)dim1, cast(int)dim2);
return setError();
}
}
if (exp.op != TOK.blit &&
(e2x.op == TOK.slice && (cast(UnaExp)e2x).e1.isLvalue() ||
e2x.op == TOK.cast_ && (cast(UnaExp)e2x).e1.isLvalue() ||
e2x.op != TOK.slice && e2x.isLvalue()))
{
if (exp.e1.checkPostblit(sc, t1.nextOf()))
return setError();
}
if (0 && global.params.warnings != DiagnosticReporting.off && !global.gag && exp.op == TOK.assign &&
e2x.op != TOK.slice && e2x.op != TOK.assign &&
e2x.op != TOK.arrayLiteral && e2x.op != TOK.string_ &&
!(e2x.op == TOK.add || e2x.op == TOK.min ||
e2x.op == TOK.mul || e2x.op == TOK.div ||
e2x.op == TOK.mod || e2x.op == TOK.xor ||
e2x.op == TOK.and || e2x.op == TOK.or ||
e2x.op == TOK.pow ||
e2x.op == TOK.tilde || e2x.op == TOK.negate))
{
const(char)* e1str = exp.e1.toChars();
const(char)* e2str = e2x.toChars();
exp.warning("explicit element-wise assignment `%s = (%s)[]` is better than `%s = %s`", e1str, e2str, e1str, e2str);
}
Type t2n = t2.nextOf();
Type t1n = t1.nextOf();
int offset;
if (t2n.equivalent(t1n) ||
t1n.isBaseOf(t2n, &offset) && offset == 0)
{
/* Allow copy of distinct qualifier elements.
* eg.
* char[] dst; const(char)[] src;
* dst[] = src;
*
* class C {} class D : C {}
* C[2] ca; D[] da;
* ca[] = da;
*/
if (isArrayOpValid(e2x))
{
// Don't add CastExp to keep AST for array operations
e2x = e2x.copy();
e2x.type = exp.e1.type.constOf();
}
else
e2x = e2x.castTo(sc, exp.e1.type.constOf());
}
else
{
/* https://issues.dlang.org/show_bug.cgi?id=15778
* A string literal has an array type of immutable
* elements by default, and normally it cannot be convertible to
* array type of mutable elements. But for element-wise assignment,
* elements need to be const at best. So we should give a chance
* to change code unit size for polysemous string literal.
*/
if (e2x.op == TOK.string_)
e2x = e2x.implicitCastTo(sc, exp.e1.type.constOf());
else
e2x = e2x.implicitCastTo(sc, exp.e1.type);
}
if (t1n.toBasetype.ty == Tvoid && t2n.toBasetype.ty == Tvoid)
{
if (!sc.intypeof && sc.func && !(sc.flags & SCOPE.debug_) && sc.func.setUnsafe())
{
exp.error("cannot copy `void[]` to `void[]` in `@safe` code");
return setError();
}
}
}
else
{
if (0 && global.params.warnings != DiagnosticReporting.off && !global.gag && exp.op == TOK.assign &&
t1.ty == Tarray && t2.ty == Tsarray &&
e2x.op != TOK.slice &&
t2.implicitConvTo(t1))
{
// Disallow ar[] = sa (Converted to ar[] = sa[])
// Disallow da = sa (Converted to da = sa[])
const(char)* e1str = exp.e1.toChars();
const(char)* e2str = e2x.toChars();
const(char)* atypestr = exp.e1.op == TOK.slice ? "element-wise" : "slice";
exp.warning("explicit %s assignment `%s = (%s)[]` is better than `%s = %s`", atypestr, e1str, e2str, e1str, e2str);
}
if (exp.op == TOK.blit)
e2x = e2x.castTo(sc, exp.e1.type);
else
{
e2x = e2x.implicitCastTo(sc, exp.e1.type);
// Fix Issue 13435: https://issues.dlang.org/show_bug.cgi?id=13435
// If the implicit cast has failed and the assign expression is
// the initialization of a struct member field
if (e2x.op == TOK.error && exp.op == TOK.construct && t1.ty == Tstruct)
{
scope sd = (cast(TypeStruct)t1).sym;
Dsymbol opAssign = search_function(sd, Id.assign);
// and the struct defines an opAssign
if (opAssign)
{
// offer more information about the cause of the problem
errorSupplemental(exp.loc,
"`%s` is the first assignment of `%s` therefore it represents its initialization",
exp.toChars(), exp.e1.toChars());
errorSupplemental(exp.loc,
"`opAssign` methods are not used for initialization, but for subsequent assignments");
}
}
}
}
if (e2x.op == TOK.error)
{
result = e2x;
return;
}
exp.e2 = e2x;
t2 = exp.e2.type.toBasetype();
/* Look for array operations
*/
if ((t2.ty == Tarray || t2.ty == Tsarray) && isArrayOpValid(exp.e2))
{
// Look for valid array operations
if (exp.memset != MemorySet.blockAssign &&
exp.e1.op == TOK.slice &&
(isUnaArrayOp(exp.e2.op) || isBinArrayOp(exp.e2.op)))
{
exp.type = exp.e1.type;
if (exp.op == TOK.construct) // https://issues.dlang.org/show_bug.cgi?id=10282
// tweak mutability of e1 element
exp.e1.type = exp.e1.type.nextOf().mutableOf().arrayOf();
result = arrayOp(exp, sc);
return;
}
// Drop invalid array operations in e2
// d = a[] + b[], d = (a[] + b[])[0..2], etc
if (checkNonAssignmentArrayOp(exp.e2, exp.memset != MemorySet.blockAssign && exp.op == TOK.assign))
return setError();
// Remains valid array assignments
// d = d[], d = [1,2,3], etc
}
/* Don't allow assignment to classes that were allocated on the stack with:
* scope Class c = new Class();
*/
if (exp.e1.op == TOK.variable && exp.op == TOK.assign)
{
VarExp ve = cast(VarExp)exp.e1;
VarDeclaration vd = ve.var.isVarDeclaration();
if (vd && (vd.onstack || vd.mynew))
{
assert(t1.ty == Tclass);
exp.error("cannot rebind scope variables");
}
}
if (exp.e1.op == TOK.variable && (cast(VarExp)exp.e1).var.ident == Id.ctfe)
{
exp.error("cannot modify compiler-generated variable `__ctfe`");
}
exp.type = exp.e1.type;
assert(exp.type);
auto res = exp.op == TOK.assign ? exp.reorderSettingAAElem(sc) : exp;
checkAssignEscape(sc, res, false);
return setResult(res);
}
override void visit(PowAssignExp exp)
{
if (exp.type)
{
result = exp;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.checkReadModifyWrite(exp.op, exp.e2))
return setError();
assert(exp.e1.type && exp.e2.type);
if (exp.e1.op == TOK.slice || exp.e1.type.ty == Tarray || exp.e1.type.ty == Tsarray)
{
if (checkNonAssignmentArrayOp(exp.e1))
return setError();
// T[] ^^= ...
if (exp.e2.implicitConvTo(exp.e1.type.nextOf()))
{
// T[] ^^= T
exp.e2 = exp.e2.castTo(sc, exp.e1.type.nextOf());
}
else if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
// Check element types are arithmetic
Type tb1 = exp.e1.type.nextOf().toBasetype();
Type tb2 = exp.e2.type.toBasetype();
if (tb2.ty == Tarray || tb2.ty == Tsarray)
tb2 = tb2.nextOf().toBasetype();
if ((tb1.isintegral() || tb1.isfloating()) && (tb2.isintegral() || tb2.isfloating()))
{
exp.type = exp.e1.type;
result = arrayOp(exp, sc);
return;
}
}
else
{
exp.e1 = exp.e1.modifiableLvalue(sc, exp.e1);
}
if ((exp.e1.type.isintegral() || exp.e1.type.isfloating()) && (exp.e2.type.isintegral() || exp.e2.type.isfloating()))
{
Expression e0 = null;
e = exp.reorderSettingAAElem(sc);
e = Expression.extractLast(e, e0);
assert(e == exp);
if (exp.e1.op == TOK.variable)
{
// Rewrite: e1 = e1 ^^ e2
e = new PowExp(exp.loc, exp.e1.syntaxCopy(), exp.e2);
e = new AssignExp(exp.loc, exp.e1, e);
}
else
{
// Rewrite: ref tmp = e1; tmp = tmp ^^ e2
auto v = copyToTemp(STC.ref_, "__powtmp", exp.e1);
auto de = new DeclarationExp(exp.e1.loc, v);
auto ve = new VarExp(exp.e1.loc, v);
e = new PowExp(exp.loc, ve, exp.e2);
e = new AssignExp(exp.loc, new VarExp(exp.e1.loc, v), e);
e = new CommaExp(exp.loc, de, e);
}
e = Expression.combine(e0, e);
e = e.expressionSemantic(sc);
result = e;
return;
}
result = exp.incompatibleTypes();
}
override void visit(CatAssignExp exp)
{
if (exp.type)
{
result = exp;
return;
}
//printf("CatAssignExp::semantic() %s\n", exp.toChars());
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.op == TOK.slice)
{
SliceExp se = cast(SliceExp)exp.e1;
if (se.e1.type.toBasetype().ty == Tsarray)
{
exp.error("cannot append to static array `%s`", se.e1.type.toChars());
return setError();
}
}
exp.e1 = exp.e1.modifiableLvalue(sc, exp.e1);
if (exp.e1.op == TOK.error)
{
result = exp.e1;
return;
}
if (exp.e2.op == TOK.error)
{
result = exp.e2;
return;
}
if (checkNonAssignmentArrayOp(exp.e2))
return setError();
Type tb1 = exp.e1.type.toBasetype();
Type tb1next = tb1.nextOf();
Type tb2 = exp.e2.type.toBasetype();
/* Possibilities:
* TOK.concatenateAssign: appending T[] to T[]
* TOK.concatenateElemAssign: appending T to T[]
* TOK.concatenateDcharAssign: appending dchar to T[]
*/
if ((tb1.ty == Tarray) &&
(tb2.ty == Tarray || tb2.ty == Tsarray) &&
(exp.e2.implicitConvTo(exp.e1.type) ||
(tb2.nextOf().implicitConvTo(tb1next) &&
(tb2.nextOf().size(Loc.initial) == tb1next.size(Loc.initial)))))
{
// TOK.concatenateAssign
assert(exp.op == TOK.concatenateAssign);
if (exp.e1.checkPostblit(sc, tb1next))
return setError();
exp.e2 = exp.e2.castTo(sc, exp.e1.type);
}
else if ((tb1.ty == Tarray) && exp.e2.implicitConvTo(tb1next))
{
/* https://issues.dlang.org/show_bug.cgi?id=19782
*
* If e2 is implicitly convertible to tb1next, the conversion
* might be done through alias this, in which case, e2 needs to
* be modified accordingly (e2 => e2.aliasthis).
*/
if (tb2.ty == Tstruct && (cast(TypeStruct)tb2).implicitConvToThroughAliasThis(tb1next))
goto Laliasthis;
if (tb2.ty == Tclass && (cast(TypeClass)tb2).implicitConvToThroughAliasThis(tb1next))
goto Laliasthis;
// Append element
if (exp.e2.checkPostblit(sc, tb2))
return setError();
if (checkNewEscape(sc, exp.e2, false))
return setError();
exp = new CatElemAssignExp(exp.loc, exp.type, exp.e1, exp.e2.castTo(sc, tb1next));
exp.e2 = doCopyOrMove(sc, exp.e2);
}
else if (tb1.ty == Tarray &&
(tb1next.ty == Tchar || tb1next.ty == Twchar) &&
exp.e2.type.ty != tb1next.ty &&
exp.e2.implicitConvTo(Type.tdchar))
{
// Append dchar to char[] or wchar[]
exp = new CatDcharAssignExp(exp.loc, exp.type, exp.e1, exp.e2.castTo(sc, Type.tdchar));
/* Do not allow appending wchar to char[] because if wchar happens
* to be a surrogate pair, nothing good can result.
*/
}
else
{
// Try alias this on first operand
static Expression tryAliasThisForLhs(BinAssignExp exp, Scope* sc)
{
AggregateDeclaration ad1 = isAggregate(exp.e1.type);
if (!ad1 || !ad1.aliasthis)
return null;
/* Rewrite (e1 op e2) as:
* (e1.aliasthis op e2)
*/
if (exp.att1 && exp.e1.type == exp.att1)
return null;
//printf("att %s e1 = %s\n", Token::toChars(e.op), e.e1.type.toChars());
Expression e1 = new DotIdExp(exp.loc, exp.e1, ad1.aliasthis.ident);
BinExp be = cast(BinExp)exp.copy();
if (!be.att1 && exp.e1.type.checkAliasThisRec())
be.att1 = exp.e1.type;
be.e1 = e1;
return be.trySemantic(sc);
}
// Try alias this on second operand
static Expression tryAliasThisForRhs(BinAssignExp exp, Scope* sc)
{
AggregateDeclaration ad2 = isAggregate(exp.e2.type);
if (!ad2 || !ad2.aliasthis)
return null;
/* Rewrite (e1 op e2) as:
* (e1 op e2.aliasthis)
*/
if (exp.att2 && exp.e2.type == exp.att2)
return null;
//printf("att %s e2 = %s\n", Token::toChars(e.op), e.e2.type.toChars());
Expression e2 = new DotIdExp(exp.loc, exp.e2, ad2.aliasthis.ident);
BinExp be = cast(BinExp)exp.copy();
if (!be.att2 && exp.e2.type.checkAliasThisRec())
be.att2 = exp.e2.type;
be.e2 = e2;
return be.trySemantic(sc);
}
Laliasthis:
result = tryAliasThisForLhs(exp, sc);
if (result)
return;
result = tryAliasThisForRhs(exp, sc);
if (result)
return;
exp.error("cannot append type `%s` to type `%s`", tb2.toChars(), tb1.toChars());
return setError();
}
if (exp.e2.checkValue() || exp.e2.checkSharedAccess(sc))
return setError();
exp.type = exp.e1.type;
auto res = exp.reorderSettingAAElem(sc);
if ((exp.op == TOK.concatenateElemAssign || exp.op == TOK.concatenateDcharAssign) && global.params.vsafe)
checkAssignEscape(sc, res, false);
result = res;
}
override void visit(AddExp exp)
{
static if (LOGSEMANTIC)
{
printf("AddExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
Type tb1 = exp.e1.type.toBasetype();
Type tb2 = exp.e2.type.toBasetype();
bool err = false;
if (tb1.ty == Tdelegate || tb1.ty == Tpointer && tb1.nextOf().ty == Tfunction)
{
err |= exp.e1.checkArithmetic() || exp.e1.checkSharedAccess(sc);
}
if (tb2.ty == Tdelegate || tb2.ty == Tpointer && tb2.nextOf().ty == Tfunction)
{
err |= exp.e2.checkArithmetic() || exp.e2.checkSharedAccess(sc);
}
if (err)
return setError();
if (tb1.ty == Tpointer && exp.e2.type.isintegral() || tb2.ty == Tpointer && exp.e1.type.isintegral())
{
result = scaleFactor(exp, sc);
return;
}
if (tb1.ty == Tpointer && tb2.ty == Tpointer)
{
result = exp.incompatibleTypes();
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
tb1 = exp.e1.type.toBasetype();
if (!target.isVectorOpSupported(tb1, exp.op, tb2))
{
result = exp.incompatibleTypes();
return;
}
if ((tb1.isreal() && exp.e2.type.isimaginary()) || (tb1.isimaginary() && exp.e2.type.isreal()))
{
switch (exp.type.toBasetype().ty)
{
case Tfloat32:
case Timaginary32:
exp.type = Type.tcomplex32;
break;
case Tfloat64:
case Timaginary64:
exp.type = Type.tcomplex64;
break;
case Tfloat80:
case Timaginary80:
exp.type = Type.tcomplex80;
break;
default:
assert(0);
}
}
result = exp;
}
override void visit(MinExp exp)
{
static if (LOGSEMANTIC)
{
printf("MinExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
Type t1 = exp.e1.type.toBasetype();
Type t2 = exp.e2.type.toBasetype();
bool err = false;
if (t1.ty == Tdelegate || t1.ty == Tpointer && t1.nextOf().ty == Tfunction)
{
err |= exp.e1.checkArithmetic() || exp.e1.checkSharedAccess(sc);
}
if (t2.ty == Tdelegate || t2.ty == Tpointer && t2.nextOf().ty == Tfunction)
{
err |= exp.e2.checkArithmetic() || exp.e2.checkSharedAccess(sc);
}
if (err)
return setError();
if (t1.ty == Tpointer)
{
if (t2.ty == Tpointer)
{
// https://dlang.org/spec/expression.html#add_expressions
// "If both operands are pointers, and the operator is -, the pointers are
// subtracted and the result is divided by the size of the type pointed to
// by the operands. It is an error if the pointers point to different types."
Type p1 = t1.nextOf();
Type p2 = t2.nextOf();
if (!p1.equivalent(p2))
{
// Deprecation to remain for at least a year, after which this should be
// changed to an error
// See https://github.com/dlang/dmd/pull/7332
deprecation(exp.loc,
"cannot subtract pointers to different types: `%s` and `%s`.",
t1.toChars(), t2.toChars());
}
// Need to divide the result by the stride
// Replace (ptr - ptr) with (ptr - ptr) / stride
d_int64 stride;
// make sure pointer types are compatible
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
exp.type = Type.tptrdiff_t;
stride = t2.nextOf().size();
if (stride == 0)
{
e = new IntegerExp(exp.loc, 0, Type.tptrdiff_t);
}
else
{
e = new DivExp(exp.loc, exp, new IntegerExp(Loc.initial, stride, Type.tptrdiff_t));
e.type = Type.tptrdiff_t;
}
}
else if (t2.isintegral())
e = scaleFactor(exp, sc);
else
{
exp.error("can't subtract `%s` from pointer", t2.toChars());
e = ErrorExp.get();
}
result = e;
return;
}
if (t2.ty == Tpointer)
{
exp.type = exp.e2.type;
exp.error("can't subtract pointer from `%s`", exp.e1.type.toChars());
return setError();
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
t1 = exp.e1.type.toBasetype();
t2 = exp.e2.type.toBasetype();
if (!target.isVectorOpSupported(t1, exp.op, t2))
{
result = exp.incompatibleTypes();
return;
}
if ((t1.isreal() && t2.isimaginary()) || (t1.isimaginary() && t2.isreal()))
{
switch (exp.type.ty)
{
case Tfloat32:
case Timaginary32:
exp.type = Type.tcomplex32;
break;
case Tfloat64:
case Timaginary64:
exp.type = Type.tcomplex64;
break;
case Tfloat80:
case Timaginary80:
exp.type = Type.tcomplex80;
break;
default:
assert(0);
}
}
result = exp;
return;
}
override void visit(CatExp exp)
{
// https://dlang.org/spec/expression.html#cat_expressions
//printf("CatExp.semantic() %s\n", toChars());
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
Type tb1 = exp.e1.type.toBasetype();
Type tb2 = exp.e2.type.toBasetype();
auto f1 = checkNonAssignmentArrayOp(exp.e1);
auto f2 = checkNonAssignmentArrayOp(exp.e2);
if (f1 || f2)
return setError();
/* BUG: Should handle things like:
* char c;
* c ~ ' '
* ' ' ~ c;
*/
Type tb1next = tb1.nextOf();
Type tb2next = tb2.nextOf();
// Check for: array ~ array
if (tb1next && tb2next && (tb1next.implicitConvTo(tb2next) >= MATCH.constant || tb2next.implicitConvTo(tb1next) >= MATCH.constant || exp.e1.op == TOK.arrayLiteral && exp.e1.implicitConvTo(tb2) || exp.e2.op == TOK.arrayLiteral && exp.e2.implicitConvTo(tb1)))
{
/* https://issues.dlang.org/show_bug.cgi?id=9248
* Here to avoid the case of:
* void*[] a = [cast(void*)1];
* void*[] b = [cast(void*)2];
* a ~ b;
* becoming:
* a ~ [cast(void*)b];
*/
/* https://issues.dlang.org/show_bug.cgi?id=14682
* Also to avoid the case of:
* int[][] a;
* a ~ [];
* becoming:
* a ~ cast(int[])[];
*/
goto Lpeer;
}
// Check for: array ~ element
if ((tb1.ty == Tsarray || tb1.ty == Tarray) && tb2.ty != Tvoid)
{
if (exp.e1.op == TOK.arrayLiteral)
{
exp.e2 = doCopyOrMove(sc, exp.e2);
// https://issues.dlang.org/show_bug.cgi?id=14686
// Postblit call appears in AST, and this is
// finally translated to an ArrayLiteralExp in below optimize().
}
else if (exp.e1.op == TOK.string_)
{
// No postblit call exists on character (integer) value.
}
else
{
if (exp.e2.checkPostblit(sc, tb2))
return setError();
// Postblit call will be done in runtime helper function
}
if (exp.e1.op == TOK.arrayLiteral && exp.e1.implicitConvTo(tb2.arrayOf()))
{
exp.e1 = exp.e1.implicitCastTo(sc, tb2.arrayOf());
exp.type = tb2.arrayOf();
goto L2elem;
}
if (exp.e2.implicitConvTo(tb1next) >= MATCH.convert)
{
exp.e2 = exp.e2.implicitCastTo(sc, tb1next);
exp.type = tb1next.arrayOf();
L2elem:
if (tb2.ty == Tarray || tb2.ty == Tsarray)
{
// Make e2 into [e2]
exp.e2 = new ArrayLiteralExp(exp.e2.loc, exp.type, exp.e2);
}
else if (checkNewEscape(sc, exp.e2, false))
return setError();
result = exp.optimize(WANTvalue);
return;
}
}
// Check for: element ~ array
if ((tb2.ty == Tsarray || tb2.ty == Tarray) && tb1.ty != Tvoid)
{
if (exp.e2.op == TOK.arrayLiteral)
{
exp.e1 = doCopyOrMove(sc, exp.e1);
}
else if (exp.e2.op == TOK.string_)
{
}
else
{
if (exp.e1.checkPostblit(sc, tb1))
return setError();
}
if (exp.e2.op == TOK.arrayLiteral && exp.e2.implicitConvTo(tb1.arrayOf()))
{
exp.e2 = exp.e2.implicitCastTo(sc, tb1.arrayOf());
exp.type = tb1.arrayOf();
goto L1elem;
}
if (exp.e1.implicitConvTo(tb2next) >= MATCH.convert)
{
exp.e1 = exp.e1.implicitCastTo(sc, tb2next);
exp.type = tb2next.arrayOf();
L1elem:
if (tb1.ty == Tarray || tb1.ty == Tsarray)
{
// Make e1 into [e1]
exp.e1 = new ArrayLiteralExp(exp.e1.loc, exp.type, exp.e1);
}
else if (checkNewEscape(sc, exp.e1, false))
return setError();
result = exp.optimize(WANTvalue);
return;
}
}
Lpeer:
if ((tb1.ty == Tsarray || tb1.ty == Tarray) && (tb2.ty == Tsarray || tb2.ty == Tarray) && (tb1next.mod || tb2next.mod) && (tb1next.mod != tb2next.mod))
{
Type t1 = tb1next.mutableOf().constOf().arrayOf();
Type t2 = tb2next.mutableOf().constOf().arrayOf();
if (exp.e1.op == TOK.string_ && !(cast(StringExp)exp.e1).committed)
exp.e1.type = t1;
else
exp.e1 = exp.e1.castTo(sc, t1);
if (exp.e2.op == TOK.string_ && !(cast(StringExp)exp.e2).committed)
exp.e2.type = t2;
else
exp.e2 = exp.e2.castTo(sc, t2);
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
exp.type = exp.type.toHeadMutable();
Type tb = exp.type.toBasetype();
if (tb.ty == Tsarray)
exp.type = tb.nextOf().arrayOf();
if (exp.type.ty == Tarray && tb1next && tb2next && tb1next.mod != tb2next.mod)
{
exp.type = exp.type.nextOf().toHeadMutable().arrayOf();
}
if (Type tbn = tb.nextOf())
{
if (exp.checkPostblit(sc, tbn))
return setError();
}
Type t1 = exp.e1.type.toBasetype();
Type t2 = exp.e2.type.toBasetype();
if ((t1.ty == Tarray || t1.ty == Tsarray) &&
(t2.ty == Tarray || t2.ty == Tsarray))
{
// Normalize to ArrayLiteralExp or StringExp as far as possible
e = exp.optimize(WANTvalue);
}
else
{
//printf("(%s) ~ (%s)\n", e1.toChars(), e2.toChars());
result = exp.incompatibleTypes();
return;
}
result = e;
}
override void visit(MulExp exp)
{
version (none)
{
printf("MulExp::semantic() %s\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (exp.checkArithmeticBin() || exp.checkSharedAccessBin(sc))
return setError();
if (exp.type.isfloating())
{
Type t1 = exp.e1.type;
Type t2 = exp.e2.type;
if (t1.isreal())
{
exp.type = t2;
}
else if (t2.isreal())
{
exp.type = t1;
}
else if (t1.isimaginary())
{
if (t2.isimaginary())
{
switch (t1.toBasetype().ty)
{
case Timaginary32:
exp.type = Type.tfloat32;
break;
case Timaginary64:
exp.type = Type.tfloat64;
break;
case Timaginary80:
exp.type = Type.tfloat80;
break;
default:
assert(0);
}
// iy * iv = -yv
exp.e1.type = exp.type;
exp.e2.type = exp.type;
e = new NegExp(exp.loc, exp);
e = e.expressionSemantic(sc);
result = e;
return;
}
else
exp.type = t2; // t2 is complex
}
else if (t2.isimaginary())
{
exp.type = t1; // t1 is complex
}
}
else if (!target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
result = exp;
}
override void visit(DivExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (exp.checkArithmeticBin() || exp.checkSharedAccessBin(sc))
return setError();
if (exp.type.isfloating())
{
Type t1 = exp.e1.type;
Type t2 = exp.e2.type;
if (t1.isreal())
{
exp.type = t2;
if (t2.isimaginary())
{
// x/iv = i(-x/v)
exp.e2.type = t1;
e = new NegExp(exp.loc, exp);
e = e.expressionSemantic(sc);
result = e;
return;
}
}
else if (t2.isreal())
{
exp.type = t1;
}
else if (t1.isimaginary())
{
if (t2.isimaginary())
{
switch (t1.toBasetype().ty)
{
case Timaginary32:
exp.type = Type.tfloat32;
break;
case Timaginary64:
exp.type = Type.tfloat64;
break;
case Timaginary80:
exp.type = Type.tfloat80;
break;
default:
assert(0);
}
}
else
exp.type = t2; // t2 is complex
}
else if (t2.isimaginary())
{
exp.type = t1; // t1 is complex
}
}
else if (!target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
result = exp;
}
override void visit(ModExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (!target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
if (exp.checkArithmeticBin() || exp.checkSharedAccessBin(sc))
return setError();
if (exp.type.isfloating())
{
exp.type = exp.e1.type;
if (exp.e2.type.iscomplex())
{
exp.error("cannot perform modulo complex arithmetic");
return setError();
}
}
result = exp;
}
override void visit(PowExp exp)
{
if (exp.type)
{
result = exp;
return;
}
//printf("PowExp::semantic() %s\n", toChars());
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (exp.checkArithmeticBin() || exp.checkSharedAccessBin(sc))
return setError();
if (!target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
// First, attempt to fold the expression.
e = exp.optimize(WANTvalue);
if (e.op != TOK.pow)
{
e = e.expressionSemantic(sc);
result = e;
return;
}
Module mmath = loadStdMath();
if (!mmath)
{
e.error("`%s` requires `std.math` for `^^` operators", e.toChars());
return setError();
}
e = new ScopeExp(exp.loc, mmath);
if (exp.e2.op == TOK.float64 && exp.e2.toReal() == CTFloat.half)
{
// Replace e1 ^^ 0.5 with .std.math.sqrt(e1)
e = new CallExp(exp.loc, new DotIdExp(exp.loc, e, Id._sqrt), exp.e1);
}
else
{
// Replace e1 ^^ e2 with .std.math.pow(e1, e2)
e = new CallExp(exp.loc, new DotIdExp(exp.loc, e, Id._pow), exp.e1, exp.e2);
}
e = e.expressionSemantic(sc);
result = e;
return;
}
override void visit(ShlExp exp)
{
//printf("ShlExp::semantic(), type = %p\n", type);
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.checkIntegralBin() || exp.checkSharedAccessBin(sc))
return setError();
if (!target.isVectorOpSupported(exp.e1.type.toBasetype(), exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
exp.e1 = integralPromotions(exp.e1, sc);
if (exp.e2.type.toBasetype().ty != Tvector)
exp.e2 = exp.e2.castTo(sc, Type.tshiftcnt);
exp.type = exp.e1.type;
result = exp;
}
override void visit(ShrExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.checkIntegralBin() || exp.checkSharedAccessBin(sc))
return setError();
if (!target.isVectorOpSupported(exp.e1.type.toBasetype(), exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
exp.e1 = integralPromotions(exp.e1, sc);
if (exp.e2.type.toBasetype().ty != Tvector)
exp.e2 = exp.e2.castTo(sc, Type.tshiftcnt);
exp.type = exp.e1.type;
result = exp;
}
override void visit(UshrExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.checkIntegralBin() || exp.checkSharedAccessBin(sc))
return setError();
if (!target.isVectorOpSupported(exp.e1.type.toBasetype(), exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
exp.e1 = integralPromotions(exp.e1, sc);
if (exp.e2.type.toBasetype().ty != Tvector)
exp.e2 = exp.e2.castTo(sc, Type.tshiftcnt);
exp.type = exp.e1.type;
result = exp;
}
override void visit(AndExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.type.toBasetype().ty == Tbool && exp.e2.type.toBasetype().ty == Tbool)
{
exp.type = exp.e1.type;
result = exp;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (!target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
if (exp.checkIntegralBin() || exp.checkSharedAccessBin(sc))
return setError();
result = exp;
}
override void visit(OrExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.type.toBasetype().ty == Tbool && exp.e2.type.toBasetype().ty == Tbool)
{
exp.type = exp.e1.type;
result = exp;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (!target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
if (exp.checkIntegralBin() || exp.checkSharedAccessBin(sc))
return setError();
result = exp;
}
override void visit(XorExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.type.toBasetype().ty == Tbool && exp.e2.type.toBasetype().ty == Tbool)
{
exp.type = exp.e1.type;
result = exp;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (!target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
if (exp.checkIntegralBin() || exp.checkSharedAccessBin(sc))
return setError();
result = exp;
}
override void visit(LogicalExp exp)
{
static if (LOGSEMANTIC)
{
printf("LogicalExp::semantic() %s\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
exp.setNoderefOperands();
Expression e1x = exp.e1.expressionSemantic(sc);
// for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684
if (e1x.op == TOK.type)
e1x = resolveAliasThis(sc, e1x);
e1x = resolveProperties(sc, e1x);
e1x = e1x.toBoolean(sc);
if (sc.flags & SCOPE.condition)
{
/* If in static if, don't evaluate e2 if we don't have to.
*/
e1x = e1x.optimize(WANTvalue);
if (e1x.isBool(exp.op == TOK.orOr))
{
result = IntegerExp.createBool(exp.op == TOK.orOr);
return;
}
}
CtorFlow ctorflow = sc.ctorflow.clone();
Expression e2x = exp.e2.expressionSemantic(sc);
sc.merge(exp.loc, ctorflow);
ctorflow.freeFieldinit();
// for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684
if (e2x.op == TOK.type)
e2x = resolveAliasThis(sc, e2x);
e2x = resolveProperties(sc, e2x);
auto f1 = checkNonAssignmentArrayOp(e1x);
auto f2 = checkNonAssignmentArrayOp(e2x);
if (f1 || f2)
return setError();
// Unless the right operand is 'void', the expression is converted to 'bool'.
if (e2x.type.ty != Tvoid)
e2x = e2x.toBoolean(sc);
if (e2x.op == TOK.type || e2x.op == TOK.scope_)
{
exp.error("`%s` is not an expression", exp.e2.toChars());
return setError();
}
if (e1x.op == TOK.error)
{
result = e1x;
return;
}
if (e2x.op == TOK.error)
{
result = e2x;
return;
}
// The result type is 'bool', unless the right operand has type 'void'.
if (e2x.type.ty == Tvoid)
exp.type = Type.tvoid;
else
exp.type = Type.tbool;
exp.e1 = e1x;
exp.e2 = e2x;
result = exp;
}
override void visit(CmpExp exp)
{
static if (LOGSEMANTIC)
{
printf("CmpExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
exp.setNoderefOperands();
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Type t1 = exp.e1.type.toBasetype();
Type t2 = exp.e2.type.toBasetype();
if (t1.ty == Tclass && exp.e2.op == TOK.null_ || t2.ty == Tclass && exp.e1.op == TOK.null_)
{
exp.error("do not use `null` when comparing class types");
return setError();
}
TOK cmpop;
if (auto e = exp.op_overload(sc, &cmpop))
{
if (!e.type.isscalar() && e.type.equals(exp.e1.type))
{
exp.error("recursive `opCmp` expansion");
return setError();
}
if (e.op == TOK.call)
{
e = new CmpExp(cmpop, exp.loc, e, IntegerExp.literal!0);
e = e.expressionSemantic(sc);
}
result = e;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
auto f1 = checkNonAssignmentArrayOp(exp.e1);
auto f2 = checkNonAssignmentArrayOp(exp.e2);
if (f1 || f2)
return setError();
exp.type = Type.tbool;
// Special handling for array comparisons
Expression arrayLowering = null;
t1 = exp.e1.type.toBasetype();
t2 = exp.e2.type.toBasetype();
if ((t1.ty == Tarray || t1.ty == Tsarray || t1.ty == Tpointer) && (t2.ty == Tarray || t2.ty == Tsarray || t2.ty == Tpointer))
{
Type t1next = t1.nextOf();
Type t2next = t2.nextOf();
if (t1next.implicitConvTo(t2next) < MATCH.constant && t2next.implicitConvTo(t1next) < MATCH.constant && (t1next.ty != Tvoid && t2next.ty != Tvoid))
{
exp.error("array comparison type mismatch, `%s` vs `%s`", t1next.toChars(), t2next.toChars());
return setError();
}
if ((t1.ty == Tarray || t1.ty == Tsarray) && (t2.ty == Tarray || t2.ty == Tsarray))
{
if (!verifyHookExist(exp.loc, *sc, Id.__cmp, "comparing arrays"))
return setError();
// Lower to object.__cmp(e1, e2)
Expression al = new IdentifierExp(exp.loc, Id.empty);
al = new DotIdExp(exp.loc, al, Id.object);
al = new DotIdExp(exp.loc, al, Id.__cmp);
al = al.expressionSemantic(sc);
auto arguments = new Expressions(2);
(*arguments)[0] = exp.e1;
(*arguments)[1] = exp.e2;
al = new CallExp(exp.loc, al, arguments);
al = new CmpExp(exp.op, exp.loc, al, IntegerExp.literal!0);
arrayLowering = al;
}
}
else if (t1.ty == Tstruct || t2.ty == Tstruct || (t1.ty == Tclass && t2.ty == Tclass))
{
if (t2.ty == Tstruct)
exp.error("need member function `opCmp()` for %s `%s` to compare", t2.toDsymbol(sc).kind(), t2.toChars());
else
exp.error("need member function `opCmp()` for %s `%s` to compare", t1.toDsymbol(sc).kind(), t1.toChars());
return setError();
}
else if (t1.iscomplex() || t2.iscomplex())
{
exp.error("compare not defined for complex operands");
return setError();
}
else if (t1.ty == Taarray || t2.ty == Taarray)
{
exp.error("`%s` is not defined for associative arrays", Token.toChars(exp.op));
return setError();
}
else if (!target.isVectorOpSupported(t1, exp.op, t2))
{
result = exp.incompatibleTypes();
return;
}
else
{
bool r1 = exp.e1.checkValue() || exp.e1.checkSharedAccess(sc);
bool r2 = exp.e2.checkValue() || exp.e2.checkSharedAccess(sc);
if (r1 || r2)
return setError();
}
//printf("CmpExp: %s, type = %s\n", e.toChars(), e.type.toChars());
if (arrayLowering)
{
arrayLowering = arrayLowering.expressionSemantic(sc);
result = arrayLowering;
return;
}
result = exp;
return;
}
override void visit(InExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
Type t2b = exp.e2.type.toBasetype();
switch (t2b.ty)
{
case Taarray:
{
TypeAArray ta = cast(TypeAArray)t2b;
// Special handling for array keys
if (!arrayTypeCompatibleWithoutCasting(exp.e1.type, ta.index))
{
// Convert key to type of key
exp.e1 = exp.e1.implicitCastTo(sc, ta.index);
}
semanticTypeInfo(sc, ta.index);
// Return type is pointer to value
exp.type = ta.nextOf().pointerTo();
break;
}
case Terror:
return setError();
default:
result = exp.incompatibleTypes();
return;
}
result = exp;
}
override void visit(RemoveExp e)
{
if (Expression ex = binSemantic(e, sc))
{
result = ex;
return;
}
result = e;
}
override void visit(EqualExp exp)
{
//printf("EqualExp::semantic('%s')\n", exp.toChars());
if (exp.type)
{
result = exp;
return;
}
exp.setNoderefOperands();
if (auto e = binSemanticProp(exp, sc))
{
result = e;
return;
}
if (exp.e1.op == TOK.type || exp.e2.op == TOK.type)
{
/* https://issues.dlang.org/show_bug.cgi?id=12520
* empty tuples are represented as types so special cases are added
* so that they can be compared for equality with tuples of values.
*/
static auto extractTypeTupAndExpTup(Expression e)
{
static struct Result { bool ttEmpty; bool te; }
auto tt = e.op == TOK.type ? e.isTypeExp().type.isTypeTuple() : null;
return Result(tt && (!tt.arguments || !tt.arguments.dim), e.isTupleExp() !is null);
}
auto tups1 = extractTypeTupAndExpTup(exp.e1);
auto tups2 = extractTypeTupAndExpTup(exp.e2);
// AliasSeq!() == AliasSeq!(<at least a value>)
if (tups1.ttEmpty && tups2.te)
{
result = IntegerExp.createBool(exp.op != TOK.equal);
return;
}
// AliasSeq!(<at least a value>) == AliasSeq!()
else if (tups1.te && tups2.ttEmpty)
{
result = IntegerExp.createBool(exp.op != TOK.equal);
return;
}
// AliasSeq!() == AliasSeq!()
else if (tups1.ttEmpty && tups2.ttEmpty)
{
result = IntegerExp.createBool(exp.op == TOK.equal);
return;
}
// otherwise, two types are really not comparable
result = exp.incompatibleTypes();
return;
}
{
auto t1 = exp.e1.type;
auto t2 = exp.e2.type;
if (t1.ty == Tenum && t2.ty == Tenum && !t1.equivalent(t2))
exp.error("Comparison between different enumeration types `%s` and `%s`; If this behavior is intended consider using `std.conv.asOriginalType`",
t1.toChars(), t2.toChars());
}
/* Before checking for operator overloading, check to see if we're
* comparing the addresses of two statics. If so, we can just see
* if they are the same symbol.
*/
if (exp.e1.op == TOK.address && exp.e2.op == TOK.address)
{
AddrExp ae1 = cast(AddrExp)exp.e1;
AddrExp ae2 = cast(AddrExp)exp.e2;
if (ae1.e1.op == TOK.variable && ae2.e1.op == TOK.variable)
{
VarExp ve1 = cast(VarExp)ae1.e1;
VarExp ve2 = cast(VarExp)ae2.e1;
if (ve1.var == ve2.var)
{
// They are the same, result is 'true' for ==, 'false' for !=
result = IntegerExp.createBool(exp.op == TOK.equal);
return;
}
}
}
Type t1 = exp.e1.type.toBasetype();
Type t2 = exp.e2.type.toBasetype();
// Indicates whether the comparison of the 2 specified array types
// requires an object.__equals() lowering.
static bool needsDirectEq(Type t1, Type t2, Scope* sc)
{
Type t1n = t1.nextOf().toBasetype();
Type t2n = t2.nextOf().toBasetype();
if ((t1n.ty.isSomeChar && t2n.ty.isSomeChar) ||
(t1n.ty == Tvoid || t2n.ty == Tvoid))
{
return false;
}
if (t1n.constOf() != t2n.constOf())
return true;
Type t = t1n;
while (t.toBasetype().nextOf())
t = t.nextOf().toBasetype();
if (auto ts = t.isTypeStruct())
{
// semanticTypeInfo() makes sure hasIdentityEquals has been computed
if (global.params.useTypeInfo && Type.dtypeinfo)
semanticTypeInfo(sc, ts);
return ts.sym.hasIdentityEquals; // has custom opEquals
}
return false;
}
if (auto e = exp.op_overload(sc))
{
result = e;
return;
}
const isArrayComparison = (t1.ty == Tarray || t1.ty == Tsarray) &&
(t2.ty == Tarray || t2.ty == Tsarray);
const needsArrayLowering = isArrayComparison && needsDirectEq(t1, t2, sc);
if (!needsArrayLowering)
{
if (auto e = typeCombine(exp, sc))
{
result = e;
return;
}
}
auto f1 = checkNonAssignmentArrayOp(exp.e1);
auto f2 = checkNonAssignmentArrayOp(exp.e2);
if (f1 || f2)
return setError();
exp.type = Type.tbool;
if (!isArrayComparison)
{
if (exp.e1.type != exp.e2.type && exp.e1.type.isfloating() && exp.e2.type.isfloating())
{
// Cast both to complex
exp.e1 = exp.e1.castTo(sc, Type.tcomplex80);
exp.e2 = exp.e2.castTo(sc, Type.tcomplex80);
}
}
// lower some array comparisons to object.__equals(e1, e2)
if (needsArrayLowering || (t1.ty == Tarray && t2.ty == Tarray))
{
//printf("Lowering to __equals %s %s\n", exp.e1.toChars(), exp.e2.toChars());
if (!verifyHookExist(exp.loc, *sc, Id.__equals, "equal checks on arrays"))
return setError();
Expression __equals = new IdentifierExp(exp.loc, Id.empty);
Identifier id = Identifier.idPool("__equals");
__equals = new DotIdExp(exp.loc, __equals, Id.object);
__equals = new DotIdExp(exp.loc, __equals, id);
auto arguments = new Expressions(2);
(*arguments)[0] = exp.e1;
(*arguments)[1] = exp.e2;
__equals = new CallExp(exp.loc, __equals, arguments);
if (exp.op == TOK.notEqual)
{
__equals = new NotExp(exp.loc, __equals);
}
__equals = __equals.trySemantic(sc); // for better error message
if (!__equals)
{
exp.error("incompatible types for array comparison: `%s` and `%s`",
exp.e1.type.toChars(), exp.e2.type.toChars());
__equals = ErrorExp.get();
}
result = __equals;
return;
}
if (exp.e1.type.toBasetype().ty == Taarray)
semanticTypeInfo(sc, exp.e1.type.toBasetype());
if (!target.isVectorOpSupported(t1, exp.op, t2))
{
result = exp.incompatibleTypes();
return;
}
result = exp;
}
override void visit(IdentityExp exp)
{
if (exp.type)
{
result = exp;
return;
}
exp.setNoderefOperands();
if (auto e = binSemanticProp(exp, sc))
{
result = e;
return;
}
if (auto e = typeCombine(exp, sc))
{
result = e;
return;
}
auto f1 = checkNonAssignmentArrayOp(exp.e1);
auto f2 = checkNonAssignmentArrayOp(exp.e2);
if (f1 || f2)
return setError();
if (exp.e1.op == TOK.type || exp.e2.op == TOK.type)
{
result = exp.incompatibleTypes();
return;
}
exp.type = Type.tbool;
if (exp.e1.type != exp.e2.type && exp.e1.type.isfloating() && exp.e2.type.isfloating())
{
// Cast both to complex
exp.e1 = exp.e1.castTo(sc, Type.tcomplex80);
exp.e2 = exp.e2.castTo(sc, Type.tcomplex80);
}
auto tb1 = exp.e1.type.toBasetype();
auto tb2 = exp.e2.type.toBasetype();
if (!target.isVectorOpSupported(tb1, exp.op, tb2))
{
result = exp.incompatibleTypes();
return;
}
if (exp.e1.op == TOK.call)
exp.e1 = (cast(CallExp)exp.e1).addDtorHook(sc);
if (exp.e2.op == TOK.call)
exp.e2 = (cast(CallExp)exp.e2).addDtorHook(sc);
if (exp.e1.type.toBasetype().ty == Tsarray ||
exp.e2.type.toBasetype().ty == Tsarray)
exp.deprecation("identity comparison of static arrays "
~ "implicitly coerces them to slices, "
~ "which are compared by reference");
result = exp;
}
override void visit(CondExp exp)
{
static if (LOGSEMANTIC)
{
printf("CondExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (exp.econd.op == TOK.dotIdentifier)
(cast(DotIdExp)exp.econd).noderef = true;
Expression ec = exp.econd.expressionSemantic(sc);
ec = resolveProperties(sc, ec);
ec = ec.toBoolean(sc);
CtorFlow ctorflow_root = sc.ctorflow.clone();
Expression e1x = exp.e1.expressionSemantic(sc);
e1x = resolveProperties(sc, e1x);
CtorFlow ctorflow1 = sc.ctorflow;
sc.ctorflow = ctorflow_root;
Expression e2x = exp.e2.expressionSemantic(sc);
e2x = resolveProperties(sc, e2x);
sc.merge(exp.loc, ctorflow1);
ctorflow1.freeFieldinit();
if (ec.op == TOK.error)
{
result = ec;
return;
}
if (ec.type == Type.terror)
return setError();
exp.econd = ec;
if (e1x.op == TOK.error)
{
result = e1x;
return;
}
if (e1x.type == Type.terror)
return setError();
exp.e1 = e1x;
if (e2x.op == TOK.error)
{
result = e2x;
return;
}
if (e2x.type == Type.terror)
return setError();
exp.e2 = e2x;
auto f0 = checkNonAssignmentArrayOp(exp.econd);
auto f1 = checkNonAssignmentArrayOp(exp.e1);
auto f2 = checkNonAssignmentArrayOp(exp.e2);
if (f0 || f1 || f2)
return setError();
Type t1 = exp.e1.type;
Type t2 = exp.e2.type;
// If either operand is void the result is void, we have to cast both
// the expression to void so that we explicitly discard the expression
// value if any
// https://issues.dlang.org/show_bug.cgi?id=16598
if (t1.ty == Tvoid || t2.ty == Tvoid)
{
exp.type = Type.tvoid;
exp.e1 = exp.e1.castTo(sc, exp.type);
exp.e2 = exp.e2.castTo(sc, exp.type);
}
else if (t1 == t2)
exp.type = t1;
else
{
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
switch (exp.e1.type.toBasetype().ty)
{
case Tcomplex32:
case Tcomplex64:
case Tcomplex80:
exp.e2 = exp.e2.castTo(sc, exp.e1.type);
break;
default:
break;
}
switch (exp.e2.type.toBasetype().ty)
{
case Tcomplex32:
case Tcomplex64:
case Tcomplex80:
exp.e1 = exp.e1.castTo(sc, exp.e2.type);
break;
default:
break;
}
if (exp.type.toBasetype().ty == Tarray)
{
exp.e1 = exp.e1.castTo(sc, exp.type);
exp.e2 = exp.e2.castTo(sc, exp.type);
}
}
exp.type = exp.type.merge2();
version (none)
{
printf("res: %s\n", exp.type.toChars());
printf("e1 : %s\n", exp.e1.type.toChars());
printf("e2 : %s\n", exp.e2.type.toChars());
}
/* https://issues.dlang.org/show_bug.cgi?id=14696
* If either e1 or e2 contain temporaries which need dtor,
* make them conditional.
* Rewrite:
* cond ? (__tmp1 = ..., __tmp1) : (__tmp2 = ..., __tmp2)
* to:
* (auto __cond = cond) ? (... __tmp1) : (... __tmp2)
* and replace edtors of __tmp1 and __tmp2 with:
* __tmp1.edtor --> __cond && __tmp1.dtor()
* __tmp2.edtor --> __cond || __tmp2.dtor()
*/
exp.hookDtors(sc);
result = exp;
}
override void visit(FileInitExp e)
{
//printf("FileInitExp::semantic()\n");
e.type = Type.tstring;
result = e;
}
override void visit(LineInitExp e)
{
e.type = Type.tint32;
result = e;
}
override void visit(ModuleInitExp e)
{
//printf("ModuleInitExp::semantic()\n");
e.type = Type.tstring;
result = e;
}
override void visit(FuncInitExp e)
{
//printf("FuncInitExp::semantic()\n");
e.type = Type.tstring;
if (sc.func)
{
result = e.resolveLoc(Loc.initial, sc);
return;
}
result = e;
}
override void visit(PrettyFuncInitExp e)
{
//printf("PrettyFuncInitExp::semantic()\n");
e.type = Type.tstring;
if (sc.func)
{
result = e.resolveLoc(Loc.initial, sc);
return;
}
result = e;
}
}
/**********************************
* Try to run semantic routines.
* If they fail, return NULL.
*/
Expression trySemantic(Expression exp, Scope* sc)
{
//printf("+trySemantic(%s)\n", exp.toChars());
uint errors = global.startGagging();
Expression e = expressionSemantic(exp, sc);
if (global.endGagging(errors))
{
e = null;
}
//printf("-trySemantic(%s)\n", exp.toChars());
return e;
}
/**************************
* Helper function for easy error propagation.
* If error occurs, returns ErrorExp. Otherwise returns NULL.
*/
Expression unaSemantic(UnaExp e, Scope* sc)
{
static if (LOGSEMANTIC)
{
printf("UnaExp::semantic('%s')\n", e.toChars());
}
Expression e1x = e.e1.expressionSemantic(sc);
if (e1x.op == TOK.error)
return e1x;
e.e1 = e1x;
return null;
}
/**************************
* Helper function for easy error propagation.
* If error occurs, returns ErrorExp. Otherwise returns NULL.
*/
Expression binSemantic(BinExp e, Scope* sc)
{
static if (LOGSEMANTIC)
{
printf("BinExp::semantic('%s')\n", e.toChars());
}
Expression e1x = e.e1.expressionSemantic(sc);
Expression e2x = e.e2.expressionSemantic(sc);
// for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684
if (e1x.op == TOK.type)
e1x = resolveAliasThis(sc, e1x);
if (e2x.op == TOK.type)
e2x = resolveAliasThis(sc, e2x);
if (e1x.op == TOK.error)
return e1x;
if (e2x.op == TOK.error)
return e2x;
e.e1 = e1x;
e.e2 = e2x;
return null;
}
Expression binSemanticProp(BinExp e, Scope* sc)
{
if (Expression ex = binSemantic(e, sc))
return ex;
Expression e1x = resolveProperties(sc, e.e1);
Expression e2x = resolveProperties(sc, e.e2);
if (e1x.op == TOK.error)
return e1x;
if (e2x.op == TOK.error)
return e2x;
e.e1 = e1x;
e.e2 = e2x;
return null;
}
// entrypoint for semantic ExpressionSemanticVisitor
extern (C++) Expression expressionSemantic(Expression e, Scope* sc)
{
scope v = new ExpressionSemanticVisitor(sc);
e.accept(v);
return v.result;
}
Expression semanticX(DotIdExp exp, Scope* sc)
{
//printf("DotIdExp::semanticX(this = %p, '%s')\n", this, toChars());
if (Expression ex = unaSemantic(exp, sc))
return ex;
if (exp.ident == Id._mangleof)
{
// symbol.mangleof
Dsymbol ds;
switch (exp.e1.op)
{
case TOK.scope_:
ds = (cast(ScopeExp)exp.e1).sds;
goto L1;
case TOK.variable:
ds = (cast(VarExp)exp.e1).var;
goto L1;
case TOK.dotVariable:
ds = (cast(DotVarExp)exp.e1).var;
goto L1;
case TOK.overloadSet:
ds = (cast(OverExp)exp.e1).vars;
goto L1;
case TOK.template_:
{
TemplateExp te = cast(TemplateExp)exp.e1;
ds = te.fd ? cast(Dsymbol)te.fd : te.td;
}
L1:
{
assert(ds);
if (auto f = ds.isFuncDeclaration())
{
if (f.checkForwardRef(exp.loc))
{
return ErrorExp.get();
}
if (f.flags & (FUNCFLAG.purityInprocess | FUNCFLAG.safetyInprocess |
FUNCFLAG.nothrowInprocess | FUNCFLAG.nogcInprocess))
{
f.error(exp.loc, "cannot retrieve its `.mangleof` while inferring attributes");
return ErrorExp.get();
}
}
OutBuffer buf;
mangleToBuffer(ds, &buf);
Expression e = new StringExp(exp.loc, buf.extractSlice());
e = e.expressionSemantic(sc);
return e;
}
default:
break;
}
}
if (exp.e1.op == TOK.variable && exp.e1.type.toBasetype().ty == Tsarray && exp.ident == Id.length)
{
// bypass checkPurity
return exp.e1.type.dotExp(sc, exp.e1, exp.ident, exp.noderef ? DotExpFlag.noDeref : 0);
}
if (exp.e1.op == TOK.dot)
{
}
else
{
exp.e1 = resolvePropertiesX(sc, exp.e1);
}
if (exp.e1.op == TOK.tuple && exp.ident == Id.offsetof)
{
/* 'distribute' the .offsetof to each of the tuple elements.
*/
TupleExp te = cast(TupleExp)exp.e1;
auto exps = new Expressions(te.exps.dim);
for (size_t i = 0; i < exps.dim; i++)
{
Expression e = (*te.exps)[i];
e = e.expressionSemantic(sc);
e = new DotIdExp(e.loc, e, Id.offsetof);
(*exps)[i] = e;
}
// Don't evaluate te.e0 in runtime
Expression e = new TupleExp(exp.loc, null, exps);
e = e.expressionSemantic(sc);
return e;
}
if (exp.e1.op == TOK.tuple && exp.ident == Id.length)
{
TupleExp te = cast(TupleExp)exp.e1;
// Don't evaluate te.e0 in runtime
Expression e = new IntegerExp(exp.loc, te.exps.dim, Type.tsize_t);
return e;
}
// https://issues.dlang.org/show_bug.cgi?id=14416
// Template has no built-in properties except for 'stringof'.
if ((exp.e1.op == TOK.dotTemplateDeclaration || exp.e1.op == TOK.template_) && exp.ident != Id.stringof)
{
exp.error("template `%s` does not have property `%s`", exp.e1.toChars(), exp.ident.toChars());
return ErrorExp.get();
}
if (!exp.e1.type)
{
exp.error("expression `%s` does not have property `%s`", exp.e1.toChars(), exp.ident.toChars());
return ErrorExp.get();
}
return exp;
}
// Resolve e1.ident without seeing UFCS.
// If flag == 1, stop "not a property" error and return NULL.
Expression semanticY(DotIdExp exp, Scope* sc, int flag)
{
//printf("DotIdExp::semanticY(this = %p, '%s')\n", exp, exp.toChars());
//{ static int z; fflush(stdout); if (++z == 10) *(char*)0=0; }
/* Special case: rewrite this.id and super.id
* to be classtype.id and baseclasstype.id
* if we have no this pointer.
*/
if ((exp.e1.op == TOK.this_ || exp.e1.op == TOK.super_) && !hasThis(sc))
{
if (AggregateDeclaration ad = sc.getStructClassScope())
{
if (exp.e1.op == TOK.this_)
{
exp.e1 = new TypeExp(exp.e1.loc, ad.type);
}
else
{
ClassDeclaration cd = ad.isClassDeclaration();
if (cd && cd.baseClass)
exp.e1 = new TypeExp(exp.e1.loc, cd.baseClass.type);
}
}
}
Expression e = semanticX(exp, sc);
if (e != exp)
return e;
Expression eleft;
Expression eright;
if (exp.e1.op == TOK.dot)
{
DotExp de = cast(DotExp)exp.e1;
eleft = de.e1;
eright = de.e2;
}
else
{
eleft = null;
eright = exp.e1;
}
Type t1b = exp.e1.type.toBasetype();
if (eright.op == TOK.scope_) // also used for template alias's
{
ScopeExp ie = cast(ScopeExp)eright;
int flags = SearchLocalsOnly;
/* Disable access to another module's private imports.
* The check for 'is sds our current module' is because
* the current module should have access to its own imports.
*/
if (ie.sds.isModule() && ie.sds != sc._module)
flags |= IgnorePrivateImports;
if (sc.flags & SCOPE.ignoresymbolvisibility)
flags |= IgnoreSymbolVisibility;
Dsymbol s = ie.sds.search(exp.loc, exp.ident, flags);
/* Check for visibility before resolving aliases because public
* aliases to private symbols are public.
*/
if (s && !(sc.flags & SCOPE.ignoresymbolvisibility) && !symbolIsVisible(sc._module, s))
{
s = null;
}
if (s)
{
auto p = s.isPackage();
if (p && checkAccess(sc, p))
{
s = null;
}
}
if (s)
{
// if 's' is a tuple variable, the tuple is returned.
s = s.toAlias();
exp.checkDeprecated(sc, s);
exp.checkDisabled(sc, s);
EnumMember em = s.isEnumMember();
if (em)
{
return em.getVarExp(exp.loc, sc);
}
VarDeclaration v = s.isVarDeclaration();
if (v)
{
//printf("DotIdExp:: Identifier '%s' is a variable, type '%s'\n", toChars(), v.type.toChars());
if (!v.type ||
!v.type.deco && v.inuse)
{
if (v.inuse)
exp.error("circular reference to %s `%s`", v.kind(), v.toPrettyChars());
else
exp.error("forward reference to %s `%s`", v.kind(), v.toPrettyChars());
return ErrorExp.get();
}
if (v.type.ty == Terror)
return ErrorExp.get();
if ((v.storage_class & STC.manifest) && v._init && !exp.wantsym)
{
/* Normally, the replacement of a symbol with its initializer is supposed to be in semantic2().
* Introduced by https://github.com/dlang/dmd/pull/5588 which should probably
* be reverted. `wantsym` is the hack to work around the problem.
*/
if (v.inuse)
{
error(exp.loc, "circular initialization of %s `%s`", v.kind(), v.toPrettyChars());
return ErrorExp.get();
}
e = v.expandInitializer(exp.loc);
v.inuse++;
e = e.expressionSemantic(sc);
v.inuse--;
return e;
}
if (v.needThis())
{
if (!eleft)
eleft = new ThisExp(exp.loc);
e = new DotVarExp(exp.loc, eleft, v);
e = e.expressionSemantic(sc);
}
else
{
e = new VarExp(exp.loc, v);
if (eleft)
{
e = new CommaExp(exp.loc, eleft, e);
e.type = v.type;
}
}
e = e.deref();
return e.expressionSemantic(sc);
}
FuncDeclaration f = s.isFuncDeclaration();
if (f)
{
//printf("it's a function\n");
if (!f.functionSemantic())
return ErrorExp.get();
if (f.needThis())
{
if (!eleft)
eleft = new ThisExp(exp.loc);
e = new DotVarExp(exp.loc, eleft, f, true);
e = e.expressionSemantic(sc);
}
else
{
e = new VarExp(exp.loc, f, true);
if (eleft)
{
e = new CommaExp(exp.loc, eleft, e);
e.type = f.type;
}
}
return e;
}
if (auto td = s.isTemplateDeclaration())
{
if (eleft)
e = new DotTemplateExp(exp.loc, eleft, td);
else
e = new TemplateExp(exp.loc, td);
e = e.expressionSemantic(sc);
return e;
}
if (OverDeclaration od = s.isOverDeclaration())
{
e = new VarExp(exp.loc, od, true);
if (eleft)
{
e = new CommaExp(exp.loc, eleft, e);
e.type = Type.tvoid; // ambiguous type?
}
return e;
}
OverloadSet o = s.isOverloadSet();
if (o)
{
//printf("'%s' is an overload set\n", o.toChars());
return new OverExp(exp.loc, o);
}
if (auto t = s.getType())
{
return (new TypeExp(exp.loc, t)).expressionSemantic(sc);
}
TupleDeclaration tup = s.isTupleDeclaration();
if (tup)
{
if (eleft)
{
e = new DotVarExp(exp.loc, eleft, tup);
e = e.expressionSemantic(sc);
return e;
}
e = new TupleExp(exp.loc, tup);
e = e.expressionSemantic(sc);
return e;
}
ScopeDsymbol sds = s.isScopeDsymbol();
if (sds)
{
//printf("it's a ScopeDsymbol %s\n", ident.toChars());
e = new ScopeExp(exp.loc, sds);
e = e.expressionSemantic(sc);
if (eleft)
e = new DotExp(exp.loc, eleft, e);
return e;
}
Import imp = s.isImport();
if (imp)
{
ie = new ScopeExp(exp.loc, imp.pkg);
return ie.expressionSemantic(sc);
}
// BUG: handle other cases like in IdentifierExp::semantic()
debug
{
printf("s = '%s', kind = '%s'\n", s.toChars(), s.kind());
}
assert(0);
}
else if (exp.ident == Id.stringof)
{
e = new StringExp(exp.loc, ie.toString());
e = e.expressionSemantic(sc);
return e;
}
if (ie.sds.isPackage() || ie.sds.isImport() || ie.sds.isModule())
{
flag = 0;
}
if (flag)
return null;
s = ie.sds.search_correct(exp.ident);
if (s && symbolIsVisible(sc, s))
{
if (s.isPackage())
exp.error("undefined identifier `%s` in %s `%s`, perhaps add `static import %s;`", exp.ident.toChars(), ie.sds.kind(), ie.sds.toPrettyChars(), s.toPrettyChars());
else
exp.error("undefined identifier `%s` in %s `%s`, did you mean %s `%s`?", exp.ident.toChars(), ie.sds.kind(), ie.sds.toPrettyChars(), s.kind(), s.toChars());
}
else
exp.error("undefined identifier `%s` in %s `%s`", exp.ident.toChars(), ie.sds.kind(), ie.sds.toPrettyChars());
return ErrorExp.get();
}
else if (t1b.ty == Tpointer && exp.e1.type.ty != Tenum && exp.ident != Id._init && exp.ident != Id.__sizeof && exp.ident != Id.__xalignof && exp.ident != Id.offsetof && exp.ident != Id._mangleof && exp.ident != Id.stringof)
{
Type t1bn = t1b.nextOf();
if (flag)
{
AggregateDeclaration ad = isAggregate(t1bn);
if (ad && !ad.members) // https://issues.dlang.org/show_bug.cgi?id=11312
return null;
}
/* Rewrite:
* p.ident
* as:
* (*p).ident
*/
if (flag && t1bn.ty == Tvoid)
return null;
e = new PtrExp(exp.loc, exp.e1);
e = e.expressionSemantic(sc);
return e.type.dotExp(sc, e, exp.ident, flag | (exp.noderef ? DotExpFlag.noDeref : 0));
}
else
{
if (exp.e1.op == TOK.type || exp.e1.op == TOK.template_)
flag = 0;
e = exp.e1.type.dotExp(sc, exp.e1, exp.ident, flag | (exp.noderef ? DotExpFlag.noDeref : 0));
if (e)
e = e.expressionSemantic(sc);
return e;
}
}
// Resolve e1.ident!tiargs without seeing UFCS.
// If flag == 1, stop "not a property" error and return NULL.
Expression semanticY(DotTemplateInstanceExp exp, Scope* sc, int flag)
{
static if (LOGSEMANTIC)
{
printf("DotTemplateInstanceExpY::semantic('%s')\n", exp.toChars());
}
static Expression errorExp()
{
return ErrorExp.get();
}
Expression e1 = exp.e1;
if (exp.ti.tempdecl && exp.ti.tempdecl.parent && exp.ti.tempdecl.parent.isTemplateMixin())
{
// if 'ti.tempdecl' happens to be found in a mixin template don't lose that info
// and do the symbol search in that context (Issue: 19476)
auto tm = cast(TemplateMixin)exp.ti.tempdecl.parent;
e1 = new DotExp(exp.e1.loc, exp.e1, new ScopeExp(tm.loc, tm));
}
auto die = new DotIdExp(exp.loc, e1, exp.ti.name);
Expression e = die.semanticX(sc);
if (e == die)
{
exp.e1 = die.e1; // take back
Type t1b = exp.e1.type.toBasetype();
if (t1b.ty == Tarray || t1b.ty == Tsarray || t1b.ty == Taarray || t1b.ty == Tnull || (t1b.isTypeBasic() && t1b.ty != Tvoid))
{
/* No built-in type has templatized properties, so do shortcut.
* It is necessary in: 1024.max!"a < b"
*/
if (flag)
return null;
}
e = die.semanticY(sc, flag);
if (flag)
{
if (!e ||
isDotOpDispatch(e))
{
/* opDispatch!tiargs would be a function template that needs IFTI,
* so it's not a template
*/
return null;
}
}
}
assert(e);
if (e.op == TOK.error)
return e;
if (e.op == TOK.dotVariable)
{
DotVarExp dve = cast(DotVarExp)e;
if (FuncDeclaration fd = dve.var.isFuncDeclaration())
{
if (TemplateDeclaration td = fd.findTemplateDeclRoot())
{
e = new DotTemplateExp(dve.loc, dve.e1, td);
e = e.expressionSemantic(sc);
}
}
else if (OverDeclaration od = dve.var.isOverDeclaration())
{
exp.e1 = dve.e1; // pull semantic() result
if (!exp.findTempDecl(sc))
goto Lerr;
if (exp.ti.needsTypeInference(sc))
return exp;
exp.ti.dsymbolSemantic(sc);
if (!exp.ti.inst || exp.ti.errors) // if template failed to expand
return errorExp();
if (Declaration v = exp.ti.toAlias().isDeclaration())
{
if (v.type && !v.type.deco)
v.type = v.type.typeSemantic(v.loc, sc);
return new DotVarExp(exp.loc, exp.e1, v)
.expressionSemantic(sc);
}
return new DotExp(exp.loc, exp.e1, new ScopeExp(exp.loc, exp.ti))
.expressionSemantic(sc);
}
}
else if (e.op == TOK.variable)
{
VarExp ve = cast(VarExp)e;
if (FuncDeclaration fd = ve.var.isFuncDeclaration())
{
if (TemplateDeclaration td = fd.findTemplateDeclRoot())
{
e = new TemplateExp(ve.loc, td)
.expressionSemantic(sc);
}
}
else if (OverDeclaration od = ve.var.isOverDeclaration())
{
exp.ti.tempdecl = od;
return new ScopeExp(exp.loc, exp.ti)
.expressionSemantic(sc);
}
}
if (e.op == TOK.dotTemplateDeclaration)
{
DotTemplateExp dte = cast(DotTemplateExp)e;
exp.e1 = dte.e1; // pull semantic() result
exp.ti.tempdecl = dte.td;
if (!exp.ti.semanticTiargs(sc))
return errorExp();
if (exp.ti.needsTypeInference(sc))
return exp;
exp.ti.dsymbolSemantic(sc);
if (!exp.ti.inst || exp.ti.errors) // if template failed to expand
return errorExp();
if (Declaration v = exp.ti.toAlias().isDeclaration())
{
if (v.isFuncDeclaration() || v.isVarDeclaration())
{
return new DotVarExp(exp.loc, exp.e1, v)
.expressionSemantic(sc);
}
}
return new DotExp(exp.loc, exp.e1, new ScopeExp(exp.loc, exp.ti))
.expressionSemantic(sc);
}
else if (e.op == TOK.template_)
{
exp.ti.tempdecl = (cast(TemplateExp)e).td;
return new ScopeExp(exp.loc, exp.ti)
.expressionSemantic(sc);
}
else if (e.op == TOK.dot)
{
DotExp de = cast(DotExp)e;
if (de.e2.op == TOK.overloadSet)
{
if (!exp.findTempDecl(sc) || !exp.ti.semanticTiargs(sc))
{
return errorExp();
}
if (exp.ti.needsTypeInference(sc))
return exp;
exp.ti.dsymbolSemantic(sc);
if (!exp.ti.inst || exp.ti.errors) // if template failed to expand
return errorExp();
if (Declaration v = exp.ti.toAlias().isDeclaration())
{
if (v.type && !v.type.deco)
v.type = v.type.typeSemantic(v.loc, sc);
return new DotVarExp(exp.loc, exp.e1, v)
.expressionSemantic(sc);
}
return new DotExp(exp.loc, exp.e1, new ScopeExp(exp.loc, exp.ti))
.expressionSemantic(sc);
}
}
else if (e.op == TOK.overloadSet)
{
OverExp oe = cast(OverExp)e;
exp.ti.tempdecl = oe.vars;
return new ScopeExp(exp.loc, exp.ti)
.expressionSemantic(sc);
}
Lerr:
exp.error("`%s` isn't a template", e.toChars());
return errorExp();
}
/***************************************
* If expression is shared, check that we can access it.
* Give error message if not.
*
* Params:
* e = expression to check
* sc = context
* returnRef = Whether this expression is for a `return` statement
* off a `ref` function, in which case a single level
* of dereference is allowed (e.g. `shared(int)*`).
* Returns:
* true on error
*/
bool checkSharedAccess(Expression e, Scope* sc, bool returnRef = false)
{
if (!global.params.noSharedAccess ||
sc.intypeof ||
sc.flags & SCOPE.ctfe)
{
return false;
}
//printf("checkSharedAccess() %s\n", e.toChars());
static extern(C++) final class SharedCheckVisitor : SemanticTimeTransitiveVisitor
{
/// In case we don't know which expression triggered it,
/// e.g. for `visit(Type)` overload
Expression original;
/// Where the result is stored (`true` == error)
bool result;
/// Whether we should allow one level of dereferencing
bool allowRef;
/// Ctor
this(Expression oe, bool allowRef_)
{
this.original = oe;
this.allowRef = allowRef_;
}
void sharedError(Expression e)
{
// https://dlang.org/phobos/core_atomic.html
e.error("direct access to shared `%s` is not allowed, see `core.atomic`", e.toChars());
this.result = true;
}
/// Introduce base class overrides
alias visit = SemanticTimeTransitiveVisitor.visit;
// Error by default
override void visit(Expression e)
{
if (e.type.isShared())
this.sharedError(e);
}
/// Ditto
override void visit(Type t)
{
// Note: This handles things like `new shared(Throwable).msg`,
// where accessing `msg` would violate `shared`.
if (t.isShared())
this.sharedError(this.original);
}
// Those have no indirections / can be ignored
override void visit(ErrorExp e) {}
override void visit(ComplexExp e) {}
override void visit(IntegerExp e) {}
override void visit(NullExp e) {}
override void visit(VarExp e)
{
if (!this.allowRef && e.var.type.isShared())
this.sharedError(e);
}
override void visit(AddrExp e)
{
this.allowRef = true;
e.e1.accept(this);
}
override void visit(PtrExp e)
{
if (!this.allowRef && e.type.isShared())
return this.sharedError(e);
if (e.e1.type.isShared())
return this.sharedError(e);
this.allowRef = false;
e.e1.accept(this);
}
override void visit(DotVarExp e)
{
if (!this.allowRef && e.type.isShared())
return this.sharedError(e);
// Allow to use `DotVarExp` within value types
if (e.e1.type.ty == Tsarray || e.e1.type.ty == Tstruct)
return e.e1.accept(this);
// If we end up with a single `VarExp`, it might be a `ref` param
// `shared ref T` param == `shared(T)*`.
if (auto ve = e.e1.isVarExp())
{
this.allowRef = this.allowRef && (ve.var.storage_class & STC.ref_);
return e.e1.accept(this);
}
this.allowRef = false;
return e.e1.accept(this);
}
override void visit(IndexExp e)
{
if (!this.allowRef && e.type.isShared())
return this.sharedError(e);
if (e.e1.type.isShared())
return this.sharedError(e);
this.allowRef = false;
e.e1.accept(this);
}
override void visit(CommaExp e)
{
// Cannot be `return ref` since we can't use the return,
// but it's better to show that error than an unrelated `shared` one
this.allowRef = true;
e.e2.accept(this);
}
}
scope visitor = new SharedCheckVisitor(e, returnRef);
e.accept(visitor);
return visitor.result;
}
/****************************************************
* Determine if `exp`, which gets its address taken, can do so safely.
* Params:
* sc = context
* exp = expression having its address taken
* v = the variable getting its address taken
* Returns:
* `true` if ok, `false` for error
*/
bool checkAddressVar(Scope* sc, Expression exp, VarDeclaration v)
{
//printf("checkAddressVar(exp: %s, v: %s)\n", exp.toChars(), v.toChars());
if (v)
{
if (!v.canTakeAddressOf())
{
exp.error("cannot take address of `%s`", exp.toChars());
return false;
}
if (sc.func && !sc.intypeof && !v.isDataseg())
{
const(char)* p = v.isParameter() ? "parameter" : "local";
if (global.params.vsafe)
{
// Taking the address of v means it cannot be set to 'scope' later
v.storage_class &= ~STC.maybescope;
v.doNotInferScope = true;
if (exp.type.hasPointers() && v.storage_class & STC.scope_ &&
!(sc.flags & SCOPE.debug_) && sc.func.setUnsafe())
{
exp.error("cannot take address of `scope` %s `%s` in `@safe` function `%s`", p, v.toChars(), sc.func.toChars());
return false;
}
}
else if (!(sc.flags & SCOPE.debug_) &&
sc.func.setUnsafe())
{
exp.error("cannot take address of %s `%s` in `@safe` function `%s`", p, v.toChars(), sc.func.toChars());
return false;
}
}
}
return true;
}
/*******************************
* Checks the attributes of a function.
* Purity (`pure`), safety (`@safe`), no GC allocations(`@nogc`)
* and usage of `deprecated` and `@disabled`-ed symbols are checked.
*
* Params:
* exp = expression to check attributes for
* sc = scope of the function
* f = function to be checked
* Returns: `true` if error occur.
*/
private bool checkFunctionAttributes(Expression exp, Scope* sc, FuncDeclaration f)
{
with(exp)
{
bool error = checkDisabled(sc, f);
error |= checkDeprecated(sc, f);
error |= checkPurity(sc, f);
error |= checkSafety(sc, f);
error |= checkNogc(sc, f);
return error;
}
}
/*******************************
* Helper function for `getRightThis()`.
* Gets `this` of the next outer aggregate.
* Params:
* loc = location to use for error messages
* sc = context
* s = the parent symbol of the existing `this`
* ad = struct or class we need the correct `this` for
* e1 = existing `this`
* t = type of the existing `this`
* var = the specific member of ad we're accessing
* flag = if true, return `null` instead of throwing an error
* Returns:
* Expression representing the `this` for the var
*/
Expression getThisSkipNestedFuncs(const ref Loc loc, Scope* sc, Dsymbol s, AggregateDeclaration ad, Expression e1, Type t, Dsymbol var, bool flag = false)
{
int n = 0;
while (s && s.isFuncDeclaration())
{
FuncDeclaration f = s.isFuncDeclaration();
if (f.vthis)
{
n++;
e1 = new VarExp(loc, f.vthis);
if (f.isThis2)
{
// (*__this)[i]
if (n > 1)
e1 = e1.expressionSemantic(sc);
e1 = new PtrExp(loc, e1);
uint i = f.followInstantiationContext(ad);
e1 = new IndexExp(loc, e1, new IntegerExp(i));
s = f.toParentP(ad);
continue;
}
}
else
{
if (flag)
return null;
e1.error("need `this` of type `%s` to access member `%s` from static function `%s`", ad.toChars(), var.toChars(), f.toChars());
e1 = ErrorExp.get();
return e1;
}
s = s.toParent2();
}
if (n > 1 || e1.op == TOK.index)
e1 = e1.expressionSemantic(sc);
if (s && e1.type.equivalent(Type.tvoidptr))
{
if (auto sad = s.isAggregateDeclaration())
{
Type ta = sad.handleType();
if (ta.ty == Tstruct)
ta = ta.pointerTo();
e1.type = ta;
}
}
e1.type = e1.type.addMod(t.mod);
return e1;
}
/*******************************
* Make a dual-context container for use as a `this` argument.
* Params:
* loc = location to use for error messages
* sc = current scope
* fd = target function that will take the `this` argument
* Returns:
* Temporary closure variable.
* Note:
* The function `fd` is added to the nested references of the
* newly created variable such that a closure is made for the variable when
* the address of `fd` is taken.
*/
VarDeclaration makeThis2Argument(const ref Loc loc, Scope* sc, FuncDeclaration fd)
{
Type tthis2 = Type.tvoidptr.sarrayOf(2);
VarDeclaration vthis2 = new VarDeclaration(loc, tthis2, Identifier.generateId("__this"), null);
vthis2.storage_class |= STC.temp;
vthis2.dsymbolSemantic(sc);
vthis2.parent = sc.parent;
// make it a closure var
assert(sc.func);
sc.func.closureVars.push(vthis2);
// add `fd` to the nested refs
vthis2.nestedrefs.push(fd);
return vthis2;
}
/*******************************
* Make sure that the runtime hook `id` exists.
* Params:
* loc = location to use for error messages
* sc = current scope
* id = the hook identifier
* description = what the hook does
* module_ = what module the hook is located in
* Returns:
* a `bool` indicating if the hook is present.
*/
bool verifyHookExist(const ref Loc loc, ref Scope sc, Identifier id, string description, Identifier module_ = Id.object)
{
auto rootSymbol = sc.search(loc, Id.empty, null);
if (auto moduleSymbol = rootSymbol.search(loc, module_))
if (moduleSymbol.search(loc, id))
return true;
error(loc, "`%s.%s` not found. The current runtime does not support %.*s, or the runtime is corrupt.", module_.toChars(), id.toChars(), cast(int)description.length, description.ptr);
return false;
}
|
D
|
/***********************************************************************\
* commctrl.d *
* *
* Windows API header module *
* *
* Translated from MinGW API for MS-Windows 3.12 *
* *
* Placed into public domain *
\***********************************************************************/
module win32.commctrl;
pragma(lib, "comctl32");
private import win32.w32api, win32.windef, win32.winuser;
private import win32.winbase; // for SYSTEMTIME
private import win32.objfwd; // for LPSTREAM
import win32.prsht;
const COMCTL32_VERSION = 6;
const TCHAR[]
DRAGLISTMSGSTRING = "commctrl_DragListMsg",
HOTKEY_CLASS = "msctls_hotkey32",
PROGRESS_CLASS = "msctls_progress32",
STATUSCLASSNAME = "msctls_statusbar32",
TOOLBARCLASSNAME = "ToolbarWindow32",
TOOLTIPS_CLASS = "tooltips_class32",
TRACKBAR_CLASS = "msctls_trackbar32",
UPDOWN_CLASS = "msctls_updown32",
ANIMATE_CLASS = "SysAnimate32",
DATETIMEPICK_CLASS = "SysDateTimePick32",
MONTHCAL_CLASS = "SysMonthCal32",
REBARCLASSNAME = "ReBarWindow32",
WC_COMBOBOXEX = "ComboBoxEx32",
WC_IPADDRESS = "SysIPAddress32",
WC_LISTVIEW = "SysListView32",
WC_TABCONTROL = "SysTabControl32",
WC_TREEVIEW = "SysTreeView32",
WC_HEADER = "SysHeader32",
WC_PAGESCROLLER = "SysPager",
WC_NATIVEFONTCTL = "NativeFontCtl",
WC_BUTTON = "Button",
WC_STATIC = "Static",
WC_EDIT = "Edit",
WC_LISTBOX = "ListBox",
WC_COMBOBOX = "ComboBox",
WC_SCROLLBAR = "ScrollBar",
WC_LINKA = "SysLink";
enum {
LVM_FIRST = 0x1000,
TV_FIRST = 0x1100,
HDM_FIRST = 0x1200
}
enum {
ACM_OPENA = WM_USER + 100,
ACM_PLAY = WM_USER + 101,
ACM_STOP = WM_USER + 102,
ACM_OPENW = WM_USER + 103,
ACM_ISPLAYING = WM_USER + 104
}
enum {
ACN_START = 1,
ACN_STOP
}
enum {
CBEIF_TEXT = 0x00000001,
CBEIF_IMAGE = 0x00000002,
CBEIF_SELECTEDIMAGE = 0x00000004,
CBEIF_OVERLAY = 0x00000008,
CBEIF_INDENT = 0x00000010,
CBEIF_LPARAM = 0x00000020,
CBEIF_DI_SETITEM = 0x10000000
}
enum {
RBN_FIRST = -831U,
RBN_LAST = -859U,
MCN_FIRST = -750U,
MCN_LAST = -759U,
DTN_FIRST = -760U,
DTN_LAST = -799U,
CBEN_FIRST = -800U,
CBEN_LAST = -830U
}
enum {
CBEN_INSERTITEM = CBEN_FIRST - 1,
CBEN_DELETEITEM = CBEN_FIRST - 2,
CBEN_BEGINEDIT = CBEN_FIRST - 4,
CBEN_ENDEDITA = CBEN_FIRST - 5,
CBEN_ENDEDITW = CBEN_FIRST - 6
}
enum {
CBENF_KILLFOCUS = 1,
CBENF_RETURN,
CBENF_ESCAPE,
CBENF_DROPDOWN // = 4
}
const CBEMAXSTRLEN = 260;
enum {
DL_BEGINDRAG = 1157,
DL_CANCELDRAG = 1160,
DL_DRAGGING = 1158,
DL_DROPPED = 1159,
DL_CURSORSET = 0,
DL_STOPCURSOR = 1,
DL_COPYCURSOR = 2,
DL_MOVECURSOR = 3
}
enum {
CCS_TOP = 1,
CCS_NOMOVEY = 2,
CCS_BOTTOM = 3,
CCS_NORESIZE = 4,
CCS_NOPARENTALIGN = 8,
CCS_ADJUSTABLE = 32,
CCS_NODIVIDER = 64
}
static if (_WIN32_IE >= 0x300) {
enum {
CCS_VERT = 128,
CCS_LEFT = 129,
CCS_NOMOVEX = 130,
CCS_RIGHT = 131
}
}
enum {
ACS_CENTER = 0x0001,
ACS_TRANSPARENT = 0x0002,
ACS_AUTOPLAY = 0x0004,
ACS_TIMER = 0x0008
}
enum {
PGS_VERT = 0x00000000,
PGS_HORZ = 0x00000001,
PGS_AUTOSCROLL = 0x00000002,
PGS_DRAGNDROP = 0x00000004
}
const CMB_MASKED = 2;
const MINSYSCOMMAND = SC_SIZE;
enum {
SBT_OWNERDRAW = 0x1000,
SBT_NOBORDERS = 256,
SBT_POPOUT = 512,
SBT_RTLREADING = 1024
}
enum {
SB_SETTEXTA = WM_USER + 1,
SB_SETTEXTW = WM_USER + 11,
SB_GETTEXTA = WM_USER + 2,
SB_GETTEXTW = WM_USER + 13,
SB_GETTEXTLENGTHA = WM_USER + 3,
SB_GETTEXTLENGTHW = WM_USER + 12,
SB_SETPARTS = WM_USER + 4,
SB_GETPARTS = WM_USER + 6,
SB_GETBORDERS = WM_USER + 7,
SB_SETMINHEIGHT = WM_USER + 8,
SB_SIMPLE = WM_USER + 9,
SB_GETRECT = WM_USER + 10
}
enum {
MSGF_COMMCTRL_BEGINDRAG = 0x4200,
MSGF_COMMCTRL_SIZEHEADER = 0x4201,
MSGF_COMMCTRL_DRAGSELECT = 0x4202,
MSGF_COMMCTRL_TOOLBARCUST = 0x4203
}
enum {
ILC_COLOR = 0,
ILC_COLOR4 = 4,
ILC_COLOR8 = 8,
ILC_COLOR16 = 16,
ILC_COLOR24 = 24,
ILC_COLOR32 = 32,
ILC_COLORDDB = 254,
ILC_MASK = 1,
ILC_PALETTE = 2048
}
enum {
ILCF_MOVE,
ILCF_SWAP
}
enum {
ILS_NORMAL = 0,
ILS_GLOW = 1,
ILS_SHADOW = 2,
ILS_SATURATE = 4,
ILS_ALPHA = 8,
ILD_BLEND25 = 2,
ILD_BLEND50 = 4,
ILD_SELECTED = 4,
ILD_BLEND = 4,
ILD_FOCUS = 2,
ILD_MASK = 16,
ILD_NORMAL = 0,
ILD_TRANSPARENT = 1,
ILD_IMAGE = 0x0020,
ILD_ROP = 0x0040,
ILD_OVERLAYMASK = 0x0F00,
ILD_PRESERVEALPHA = 0x1000,
ILD_SCALE = 0x2000,
ILD_DPISCALE = 0x4000
}
enum {
HDS_HORZ = 0,
HDS_BUTTONS = 2,
HDS_HIDDEN = 8
}
static if (_WIN32_IE >= 0x400) {
enum {
HDS_HOTTRACK = 4,
HDS_DRAGDROP = 0x0040,
HDS_FULLDRAG = 0x0080
}
}
static if (_WIN32_IE >= 0x500) {
enum {
HDS_FILTERBAR = 0x0100
}
}
enum {
NM_FIRST = 0,
NM_LAST = -99U,
LVN_FIRST = -100U,
LVN_LAST = -199U,
HDN_FIRST = -300U,
HDN_LAST = -399U,
TVN_FIRST = -400U,
TVN_LAST = -499U,
TTN_FIRST = -520U,
TTN_LAST = -549U,
TCN_FIRST = -550U,
TCN_LAST = -580U,
CDN_FIRST = -601U, /* also in commdlg.h */
CDN_LAST = -699U,
TBN_FIRST = -700U,
TBN_LAST = -720U,
UDN_FIRST = -721U,
UDN_LAST = -740U
}
/*static if (_WIN32_IE >= 0x300) {
enum {
RBN_FIRST = -831U,
RBN_LAST = -859U,
MCN_FIRST = -750U,
MCN_LAST = -759U,
DTN_FIRST = -760U,
DTN_LAST = -799U,
CBEN_FIRST = -800U,
CBEN_LAST = -830U
}
}*/
static if (_WIN32_IE >= 0x400) {
enum {
IPN_FIRST = -860U,
IPN_LAST = -879U,
IPN_FIELDCHANGED = IPN_FIRST,
SBN_FIRST = -880U,
SBN_LAST = -899U,
PGN_FIRST = -900U,
PGN_LAST = -950U,
PGN_SCROLL = PGN_FIRST-1,
PGN_CALCSIZE = PGN_FIRST-2
}
}
static if (_WIN32_IE >= 0x500) {
enum {
WMN_FIRST = -1000U,
WMN_LAST = -1200U,
}
}
static if (_WIN32_WINNT >= 0x501)
{
enum {
BCN_FIRST = -1250U,
BCN_LAST = -1350U,
}
}
static if (_WIN32_WINNT >= 0x600)
{
enum {
TRBN_FIRST = -1501U,
TRBN_LAST = -1519U,
}
}
enum {
HDI_WIDTH = 1,
HDI_HEIGHT = 1,
HDI_TEXT = 2,
HDI_FORMAT = 4,
HDI_LPARAM = 8,
HDI_BITMAP = 16
}
static if (_WIN32_IE >= 0x300) {
enum {
HDI_IMAGE = 32,
HDI_DI_SETITEM = 64,
HDI_ORDER = 128
}
}
static if (_WIN32_IE >= 0x500) {
enum {
HDI_FILTER = 256
}
}
enum {
CBES_EX_NOEDITIMAGE = 0x00000001,
CBES_EX_NOEDITIMAGEINDENT = 0x00000002,
CBES_EX_PATHWORDBREAKPROC = 0x00000004
}
static if (_WIN32_IE >= 0x400) {
enum {
CBES_EX_NOSIZELIMIT = 0x00000008,
CBES_EX_CASESENSITIVE = 0x00000010,
CBEN_GETDISPINFOA = CBEN_FIRST - 0,
CBEN_GETDISPINFOW = CBEN_FIRST - 7,
CBEN_DRAGBEGINA = CBEN_FIRST - 8,
CBEN_DRAGBEGINW = CBEN_FIRST - 9
}
}
enum {
HDF_LEFT,
HDF_RIGHT,
HDF_CENTER,
HDF_JUSTIFYMASK,
HDF_RTLREADING, // = 4
HDF_OWNERDRAW = 0x8000,
HDF_STRING = 0x4000,
HDF_BITMAP = 0x2000
}
static if (_WIN32_IE >= 0x300) {
enum {
HDF_BITMAP_ON_RIGHT = 0x1000,
HDF_IMAGE = 0x0800
}
}
enum {
CCM_FIRST = 0x2000,
CCM_LAST = CCM_FIRST + 0x200,
CCM_SETBKCOLOR = 8193,
CCM_SETCOLORSCHEME = 8194,
CCM_GETCOLORSCHEME = 8195,
CCM_GETDROPTARGET = 8196,
CCM_SETUNICODEFORMAT = 8197,
CCM_GETUNICODEFORMAT = 8198,
CCM_SETVERSION = 0x2007,
CCM_GETVERSION = 0x2008,
CCM_SETNOTIFYWINDOW = 0x2009
}
enum {
HDM_GETITEMCOUNT = HDM_FIRST,
HDM_INSERTITEMA = HDM_FIRST + 1,
HDM_INSERTITEMW = HDM_FIRST + 10,
HDM_DELETEITEM = HDM_FIRST + 2,
HDM_GETITEMA = HDM_FIRST + 3,
HDM_GETITEMW = HDM_FIRST + 11,
HDM_SETITEMA = HDM_FIRST + 4,
HDM_SETITEMW = HDM_FIRST + 12,
HDM_LAYOUT = HDM_FIRST + 5
}
static if (_WIN32_IE >= 0x300) {
enum {
HDM_GETITEMRECT = HDM_FIRST + 7,
HDM_SETIMAGELIST = HDM_FIRST + 8,
HDM_GETIMAGELIST = HDM_FIRST + 9,
HDM_ORDERTOINDEX = HDM_FIRST + 15,
HDM_CREATEDRAGIMAGE = HDM_FIRST + 16,
HDM_GETORDERARRAY = HDM_FIRST + 17,
HDM_SETORDERARRAY = HDM_FIRST + 18,
HDM_SETHOTDIVIDER = HDM_FIRST + 19
}
}
static if (_WIN32_IE >= 0x400) {
enum {
HDM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT,
HDM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT
}
}
static if (_WIN32_IE >= 0x500) {
enum {
HDM_SETBITMAPMARGIN = HDM_FIRST + 20,
HDM_GETBITMAPMARGIN = HDM_FIRST + 21,
HDM_SETFILTERCHANGETIMEOUT = HDM_FIRST + 22,
HDM_EDITFILTER = HDM_FIRST + 23,
HDM_CLEARFILTER = HDM_FIRST + 24,
}
}
static if (_WIN32_IE >= 0x600) {
enum {
HDM_GETITEMDROPDOWNRECT = HDM_FIRST + 25,
HDM_GETOVERFLOWRECT = HDM_FIRST + 26,
HDM_GETFOCUSEDITEM = HDM_FIRST + 27,
HDM_SETFOCUSEDITEM = HDM_FIRST + 28,
}
}
enum {
HHT_NOWHERE = 1,
HHT_ONHEADER = 2,
HHT_ONDIVIDER = 4,
HHT_ONDIVOPEN = 8,
HHT_ABOVE = 256,
HHT_BELOW = 512,
HHT_TORIGHT = 1024,
HHT_TOLEFT = 2048
}
enum {
HDM_HITTEST = HDM_FIRST + 6
}
enum {
HDN_ITEMCHANGINGA = HDN_FIRST -0,
HDN_ITEMCHANGINGW = HDN_FIRST -20,
HDN_ITEMCHANGEDA = HDN_FIRST -1,
HDN_ITEMCHANGEDW = HDN_FIRST -21,
HDN_ITEMCLICKA = HDN_FIRST -2,
HDN_ITEMCLICKW = HDN_FIRST -22,
HDN_ITEMDBLCLICKA = HDN_FIRST -3,
HDN_ITEMDBLCLICKW = HDN_FIRST -23,
HDN_DIVIDERDBLCLICKA = HDN_FIRST -5,
HDN_DIVIDERDBLCLICKW = HDN_FIRST -25,
HDN_BEGINTRACKA = HDN_FIRST -6,
HDN_BEGINTRACKW = HDN_FIRST -26,
HDN_ENDTRACKA = HDN_FIRST -7,
HDN_ENDTRACKW = HDN_FIRST -27,
HDN_TRACKA = HDN_FIRST -8,
HDN_TRACKW = HDN_FIRST -28
}
static if (_WIN32_IE >= 0x300) {
enum {
HDN_ENDDRAG = (HDN_FIRST-11),
HDN_BEGINDRAG = (HDN_FIRST-10),
HDN_GETDISPINFOA = (HDN_FIRST-9),
HDN_GETDISPINFOW = (HDN_FIRST-29)
}
}
static if (_WIN32_IE >= 0x400) {
enum {
HICF_OTHER = 0x00,
HICF_MOUSE = 0x01,
HICF_ARROWKEYS = 0x02,
HICF_ACCELERATOR = 0x04,
HICF_DUPACCEL = 0x08,
HICF_ENTERING = 0x10,
HICF_LEAVING = 0x20,
HICF_RESELECT = 0x40,
HICF_LMOUSE = 0x80,
HICF_TOGGLEDROPDOWN = 0x100
}
}
enum {
IPM_CLEARADDRESS = WM_USER + 100,
IPM_SETADDRESS = WM_USER + 101,
IPM_GETADDRESS = WM_USER + 102,
IPM_SETRANGE = WM_USER + 103,
IPM_SETFOCUS = WM_USER + 104,
IPM_ISBLANK = WM_USER + 105
}
static if (_WIN32_IE >= 0x500) {
enum {
I_INDENTCALLBACK = -1,
I_IMAGENONE = -2
}
}
enum {
TBSTATE_CHECKED = 1,
TBSTATE_PRESSED = 2,
TBSTATE_ENABLED = 4,
TBSTATE_HIDDEN = 8,
TBSTATE_INDETERMINATE = 16,
TBSTATE_WRAP = 32
}
static if (_WIN32_IE >= 0x300) {
enum {
TBSTATE_ELLIPSES = 0x40
}
}
static if (_WIN32_IE >= 0x400) {
enum {
TBSTATE_MARKED = 0x0080
}
}
enum {
TBSTYLE_BUTTON = 0,
TBSTYLE_SEP = 1,
TBSTYLE_CHECK = 2,
TBSTYLE_GROUP = 4,
TBSTYLE_CHECKGROUP = TBSTYLE_GROUP | TBSTYLE_CHECK
}
static if (_WIN32_IE >= 0x300) {
enum {
TBSTYLE_DROPDOWN = 8
}
}
static if (_WIN32_IE >= 0x400) {
enum {
TBSTYLE_AUTOSIZE = 16,
TBSTYLE_NOPREFIX = 32
}
}
enum {
TBSTYLE_TOOLTIPS = 256,
TBSTYLE_WRAPABLE = 512,
TBSTYLE_ALTDRAG = 1024
}
static if (_WIN32_IE >= 0x300) {
enum {
TBSTYLE_FLAT = 2048,
TBSTYLE_LIST = 4096,
TBSTYLE_CUSTOMERASE = 8192
}
}
static if (_WIN32_IE >= 0x400) {
enum {
TBSTYLE_REGISTERDROP = 0x4000,
TBSTYLE_TRANSPARENT = 0x8000,
TBSTYLE_EX_DRAWDDARROWS = 0x00000001
}
}
static if (_WIN32_IE >= 0x501) {
enum {
TBSTYLE_EX_MIXEDBUTTONS = 8,
TBSTYLE_EX_HIDECLIPPEDBUTTONS = 16
}
}
static if (_WIN32_WINNT >= 0x501) {
enum {
TBSTYLE_EX_DOUBLEBUFFER = 0x80
}
}
static if (_WIN32_IE >= 0x500) {
enum {
BTNS_BUTTON = TBSTYLE_BUTTON,
BTNS_SEP = TBSTYLE_SEP,
BTNS_CHECK = TBSTYLE_CHECK,
BTNS_GROUP = TBSTYLE_GROUP,
BTNS_CHECKGROUP = TBSTYLE_CHECKGROUP,
BTNS_DROPDOWN = TBSTYLE_DROPDOWN,
BTNS_AUTOSIZE = TBSTYLE_AUTOSIZE,
BTNS_NOPREFIX = TBSTYLE_NOPREFIX,
BTNS_WHOLEDROPDOWN = 0x0080
}
}
static if (_WIN32_IE >= 0x501) {
enum {
BTNS_SHOWTEXT = 0x0040
}
}
static if (_WIN32_IE >= 0x400) {
enum {
TBCDRF_NOEDGES = 0x10000,
TBCDRF_HILITEHOTTRACK = 0x20000,
TBCDRF_NOOFFSET = 0x40000,
TBCDRF_NOMARK = 0x80000,
TBCDRF_NOETCHEDEFFECT = 0x100000
}
}
const HINST_COMMCTRL = cast(HINSTANCE) (-1);
enum {
IDB_STD_SMALL_COLOR,
IDB_STD_LARGE_COLOR,
IDB_VIEW_SMALL_COLOR = 4,
IDB_VIEW_LARGE_COLOR = 5
}
static if (_WIN32_IE >= 0x300) {
enum {
IDB_HIST_SMALL_COLOR = 8,
IDB_HIST_LARGE_COLOR = 9
}
}
enum {
STD_CUT,
STD_COPY,
STD_PASTE,
STD_UNDO,
STD_REDOW,
STD_DELETE,
STD_FILENEW,
STD_FILEOPEN,
STD_FILESAVE,
STD_PRINTPRE,
STD_PROPERTIES,
STD_HELP,
STD_FIND,
STD_REPLACE,
STD_PRINT // = 14
}
enum {
VIEW_LARGEICONS,
VIEW_SMALLICONS,
VIEW_LIST,
VIEW_DETAILS,
VIEW_SORTNAME,
VIEW_SORTSIZE,
VIEW_SORTDATE,
VIEW_SORTTYPE,
VIEW_PARENTFOLDER,
VIEW_NETCONNECT,
VIEW_NETDISCONNECT,
VIEW_NEWFOLDER // = 11
}
enum {
TB_ENABLEBUTTON = WM_USER + 1,
TB_CHECKBUTTON,
TB_PRESSBUTTON,
TB_HIDEBUTTON,
TB_INDETERMINATE, // = WM_USER + 5,
TB_ISBUTTONENABLED = WM_USER + 9,
TB_ISBUTTONCHECKED,
TB_ISBUTTONPRESSED,
TB_ISBUTTONHIDDEN,
TB_ISBUTTONINDETERMINATE, // = WM_USER + 13,
TB_SETSTATE = WM_USER + 17,
TB_GETSTATE = WM_USER + 18,
TB_ADDBITMAP = WM_USER + 19,
TB_DELETEBUTTON = WM_USER + 22,
TB_GETBUTTON,
TB_BUTTONCOUNT,
TB_COMMANDTOINDEX,
TB_SAVERESTOREA,
TB_CUSTOMIZE,
TB_ADDSTRINGA,
TB_GETITEMRECT,
TB_BUTTONSTRUCTSIZE,
TB_SETBUTTONSIZE,
TB_SETBITMAPSIZE,
TB_AUTOSIZE, // = WM_USER + 33,
TB_GETTOOLTIPS = WM_USER + 35,
TB_SETTOOLTIPS = WM_USER + 36,
TB_SETPARENT = WM_USER + 37,
TB_SETROWS = WM_USER + 39,
TB_GETROWS,
TB_GETBITMAPFLAGS,
TB_SETCMDID,
TB_CHANGEBITMAP,
TB_GETBITMAP,
TB_GETBUTTONTEXTA,
TB_REPLACEBITMAP, // = WM_USER + 46,
TB_GETBUTTONSIZE = WM_USER + 58,
TB_SETBUTTONWIDTH = WM_USER + 59,
TB_GETBUTTONTEXTW = WM_USER + 75,
TB_SAVERESTOREW = WM_USER + 76,
TB_ADDSTRINGW = WM_USER + 77,
}
static if (_WIN32_IE >= 0x400) {
enum {
TB_MARKBUTTON = WM_USER + 6
}
}
static if (_WIN32_IE >= 0x400) {
enum {
TB_ISBUTTONHIGHLIGHTED = WM_USER + 14
}
}
static if (_WIN32_IE >= 0x400) {
enum {
TB_ADDBUTTONSA = WM_USER + 20,
TB_INSERTBUTTONA = WM_USER + 21
}
} else {
enum {
TB_ADDBUTTONS = WM_USER + 20,
TB_INSERTBUTTON = WM_USER + 21
}
}
static if (_WIN32_IE >= 0x300) {
enum {
TB_SETINDENT = WM_USER + 47,
TB_SETIMAGELIST,
TB_GETIMAGELIST,
TB_LOADIMAGES,
TB_GETRECT,
TB_SETHOTIMAGELIST,
TB_GETHOTIMAGELIST,
TB_SETDISABLEDIMAGELIST,
TB_GETDISABLEDIMAGELIST,
TB_SETSTYLE,
TB_GETSTYLE,
//TB_GETBUTTONSIZE,
//TB_SETBUTTONWIDTH,
TB_SETMAXTEXTROWS,
TB_GETTEXTROWS // = WM_USER + 61
}
}
static if (_WIN32_IE >= 0x400) {
enum {
TB_GETOBJECT = WM_USER + 62,
TB_GETBUTTONINFOW,
TB_SETBUTTONINFOW,
TB_GETBUTTONINFOA,
TB_SETBUTTONINFOA,
TB_INSERTBUTTONW,
TB_ADDBUTTONSW,
TB_HITTEST, // = WM_USER + 69
TB_SETEXTENDEDSTYLE = WM_USER + 84,
TB_GETEXTENDEDSTYLE = WM_USER + 85,
TB_SETDRAWTEXTFLAGS = WM_USER + 70,
TB_GETHOTITEM,
TB_SETHOTITEM,
TB_SETANCHORHIGHLIGHT,
TB_GETANCHORHIGHLIGHT, // = WM_USER + 74
TB_MAPACCELERATORA = WM_USER + 78,
TB_GETINSERTMARK,
TB_SETINSERTMARK,
TB_INSERTMARKHITTEST,
TB_MOVEBUTTON,
TB_GETMAXSIZE,
//TB_SETEXTENDEDSTYLE,
//TB_GETEXTENDEDSTYLE,
TB_GETPADDING,
TB_SETPADDING,
TB_SETINSERTMARKCOLOR,
TB_GETINSERTMARKCOLOR,
TB_MAPACCELERATORW,
TB_GETSTRINGW,
TB_GETSTRINGA, // = WM_USER + 92
TB_SETHOTITEM2 = WM_USER + 94,
TB_SETLISTGAP = WM_USER + 96,
TB_GETIMAGELISTCOUNT = WM_USER + 98,
TB_GETIDEALSIZE = WM_USER + 99,
//TB_TRANSLATEACCELERATOR = CCM_TRANSLATEACCELERATOR,
TB_SETCOLORSCHEME = CCM_SETCOLORSCHEME,
TB_GETCOLORSCHEME = CCM_GETCOLORSCHEME,
TB_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT,
TB_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT
}
}
static if (_WIN32_WINNT >= 0x501) {
enum {
TB_GETMETRICS = WM_USER + 101,
TB_SETMETRICS = WM_USER + 102,
}
}
static if (_WIN32_WINNT >= 0x600) {
enum {
TB_GETITEMDROPDOWNRECT = WM_USER + 103,
TB_SETPRESSEDIMAGELIST = WM_USER + 104,
TB_GETPRESSEDIMAGELIST = WM_USER + 105,
}
}
const TBBF_LARGE = 1;
enum {
TBN_GETBUTTONINFOA = TBN_FIRST -0,
TBN_BEGINDRAG = TBN_FIRST -1,
TBN_ENDDRAG = TBN_FIRST -2,
TBN_BEGINADJUST = TBN_FIRST -3,
TBN_ENDADJUST = TBN_FIRST -4,
TBN_RESET = TBN_FIRST -5,
TBN_QUERYINSERT = TBN_FIRST -6,
TBN_QUERYDELETE = TBN_FIRST -7,
TBN_TOOLBARCHANGE = TBN_FIRST -8,
TBN_CUSTHELP = TBN_FIRST -9
}
static if (_WIN32_IE >= 0x300) {
enum {
TBN_DROPDOWN = TBN_FIRST - 10
}
}
static if (_WIN32_IE >= 0x400) {
enum {
TBN_HOTITEMCHANGE = TBN_FIRST - 13,
TBN_DRAGOUT = TBN_FIRST - 14,
TBN_DELETINGBUTTON = TBN_FIRST - 15,
TBN_GETDISPINFOA = TBN_FIRST - 16,
TBN_GETDISPINFOW = TBN_FIRST - 17,
TBN_GETINFOTIPA = TBN_FIRST - 18,
TBN_GETINFOTIPW = TBN_FIRST - 19,
TBN_GETBUTTONINFOW = TBN_FIRST - 20
}
}
static if (_WIN32_IE >= 0x500) {
enum {
TBN_RESTORE = TBN_FIRST - 21,
TBN_SAVE = TBN_FIRST - 22,
TBN_INITCUSTOMIZE = TBN_FIRST - 23
}
enum {
TBNRF_HIDEHELP = 1,
TBNRF_ENDCUSTOMIZE
}
enum {
TBNF_IMAGE = 1,
TBNF_TEXT = 2,
TBNF_DI_SETITEM = 0x10000000
}
}
enum {
TTS_ALWAYSTIP = 1,
TTS_NOPREFIX
}
static if(_WIN32_IE >= 0x500) {
enum {
TTS_NOANIMATE = 0x10,
TTS_NOFADE = 0x20,
TTS_BALLOON = 0x40,
TTS_CLOSE = 0x80
}
}
enum {
TTF_IDISHWND = 1,
TTF_CENTERTIP = 2,
TTF_RTLREADING = 4,
TTF_SUBCLASS = 16
}
static if (_WIN32_IE >= 0x300) {
enum {
TTF_TRACK = 0x0020,
TTF_ABSOLUTE = 0x0080,
TTF_TRANSPARENT = 0x0100,
TTF_DI_SETITEM = 0x8000
}
static if (_WIN32_IE >= 0x501) {
enum {
TTF_PARSELINKS = 0x1000
}
}
enum {
TBCD_TICS = 1,
TBCD_THUMB,
TBCD_CHANNEL // = 3
}
}
static if (_WIN32_IE >= 0x400) {
enum {
TBDDRET_DEFAULT,
TBDDRET_NODEFAULT,
TBDDRET_TREATPRESSED
}
enum {
TBIMHT_AFTER = 1,
TBIMHT_BACKGROUND
}
}
enum {
TTDT_AUTOMATIC,
TTDT_RESHOW,
TTDT_AUTOPOP,
TTDT_INITIAL
}
enum {
TTM_ACTIVATE = WM_USER + 1,
TTM_SETDELAYTIME = WM_USER + 3,
TTM_ADDTOOLA,
TTM_DELTOOLA,
TTM_NEWTOOLRECTA,
TTM_RELAYEVENT,
TTM_GETTOOLINFOA,
TTM_SETTOOLINFOA,
TTM_HITTESTA,
TTM_GETTEXTA,
TTM_UPDATETIPTEXTA,
TTM_GETTOOLCOUNT,
TTM_ENUMTOOLSA,
TTM_GETCURRENTTOOLA,
TTM_WINDOWFROMPOINT, // = WM_USER + 16
TTM_ADDTOOLW = WM_USER + 50,
TTM_DELTOOLW,
TTM_NEWTOOLRECTW,
TTM_GETTOOLINFOW,
TTM_SETTOOLINFOW,
TTM_HITTESTW,
TTM_GETTEXTW,
TTM_UPDATETIPTEXTW,
TTM_ENUMTOOLSW,
TTM_GETCURRENTTOOLW // = WM_USER + 59
}
static if (_WIN32_IE >= 0x300) {
enum {
TTM_TRACKACTIVATE = WM_USER + 17,
TTM_TRACKPOSITION,
TTM_SETTIPBKCOLOR,
TTM_SETTIPTEXTCOLOR,
TTM_GETDELAYTIME,
TTM_GETTIPBKCOLOR,
TTM_GETTIPTEXTCOLOR,
TTM_SETMAXTIPWIDTH,
TTM_GETMAXTIPWIDTH,
TTM_SETMARGIN,
TTM_GETMARGIN,
TTM_POP // = WM_USER + 28
}
}
static if (_WIN32_IE >= 0x400) { // IE4.0 ???
enum {
TTM_UPDATE = WM_USER + 29,
TTM_GETBUBBLESIZE,
TTM_ADJUSTRECT,
TTM_SETTITLEA,
TTM_SETTITLEW // = WM_USER + 33
}
static if (_WIN32_IE >= 0x500) {
alias TTM_SETTITLEW TTM_SETTITLE;
} else {
alias TTM_SETTITLEA TTM_SETTITLE;
}
}
static if (_WIN32_WINNT >= 0x501) {
enum {
TTM_POPUP = (WM_USER + 34),
TTM_GETTITLE = (WM_USER + 35),
}
}
enum {
TTN_GETDISPINFOA = TTN_FIRST - 0,
TTN_GETDISPINFOW = TTN_FIRST - 10,
TTN_NEEDTEXTA = TTN_GETDISPINFOA,
TTN_NEEDTEXTW = TTN_GETDISPINFOW,
TTN_SHOW = TTN_FIRST-1,
TTN_POP = TTN_FIRST-2
}
const UD_MAXVAL = 0x7fff;
const UD_MINVAL = -UD_MAXVAL;
enum {
UDN_DELTAPOS = UDN_FIRST-1,
UDS_WRAP = 1,
UDS_SETBUDDYINT = 2,
UDS_ALIGNRIGHT = 4,
UDS_ALIGNLEFT = 8,
UDS_AUTOBUDDY = 16,
UDS_ARROWKEYS = 32,
UDS_HORZ = 64,
UDS_NOTHOUSANDS = 128
}
static if (_WIN32_IE >= 0x300) {
enum {
UDS_HOTTRACK = 0x0100
}
}
enum {
UDM_SETRANGE = WM_USER + 101,
UDM_GETRANGE,
UDM_SETPOS,
UDM_GETPOS,
UDM_SETBUDDY,
UDM_GETBUDDY,
UDM_SETACCEL,
UDM_GETACCEL,
UDM_SETBASE,
UDM_GETBASE // = WM_USER + 110
}
static if (_WIN32_IE >= 0x400) {
enum {
UDM_SETRANGE32 = WM_USER + 111,
UDM_GETRANGE32,
UDM_SETPOS32,
UDM_GETPOS32 // = WM_USER + 114
}
}
static if (_WIN32_IE >= 0x500) {
enum {
UDM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT,
UDM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT
}
}
/*enum {
SB_SETTEXTA = WM_USER + 1,
SB_GETTEXTA,
SB_GETTEXTLENGTHA,
SB_SETPARTS, // = WM_USER + 4
SB_GETPARTS = WM_USER + 6,
SB_GETBORDERS,
SB_SETMINHEIGHT,
SB_SIMPLE,
SB_GETRECT,
SB_SETTEXTW,
SB_GETTEXTLENGTHW,
SB_GETTEXTW // = WM_USER + 13
}*/
/*enum {
SBT_OWNERDRAW = 0x1000,
SBT_NOBORDERS = 256,
SBT_POPOUT = 512,
SBT_RTLREADING = 1024
}*/
static if(_WIN32_IE >= 0x400) {
enum {
SBT_TOOLTIPS = 0x0800,
SBN_SIMPLEMODECHANGE = SBN_FIRST
}
}
enum {
TBS_AUTOTICKS = 1,
TBS_VERT = 2,
TBS_HORZ = 0,
TBS_TOP = 4,
TBS_BOTTOM = 0,
TBS_LEFT = 4,
TBS_RIGHT = 0,
TBS_BOTH = 8,
TBS_NOTICKS = 16,
TBS_ENABLESELRANGE = 32,
TBS_FIXEDLENGTH = 64,
TBS_NOTHUMB = 128
}
static if (_WIN32_IE >= 0x300) {
enum {
TBS_TOOLTIPS = 0x0100,
TBTS_TOP = 0,
TBTS_LEFT,
TBTS_BOTTOM,
TBTS_RIGHT // = 3
}
}
static if (_WIN32_IE >= 0x500) {
enum {
TBS_REVERSED = 0x0200
}
}
static if (_WIN32_IE >= 0x501) {
enum {
TBS_DOWNISLEFT = 0x0400
}
}
static if (_WIN32_IE >= 0x400) {
enum {
TBIF_BYINDEX = 0x80000000,
TBIF_COMMAND = 32,
TBIF_IMAGE = 1,
TBIF_LPARAM = 16,
TBIF_SIZE = 64,
TBIF_STATE = 4,
TBIF_STYLE = 8,
TBIF_TEXT = 2
}
}
enum {
TBM_GETPOS = WM_USER,
TBM_GETRANGEMIN,
TBM_GETRANGEMAX,
TBM_GETTIC,
TBM_SETTIC,
TBM_SETPOS,
TBM_SETRANGE,
TBM_SETRANGEMIN,
TBM_SETRANGEMAX,
TBM_CLEARTICS,
TBM_SETSEL,
TBM_SETSELSTART,
TBM_SETSELEND, // = WM_USER+12,
TBM_GETPTICS = WM_USER+14,
TBM_GETTICPOS,
TBM_GETNUMTICS,
TBM_GETSELSTART,
TBM_GETSELEND,
TBM_CLEARSEL,
TBM_SETTICFREQ,
TBM_SETPAGESIZE,
TBM_GETPAGESIZE,
TBM_SETLINESIZE,
TBM_GETLINESIZE,
TBM_GETTHUMBRECT,
TBM_GETCHANNELRECT,
TBM_SETTHUMBLENGTH,
TBM_GETTHUMBLENGTH,
TBM_SETTOOLTIPS,
TBM_GETTOOLTIPS,
TBM_SETTIPSIDE,
TBM_SETBUDDY,
TBM_GETBUDDY, // = WM_USER+33,
TBM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT,
TBM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT
}
enum {
TB_LINEUP,
TB_LINEDOWN,
TB_PAGEUP,
TB_PAGEDOWN,
TB_THUMBPOSITION,
TB_THUMBTRACK,
TB_TOP,
TB_BOTTOM,
TB_ENDTRACK // = 8
}
enum {
HOTKEYF_SHIFT = 1,
HOTKEYF_CONTROL = 2,
HOTKEYF_ALT = 4,
HOTKEYF_EXT = 8
}
enum {
HKCOMB_NONE = 1,
HKCOMB_S = 2,
HKCOMB_C = 4,
HKCOMB_A = 8,
HKCOMB_SC = 16,
HKCOMB_SA = 32,
HKCOMB_CA = 64,
HKCOMB_SCA = 128
}
enum {
HKM_SETHOTKEY = WM_USER + 1,
HKM_GETHOTKEY = WM_USER + 2,
HKM_SETRULES = WM_USER + 3
}
enum {
PBM_SETRANGE = WM_USER + 1,
PBM_SETPOS,
PBM_DELTAPOS,
PBM_SETSTEP,
PBM_STEPIT, // = WM_USER + 5
PBM_SETRANGE32 = 1030,
PBM_GETRANGE,
PBM_GETPOS,
PBM_SETBARCOLOR, // = 1033
PBM_SETBKCOLOR = CCM_SETBKCOLOR
}
static if (_WIN32_WINNT >= 0x501) {
enum {
PBM_SETMARQUEE = WM_USER + 10,
}
}
static if (_WIN32_WINNT >= 0x600) {
enum {
PBM_GETSTEP = WM_USER + 13,
PBM_GETBKCOLOR,
PBM_GETBARCOLOR,
PBM_SETSTATE,
PBM_GETSTATE,
}
}
enum {
PBS_SMOOTH = 1,
PBS_VERTICAL = 4
}
static if (_WIN32_WINNT >= 0x501) {
enum {
PBS_MARQUEE = 8,
}
}
static if (_WIN32_WINNT >= 0x600) {
enum {
PBS_SMOOTHREVERSE = 16,
}
}
enum {
LVS_ICON,
LVS_REPORT,
LVS_SMALLICON,
LVS_LIST, // = 3
LVS_TYPEMASK = 3,
LVS_SINGLESEL = 4,
LVS_SHOWSELALWAYS = 8,
LVS_SORTASCENDING = 16,
LVS_SORTDESCENDING = 32,
LVS_SHAREIMAGELISTS = 64,
LVS_NOLABELWRAP = 128,
LVS_AUTOARRANGE = 256,
LVS_EDITLABELS = 512,
LVS_NOSCROLL = 0x2000,
LVS_TYPESTYLEMASK = 0xFC00,
LVS_ALIGNTOP = 0,
LVS_ALIGNLEFT = 0x800,
LVS_ALIGNMASK = 0xC00,
LVS_OWNERDRAWFIXED = 0x400,
LVS_NOCOLUMNHEADER = 0x4000,
LVS_NOSORTHEADER = 0x8000
}
static if (_WIN32_IE >= 0x300) {
enum {
CDIS_CHECKED = 8,
CDIS_DEFAULT = 32,
CDIS_DISABLED = 4,
CDIS_FOCUS = 16,
CDIS_GRAYED = 2,
CDIS_HOT = 64,
CDIS_SELECTED = 1,
CDIS_MARKED = 128,
CDIS_INDETERMINATE = 256
}
static if (_WIN32_WINNT >= 0x501) {
enum {
CDIS_SHOWKEYBOARDCUES = 512
}
}
enum {
CDDS_POSTERASE = 4,
CDDS_POSTPAINT = 2,
CDDS_PREERASE = 3,
CDDS_PREPAINT = 1,
CDDS_ITEM = 65536,
CDDS_ITEMPOSTERASE = 65540,
CDDS_ITEMPOSTPAINT = 65538,
CDDS_ITEMPREERASE = 65539,
CDDS_ITEMPREPAINT = 65537
}
static if (_WIN32_IE >= 0x400) {
enum {
CDDS_SUBITEM = 0x20000
}
}
enum {
CDRF_DODEFAULT = 0x00,
CDRF_NOTIFYITEMDRAW = 0x20,
CDRF_NOTIFYSUBITEMDRAW = 0x20,
CDRF_NOTIFYITEMERASE = 0x80,
CDRF_NOTIFYPOSTERASE = 0x40,
CDRF_NOTIFYPOSTPAINT = 0x10,
CDRF_NEWFONT = 0x02,
CDRF_SKIPDEFAULT = 0x04
}
static if (_WIN32_IE >= 0x400) {
enum {
LVBKIF_SOURCE_NONE = 0x00000000,
LVBKIF_SOURCE_HBITMAP = 0x00000001,
LVBKIF_SOURCE_URL = 0x00000002,
LVBKIF_SOURCE_MASK = 0x00000003,
LVBKIF_STYLE_NORMAL = 0x00000000,
LVBKIF_STYLE_TILE = 0x00000010,
LVBKIF_STYLE_MASK = 0x00000010
}
}
static if (_WIN32_WINNT >= 0x501) {
enum {
LVBKIF_FLAG_TILEOFFSET = 0x00000100,
LVBKIF_TYPE_WATERMARK = 0x10000000
}
}
enum {
LVS_OWNERDATA = 4096
}
enum {
LVS_EX_CHECKBOXES = 4,
LVS_EX_FULLROWSELECT = 32,
LVS_EX_GRIDLINES = 1,
LVS_EX_HEADERDRAGDROP = 16,
LVS_EX_ONECLICKACTIVATE = 64,
LVS_EX_SUBITEMIMAGES = 2,
LVS_EX_TRACKSELECT = 8,
LVS_EX_TWOCLICKACTIVATE = 128
}
enum {
LVSICF_NOINVALIDATEALL = 0x00000001,
LVSICF_NOSCROLL = 0x00000002
}
static if(_WIN32_IE >= 0x400) {
enum {
LVS_EX_FLATSB = 0x00000100,
LVS_EX_REGIONAL = 0x00000200,
LVS_EX_INFOTIP = 0x00000400,
LVS_EX_UNDERLINEHOT = 0x00000800,
LVS_EX_UNDERLINECOLD = 0x00001000,
LVS_EX_MULTIWORKAREAS = 0x00002000
}
}
static if(_WIN32_IE >= 0x500) {
enum {
LVS_EX_LABELTIP = 0x00004000,
LVS_EX_BORDERSELECT = 0x00008000
}
}
}
enum {
LVSIL_NORMAL,
LVSIL_SMALL,
LVSIL_STATE
}
enum {
LVM_GETBKCOLOR = LVM_FIRST,
LVM_SETBKCOLOR,
LVM_GETIMAGELIST,
LVM_SETIMAGELIST,
LVM_GETITEMCOUNT, // = LVM_FIRST + 4
LVM_SORTITEMSEX = LVM_FIRST + 81,
LVM_GETGROUPSTATE = LVM_FIRST + 92,
LVM_GETFOCUSEDGROUP,
LVM_GETGROUPRECT = LVM_FIRST + 98,
LVM_SETVIEW = LVM_FIRST + 142,
LVM_GETVIEW, // = LVM_FIRST + 143
LVM_INSERTGROUP = LVM_FIRST + 145,
LVM_SETGROUPINFO = LVM_FIRST + 147,
LVM_GETGROUPINFO = LVM_FIRST + 149,
LVM_REMOVEGROUP,
LVM_MOVEGROUP, // = LVM_FIRST + 151
LVM_GETGROUPCOUNT,
LVM_GETGROUPINFOBYINDEX,
LVM_MOVEITEMTOGROUP,
LVM_SETGROUPMETRICS = LVM_FIRST + 155,
LVM_GETGROUPMETRICS,
LVM_ENABLEGROUPVIEW,
LVM_SORTGROUPS,
LVM_INSERTGROUPSORTED,
LVM_REMOVEALLGROUPS,
LVM_HASGROUP,
LVM_SETTILEVIEWINFO,
LVM_GETTILEVIEWINFO,
LVM_SETTILEINFO,
LVM_GETTILEINFO,
LVM_SETINSERTMARK,
LVM_GETINSERTMARK,
LVM_INSERTMARKHITTEST,
LVM_GETINSERTMARKRECT,
LVM_SETINSERTMARKCOLOR,
LVM_GETINSERTMARKCOLOR, // = LVM_FIRST + 171
LVM_SETINFOTIP = LVM_FIRST + 173,
LVM_GETSELECTEDCOLUMN,
LVM_ISGROUPVIEWENABLED,
LVM_GETOUTLINECOLOR,
LVM_SETOUTLINECOLOR, // = LVM_FIRST + 177
LVM_CANCELEDITLABEL = LVM_FIRST + 179,
LVM_MAPINDEXTOID = LVM_FIRST + 180,
LVM_MAPIDTOINDEX = LVM_FIRST + 181,
LVM_ISITEMVISIBLE = LVM_FIRST + 182,
}
static if (_WIN32_WINNT >= 0x501) {
enum {
LVM_SETSELECTEDCOLUMN = LVM_FIRST + 140
}
}
static if (_WIN32_WINNT >= 0x600) {
enum {
LVM_GETEMPTYTEXT = LVM_FIRST + 204,
LVM_GETFOOTERRECT = LVM_FIRST + 205,
LVM_GETFOOTERINFO = LVM_FIRST + 206,
LVM_GETFOOTERITEMRECT = LVM_FIRST + 207,
LVM_GETFOOTERITEM = (LVM_FIRST + 208),
LVM_GETITEMINDEXRECT = (LVM_FIRST + 209),
LVM_SETITEMINDEXSTATE = (LVM_FIRST + 210),
LVM_GETNEXTITEMINDEX = (LVM_FIRST + 211),
}
}
enum {
LVIF_TEXT = 1,
LVIF_IMAGE = 2,
LVIF_PARAM = 4,
LVIF_STATE = 8
}
static if (_WIN32_IE >= 0x300) {
enum {
LVIF_INDENT = 16,
LVIF_NORECOMPUTE = 2048
}
}
static if (_WIN32_WINNT >= 0x501) {
enum {
LVIF_GROUPID = 128,
LVIF_COLUMNS = 256
}
}
enum {
LVIS_FOCUSED = 1,
LVIS_SELECTED = 2,
LVIS_CUT = 4,
LVIS_DROPHILITED = 8,
LVIS_OVERLAYMASK = 0xF00,
LVIS_STATEIMAGEMASK = 0xF000
}
const LPWSTR LPSTR_TEXTCALLBACKW = cast(LPWSTR) -1;
const LPSTR LPSTR_TEXTCALLBACKA = cast(LPSTR) -1;
const I_IMAGECALLBACK = -1;
static if(_WIN32_IE >= 0x400) {
enum {
LVM_SETBKIMAGEA = LVM_FIRST + 68,
LVM_SETBKIMAGEW = LVM_FIRST + 138,
LVM_GETBKIMAGEA = LVM_FIRST + 69,
LVM_GETBKIMAGEW = LVM_FIRST + 139,
LV_MAX_WORKAREAS = 16,
LVM_SETWORKAREAS = LVM_FIRST + 65,
LVM_GETWORKAREAS = LVM_FIRST + 70,
LVM_GETNUMBEROFWORKAREAS = LVM_FIRST + 73,
LVM_GETSELECTIONMARK = LVM_FIRST + 66,
LVM_SETSELECTIONMARK = LVM_FIRST + 67,
LVM_SETHOVERTIME = LVM_FIRST + 71,
LVM_GETHOVERTIME = LVM_FIRST + 72,
LVM_SETTOOLTIPS = LVM_FIRST + 74,
LVM_GETTOOLTIPS = LVM_FIRST + 78,
LVM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT,
LVM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT
}
}
enum {
LVNI_ALL,
LVNI_FOCUSED = 1,
LVNI_SELECTED = 2,
LVNI_CUT = 4,
LVNI_DROPHILITED = 8,
LVNI_ABOVE = 256,
LVNI_BELOW = 512,
LVNI_TOLEFT = 1024,
LVNI_TORIGHT = 2048
}
enum {
LVM_GETITEMA = LVM_FIRST + 5,
LVM_SETITEMA,
LVM_INSERTITEMA,
LVM_DELETEITEM,
LVM_DELETEALLITEMS,
LVM_GETCALLBACKMASK,
LVM_SETCALLBACKMASK,
LVM_GETNEXTITEM,
LVM_FINDITEMA,
LVM_GETITEMRECT,
LVM_SETITEMPOSITION,
LVM_GETITEMPOSITION,
LVM_GETSTRINGWIDTHA,
LVM_HITTEST,
LVM_ENSUREVISIBLE,
LVM_SCROLL,
LVM_REDRAWITEMS,
LVM_ARRANGE,
LVM_EDITLABELA,
LVM_GETEDITCONTROL,
LVM_GETCOLUMNA,
LVM_SETCOLUMNA,
LVM_INSERTCOLUMNA,
LVM_DELETECOLUMN,
LVM_GETCOLUMNWIDTH,
LVM_SETCOLUMNWIDTH, // = LVM_FIRST + 30,
LVM_CREATEDRAGIMAGE = LVM_FIRST + 33,
LVM_GETVIEWRECT,
LVM_GETTEXTCOLOR,
LVM_SETTEXTCOLOR,
LVM_GETTEXTBKCOLOR,
LVM_SETTEXTBKCOLOR,
LVM_GETTOPINDEX,
LVM_GETCOUNTPERPAGE,
LVM_GETORIGIN,
LVM_UPDATE,
LVM_SETITEMSTATE,
LVM_GETITEMSTATE,
LVM_GETITEMTEXTA,
LVM_SETITEMTEXTA,
LVM_SETITEMCOUNT,
LVM_SORTITEMS,
LVM_SETITEMPOSITION32,
LVM_GETSELECTEDCOUNT,
LVM_GETITEMSPACING,
LVM_GETISEARCHSTRINGA, // = LVM_FIRST + 52,
LVM_GETITEMW = LVM_FIRST + 75,
LVM_SETITEMW = LVM_FIRST + 76,
LVM_INSERTITEMW = LVM_FIRST + 77,
LVM_FINDITEMW = LVM_FIRST + 83,
LVM_GETSTRINGWIDTHW = LVM_FIRST + 87,
LVM_GETCOLUMNW = LVM_FIRST + 95,
LVM_SETCOLUMNW = LVM_FIRST + 96,
LVM_INSERTCOLUMNW = LVM_FIRST + 97,
LVM_GETITEMTEXTW = LVM_FIRST + 115,
LVM_SETITEMTEXTW,
LVM_GETISEARCHSTRINGW,
LVM_EDITLABELW // = LVM_FIRST + 118,
}
static if (_WIN32_IE >= 0x300) {
enum {
LVM_GETHEADER = LVM_FIRST + 31,
LVM_SETICONSPACING = LVM_FIRST + 53,
LVM_SETEXTENDEDLISTVIEWSTYLE,
LVM_GETEXTENDEDLISTVIEWSTYLE,
LVM_GETSUBITEMRECT,
LVM_SUBITEMHITTEST,
LVM_SETCOLUMNORDERARRAY,
LVM_GETCOLUMNORDERARRAY,
LVM_SETHOTITEM,
LVM_GETHOTITEM,
LVM_SETHOTCURSOR,
LVM_GETHOTCURSOR,
LVM_APPROXIMATEVIEWRECT // = LVM_FIRST + 64,
}
}
enum {
LVFI_PARAM = 1,
LVFI_STRING = 2,
LVFI_PARTIAL = 8,
LVFI_WRAP = 32,
LVFI_NEARESTXY = 64
}
enum {
LVIF_DI_SETITEM = 0x1000
}
enum {
LVIR_BOUNDS,
LVIR_ICON,
LVIR_LABEL,
LVIR_SELECTBOUNDS // = 3
}
enum {
LVHT_NOWHERE = 1,
LVHT_ONITEMICON = 2,
LVHT_ONITEMLABEL = 4,
LVHT_ONITEMSTATEICON = 8,
LVHT_ONITEM = LVHT_ONITEMICON | LVHT_ONITEMLABEL
| LVHT_ONITEMSTATEICON,
LVHT_ABOVE = 8,
LVHT_BELOW = 16,
LVHT_TORIGHT = 32,
LVHT_TOLEFT = 64
}
enum {
LVA_DEFAULT = 0,
LVA_ALIGNLEFT = 1,
LVA_ALIGNTOP = 2,
LVA_SNAPTOGRID = 5
}
enum {
LVCF_FMT = 1,
LVCF_WIDTH = 2,
LVCF_TEXT = 4,
LVCF_SUBITEM = 8
}
static if (_WIN32_IE >= 0x300) {
enum {
LVCF_IMAGE = 16,
LVCF_ORDER = 32
}
}
enum {
LVCFMT_LEFT,
LVCFMT_RIGHT,
LVCFMT_CENTER,
LVCFMT_JUSTIFYMASK // = 3
}
static if (_WIN32_IE >= 0x300) {
enum {
LVCFMT_IMAGE = 2048,
LVCFMT_BITMAP_ON_RIGHT = 4096,
LVCFMT_COL_HAS_IMAGES = 32768
}
}
enum {
LVSCW_AUTOSIZE = -1,
LVSCW_AUTOSIZE_USEHEADER = -2
}
enum {
LVN_ITEMCHANGING = LVN_FIRST,
LVN_ITEMCHANGED = LVN_FIRST - 1,
LVN_INSERTITEM = LVN_FIRST - 2,
LVN_DELETEITEM = LVN_FIRST - 3,
LVN_DELETEALLITEMS = LVN_FIRST - 4,
LVN_BEGINLABELEDITA = LVN_FIRST - 5,
LVN_ENDLABELEDITA = LVN_FIRST - 6,
LVN_COLUMNCLICK = LVN_FIRST - 8,
LVN_BEGINDRAG = LVN_FIRST - 9,
LVN_BEGINRDRAG = LVN_FIRST - 11,
LVN_GETDISPINFOA = LVN_FIRST - 50,
LVN_SETDISPINFOA = LVN_FIRST - 51,
LVN_KEYDOWN = LVN_FIRST - 55,
LVN_BEGINLABELEDITW = LVN_FIRST - 75,
LVN_ENDLABELEDITW = LVN_FIRST - 76,
LVN_GETDISPINFOW = LVN_FIRST - 77,
LVN_SETDISPINFOW = LVN_FIRST - 78
}
static if (_WIN32_IE >= 0x400) {
enum {
LVN_MARQUEEBEGIN = LVN_FIRST - 56,
LVN_GETINFOTIPA = LVN_FIRST - 57,
LVN_GETINFOTIPW = LVN_FIRST - 58,
LVKF_ALT = 1,
LVKF_CONTROL = 2,
LVKF_SHIFT = 4,
LVGIT_UNFOLDED = 1
}
}
enum {
TVS_HASBUTTONS = 1,
TVS_HASLINES = 2,
TVS_LINESATROOT = 4,
TVS_EDITLABELS = 8,
TVS_DISABLEDRAGDROP = 16,
TVS_SHOWSELALWAYS = 32
}
static if (_WIN32_IE >= 0x300) {
enum {
TVS_RTLREADING = 64,
TVS_NOTOOLTIPS = 128,
TVS_CHECKBOXES = 256,
TVS_TRACKSELECT = 512
}
}
static if (_WIN32_IE >= 0x400) {
enum {
TVS_SINGLEEXPAND = 1024,
TVS_INFOTIP = 2048,
TVS_FULLROWSELECT = 4096,
TVS_NOSCROLL = 8192,
TVS_NONEVENHEIGHT = 16384
}
}
static if (_WIN32_IE >= 0x500) {
enum {
TVS_NOHSCROLL = 0x8000
}
}
enum {
TVIF_TEXT = 1,
TVIF_IMAGE = 2,
TVIF_PARAM = 4,
TVIF_STATE = 8,
TVIF_HANDLE = 16,
TVIF_SELECTEDIMAGE = 32,
TVIF_CHILDREN = 64
}
static if (_WIN32_IE >= 0x400) {
enum {
TVIF_INTEGRAL = 0x0080
}
}
enum {
TVIS_FOCUSED = 1,
TVIS_SELECTED = 2,
TVIS_CUT = 4,
TVIS_DROPHILITED = 8,
TVIS_BOLD = 16,
TVIS_EXPANDED = 32,
TVIS_EXPANDEDONCE = 64,
TVIS_OVERLAYMASK = 0xF00,
TVIS_STATEIMAGEMASK = 0xF000,
TVIS_USERMASK = 0xF000
}
enum {
I_CHILDRENCALLBACK = -1
}
mixin DECLARE_HANDLE!("HTREEITEM");
mixin DECLARE_HANDLE!("HIMAGELIST");
version(Win64)
{
const HTREEITEM
TVI_ROOT = cast(HTREEITEM) cast(ULONG_PTR)-0x10000,
TVI_FIRST = cast(HTREEITEM) cast(ULONG_PTR)-0xffff,
TVI_LAST = cast(HTREEITEM) cast(ULONG_PTR)-0xfffe,
TVI_SORT = cast(HTREEITEM) cast(ULONG_PTR)-0xfffd;
} else {
const HTREEITEM
TVI_ROOT = cast(HTREEITEM) 0xFFFF0000,
TVI_FIRST = cast(HTREEITEM) 0xFFFF0001,
TVI_LAST = cast(HTREEITEM) 0xFFFF0002,
TVI_SORT = cast(HTREEITEM) 0xFFFF0003;
}
enum {
TVSIL_NORMAL = 0,
TVSIL_STATE = 2
}
enum {
TVM_INSERTITEMA = TV_FIRST,
TVM_DELETEITEM = TV_FIRST + 1,
TVM_EXPAND = TV_FIRST + 2,
TVM_GETITEMRECT = TV_FIRST + 4,
TVM_GETCOUNT,
TVM_GETINDENT,
TVM_SETINDENT,
TVM_GETIMAGELIST,
TVM_SETIMAGELIST,
TVM_GETNEXTITEM,
TVM_SELECTITEM,
TVM_GETITEMA,
TVM_SETITEMA,
TVM_EDITLABELA,
TVM_GETEDITCONTROL,
TVM_GETVISIBLECOUNT,
TVM_HITTEST,
TVM_CREATEDRAGIMAGE,
TVM_SORTCHILDREN,
TVM_ENSUREVISIBLE,
TVM_SORTCHILDRENCB,
TVM_ENDEDITLABELNOW,
TVM_GETISEARCHSTRINGA, // = TV_FIRST + 23
TVM_INSERTITEMW = TV_FIRST + 50,
TVM_GETITEMW = TV_FIRST + 62,
TVM_SETITEMW = TV_FIRST + 63,
TVM_GETISEARCHSTRINGW = TV_FIRST + 64,
TVM_EDITLABELW = TV_FIRST + 65
}
static if (_WIN32_IE >= 0x300) {
enum {
TVM_GETTOOLTIPS = TV_FIRST + 25,
TVM_SETTOOLTIPS = TV_FIRST + 24
}
}
static if (_WIN32_IE >= 0x400) {
enum {
TVM_SETINSERTMARK = TV_FIRST + 26,
TVM_SETITEMHEIGHT,
TVM_GETITEMHEIGHT,
TVM_SETBKCOLOR,
TVM_SETTEXTCOLOR,
TVM_GETBKCOLOR,
TVM_GETTEXTCOLOR,
TVM_SETSCROLLTIME,
TVM_GETSCROLLTIME, // = TV_FIRST + 34
TVM_SETINSERTMARKCOLOR = TV_FIRST + 37,
TVM_GETINSERTMARKCOLOR = TV_FIRST + 38,
TVM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT,
TVM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT
}
}
static if (_WIN32_IE >= 0x500) {
enum {
TVM_GETITEMSTATE = TV_FIRST + 39,
TVM_SETLINECOLOR = TV_FIRST + 40,
TVM_GETLINECOLOR = TV_FIRST + 41
}
}
static if (_WIN32_IE >= 0x501) {
enum {
TVM_MAPACCIDTOHTREEITEM = TV_FIRST + 42,
TVM_MAPHTREEITEMTOACCID = TV_FIRST + 43,
TVM_SETEXTENDEDSTYLE = TV_FIRST + 44,
TVM_GETEXTENDEDSTYLE = TV_FIRST + 45,
TVM_SETAUTOSCROLLINFO = TV_FIRST + 59
}
}
static if (_WIN32_IE >= 0x600) {
enum {
TVM_GETSELECTEDCOUNT = TV_FIRST + 70,
TVM_SHOWINFOTIP = TV_FIRST + 71,
TVM_GETITEMPARTRECT = TV_FIRST + 72,
}
}
enum {
TVE_COLLAPSE = 1,
TVE_EXPAND = 2,
TVE_TOGGLE = 3,
TVE_COLLAPSERESET = 0x8000
}
static if (_WIN32_IE >= 0x300) {
enum {
TVE_EXPANDPARTIAL = 0x4000
}
}
enum {
TVC_UNKNOWN,
TVC_BYMOUSE,
TVC_BYKEYBOARD // = 2
}
enum {
TVGN_ROOT,
TVGN_NEXT,
TVGN_PREVIOUS,
TVGN_PARENT,
TVGN_CHILD,
TVGN_FIRSTVISIBLE,
TVGN_NEXTVISIBLE,
TVGN_PREVIOUSVISIBLE,
TVGN_DROPHILITE,
TVGN_CARET // = 9
}
static if (_WIN32_IE >= 0x400) {
enum {
TVGN_LASTVISIBLE = 10
}
}
static if (_WIN32_IE >= 0x600) {
enum {
TVGN_NEXTSELECTED = 11
}
}
enum {
TVN_SELCHANGINGA = TVN_FIRST - 1,
TVN_SELCHANGEDA = TVN_FIRST - 2,
TVN_GETDISPINFOA = TVN_FIRST - 3,
TVN_SETDISPINFOA = TVN_FIRST - 4,
TVN_ITEMEXPANDINGA = TVN_FIRST - 5,
TVN_ITEMEXPANDEDA = TVN_FIRST - 6,
TVN_BEGINDRAGA = TVN_FIRST - 7,
TVN_BEGINRDRAGA = TVN_FIRST - 8,
TVN_DELETEITEMA = TVN_FIRST - 9,
TVN_BEGINLABELEDITA = TVN_FIRST - 10,
TVN_ENDLABELEDITA = TVN_FIRST - 11,
TVN_KEYDOWN = TVN_FIRST - 12,
TVN_SELCHANGINGW = TVN_FIRST - 50,
TVN_SELCHANGEDW = TVN_FIRST - 51,
TVN_GETDISPINFOW = TVN_FIRST - 52,
TVN_SETDISPINFOW = TVN_FIRST - 53,
TVN_ITEMEXPANDINGW = TVN_FIRST - 54,
TVN_ITEMEXPANDEDW = TVN_FIRST - 55,
TVN_BEGINDRAGW = TVN_FIRST - 56,
TVN_BEGINRDRAGW = TVN_FIRST - 57,
TVN_DELETEITEMW = TVN_FIRST - 58,
TVN_BEGINLABELEDITW = TVN_FIRST - 59,
TVN_ENDLABELEDITW = TVN_FIRST - 60
}
static if (_WIN32_IE >= 0x400) {
enum {
TVNRET_DEFAULT = 0,
TVNRET_SKIPOLD = 1,
TVNRET_SKIPNEW = 2,
TVN_GETINFOTIPA = TVN_FIRST - 13,
TVN_GETINFOTIPW = TVN_FIRST - 14,
TVN_SINGLEEXPAND = TVN_FIRST - 15
}
}
enum {
TVIF_DI_SETITEM = 0x1000
}
enum {
TVHT_NOWHERE = 1,
TVHT_ONITEMICON = 2,
TVHT_ONITEMLABEL = 4,
TVHT_ONITEMINDENT = 8,
TVHT_ONITEMBUTTON = 16,
TVHT_ONITEMRIGHT = 32,
TVHT_ONITEMSTATEICON = 64,
TVHT_ABOVE = 256,
TVHT_BELOW = 512,
TVHT_TORIGHT = 1024,
TVHT_TOLEFT = 2048,
TCHT_NOWHERE = 1,
TCHT_ONITEMICON = 2,
TCHT_ONITEMLABEL = 4,
TVHT_ONITEM = TVHT_ONITEMICON | TVHT_ONITEMLABEL
| TVHT_ONITEMSTATEICON,
TCHT_ONITEM = TCHT_ONITEMICON | TCHT_ONITEMLABEL
}
enum {
TCS_TABS = 0,
TCS_RIGHTJUSTIFY = 0,
TCS_SINGLELINE = 0,
TCS_FORCEICONLEFT = 16,
TCS_FORCELABELLEFT = 32,
TCS_BUTTONS = 256,
TCS_MULTILINE = 512,
TCS_FIXEDWIDTH = 1024,
TCS_RAGGEDRIGHT = 2048,
TCS_FOCUSONBUTTONDOWN = 0x1000,
TCS_OWNERDRAWFIXED = 0x2000,
TCS_TOOLTIPS = 0x4000,
TCS_FOCUSNEVER = 0x8000
}
static if (_WIN32_IE >= 0x300) {
enum {
TCS_BOTTOM = 2,
TCS_RIGHT = 2,
TCS_VERTICAL = 128,
TCS_SCROLLOPPOSITE = 0x0001,
TCS_HOTTRACK = 0x0040,
TCS_MULTISELECT = 0x0004
}
}
static if(_WIN32_IE >= 0x400) {
enum {
TCS_FLATBUTTONS = 0x0008,
TCS_EX_FLATSEPARATORS = 0x00000001,
TCS_EX_REGISTERDROP = 0x00000002
}
}
enum {
TCIF_TEXT = 1,
TCIF_IMAGE = 2,
TCIF_RTLREADING = 4,
TCIF_PARAM = 8
}
static if (_WIN32_IE >= 0x400) {
enum {
TCIF_STATE = 16
}
}
enum {
TCIS_BUTTONPRESSED = 1
}
static if (_WIN32_IE >= 0x400) {
enum {
TCIS_HIGHLIGHTED = 2
}
}
enum {
TCM_FIRST = 0x1300,
TCM_GETIMAGELIST = TCM_FIRST + 2,
TCM_SETIMAGELIST,
TCM_GETITEMCOUNT,
TCM_GETITEMA,
TCM_SETITEMA,
TCM_INSERTITEMA,
TCM_DELETEITEM,
TCM_DELETEALLITEMS,
TCM_GETITEMRECT,
TCM_GETCURSEL,
TCM_SETCURSEL,
TCM_HITTEST,
TCM_SETITEMEXTRA, // = TCM_FIRST + 14
TCM_ADJUSTRECT = TCM_FIRST + 40,
TCM_SETITEMSIZE,
TCM_REMOVEIMAGE,
TCM_SETPADDING,
TCM_GETROWCOUNT,
TCM_GETTOOLTIPS,
TCM_SETTOOLTIPS,
TCM_GETCURFOCUS,
TCM_SETCURFOCUS,
TCM_SETMINTABWIDTH,
TCM_DESELECTALL, // = TCM_FIRST + 50
TCM_GETITEMW = TCM_FIRST + 60,
TCM_SETITEMW = TCM_FIRST + 61,
TCM_INSERTITEMW = TCM_FIRST + 62
}
static if (_WIN32_IE >=0x0400) {
enum {
TCM_HIGHLIGHTITEM = TCM_FIRST + 51,
TCM_SETEXTENDEDSTYLE = TCM_FIRST + 52,
TCM_GETEXTENDEDSTYLE = TCM_FIRST + 53,
TCM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT,
TCM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT
}
}
enum {
TCN_KEYDOWN = TCN_FIRST,
TCN_SELCHANGE = TCN_FIRST - 1,
TCN_SELCHANGING = TCN_FIRST - 2
}
enum {
NM_OUTOFMEMORY = NM_FIRST - 1,
NM_CLICK = NM_FIRST - 2,
NM_DBLCLK = NM_FIRST - 3,
NM_RETURN = NM_FIRST - 4,
NM_RCLICK = NM_FIRST - 5,
NM_RDBLCLK = NM_FIRST - 6,
NM_SETFOCUS = NM_FIRST - 7,
NM_KILLFOCUS = NM_FIRST - 8,
NM_CUSTOMDRAW = NM_FIRST - 12,
NM_HOVER = NM_FIRST - 13,
NM_NCHITTEST = NM_FIRST - 14,
NM_KEYDOWN = NM_FIRST - 15,
NM_RELEASEDCAPTURE = NM_FIRST - 16,
NM_SETCURSOR = NM_FIRST - 17,
NM_CHAR = NM_FIRST - 18,
NM_TOOLTIPSCREATED = NM_FIRST - 19
}
enum {
SBARS_SIZEGRIP = 256
}
/*enum {
CCM_FIRST = 0x2000,
CCM_LAST = CCM_FIRST + 0x200,
CCM_SETBKCOLOR = 8193,
CCM_SETCOLORSCHEME = 8194,
CCM_GETCOLORSCHEME = 8195,
CCM_GETDROPTARGET = 8196,
CCM_SETUNICODEFORMAT = 8197,
CCM_GETUNICODEFORMAT = 8198,
CCM_SETVERSION = 0x2007,
CCM_GETVERSION = 0x2008,
CCM_SETNOTIFYWINDOW = 0x2009
}*/
static if (_WIN32_WINNT >= 0x501) {
enum {
CCM_SETWINDOWTHEME = 0x200b,
CCM_DPISCALE = 0x200c,
RB_GETBANDMARGINS = WM_USER + 40,
RB_SETWINDOWTHEME = CCM_SETWINDOWTHEME,
TB_SETWINDOWTHEME = CCM_SETWINDOWTHEME,
TTM_SETWINDOWTHEME = CCM_SETWINDOWTHEME,
}
}
enum {
ICC_LISTVIEW_CLASSES = 1,
ICC_TREEVIEW_CLASSES = 2,
ICC_BAR_CLASSES = 4,
ICC_TAB_CLASSES = 8,
ICC_UPDOWN_CLASS = 16,
ICC_PROGRESS_CLASS = 32,
ICC_HOTKEY_CLASS = 64,
ICC_ANIMATE_CLASS = 128,
ICC_WIN95_CLASSES = 255,
ICC_DATE_CLASSES = 256,
ICC_USEREX_CLASSES = 512,
ICC_COOL_CLASSES = 1024
}
static if (_WIN32_IE >= 0x400) {
enum {
INFOTIPSIZE = 1024,
ICC_INTERNET_CLASSES = 2048,
ICC_PAGESCROLLER_CLASS = 4096,
ICC_NATIVEFNTCTL_CLASS = 8192
}
}
static if (_WIN32_WINNT >= 0x501) {
enum {
ICC_STANDARD_CLASSES = 0x00004000,
ICC_LINK_CLASS = 0x00008000
}
}
enum {
GDTR_MIN = 1,
GDTR_MAX = 2
}
enum {
GMR_VISIBLE,
GMR_DAYSTATE
}
enum {
GDT_ERROR = -1,
GDT_VALID = 0,
GDT_NONE = 1
}
enum {
DTS_SHORTDATEFORMAT = 0,
DTS_UPDOWN = 1,
DTS_SHOWNONE = 2,
DTS_LONGDATEFORMAT = 4,
DTS_TIMEFORMAT = 9,
DTS_APPCANPARSE = 16,
DTS_RIGHTALIGN = 32
}
static if (_WIN32_IE >= 0x500) {
enum {
DTS_SHORTDATECENTURYFORMAT = 0x000C
}
}
enum {
MCS_DAYSTATE = 1,
MCS_MULTISELECT = 2,
MCS_WEEKNUMBERS = 4
}
static if (_WIN32_IE >= 0x400) {
enum {
MCS_NOTODAYCIRCLE = 0x0008,
MCS_NOTODAY = 0x0010
}
} else {
enum {
MCS_NOTODAY = 0x0008
}
}
enum {
DTM_FIRST = 0x10000,
DTM_GETSYSTEMTIME = 0x1001,
DTM_SETSYSTEMTIME = 0x1002,
DTM_GETRANGE = 0x1003,
DTM_SETRANGE = 0x1004,
DTM_SETFORMATA = 0x1005,
DTM_SETMCCOLOR = 0x1006,
DTM_GETMCCOLOR = 0x1007,
DTM_GETMONTHCAL = 0x1008,
DTM_SETMCFONT = 0x1009,
DTM_GETMCFONT = 0x100a,
DTM_SETFORMATW = 0x1050
}
static if (_WIN32_WINNT >= 0x600) {
enum {
DTM_SETMCSTYLE = DTM_FIRST + 11,
DTM_GETMCSTYLE,
DTM_CLOSEMONTHCAL,
DTM_GETDATETIMEPICKERINFO,
DTM_GETIDEALSIZE,
}
}
enum {
DTN_USERSTRINGA = -758U,
DTN_USERSTRINGW = -745U,
DTN_WMKEYDOWNA = -757U,
DTN_WMKEYDOWNW = -744U,
DTN_FORMATA = -756U,
DTN_FORMATW = -743U,
DTN_FORMATQUERYA = -755U,
DTN_FORMATQUERYW = -742U,
DTN_DROPDOWN = -754U,
DTN_CLOSEUP = -753U,
DTN_DATETIMECHANGE = -759U,
}
enum {
MCM_FIRST = 0x1000,
MCM_GETCURSEL = 0x1001,
MCM_SETCURSEL = 0x1002,
MCM_GETMAXSELCOUNT = 0x1003,
MCM_SETMAXSELCOUNT = 0x1004,
MCM_GETSELRANGE = 0x1005,
MCM_SETSELRANGE = 0x1006,
MCM_GETMONTHRANGE = 0x1007,
MCM_SETDAYSTATE = 0x1008,
MCM_GETMINREQRECT = 0x1009,
MCM_SETCOLOR = 0x100a,
MCM_GETCOLOR = 0x100b,
MCM_SETTODAY = 0x100c,
MCM_GETTODAY = 0x100d,
MCM_HITTEST = 0x100e,
MCM_SETFIRSTDAYOFWEEK = 0x100f,
MCM_GETFIRSTDAYOFWEEK = 0x1010,
MCM_GETRANGE = 0x1011,
MCM_SETRANGE = 0x1012,
MCM_GETMONTHDELTA = 0x1013,
MCM_SETMONTHDELTA = 0x1014,
MCM_GETMAXTODAYWIDTH = 0x1015,
MCM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT,
MCM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT
}
static if (_WIN32_WINNT >= 0x600) {
enum {
MCM_GETCURRENTVIEW = MCM_FIRST + 22,
MCM_GETCALENDARCOUNT,
MCM_GETCALENDARGRIDINFO,
MCM_GETCALID = MCM_FIRST + 27,
MCM_SETCALID,
MCM_SIZERECTTOMIN,
MCM_SETCALENDARBORDER,
MCM_GETCALENDARBORDER,
MCM_SETCURRENTVIEW,
}
}
enum {
MCN_SELCHANGE = -749U,
MCN_GETDAYSTATE = -747U,
MCN_SELECT = -746U
}
enum {
ODT_HEADER = 100,
ODT_TAB,
ODT_LISTVIEW // = 102
}
enum {
SB_SETBKCOLOR = 0x2001
}
static if (_WIN32_IE >= 0x300) {
enum {
SB_ISSIMPLE = 1038
}
enum {
MCSC_BACKGROUND,
MCSC_TEXT,
MCSC_TITLEBK,
MCSC_TITLETEXT,
MCSC_MONTHBK,
MCSC_TRAILINGTEXT // = 5
}
}
static if (_WIN32_IE >= 0x400) {
enum {
MCHT_TITLE = 0x10000,
MCHT_CALENDAR = 0x20000,
MCHT_TODAYLINK = 0x30000,
MCHT_NEXT = 0x1000000,
MCHT_PREV = 0x2000000,
MCHT_NOWHERE = 0x00,
MCHT_TITLEBK = MCHT_TITLE,
MCHT_TITLEMONTH = MCHT_TITLE | 0x0001,
MCHT_TITLEYEAR = MCHT_TITLE | 0x0002,
MCHT_TITLEBTNNEXT = MCHT_TITLE | MCHT_NEXT | 0x0003,
MCHT_TITLEBTNPREV = MCHT_TITLE | MCHT_PREV | 0x0003,
MCHT_CALENDARBK = MCHT_CALENDAR,
MCHT_CALENDARDATE = MCHT_CALENDAR | 0x0001,
MCHT_CALENDARDATENEXT = MCHT_CALENDARDATE | MCHT_NEXT,
MCHT_CALENDARDATEPREV = MCHT_CALENDARDATE | MCHT_PREV,
MCHT_CALENDARDAY = MCHT_CALENDAR | 0x0002,
MCHT_CALENDARWEEKNUM = MCHT_CALENDAR | 0x0003
}
}
enum {
RBS_TOOLTIPS = 256,
RBS_VARHEIGHT = 512,
RBS_BANDBORDERS = 1024,
RBS_FIXEDORDER = 2048
}
enum {
RBIM_IMAGELIST = 1
}
enum {
RB_SETCOLORSCHEME = CCM_SETCOLORSCHEME,
RB_GETCOLORSCHEME = CCM_GETCOLORSCHEME
}
enum {
RBBS_BREAK = 0x0001,
RBBS_FIXEDSIZE = 0x0002,
RBBS_CHILDEDGE = 0x0004,
RBBS_HIDDEN = 0x0008,
RBBS_NOVERT = 0x0010,
RBBS_FIXEDBMP = 0x0020,
RBBS_VARIABLEHEIGHT = 0x0040,
RBBS_GRIPPERALWAYS = 0x0080,
RBBS_NOGRIPPER = 0x0100
}
static if (_WIN32_IE >= 0x500) {
enum {
RBBS_USECHEVRON = 0x0200
}
}
static if (_WIN32_IE >= 0x501) {
enum {
RBBS_HIDETITLE = 0x0400,
RBBS_TOPALIGN = 0x0800
}
}
enum {
RBBIM_STYLE = 1,
RBBIM_COLORS = 2,
RBBIM_TEXT = 4,
RBBIM_IMAGE = 8,
RBBIM_CHILD = 16,
RBBIM_CHILDSIZE = 32,
RBBIM_SIZE = 64,
RBBIM_BACKGROUND = 128,
RBBIM_ID = 256
}
enum {
RB_INSERTBANDA = WM_USER + 1,
RB_DELETEBAND,
RB_GETBARINFO,
RB_SETBARINFO, // = WM_USER + 4
RB_SETBANDINFOA = WM_USER + 6,
RB_SETPARENT = WM_USER + 7,
RB_INSERTBANDW = WM_USER + 10,
RB_SETBANDINFOW,
RB_GETBANDCOUNT,
RB_GETROWCOUNT,
RB_GETROWHEIGHT // = WM_USER + 14,
}
enum {
RBN_HEIGHTCHANGE = RBN_FIRST
}
static if (_WIN32_IE >= 0x300) {
enum {
LVN_ODCACHEHINT = LVN_FIRST - 13,
LVN_ODFINDITEMA = LVN_FIRST - 52,
LVN_ODFINDITEMW = LVN_FIRST - 79,
LVN_ITEMACTIVATE = LVN_FIRST - 14,
LVN_ODSTATECHANGED = LVN_FIRST - 15
}
version (Unicode) {
enum {
LVN_ODFINDITEM = LVN_ODFINDITEMW
}
} else {
enum {
LVN_ODFINDITEM = LVN_ODFINDITEMA
}
}
}
static if (_WIN32_IE >= 0x400) {
enum {
SB_SETICON = 1039,
SB_SETTIPTEXTA,
SB_SETTIPTEXTW,
SB_GETTIPTEXTA,
SB_GETTIPTEXTW,
SB_GETICON, // = 1044
SB_SETUNICODEFORMAT = 0x2005,
SB_GETUNICODEFORMAT = 0x2006
}
enum {
PGF_INVISIBLE = 0,
PGF_NORMAL = 1,
PGF_GRAYED = 2,
PGF_DEPRESSED = 4,
PGF_HOT = 8
}
enum {
PGB_TOPORLEFT,
PGB_BOTTOMORRIGHT
}
enum {
PGF_SCROLLUP = 1,
PGF_SCROLLDOWN = 2,
PGF_SCROLLLEFT = 4,
PGF_SCROLLRIGHT = 8
}
enum {
PGK_SHIFT = 1,
PGK_CONTROL = 2,
PGK_MENU = 4
}
enum {
PGF_CALCWIDTH = 1,
PGF_CALCHEIGHT = 2
}
enum {
PGM_FIRST = 0x1400,
PGM_SETCHILD = PGM_FIRST + 1,
PGM_RECALCSIZE,
PGM_FORWARDMOUSE,
PGM_SETBKCOLOR,
PGM_GETBKCOLOR,
PGM_SETBORDER,
PGM_GETBORDER,
PGM_SETPOS,
PGM_GETPOS,
PGM_SETBUTTONSIZE,
PGM_GETBUTTONSIZE,
PGM_GETBUTTONSTATE, // = PGM_FIRST + 12
PGM_GETDROPTARGET = CCM_GETDROPTARGET
}
enum {
RBS_REGISTERDROP = 4096,
RBS_AUTOSIZE = 8192,
RBS_VERTICALGRIPPER = 16384,
RBS_DBLCLKTOGGLE = 32768
}
enum {
RBBIM_IDEALSIZE = 512,
RBBIM_LPARAM = 1024,
RBBIM_HEADERSIZE = 2048
}
enum {
RB_HITTEST = WM_USER + 8,
RB_GETRECT = WM_USER + 9,
RB_IDTOINDEX = WM_USER + 16,
RB_GETTOOLTIPS,
RB_SETTOOLTIPS,
RB_SETBKCOLOR,
RB_GETBKCOLOR,
RB_SETTEXTCOLOR,
RB_GETTEXTCOLOR,
RB_SIZETORECT,
RB_BEGINDRAG,
RB_ENDDRAG,
RB_DRAGMOVE,
RB_GETBARHEIGHT,
RB_GETBANDINFOW,
RB_GETBANDINFOA,
RB_MINIMIZEBAND,
RB_MAXIMIZEBAND, // = WM_USER + 31
RB_GETDROPTARGET = CCM_GETDROPTARGET,
RB_GETBANDBORDERS = WM_USER + 34,
RB_SHOWBAND = WM_USER + 35,
RB_SETPALETTE = WM_USER + 37,
RB_GETPALETTE = WM_USER + 38,
RB_MOVEBAND = WM_USER + 39,
RB_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT,
RB_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT
}
enum {
RBN_GETOBJECT = RBN_FIRST - 1,
RBN_LAYOUTCHANGED = RBN_FIRST - 2,
RBN_AUTOSIZE = RBN_FIRST - 3,
RBN_BEGINDRAG = RBN_FIRST - 4,
RBN_ENDDRAG = RBN_FIRST - 5,
RBN_DELETINGBAND = RBN_FIRST - 6,
RBN_DELETEDBAND = RBN_FIRST - 7,
RBN_CHILDSIZE = RBN_FIRST - 8
}
enum {
RBNM_ID = 1,
RBNM_STYLE = 2,
RBNM_LPARAM = 4
}
enum {
RBHT_NOWHERE = 1,
RBHT_CAPTION,
RBHT_CLIENT,
RBHT_GRABBER
}
version (Unicode) {
alias SB_SETTIPTEXTW SB_SETTIPTEXT;
alias SB_GETTIPTEXTW SB_GETTIPTEXT;
alias RB_GETBANDINFOW RB_GETBANDINFO;
} else {
alias SB_SETTIPTEXTA SB_SETTIPTEXT;
alias SB_GETTIPTEXTA SB_GETTIPTEXT;
alias RB_GETBANDINFOA RB_GETBANDINFO;
}
} else {
enum {
RB_GETBANDINFO = WM_USER + 5
}
}
static if (_WIN32_IE >= 0x500) {
enum {
RB_PUSHCHEVRON = WM_USER + 43,
}
}
static if (_WIN32_IE >= 0x600) {
enum {
RB_SETEXTENDEDSTYLE = WM_USER + 41,
RB_GETEXTENDEDSTYLE = WM_USER + 42,
}
}
static if (_WIN32_WINNT >= 0x500) {
enum {
RB_SETBANDWIDTH = WM_USER + 44,
}
}
static if (_WIN32_WINNT >= 0x501) {
enum {
ECM_FIRST = 0x1500,
BCM_FIRST = 0x1600,
BCM_GETIDEALSIZE = BCM_FIRST + 0x0001,
BCM_SETIMAGELIST = BCM_FIRST + 0x0002,
BCM_GETIMAGELIST = BCM_FIRST + 0x0003,
BCM_SETTEXTMARGIN = BCM_FIRST + 0x0004,
BCM_GETTEXTMARGIN = BCM_FIRST + 0x0005,
BCN_HOTITEMCHANGE = BCN_FIRST + 0x0001,
}
struct NMBCHOTITEM {
NMHDR hdr;
DWORD dwFlags;
}
alias NMBCHOTITEM* LPNMBCHOTITEM;
}
static if(_WIN32_WINNT >= 0x600) {
enum {
BST_DROPDOWNPUSHED = 0x0400,
BS_SPLITBUTTON = 0x0000_000C,
BS_DEFSPLITBUTTON = 0x0000_000D,
BS_COMMANDLINK = 0x0000_000E,
BS_DEFCOMMANDLINK = 0x0000_000F,
BCSIF_GLYPH = 0x0001,
BCSIF_IMAGE = 0x0002,
BCSIF_STYLE = 0x0004,
BCSIF_SIZE = 0x0008,
BCSS_NOSPLIT = 0x0001,
BCSS_STRETCH = 0x0002,
BCSS_ALIGNLEFT = 0x0004,
BCSS_IMAGE = 0x0008,
BCM_SETDROPDOWNSTATE = BCM_FIRST + 0x0006,
BCM_SETSPLITINFO = BCM_FIRST + 0x0007,
BCM_GETSPLITINFO = BCM_FIRST + 0x0008,
BCM_SETNOTE = BCM_FIRST + 0x0009,
BCM_GETNOTE = BCM_FIRST + 0x000A,
BCM_GETNOTELENGTH = BCM_FIRST + 0x000B,
BCM_SETSHIELD = BCM_FIRST + 0x000C,
BCN_DROPDOWN = BCN_FIRST + 0x0002,
}
const HIMAGELIST BCCL_NOGLYPH = cast(HIMAGELIST)-1;
struct BUTTON_SPLITINFO
{
UINT mask;
HIMAGELIST himlGlyph;
UINT uSplitStyle;
SIZE size;
}
alias BUTTON_SPLITINFO* PBUTTON_SPLITINFO;
}
enum {
CBEM_INSERTITEMA = WM_USER + 1,
CBEM_SETIMAGELIST,
CBEM_GETIMAGELIST,
CBEM_GETITEMA,
CBEM_SETITEMA,
CBEM_GETCOMBOCONTROL,
CBEM_GETEDITCONTROL,
CBEM_SETEXSTYLE,
CBEM_GETEXSTYLE, // = WM_USER + 9)
CBEM_DELETEITEM = CB_DELETESTRING
}
static if (_WIN32_IE >= 0x400) {
enum {
CBEM_SETEXTENDEDSTYLE = WM_USER + 14,
CBEM_GETEXTENDEDSTYLE = WM_USER + 9,
CBEM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT,
CBEM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT
}
}
enum {
CBEM_HASEDITCHANGED = WM_USER + 10,
CBEM_INSERTITEMW = WM_USER + 11,
CBEM_SETITEMW = WM_USER + 12,
CBEM_GETITEMW = WM_USER + 13
}
static if (_WIN32_WINNT >= 0x501)
{
enum {
CBEM_SETWINDOWTHEME = CCM_SETWINDOWTHEME
}
}
enum {
DA_LAST = 0x7fffffff
}
enum {
DPA_APPEND = 0x7fffffff,
DPA_ERR = -1
}
enum {
DSA_APPEND = 0x7fffffff,
DSA_ERR = -1
}
enum {
DPAS_SORTED = 1,
DPAS_INSERTBEFORE = 2,
DPAS_INSERTAFTER = 4
}
static if (_WIN32_IE >= 0x400) {
enum {
WSB_PROP_CYVSCROLL = 1,
WSB_PROP_CXHSCROLL = 2,
WSB_PROP_CYHSCROLL = 4,
WSB_PROP_CXVSCROLL = 8,
WSB_PROP_CXHTHUMB = 16,
WSB_PROP_CYVTHUMB = 32,
WSB_PROP_VBKGCOLOR = 64,
WSB_PROP_HBKGCOLOR = 128,
WSB_PROP_VSTYLE = 256,
WSB_PROP_HSTYLE = 512,
WSB_PROP_WINSTYLE = 1024,
WSB_PROP_PALETTE = 2048,
WSB_PROP_MASK = 0xfff,
FSB_FLAT_MODE = 2,
FSB_ENCARTA_MODE = 1,
FSB_REGULAR_MODE = 0
}
}
static if (_WIN32_WINNT >= 0x501) {
enum {
LIF_ITEMINDEX = 1,
LIF_STATE = 2,
LIF_ITEMID = 4,
LIF_URL = 8
}
enum {
LIS_FOCUSED = 1,
LIS_ENABLED = 2,
LIS_VISITED = 4
}
enum {
LM_HITTEST = WM_USER + 768,
LM_GETIDEALHEIGHT,
LM_SETITEM,
LM_GETITEM, // = WM_USER + 771
LM_GETIDEALSIZE = LM_GETIDEALHEIGHT,
}
const size_t MAX_LINKID_TEXT = 48;
const size_t L_MAX_URL_LENGTH = 2084;
}
struct TBMETRICS {
UINT cbSize = TBMETRICS.sizeof;
DWORD dwMask;
int cxPad;
int cyPad;
int cxBarPad;
int cyBarPad;
int cxButtonSpacing;
int cyButtonSpacing;
}
alias TBMETRICS* LPTBMETRICS;
static if (_WIN32_WINNT >= 0x501) {
struct TTGETTITLE {
DWORD dwSize = TTGETTITLE.sizeof;
UINT uTitleBitmap;
UINT cch;
WCHAR* pszTitle;
}
alias TTGETTITLE* PTTGETTITLE;
}
static if (_WIN32_WINNT >= 0x600) {
struct MCGRIDINFO {
UINT cbSize;
DWORD dwPart;
DWORD dwFlags;
int iCalendar;
int iRow;
int iCol;
BOOL bSelected;
SYSTEMTIME stStart;
SYSTEMTIME stEnd;
RECT rc;
PWSTR pszName;
size_t cchName;
}
alias MCGRIDINFO* PMCGRIDINFO;
struct DATETIMEPICKERINFO
{
DWORD cbSize;
RECT rcCheck;
DWORD stateCheck;
RECT rcButton;
DWORD stateButton;
HWND hwndEdit;
HWND hwndUD;
HWND hwndDropDown;
}
alias DATETIMEPICKERINFO* LPDATETIMEPICKERINFO;
}
struct COMBOBOXEXITEMA {
UINT mask;
INT_PTR iItem;
LPSTR pszText;
int cchTextMax;
int iImage;
int iSelectedImage;
int iOverlay;
int iIndent;
LPARAM lParam;
}
alias COMBOBOXEXITEMA* PCOMBOBOXEXITEMA;
alias const(COMBOBOXEXITEMA)* PCCOMBOEXITEMA;
struct COMBOBOXEXITEMW {
UINT mask;
INT_PTR iItem;
LPWSTR pszText;
int cchTextMax;
int iImage;
int iSelectedImage;
int iOverlay;
int iIndent;
LPARAM lParam;
}
alias COMBOBOXEXITEMW* PCOMBOBOXEXITEMW;
alias const(COMBOBOXEXITEMW)* PCCOMBOEXITEMW;
static if (_WIN32_IE >= 0x400) {
struct NMCOMBOBOXEXA {
NMHDR hdr;
COMBOBOXEXITEMA ceItem;
}
alias NMCOMBOBOXEXA* PNMCOMBOBOXEXA;
struct NMCOMBOBOXEXW {
NMHDR hdr;
COMBOBOXEXITEMW ceItem;
}
alias NMCOMBOBOXEXW* PNMCOMBOBOXEXW;
struct NMCBEDRAGBEGINW {
NMHDR hdr;
int iItemid;
WCHAR[CBEMAXSTRLEN] szText;
}
alias NMCBEDRAGBEGINW* LPNMCBEDRAGBEGINW, PNMCBEDRAGBEGINW;
struct NMCBEDRAGBEGINA {
NMHDR hdr;
int iItemid;
char[CBEMAXSTRLEN] szText;
}
alias NMCBEDRAGBEGINA* LPNMCBEDRAGBEGINA, PNMCBEDRAGBEGINA;
struct NMIPADDRESS {
NMHDR hdr;
int iField;
int iValue;
}
alias NMIPADDRESS* LPNMIPADDRESS;
struct NMLVKEYDOWN {
NMHDR hdr;
WORD wVKey;
UINT flags;
}
alias NMLVKEYDOWN* LPNMLVKEYDOWN;
struct NMPGCALCSIZE {
NMHDR hdr;
DWORD dwFlag;
int iWidth;
int iHeight;
}
alias NMPGCALCSIZE* LPNMPGCALCSIZE;
struct NMPGSCROLL {
NMHDR hdr;
BOOL fwKeys;
RECT rcParent;
int iDir;
int iXpos;
int iYpos;
int iScroll;
}
alias NMPGSCROLL* LPNMPGSCROLL;
struct NMSELCHANGE {
NMHDR nmhdr;
SYSTEMTIME stSelStart;
SYSTEMTIME stSelEnd;
}
alias NMSELCHANGE* LPNMSELCHANGE;
struct NMTBHOTITEM {
NMHDR hdr;
int idOld;
int idNew;
DWORD dwFlags;
}
alias NMTBHOTITEM* LPNMTBHOTITEM;
struct NMTBDISPINFOA {
NMHDR hdr;
DWORD dwMask;
int idCommand;
DWORD_PTR lParam;
int iImage;
LPSTR pszText;
int cchText;
}
alias NMTBDISPINFOA* LPNMTBDISPINFOA;
struct NMTBDISPINFOW {
NMHDR hdr;
DWORD dwMask;
int idCommand;
DWORD_PTR lParam;
int iImage;
LPWSTR pszText;
int cchText;
}
alias NMTBDISPINFOW* LPNMTBDISPINFOW;
struct NMTBGETINFOTIPA {
NMHDR hdr;
LPSTR pszText;
int cchTextMax;
int iItem;
LPARAM lParam;
}
alias NMTBGETINFOTIPA* LPNMTBGETINFOTIPA;
struct NMTBGETINFOTIPW {
NMHDR hdr;
LPWSTR pszText;
int cchTextMax;
int iItem;
LPARAM lParam;
}
alias NMTBGETINFOTIPW* LPNMTBGETINFOTIPW;
struct NMMOUSE {
NMHDR hdr;
DWORD_PTR dwItemSpec;
DWORD_PTR dwItemData;
POINT pt;
LPARAM dwHitInfo;
}
alias NMMOUSE* LPNMMOUSE;
}
static if (_WIN32_IE >= 0x401) {
struct NMTOOLTIPSCREATED {
NMHDR hdr;
HWND hwndToolTips;
}
alias NMTOOLTIPSCREATED* LPNMTOOLTIPSCREATED;
}
struct NMDATETIMECHANGE {
NMHDR nmhdr;
DWORD dwFlags;
SYSTEMTIME st;
}
alias NMDATETIMECHANGE* LPNMDATETIMECHANGE;
struct NMCBEENDEDITW {
NMHDR hdr;
BOOL fChanged;
int iNewSelection;
WCHAR[CBEMAXSTRLEN] szText;
int iWhy;
}
alias NMCBEENDEDITW* LPNMCBEENDEDITW, PNMCBEENDEDITW;
struct NMCBEENDEDITA {
NMHDR hdr;
BOOL fChanged;
int iNewSelection;
char[CBEMAXSTRLEN] szText;
int iWhy;
}
alias NMCBEENDEDITA* LPNMCBEENDEDITA, PNMCBEENDEDITA;
struct COLORMAP {
COLORREF from;
COLORREF to;
}
alias COLORMAP* LPCOLORMAP;
struct DRAGLISTINFO {
UINT uNotification;
HWND hWnd;
POINT ptCursor;
}
alias DRAGLISTINFO* LPDRAGLISTINFO;
struct TBBUTTON {
int iBitmap;
int idCommand;
BYTE fsState;
BYTE fsStyle;
version(Win64){
BYTE[6] bReserved;
} else {
BYTE[2] bReserved;
}
DWORD_PTR dwData;
INT_PTR iString;
}
alias TBBUTTON* PTBBUTTON, LPTBBUTTON;
alias const(TBBUTTON)* LPCTBBUTTON;
static if (_WIN32_IE >= 0x400) {
struct TBBUTTONINFOA {
UINT cbSize = TBBUTTONINFOA.sizeof;
DWORD dwMask;
int idCommand;
int iImage;
BYTE fsState;
BYTE fsStyle;
WORD cx;
DWORD_PTR lParam;
LPSTR pszText;
int cchText;
}
alias TBBUTTONINFOA* LPTBBUTTONINFOA;
struct TBBUTTONINFOW {
UINT cbSize = TBBUTTONINFOW.sizeof;
DWORD dwMask;
int idCommand;
int iImage;
BYTE fsState;
BYTE fsStyle;
WORD cx;
DWORD_PTR lParam;
LPWSTR pszText;
int cchText;
}
alias TBBUTTONINFOW* LPTBBUTTONINFOW;
struct TBINSERTMARK {
int iButton;
DWORD dwFlags;
}
alias TBINSERTMARK* LPTBINSERTMARK;
struct LVBKIMAGEA {
ULONG ulFlags;
HBITMAP hbm;
LPSTR pszImage;
UINT cchImageMax;
int xOffsetPercent;
int yOffsetPercent;
}
alias LVBKIMAGEA* LPLVBKIMAGEA;
struct LVBKIMAGEW {
ULONG ulFlags;
HBITMAP hbm;
LPWSTR pszImage;
UINT cchImageMax;
int xOffsetPercent;
int yOffsetPercent;
}
alias LVBKIMAGEW* LPLVBKIMAGEW;
}
/*struct TBNOTIFY {
NMHDR hdr;
int iItem;
TBBUTTON tbButton;
int cchText;
LPTSTR pszText;
}
alias TBNOTIFY* LPTBNOTIFY;
*/
/*struct TBSAVEPARAMS {
HKEY hkr;
LPCTSTR pszSubKey;
LPCTSTR pszValueName;
}*/
struct IMAGEINFO {
HBITMAP hbmImage;
HBITMAP hbmMask;
int Unused1;
int Unused2;
RECT rcImage;
}
alias IMAGEINFO* LPIMAGEINFO;
static if (_WIN32_IE >= 0x500) {
struct HDITEMA {
UINT mask;
int cxy;
LPSTR pszText;
HBITMAP hbm;
int cchTextMax;
int fmt;
LPARAM lParam;
int iImage;
int iOrder;
UINT type;
LPVOID pvFilter;
}
struct HDITEMW {
UINT mask;
int cxy;
LPWSTR pszText;
HBITMAP hbm;
int cchTextMax;
int fmt;
LPARAM lParam;
int iImage;
int iOrder;
UINT type;
LPVOID pvFilter;
}
} else static if (_WIN32_IE >= 0x300) {
struct HDITEMA {
UINT mask;
int cxy;
LPSTR pszText;
HBITMAP hbm;
int cchTextMax;
int fmt;
LPARAM lParam;
int iImage;
int iOrder;
}
struct HDITEMW {
UINT mask;
int cxy;
LPWSTR pszText;
HBITMAP hbm;
int cchTextMax;
int fmt;
LPARAM lParam;
int iImage;
int iOrder;
}
} else {
struct HDITEMA {
UINT mask;
int cxy;
LPSTR pszText;
HBITMAP hbm;
int cchTextMax;
int fmt;
LPARAM lParam;
}
struct HDITEMW {
UINT mask;
int cxy;
LPWSTR pszText;
HBITMAP hbm;
int cchTextMax;
int fmt;
LPARAM lParam;
}
}
alias HDITEMA* LPHDITEMA;
alias HDITEMW* LPHDITEMW;
deprecated {
alias HDITEMA HD_ITEMA;
alias HDITEMW HD_ITEMW;
//alias HDITEM HD_ITEM; fixme
}
struct HD_LAYOUT {
RECT* prc;
WINDOWPOS* pwpos;
}
alias HD_LAYOUT* LPHDLAYOUT;
deprecated alias HD_LAYOUT HDLAYOUT;
struct HD_HITTESTINFO {
POINT pt;
UINT flags;
int iItem;
}
alias HD_HITTESTINFO* LPHDHITTESTINFO;
struct HD_NOTIFYA {
NMHDR hdr;
int iItem;
int iButton;
HDITEMA* pitem;
}
struct HD_NOTIFYW {
NMHDR hdr;
int iItem;
int iButton;
HDITEMW* pitem;
}
/* FIXME: NMHEADER structure (base for all events of the comctl controls)
is the same as HD_NOTIFY depending on the value of _WIN32_IE macro.
I'm defining both for now. */
struct NMHEADERA {
NMHDR hdr;
int iItem;
int iButton;
HDITEMA* pitem;
}
alias NMHEADERA* LPNMHEADERA;
struct NMHEADERW {
NMHDR hdr;
int iItem;
int iButton;
HDITEMW* pitem;
}
alias NMHEADERW* LPNMHEADERW;
version (Unicode) {
alias NMHEADERW NMHEADER;
alias LPNMHEADERW LPNMHEADER;
} else {
alias NMHEADERA NMHEADER;
alias LPNMHEADERA LPNMHEADER;
}
// End FIXME
struct NMHDDISPINFOA {
NMHDR hdr;
int iItem;
UINT mask;
LPSTR pszText;
int cchTextMax;
int iImage;
LPARAM lParam;
}
alias NMHDDISPINFOA* LPNMHDDISPINFOA;
struct NMHDDISPINFOW {
NMHDR hdr;
int iItem;
UINT mask;
LPWSTR pszText;
int cchTextMax;
int iImage;
LPARAM lParam;
}
alias NMHDDISPINFOW* LPNMHDDISPINFOW;
struct NMCUSTOMDRAW {
NMHDR hdr;
DWORD dwDrawStage;
HDC hdc;
RECT rc;
DWORD dwItemSpec;
UINT uItemState;
LPARAM lItemlParam;
}
alias NMCUSTOMDRAW* LPNMCUSTOMDRAW;
static if (_WIN32_IE >= 0x400) {
struct NMLVCUSTOMDRAW {
NMCUSTOMDRAW nmcd;
COLORREF clrText;
COLORREF clrTextBk;
int iSubItem;
}
} else {
struct NMLVCUSTOMDRAW {
NMCUSTOMDRAW nmcd;
COLORREF clrText;
COLORREF clrTextBk;
}
}
alias NMLVCUSTOMDRAW* LPNMLVCUSTOMDRAW;
static if (_WIN32_IE >= 0x400) {
struct NMLVGETINFOTIPA {
NMHDR hdr;
DWORD dwFlags;
LPSTR pszText;
int cchTextMax;
int iItem;
int iSubItem;
LPARAM lParam;
}
alias NMLVGETINFOTIPA* LPNMLVGETINFOTIPA;
struct NMLVGETINFOTIPW {
NMHDR hdr;
DWORD dwFlags;
LPWSTR pszText;
int cchTextMax;
int iItem;
int iSubItem;
LPARAM lParam;
}
alias NMLVGETINFOTIPW* LPNMLVGETINFOTIPW;
}
static if (_WIN32_IE >= 0x400) {
struct NMTVCUSTOMDRAW {
NMCUSTOMDRAW nmcd;
COLORREF clrText;
COLORREF clrTextBk;
int iLevel;
}
} else {
struct NMTVCUSTOMDRAW {
NMCUSTOMDRAW nmcd;
COLORREF clrText;
COLORREF clrTextBk;
}
}
alias NMTVCUSTOMDRAW* LPNMTVCUSTOMDRAW;
static if (_WIN32_IE >= 0x400) {
static if (_WIN32_WINNT >= 0x501) {
struct NMTBCUSTOMDRAW {
NMCUSTOMDRAW nmcd;
HBRUSH hbrMonoDither;
HBRUSH hbrLines;
HPEN hpenLines;
COLORREF clrText;
COLORREF clrMark;
COLORREF clrTextHighlight;
COLORREF clrBtnFace;
COLORREF clrBtnHighlight;
COLORREF clrHighlightHotTrack;
RECT rcText;
int nStringBkMode;
int nHLStringBkMode;
int iListGap;
}
} else {
struct NMTBCUSTOMDRAW {
NMCUSTOMDRAW nmcd;
HBRUSH hbrMonoDither;
HBRUSH hbrLines;
HPEN hpenLines;
COLORREF clrText;
COLORREF clrMark;
COLORREF clrTextHighlight;
COLORREF clrBtnFace;
COLORREF clrBtnHighlight;
COLORREF clrHighlightHotTrack;
RECT rcText;
int nStringBkMode;
int nHLStringBkMode;
}
}
alias NMTBCUSTOMDRAW* LPNMTBCUSTOMDRAW;
struct NMITEMACTIVATE {
NMHDR hdr;
int iItem;
int iSubItem;
UINT uNewState;
UINT uOldState;
UINT uChanged;
POINT ptAction;
LPARAM lParam;
UINT uKeyFlags;
}
alias NMITEMACTIVATE* LPNMITEMACTIVATE;
}
struct TBADDBITMAP {
HINSTANCE hInst;
UINT_PTR nID;
}
alias TBADDBITMAP* LPTBADDBITMAP;
struct TBSAVEPARAMSA {
HKEY hkr;
LPCSTR pszSubKey;
LPCSTR pszValueName;
}
struct TBSAVEPARAMSW {
HKEY hkr;
LPCWSTR pszSubKey;
LPCWSTR pszValueName;
}
struct TBREPLACEBITMAP {
HINSTANCE hInstOld;
UINT_PTR nIDOld;
HINSTANCE hInstNew;
UINT_PTR nIDNew;
int nButtons;
}
alias TBREPLACEBITMAP* LPTBREPLACEBITMAP;
static if (_WIN32_IE >= 0x500) {
struct NMTOOLBARA {
NMHDR hdr;
int iItem;
TBBUTTON tbButton;
int cchText;
LPSTR pszText;
RECT rcButton;
}
struct NMTOOLBARW {
NMHDR hdr;
int iItem;
TBBUTTON tbButton;
int cchText;
LPWSTR pszText;
RECT rcButton;
}
} else {
struct NMTOOLBARA {
NMHDR hdr;
int iItem;
TBBUTTON tbButton;
int cchText;
LPSTR pszText;
}
struct NMTOOLBARW {
NMHDR hdr;
int iItem;
TBBUTTON tbButton;
int cchText;
LPWSTR pszText;
}
}
alias NMTOOLBARA* LPNMTOOLBARA;
alias NMTOOLBARW* LPNMTOOLBARW;
alias NMTOOLBARA TBNOTIFYA;
alias LPNMTOOLBARA LPTBNOTIFYA;
alias NMTOOLBARW TBNOTIFYW;
alias LPNMTOOLBARW LPTBNOTIFYW;
static if (_WIN32_WINNT >= 0x501) {
struct TOOLINFOA {
UINT cbSize = TOOLINFOA.sizeof;
UINT uFlags;
HWND hwnd;
UINT_PTR uId;
RECT rect;
HINSTANCE hinst;
LPSTR lpszText;
LPARAM lParam;
void* lpReserved;
}
struct TOOLINFOW {
UINT cbSize = TOOLINFOW.sizeof;
UINT uFlags;
HWND hwnd;
UINT_PTR uId;
RECT rect;
HINSTANCE hinst;
LPWSTR lpszText;
LPARAM lParam;
void* lpReserved;
}
const size_t
TTTOOLINFOA_V1_SIZE = TOOLINFOA.lParam.offsetof,
TTTOOLINFOW_V1_SIZE = TOOLINFOW.lParam.offsetof,
TTTOOLINFOA_V2_SIZE = TOOLINFOA.lpReserved.offsetof,
TTTOOLINFOW_V2_SIZE = TOOLINFOW.lpReserved.offsetof,
TTTOOLINFOA_V3_SIZE = TOOLINFOA.sizeof,
TTTOOLINFOW_V3_SIZE = TOOLINFOW.sizeof;
} else static if (_WIN32_IE >= 0x300) {
struct TOOLINFOA {
UINT cbSize = TOOLINFOA.sizeof;
UINT uFlags;
HWND hwnd;
UINT uId;
RECT rect;
HINSTANCE hinst;
LPSTR lpszText;
LPARAM lParam;
}
struct TOOLINFOW {
UINT cbSize = TOOLINFOW.sizeof;
UINT uFlags;
HWND hwnd;
UINT uId;
RECT rect;
HINSTANCE hinst;
LPWSTR lpszText;
LPARAM lParam;
}
const size_t
TTTOOLINFOA_V1_SIZE = TOOLINFOA.lParam.offsetof,
TTTOOLINFOW_V1_SIZE = TOOLINFOW.lParam.offsetof,
TTTOOLINFOA_V2_SIZE = TOOLINFOA.sizeof,
TTTOOLINFOW_V2_SIZE = TOOLINFOW.sizeof;
} else {
struct TOOLINFOA {
UINT cbSize = TOOLINFOA.sizeof;
UINT uFlags;
HWND hwnd;
UINT uId;
RECT rect;
HINSTANCE hinst;
LPSTR lpszText;
}
struct TOOLINFOW {
UINT cbSize = TOOLINFOW.sizeof;
UINT uFlags;
HWND hwnd;
UINT uId;
RECT rect;
HINSTANCE hinst;
LPWSTR lpszText;
}
const size_t
TTTOOLINFOA_V1_SIZE = TOOLINFOA.sizeof,
TTTOOLINFOW_V1_SIZE = TOOLINFOW.sizeof;
}
alias TOOLINFOA TTTOOLINFOA;
alias TOOLINFOW TTTOOLINFOW;
alias TTTOOLINFOA* LPTTTOOLINFOA, PTOOLINFOA, LPTOOLINFOA;
alias TTTOOLINFOW* LPTTTOOLINFOW, PTOOLINFOW, LPTOOLINFOW;
struct TTHITTESTINFOA {
HWND hwnd;
POINT pt;
TOOLINFOA ti;
}
alias TTHITTESTINFOA* LPTTHITTESTINFOA, LPHITTESTINFOA;
struct TTHITTESTINFOW {
HWND hwnd;
POINT pt;
TOOLINFOW ti;
}
alias TTHITTESTINFOW* LPTTHITTESTINFOW, LPHITTESTINFOW;
static if (_WIN32_IE >= 0x300) {
struct NMTTDISPINFOA {
NMHDR hdr;
LPSTR lpszText;
char[80] szText;
HINSTANCE hinst;
UINT uFlags;
LPARAM lParam;
}
struct NMTTDISPINFOW {
NMHDR hdr;
LPWSTR lpszText;
WCHAR[80] szText;
HINSTANCE hinst;
UINT uFlags;
LPARAM lParam;
}
} else {
struct NMTTDISPINFOA {
NMHDR hdr;
LPSTR lpszText;
char[80] szText;
HINSTANCE hinst;
UINT uFlags;
}
struct NMTTDISPINFOW {
NMHDR hdr;
LPWSTR lpszText;
WCHAR[80] szText;
HINSTANCE hinst;
UINT uFlags;
}
}
alias NMTTDISPINFOA* LPNMTTDISPINFOA;
alias NMTTDISPINFOW* LPNMTTDISPINFOW;
alias NMTTDISPINFOA TOOLTIPTEXTA;
alias LPNMTTDISPINFOA LPTOOLTIPTEXTA;
alias NMTTDISPINFOW TOOLTIPTEXTW;
alias LPNMTTDISPINFOW LPTOOLTIPTEXTW;
struct UDACCEL {
UINT nSec;
UINT nInc;
}
alias UDACCEL* LPUDACCEL;
struct NMUPDOWN {
NMHDR hdr;
int iPos;
int iDelta;
}
alias NMUPDOWN* LPNMUPDOWN;
deprecated {
alias NMUPDOWN NM_UPDOWN;
alias LPNMUPDOWN LPNM_UPDOWN;
}
static if (_WIN32_WINNT >= 0x501) {
struct LVITEMA {
UINT mask;
int iItem;
int iSubItem;
UINT state;
UINT stateMask;
LPSTR pszText;
int cchTextMax;
int iImage;
LPARAM lParam;
int iIndent;
int iGroupId;
UINT cColumns;
PUINT puColumns;
}
struct LVITEMW {
UINT mask;
int iItem;
int iSubItem;
UINT state;
UINT stateMask;
LPWSTR pszText;
int cchTextMax;
int iImage;
LPARAM lParam;
int iIndent;
int iGroupId;
UINT cColumns;
PUINT puColumns;
}
} else static if (_WIN32_IE >= 0x300) {
struct LVITEMA {
UINT mask;
int iItem;
int iSubItem;
UINT state;
UINT stateMask;
LPSTR pszText;
int cchTextMax;
int iImage;
LPARAM lParam;
int iIndent;
}
struct LVITEMW {
UINT mask;
int iItem;
int iSubItem;
UINT state;
UINT stateMask;
LPWSTR pszText;
int cchTextMax;
int iImage;
LPARAM lParam;
int iIndent;
}
} else {
struct LVITEMA {
UINT mask;
int iItem;
int iSubItem;
UINT state;
UINT stateMask;
LPSTR pszText;
int cchTextMax;
int iImage;
LPARAM lParam;
}
struct LVITEMW {
UINT mask;
int iItem;
int iSubItem;
UINT state;
UINT stateMask;
LPWSTR pszText;
int cchTextMax;
int iImage;
LPARAM lParam;
}
}
alias LVITEMA* LPLVITEMA;
alias LVITEMW* LPLVITEMW;
alias LVITEMA LV_ITEMA;
alias LVITEMW LV_ITEMW;
struct LVFINDINFOA {
UINT flags;
LPCSTR psz;
LPARAM lParam;
POINT pt;
UINT vkDirection;
}
struct LVFINDINFOW {
UINT flags;
LPCWSTR psz;
LPARAM lParam;
POINT pt;
UINT vkDirection;
}
alias LVFINDINFOA* LPFINDINFOA;
alias LVFINDINFOA LV_FINDINFOA;
alias LVFINDINFOW* LPFINDINFOW;
alias LVFINDINFOW LV_FINDINFOW;
struct NMLVFINDITEMA {
NMHDR hdr;
int iStart;
LVFINDINFOA lvfi;
}
struct NMLVFINDITEMW {
NMHDR hdr;
int iStart;
LVFINDINFOW lvfi;
}
alias NMLVFINDITEMA* PNMLVFINDITEMA, LPNMLVFINDITEMA;
alias NMLVFINDITEMW* PNMLVFINDITEMW, LPNMLVFINDITEMW;
static if (_WIN32_IE >= 0x300) {
struct LVHITTESTINFO {
POINT pt;
UINT flags;
int iItem;
int iSubItem;
}
} else {
struct LVHITTESTINFO {
POINT pt;
UINT flags;
int iItem;
}
}
alias LVHITTESTINFO* LPLVHITTESTINFO;
alias LVHITTESTINFO LV_HITTESTINFO;
static if (_WIN32_IE >= 0x300) {
struct LVCOLUMNA {
UINT mask;
int fmt;
int cx;
LPSTR pszText;
int cchTextMax;
int iSubItem;
int iImage;
int iOrder;
}
struct LVCOLUMNW {
UINT mask;
int fmt;
int cx;
LPWSTR pszText;
int cchTextMax;
int iSubItem;
int iImage;
int iOrder;
}
} else {
struct LVCOLUMNA {
UINT mask;
int fmt;
int cx;
LPSTR pszText;
int cchTextMax;
int iSubItem;
}
struct LVCOLUMNW {
UINT mask;
int fmt;
int cx;
LPWSTR pszText;
int cchTextMax;
int iSubItem;
}
}
alias LVCOLUMNA* LPLVCOLUMNA;
alias LVCOLUMNW* LPLVCOLUMNW;
alias LVCOLUMNA LV_COLUMNA;
alias LVCOLUMNW LV_COLUMNW;
static if (_WIN32_WINNT >= 0x501) {
/* SG: The definitions in this static if block are from the MSDN docs.
* They are not in MinGW, but nonetheless required for macros that are.
*/
struct LVGROUP {
UINT cbSize = LVGROUP.sizeof;
UINT mask;
LPWSTR pszHeader;
int cchHeader;
LPWSTR pszFooter;
int cchFooter;
int iGroupId;
UINT stateMask;
UINT state;
UINT uAlign;
static if (_WIN32_WINNT >= 0x600) {
LPWSTR pszSubtitle;
UINT cchSubtitle;
LPWSTR pszTask;
UINT cchTask;
LPWSTR pszDescriptionTop;
UINT cchDescriptionTop;
LPWSTR pszDescriptionBottom;
UINT cchDescriptionBottom;
int iTitleImage;
int iExtendedImage;
int iFirstItem; // Read only
UINT cItems; // Read only
LPWSTR pszSubsetTitle; // NULL if group is not subset
UINT cchSubsetTitle;
}
}
alias LVGROUP* PLVGROUP;
struct LVGROUPMETRICS {
UINT cbSize = LVGROUPMETRICS.sizeof;
UINT mask;
UINT Left;
UINT Top;
UINT Right;
UINT Bottom;
COLORREF crLeft;
COLORREF crTop;
COLORREF crRight;
COLORREF crBottom;
COLORREF crHeader;
COLORREF crFooter;
}
alias LVGROUPMETRICS* PLVGROUPMETRICS;
struct LVINSERTMARK {
UINT cbSize = LVINSERTMARK.sizeof;
DWORD dwFlags;
int iItem;
DWORD dwReserved;
}
alias LVINSERTMARK* PLVINSERTMARK;
alias LVINSERTMARK* LPLVINSERTMARK;
struct LVTILEINFO {
UINT cbSize = LVTILEINFO.sizeof;
int iItem;
UINT cColumns;
PUINT puColumns;
static if (_WIN32_WINNT >= 0x600) {
int* piColFmt;
}
}
alias LVTILEINFO* PLVTILEINFO;
struct LVTILEVIEWINFO {
UINT cbSize = LVTILEVIEWINFO.sizeof;
DWORD dwMask;
DWORD dwFlags;
SIZE sizeTile;
int cLines;
RECT rcLabelMargin;
}
alias LVTILEVIEWINFO* PLVTILEVIEWINFO;
struct LVINSERTGROUPSORTED {
PFNLVGROUPCOMPARE pfnGroupCompare;
LPVOID* pvData;
LVGROUP lvGroup;
}
alias LVINSERTGROUPSORTED* PLVINSERTGROUPSORTED;
alias int function(INT, INT, VOID*) PFNLVGROUPCOMPARE;
struct LVSETINFOTIP {
UINT cbSize = LVSETINFOTIP.sizeof;
DWORD dwFlags;
LPWSTR pszText;
int iItem;
int iSubItem;
HBITMAP hbmp;
}
alias LVSETINFOTIP* PLVSETINFOTIP;
struct BUTTON_IMAGELIST {
HIMAGELIST himl;
RECT margin;
UINT uAlign;
}
alias BUTTON_IMAGELIST* PBUTTON_IMAGELIST;
}
static if (_WIN32_WINNT >= 0x600) {
struct LVITEMINDEX
{
int iItem;
int iGroup;
};
alias LVITEMINDEX* PLVITEMINDEX;
struct LVFOOTERINFO
{
UINT mask;
LPWSTR pszText;
int cchTextMax;
UINT cItems;
}
alias LVFOOTERINFO* LPLVFOOTERINFO;
struct LVFOOTERITEM
{
UINT mask;
int iItem;
LPWSTR pszText;
int cchTextMax;
UINT state;
UINT stateMask;
}
alias LVFOOTERITEM *LPLVFOOTERITEM;
alias UINT TVITEMPART;
enum {
TVGIPR_BUTTON = 0x0001,
}
}
alias int function(LPARAM, LPARAM, LPARAM) PFNLVCOMPARE;
struct NMLISTVIEW {
NMHDR hdr;
int iItem;
int iSubItem;
UINT uNewState;
UINT uOldState;
UINT uChanged;
POINT ptAction;
LPARAM lParam;
}
alias NMLISTVIEW* LPNMLISTVIEW;
deprecated {
alias NMLISTVIEW NM_LISTVIEW;
alias LPNMLISTVIEW LPNM_LISTVIEW;
}
struct NMLVDISPINFOA {
NMHDR hdr;
LV_ITEMA item;
}
alias NMLVDISPINFOA* LPNMLVDISPINFOA;
alias NMLVDISPINFOA LV_DISPINFOA;
struct NMLVDISPINFOW {
NMHDR hdr;
LV_ITEMW item;
}
alias NMLVDISPINFOW* LPNMLVDISPINFOW;
alias NMLVDISPINFOW LV_DISPINFOW;
struct LV_KEYDOWN {
NMHDR hdr;
WORD wVKey;
UINT flags;
}
struct NMLVCACHEHINT {
NMHDR hdr;
int iFrom;
int iTo;
}
alias NMLVCACHEHINT* LPNMLVCACHEHINT, PNM_CACHEHINT, LPNM_CACHEHINT;
alias NMLVCACHEHINT NM_CACHEHINT;
struct TVITEMA {
UINT mask;
HTREEITEM hItem;
UINT state;
UINT stateMask;
LPSTR pszText;
int cchTextMax;
int iImage;
int iSelectedImage;
int cChildren;
LPARAM lParam;
}
alias TVITEMA* LPTVITEMA, LPTV_ITEMA;
alias TVITEMA TV_ITEMA;
struct TVITEMW {
UINT mask;
HTREEITEM hItem;
UINT state;
UINT stateMask;
LPWSTR pszText;
int cchTextMax;
int iImage;
int iSelectedImage;
int cChildren;
LPARAM lParam;
}
alias TVITEMW* LPTVITEMW, LPTV_ITEMW;
alias TVITEMW TV_ITEMW;
static if (_WIN32_IE >= 0x400) {
struct TVITEMEXA {
UINT mask;
HTREEITEM hItem;
UINT state;
UINT stateMask;
LPSTR pszText;
int cchTextMax;
int iImage;
int iSelectedImage;
int cChildren;
LPARAM lParam;
int iIntegral;
}
alias TVITEMEXA* LPTVITEMEXA;
struct TVITEMEXW {
UINT mask;
HTREEITEM hItem;
UINT state;
UINT stateMask;
LPWSTR pszText;
int cchTextMax;
int iImage;
int iSelectedImage;
int cChildren;
LPARAM lParam;
int iIntegral;
}
alias TVITEMEXW* LPTVITEMEXW;
}
static if (_WIN32_IE >= 0x400) {
struct TVINSERTSTRUCTA {
HTREEITEM hParent;
HTREEITEM hInsertAfter;
union {
TVITEMEXA itemex;
TV_ITEMA item;
}
}
struct TVINSERTSTRUCTW {
HTREEITEM hParent;
HTREEITEM hInsertAfter;
union {
TVITEMEXW itemex;
TV_ITEMW item;
}
}
} else {
struct TVINSERTSTRUCTA {
HTREEITEM hParent;
HTREEITEM hInsertAfter;
TV_ITEMA item;
}
struct TVINSERTSTRUCTW {
HTREEITEM hParent;
HTREEITEM hInsertAfter;
TV_ITEMW item;
}
}
alias TVINSERTSTRUCTA* LPTVINSERTSTRUCTA, LPTV_INSERTSTRUCTA;
alias TVINSERTSTRUCTA TV_INSERTSTRUCTA;
alias TVINSERTSTRUCTW* LPTVINSERTSTRUCTW, LPTV_INSERTSTRUCTW;
alias TVINSERTSTRUCTW TV_INSERTSTRUCTW;
struct TVHITTESTINFO {
POINT pt;
UINT flags;
HTREEITEM hItem;
}
alias TVHITTESTINFO* LPTVHITTESTINFO, LPTV_HITTESTINFO;
alias TVHITTESTINFO TV_HITTESTINFO;
static if (_WIN32_WINNT >= 0x600) {
struct TVGETITEMPARTRECTINFO {
HTREEITEM hti;
RECT* prc;
TVITEMPART partID;
}
}
alias int function(LPARAM, LPARAM, LPARAM) PFNTVCOMPARE;
struct TVSORTCB {
HTREEITEM hParent;
PFNTVCOMPARE lpfnCompare;
LPARAM lParam;
}
alias TVSORTCB* LPTVSORTCB, LPTV_SORTCB;
alias TVSORTCB TV_SORTCB;
struct NMTREEVIEWA {
NMHDR hdr;
UINT action;
TV_ITEMA itemOld;
TV_ITEMA itemNew;
POINT ptDrag;
}
alias NMTREEVIEWA* LPNMTREEVIEWA, LPNM_TREEVIEWA;
alias NMTREEVIEWA NM_TREEVIEWA;
struct NMTREEVIEWW {
NMHDR hdr;
UINT action;
TV_ITEMW itemOld;
TV_ITEMW itemNew;
POINT ptDrag;
}
alias NMTREEVIEWW* LPNMTREEVIEWW, LPNM_TREEVIEWW;
alias NMTREEVIEWW NM_TREEVIEWW;
struct NMTVDISPINFOA {
NMHDR hdr;
TVITEMA item;
}
alias NMTVDISPINFOA* LPNMTVDISPINFOA;
alias NMTVDISPINFOA TV_DISPINFOA;
struct NMTVDISPINFOW {
NMHDR hdr;
TVITEMW item;
}
alias NMTVDISPINFOW* LPNMTVDISPINFOW;
alias NMTVDISPINFOW TV_DISPINFOW;
static if (_WIN32_IE >= 0x400) {
struct NMTVGETINFOTIPA {
NMHDR hdr;
LPSTR pszText;
int cchTextMax;
HTREEITEM hItem;
LPARAM lParam;
}
alias NMTVGETINFOTIPA* LPNMTVGETINFOTIPA;
struct NMTVGETINFOTIPW {
NMHDR hdr;
LPWSTR pszText;
int cchTextMax;
HTREEITEM hItem;
LPARAM lParam;
}
alias NMTVGETINFOTIPW* LPNMTVGETINFOTIPW;
}
struct TV_KEYDOWN {
NMHDR hdr;
WORD wVKey;
UINT flags;
}
struct TC_ITEMHEADERA {
UINT mask;
UINT lpReserved1;
UINT lpReserved2;
LPSTR pszText;
int cchTextMax;
int iImage;
}
struct TC_ITEMHEADERW {
UINT mask;
UINT lpReserved1;
UINT lpReserved2;
LPWSTR pszText;
int cchTextMax;
int iImage;
}
static if (_WIN32_IE >= 0x300) {
struct TCITEMA {
UINT mask;
DWORD dwState;
DWORD dwStateMask;
LPSTR pszText;
int cchTextMax;
int iImage;
LPARAM lParam;
}
struct TCITEMW {
UINT mask;
DWORD dwState;
DWORD dwStateMask;
LPWSTR pszText;
int cchTextMax;
int iImage;
LPARAM lParam;
}
} else {
struct TCITEMA {
UINT mask;
UINT lpReserved1;
UINT lpReserved2;
LPSTR pszText;
int cchTextMax;
int iImage;
LPARAM lParam;
}
struct TCITEMW {
UINT mask;
UINT lpReserved1;
UINT lpReserved2;
LPWSTR pszText;
int cchTextMax;
int iImage;
LPARAM lParam;
}
}
alias TCITEMA* LPTCITEMA;
alias TCITEMA TC_ITEMA;
alias TCITEMW* LPTCITEMW;
alias TCITEMW TC_ITEMW;
struct TCHITTESTINFO {
POINT pt;
UINT flags;
}
alias TCHITTESTINFO* LPTCHITTESTINFO, LPTC_HITTESTINFO;
alias TCHITTESTINFO TC_HITTESTINFO;
struct TC_KEYDOWN {
NMHDR hdr;
WORD wVKey;
UINT flags;
}
static if (_WIN32_IE >= 0x300) {
struct INITCOMMONCONTROLSEX {
DWORD dwSize = INITCOMMONCONTROLSEX.sizeof;
DWORD dwICC;
}
alias INITCOMMONCONTROLSEX* LPINITCOMMONCONTROLSEX;
}
struct PBRANGE {
int iLow;
int iHigh;
}
alias PBRANGE* PPBRANGE;
struct COLORSCHEME {
DWORD dwSize = COLORSCHEME.sizeof;
COLORREF clrBtnHighlight;
COLORREF clrBtnShadow;
}
alias COLORSCHEME* LPCOLORSCHEME;
struct MCHITTESTINFO {
UINT cbSize = MCHITTESTINFO.sizeof;
POINT pt;
UINT uHit;
SYSTEMTIME st;
}
alias MCHITTESTINFO* PMCHITTESTINFO;
alias DWORD MONTHDAYSTATE;
alias MONTHDAYSTATE* LPMONTHDAYSTATE;
struct NMDAYSTATE {
NMHDR nmhdr;
SYSTEMTIME stStart;
int cDayState;
LPMONTHDAYSTATE prgDayState;
}
alias NMDAYSTATE* LPNMDAYSTATE;
struct REBARINFO {
UINT cbSize = REBARINFO.sizeof;
UINT fMask;
HIMAGELIST himl;
}
alias REBARINFO* LPREBARINFO;
static if (_WIN32_IE >= 0x400) {
struct REBARBANDINFOA {
UINT cbSize = REBARBANDINFOA.sizeof;
UINT fMask;
UINT fStyle;
COLORREF clrFore;
COLORREF clrBack;
LPSTR lpText;
UINT cch;
int iImage;
HWND hwndChild;
UINT cxMinChild;
UINT cyMinChild;
UINT cx;
HBITMAP hbmBack;
UINT wID;
UINT cyChild;
UINT cyMaxChild;
UINT cyIntegral;
UINT cxIdeal;
LPARAM lParam;
UINT cxHeader;
}
struct REBARBANDINFOW {
UINT cbSize = REBARBANDINFOW.sizeof;
UINT fMask;
UINT fStyle;
COLORREF clrFore;
COLORREF clrBack;
LPWSTR lpText;
UINT cch;
int iImage;
HWND hwndChild;
UINT cxMinChild;
UINT cyMinChild;
UINT cx;
HBITMAP hbmBack;
UINT wID;
UINT cyChild;
UINT cyMaxChild;
UINT cyIntegral;
UINT cxIdeal;
LPARAM lParam;
UINT cxHeader;
}
enum : size_t {
REBARBANDINFOA_V3_SIZE = REBARBANDINFOA.cyChild.offsetof,
REBARBANDINFOW_V3_SIZE = REBARBANDINFOW.cyChild.offsetof
}
} else {
struct REBARBANDINFOA {
UINT cbSize = REBARBANDINFOA.sizeof;
UINT fMask;
UINT fStyle;
COLORREF clrFore;
COLORREF clrBack;
LPSTR lpText;
UINT cch;
int iImage;
HWND hwndChild;
UINT cxMinChild;
UINT cyMinChild;
UINT cx;
HBITMAP hbmBack;
UINT wID;
}
struct REBARBANDINFOW {
UINT cbSize = REBARBANDINFOW.sizeof;
UINT fMask;
UINT fStyle;
COLORREF clrFore;
COLORREF clrBack;
LPWSTR lpText;
UINT cch;
int iImage;
HWND hwndChild;
UINT cxMinChild;
UINT cyMinChild;
UINT cx;
HBITMAP hbmBack;
UINT wID;
}
enum : size_t {
REBARBANDINFOA_V3_SIZE = REBARBANDINFOA.sizeof,
REBARBANDINFOW_V3_SIZE = REBARBANDINFOW.sizeof
}
}
alias REBARBANDINFOA* LPREBARBANDINFOA;
alias const(REBARBANDINFOA)* LPCREBARBANDINFOA;
alias REBARBANDINFOW* LPREBARBANDINFOW;
alias const(REBARBANDINFOW)* LPCREBARBANDINFOW;
static if (_WIN32_IE >= 0x300) {
struct NMLVODSTATECHANGE {
NMHDR hdr;
int iFrom;
int iTo;
UINT uNewState;
UINT uOldState;
}
alias NMLVODSTATECHANGE* LPNMLVODSTATECHANGE;
static if (_WIN32_WINNT >= 0x501) {
struct IMAGELISTDRAWPARAMS {
DWORD cbSize = IMAGELISTDRAWPARAMS.sizeof;
HIMAGELIST himl;
int i;
HDC hdcDst;
int x;
int y;
int cx;
int cy;
int xBitmap;
int yBitmap;
COLORREF rgbBk;
COLORREF rgbFg;
UINT fStyle;
DWORD dwRop;
DWORD fState;
DWORD Frame;
COLORREF crEffect;
}
} else {
struct IMAGELISTDRAWPARAMS {
DWORD cbSize = IMAGELISTDRAWPARAMS.sizeof;
HIMAGELIST himl;
int i;
HDC hdcDst;
int x;
int y;
int cx;
int cy;
int xBitmap;
int yBitmap;
COLORREF rgbBk;
COLORREF rgbFg;
UINT fStyle;
DWORD dwRop;
}
}
alias IMAGELISTDRAWPARAMS* LPIMAGELISTDRAWPARAMS;
}
static if (_WIN32_IE >= 0x400) {
struct NMREBARCHILDSIZE {
NMHDR hdr;
UINT uBand;
UINT wID;
RECT rcChild;
RECT rcBand;
}
alias NMREBARCHILDSIZE* LPNMREBARCHILDSIZE;
struct NMREBAR {
NMHDR hdr;
DWORD dwMask;
UINT uBand;
UINT fStyle;
UINT wID;
LPARAM lParam;
}
alias NMREBAR* LPNMREBAR;
struct NMRBAUTOSIZE {
NMHDR hdr;
BOOL fChanged;
RECT rcTarget;
RECT rcActual;
}
alias NMRBAUTOSIZE* LPNMRBAUTOSIZE;
static if (_WIN32_IE >= 0x500) {
struct NMREBARCHEVRON {
NMHDR hdr;
UINT uBand;
UINT wID;
LPARAM lParam;
RECT rc;
LPARAM lParamNM;
}
alias NMREBARCHEVRON* LPNMREBARCHEVRON;
}
struct RBHITTESTINFO {
POINT pt;
UINT flags;
int iBand;
}
alias RBHITTESTINFO* LPRBHITTESTINFO;
}
mixin DECLARE_HANDLE!("HDSA");
mixin DECLARE_HANDLE!("HDPA");
version (Unicode) {
alias HDITEMW HDITEM;
alias LPHDITEMW LPHDITEM;
alias TOOLINFOW TOOLINFO;
alias TOOLINFOW* PTOOLINFO, LPTOOLINFO;
alias TTHITTESTINFOW TTHITTESTINFO;
alias TTHITTESTINFOW* LPHITTESTINFO, LPTTHITTESTINFO;
alias TOOLTIPTEXTW TOOLTIPTEXT;
alias TOOLTIPTEXTW* LPTOOLTIPTEXT;
alias NMTTDISPINFOW NMTTDISPINFO;
alias NMTTDISPINFOW* LPNMTTDISPINFO;
alias TV_ITEMW TV_ITEM;
alias TV_ITEMW* LPTV_ITEM;
alias TVITEMW TVITEM;
alias TVITEMW* LPTVITEM;
static if (_WIN32_IE >= 0x400) {
alias TVITEMEXW TVITEMEX;
alias TVITEMEXW* LPTVITEMEX;
}
alias TV_INSERTSTRUCTW TV_INSERTSTRUCT;
alias TV_INSERTSTRUCTW* LPTV_INSERTSTRUCT;
alias TVINSERTSTRUCTW TVINSERTSTRUCT;
alias TVINSERTSTRUCTW* LPTVINSERTSTRUCT;
alias NM_TREEVIEWW NM_TREEVIEW;
alias NM_TREEVIEWW* LPNM_TREEVIEW;
alias NMTREEVIEWW NMTREEVIEW;
alias NMTREEVIEWW* LPNMTREEVIEW;
alias NMHDDISPINFOW NMHDDISPINFO;
alias NMHDDISPINFOW* LPNMHDDISPINFO;
alias ACM_OPENW ACM_OPEN;
alias COMBOBOXEXITEMW COMBOBOXEXITEM;
alias PCOMBOBOXEXITEMW PCOMBOBOXEXITEM;
//alias PCCOMBOBOXEXITEMW PCCOMBOBOXEXITEM; fixme
alias CBEM_INSERTITEMW CBEM_INSERTITEM;
alias CBEM_SETITEMW CBEM_SETITEM;
alias CBEM_GETITEMW CBEM_GETITEM;
alias CBEN_ENDEDITW CBEN_ENDEDIT;
alias NMCBEENDEDITW NMCBEENDEDIT;
alias LPNMCBEENDEDITW LPNMCBEENDEDIT;
alias PNMCBEENDEDITW PNMCBEENDEDIT;
static if (_WIN32_IE >= 0x400) {
alias NMCOMBOBOXEXW NMCOMBOBOXEX;
alias PNMCOMBOBOXEXW PNMCOMBOBOXEX;
alias CBEN_GETDISPINFOW CBEN_GETDISPINFO;
alias CBEN_DRAGBEGINW CBEN_DRAGBEGIN;
alias NMCBEDRAGBEGINW NMCBEDRAGBEGIN;
alias LPNMCBEDRAGBEGINW LPNMCBEDRAGBEGIN;
alias PNMCBEDRAGBEGINW PNMCBEDRAGBEGIN;
}
alias SB_GETTEXTW SB_GETTEXT;
alias SB_SETTEXTW SB_SETTEXT;
alias SB_GETTEXTLENGTHW SB_GETTEXTLENGTH;
alias HDM_INSERTITEMW HDM_INSERTITEM;
alias HDM_GETITEMW HDM_GETITEM;
alias HDM_SETITEMW HDM_SETITEM;
alias HDN_ITEMCHANGINGW HDN_ITEMCHANGING;
alias HDN_ITEMCHANGEDW HDN_ITEMCHANGED;
alias HDN_ITEMCLICKW HDN_ITEMCLICK;
alias HDN_ITEMDBLCLICKW HDN_ITEMDBLCLICK;
alias HDN_DIVIDERDBLCLICKW HDN_DIVIDERDBLCLICK;
alias HDN_BEGINTRACKW HDN_BEGINTRACK;
alias HDN_ENDTRACKW HDN_ENDTRACK;
alias HDN_TRACKW HDN_TRACK;
static if (_WIN32_IE >= 0x300) {
alias HDN_GETDISPINFOW HDN_GETDISPINFO;
}
alias HD_NOTIFYW HD_NOTIFY;
alias TBSAVEPARAMSW TBSAVEPARAMS;
alias TB_GETBUTTONTEXTW TB_GETBUTTONTEXT;
alias TB_SAVERESTOREW TB_SAVERESTORE;
alias TB_ADDSTRINGW TB_ADDSTRING;
static if (_WIN32_IE >= 0x400) {
alias TBN_GETBUTTONINFOW TBN_GETBUTTONINFO; // fixme
alias TB_GETBUTTONINFOW TB_GETBUTTONINFO;
alias TB_SETBUTTONINFOW TB_SETBUTTONINFO;
alias TB_INSERTBUTTONW TB_INSERTBUTTON;
alias TB_ADDBUTTONSW TB_ADDBUTTONS;
alias TB_MAPACCELERATORW TB_MAPACCELERATOR;
alias TB_GETSTRINGW TB_GETSTRING;
alias TBBUTTONINFOW TBBUTTONINFO;
alias LPTBBUTTONINFOW LPTBBUTTONINFO;
alias TBN_GETDISPINFOW TBN_GETDISPINFO;
alias NMTBDISPINFOW NMTBDISPINFO;
alias LPNMTBDISPINFOW LPNMTBDISPINFO;
alias NMTBGETINFOTIPW NMTBGETINFOTIP;
alias LPNMTBGETINFOTIPW LPNMTBGETINFOTIP;
}
alias TBNOTIFYW TBNOTIFY;
alias LPTBNOTIFYW LPTBNOTIFY;
alias NMTOOLBARW NMTOOLBAR;
alias LPNMTOOLBARW LPNMTOOLBAR;
alias TTM_ADDTOOLW TTM_ADDTOOL;
alias TTM_DELTOOLW TTM_DELTOOL;
alias TTM_NEWTOOLRECTW TTM_NEWTOOLRECT;
alias TTM_GETTOOLINFOW TTM_GETTOOLINFO;
alias TTM_SETTOOLINFOW TTM_SETTOOLINFO;
alias TTM_HITTESTW TTM_HITTEST;
alias TTM_GETTEXTW TTM_GETTEXT;
alias TTM_UPDATETIPTEXTW TTM_UPDATETIPTEXT;
alias TTM_ENUMTOOLSW TTM_ENUMTOOLS;
alias TTM_GETCURRENTTOOLW TTM_GETCURRENTTOOL;
alias TTN_NEEDTEXTW TTN_NEEDTEXT;
alias TTN_GETDISPINFOW TTN_GETDISPINFO;
//alias SB_GETTEXTW SB_GETTEXT;
//alias SB_SETTEXTW SB_SETTEXT;
//alias SB_GETTEXTLENGTHW SB_GETTEXTLENGTH;
alias LV_ITEMW LV_ITEM;
alias LVITEMW LVITEM;
alias LVITEM* LPLVITEM;
alias LPSTR_TEXTCALLBACKW LPSTR_TEXTCALLBACK;
static if (_WIN32_IE >= 0x400) {
alias LVBKIMAGEW LVBKIMAGE;
alias LPLVBKIMAGEW LPLVBKIMAGE;
alias LVM_SETBKIMAGEW LVM_SETBKIMAGE;
alias LVM_GETBKIMAGEW LVM_GETBKIMAGE;
}
alias LVM_GETITEMW LVM_GETITEM;
alias LVM_SETITEMW LVM_SETITEM;
alias LVM_INSERTITEMW LVM_INSERTITEM;
alias LV_FINDINFOW LV_FINDINFO;
alias LVFINDINFOW LVFINDINFO;
alias LPFINDINFOW LPFINDINFO;
alias NMLVFINDITEMW NMLVFINDITEM;
alias PNMLVFINDITEMW PNMLVFINDITEM;
alias LPNMLVFINDITEMW LPNMLVFINDITEM;
alias LVM_FINDITEMW LVM_FINDITEM;
alias LVM_GETSTRINGWIDTHW LVM_GETSTRINGWIDTH;
alias LVM_EDITLABELW LVM_EDITLABEL;
alias LV_COLUMNW LV_COLUMN;
alias LVCOLUMNW LVCOLUMN;
alias LVCOLUMNW* LPLVCOLUMN;
alias LVM_GETCOLUMNW LVM_GETCOLUMN;
alias LVM_SETCOLUMNW LVM_SETCOLUMN;
alias LVM_INSERTCOLUMNW LVM_INSERTCOLUMN;
alias LVM_GETITEMTEXTW LVM_GETITEMTEXT;
alias LVM_SETITEMTEXTW LVM_SETITEMTEXT;
alias LVM_GETISEARCHSTRINGW LVM_GETISEARCHSTRING;
alias LVN_BEGINLABELEDITW LVN_BEGINLABELEDIT;
alias LVN_ENDLABELEDITW LVN_ENDLABELEDIT;
alias LVN_GETDISPINFOW LVN_GETDISPINFO;
alias LVN_SETDISPINFOW LVN_SETDISPINFO;
static if (_WIN32_IE >= 0x400) {
alias LVN_GETINFOTIPW LVN_GETINFOTIP;
alias NMLVGETINFOTIPW NMLVGETINFOTIP;
alias LPNMLVGETINFOTIPW LPNMLVGETINFOTIP;
}
alias LV_DISPINFOW LV_DISPINFO;
alias NMLVDISPINFOW NMLVDISPINFO;
alias LPNMLVDISPINFOW LPNMLVDISPINFO;
alias TVM_INSERTITEMW TVM_INSERTITEM;
alias TVM_GETITEMW TVM_GETITEM;
alias TVM_SETITEMW TVM_SETITEM;
alias TVM_EDITLABELW TVM_EDITLABEL;
alias TVM_GETISEARCHSTRINGW TVM_GETISEARCHSTRING;
alias NMTVDISPINFOW TV_DISPINFO;
alias NMTVDISPINFOW NMTVDISPINFO;
alias LPNMTVDISPINFOW LPNMTVDISPINFO;
static if (_WIN32_IE >= 0x400) {
alias NMTVGETINFOTIPW NMTVGETINFOTIP;
alias LPNMTVGETINFOTIPW LPNMTVGETINFOTIP;
alias TVN_GETINFOTIPW TVN_GETINFOTIP;
}
alias TVN_SELCHANGINGW TVN_SELCHANGING;
alias TVN_SELCHANGEDW TVN_SELCHANGED;
alias TVN_GETDISPINFOW TVN_GETDISPINFO;
alias TVN_SETDISPINFOW TVN_SETDISPINFO;
alias TVN_ITEMEXPANDINGW TVN_ITEMEXPANDING;
alias TVN_ITEMEXPANDEDW TVN_ITEMEXPANDED;
alias TVN_BEGINDRAGW TVN_BEGINDRAG;
alias TVN_BEGINRDRAGW TVN_BEGINRDRAG;
alias TVN_DELETEITEMW TVN_DELETEITEM;
alias TVN_BEGINLABELEDITW TVN_BEGINLABELEDIT;
alias TVN_ENDLABELEDITW TVN_ENDLABELEDIT;
alias TC_ITEMHEADERW TC_ITEMHEADER;
alias TC_ITEMW TC_ITEM;
alias TCITEMW TCITEM;
alias LPTCITEMW LPTCITEM;
alias TCM_GETITEMW TCM_GETITEM;
alias TCM_SETITEMW TCM_SETITEM;
alias TCM_INSERTITEMW TCM_INSERTITEM;
alias CreateStatusWindowW CreateStatusWindow;
alias DrawStatusTextW DrawStatusText;
alias ImageList_LoadImageW ImageList_LoadImage;
alias DTM_SETFORMATW DTM_SETFORMAT;
alias DTN_USERSTRINGW DTN_USERSTRING;
alias DTN_WMKEYDOWNW DTN_WMKEYDOWN;
alias DTN_FORMATW DTN_FORMAT;
alias DTN_FORMATQUERYW DTN_FORMATQUERY;
alias REBARBANDINFOW REBARBANDINFO;
alias REBARBANDINFO* LPREBARBANDINFO;
alias LPCREBARBANDINFOW LPCREBARBANDINFO;
alias REBARBANDINFOW_V3_SIZE REBARBANDINFO_V3_SIZE;
alias RB_INSERTBANDW RB_INSERTBAND;
alias RB_SETBANDINFOW RB_SETBANDINFO;
} else {
alias HDITEMA HDITEM;
alias LPHDITEMA LPHDITEM;
alias TOOLINFOA TOOLINFO;
alias TOOLINFOA* PTOOLINFO, LPTOOLINFO;
alias TTHITTESTINFOA TTHITTESTINFO;
alias TTHITTESTINFOA* LPHITTESTINFO, LPTTHITTESTINFO;
alias TOOLTIPTEXTA TOOLTIPTEXT;
alias TOOLTIPTEXTA* LPTOOLTIPTEXT;
alias NMTTDISPINFOA NMTTDISPINFO;
alias NMTTDISPINFOA* LPNMTTDISPINFO;
alias TV_ITEMA TV_ITEM;
alias TV_ITEMA* LPTV_ITEM;
alias TVITEMA TVITEM;
alias TVITEMA* LPTVITEM;
static if (_WIN32_IE >= 0x400) {
alias TVITEMEXA TVITEMEX;
alias TVITEMEXA* LPTVITEMEX;
}
alias TV_INSERTSTRUCTA TV_INSERTSTRUCT;
alias TV_INSERTSTRUCTA* LPTV_INSERTSTRUCT;
alias TVINSERTSTRUCTA TVINSERTSTRUCT;
alias TVINSERTSTRUCTA* LPTVINSERTSTRUCT;
alias NM_TREEVIEWA NM_TREEVIEW;
alias NM_TREEVIEWA* LPNM_TREEVIEW;
alias NMTREEVIEWA NMTREEVIEW;
alias NMTREEVIEWA* LPNMTREEVIEW;
alias NMHDDISPINFOW NMHDDISPINFO;
alias NMHDDISPINFOW* LPNMHDDISPINFO;
alias ACM_OPENA ACM_OPEN;
alias COMBOBOXEXITEMA COMBOBOXEXITEM;
alias PCOMBOBOXEXITEMA PCOMBOBOXEXITEM;
//alias PCCOMBOBOXEXITEMA PCCOMBOBOXEXITEM; fixme
alias CBEM_INSERTITEMA CBEM_INSERTITEM;
alias CBEM_SETITEMA CBEM_SETITEM;
alias CBEM_GETITEMA CBEM_GETITEM;
alias CBEN_ENDEDITA CBEN_ENDEDIT;
alias NMCBEENDEDITA NMCBEENDEDIT;
alias LPNMCBEENDEDITA LPNMCBEENDEDIT;
alias PNMCBEENDEDITA PNMCBEENDEDIT;
static if (_WIN32_IE >= 0x400) {
alias TB_GETBUTTONINFOA TB_GETBUTTONINFO;
alias TB_SETBUTTONINFOA TB_SETBUTTONINFO;
alias TB_INSERTBUTTONA TB_INSERTBUTTON;
alias TB_ADDBUTTONSA TB_ADDBUTTONS;
alias TB_MAPACCELERATORA TB_MAPACCELERATOR;
alias TB_GETSTRINGA TB_GETSTRING;
alias NMCOMBOBOXEXA NMCOMBOBOXEX;
alias PNMCOMBOBOXEXA PNMCOMBOBOXEX;
alias CBEN_DRAGBEGINA CBEN_DRAGBEGIN;
alias CBEN_GETDISPINFOA CBEN_GETDISPINFO;
alias NMCBEDRAGBEGINA NMCBEDRAGBEGIN;
alias LPNMCBEDRAGBEGINA LPNMCBEDRAGBEGIN;
alias PNMCBEDRAGBEGINA PNMCBEDRAGBEGIN;
alias TBN_GETDISPINFOA TBN_GETDISPINFO;
alias NMTBDISPINFOA NMTBDISPINFO;
alias LPNMTBDISPINFOA LPNMTBDISPINFO;
alias NMTBGETINFOTIPA NMTBGETINFOTIP;
alias LPNMTBGETINFOTIPA LPNMTBGETINFOTIP;
}
alias SB_GETTEXTA SB_GETTEXT;
alias SB_SETTEXTA SB_SETTEXT;
alias SB_GETTEXTLENGTHA SB_GETTEXTLENGTH;
alias HDM_INSERTITEMA HDM_INSERTITEM;
alias HDM_GETITEMA HDM_GETITEM;
alias HDM_SETITEMA HDM_SETITEM;
alias HDN_ITEMCHANGINGA HDN_ITEMCHANGING;
alias HDN_ITEMCHANGEDA HDN_ITEMCHANGED;
alias HDN_ITEMCLICKA HDN_ITEMCLICK;
alias HDN_ITEMDBLCLICKA HDN_ITEMDBLCLICK;
alias HDN_DIVIDERDBLCLICKA HDN_DIVIDERDBLCLICK;
alias HDN_BEGINTRACKA HDN_BEGINTRACK;
alias HDN_ENDTRACKA HDN_ENDTRACK;
alias HDN_TRACKA HDN_TRACK;
static if (_WIN32_IE >= 0x300) {
alias HDN_GETDISPINFOA HDN_GETDISPINFO;
}
alias HD_NOTIFYA HD_NOTIFY;
alias TBSAVEPARAMSA TBSAVEPARAMS;
alias TB_GETBUTTONTEXTA TB_GETBUTTONTEXT;
alias TB_SAVERESTOREA TB_SAVERESTORE;
alias TB_ADDSTRINGA TB_ADDSTRING;
alias TBN_GETBUTTONINFOA TBN_GETBUTTONINFO;
static if (_WIN32_IE >= 0x400) {
alias TBBUTTONINFOA TBBUTTONINFO;
alias LPTBBUTTONINFOA LPTBBUTTONINFO;
}
alias TBNOTIFYA TBNOTIFY;
alias LPTBNOTIFYA LPTBNOTIFY;
alias NMTOOLBARA NMTOOLBAR;
alias LPNMTOOLBARA LPNMTOOLBAR;
alias TTM_ADDTOOLA TTM_ADDTOOL;
alias TTM_DELTOOLA TTM_DELTOOL;
alias TTM_NEWTOOLRECTA TTM_NEWTOOLRECT;
alias TTM_GETTOOLINFOA TTM_GETTOOLINFO;
alias TTM_SETTOOLINFOA TTM_SETTOOLINFO;
alias TTM_HITTESTA TTM_HITTEST;
alias TTM_GETTEXTA TTM_GETTEXT;
alias TTM_UPDATETIPTEXTA TTM_UPDATETIPTEXT;
alias TTM_ENUMTOOLSA TTM_ENUMTOOLS;
alias TTM_GETCURRENTTOOLA TTM_GETCURRENTTOOL;
alias TTN_NEEDTEXTA TTN_NEEDTEXT;
alias TTN_GETDISPINFOA TTN_GETDISPINFO;
alias LV_ITEMA LV_ITEM;
alias LVITEMA LVITEM;
alias LVITEM* LPLVITEM;
alias LPSTR_TEXTCALLBACKA LPSTR_TEXTCALLBACK;
static if (_WIN32_IE >= 0x400) {
alias LVBKIMAGEA LVBKIMAGE;
alias LPLVBKIMAGEA LPLVBKIMAGE;
alias LVM_SETBKIMAGEA LVM_SETBKIMAGE;
alias LVM_GETBKIMAGEA LVM_GETBKIMAGE;
}
alias LVM_GETITEMA LVM_GETITEM;
alias LVM_SETITEMA LVM_SETITEM;
alias LVM_INSERTITEMA LVM_INSERTITEM;
alias LV_FINDINFOA LV_FINDINFO;
alias LVFINDINFOA LVFINDINFO;
alias LPFINDINFOA LPFINDINFO;
alias NMLVFINDITEMA NMLVFINDITEM;
alias PNMLVFINDITEMA PNMLVFINDITEM;
alias LPNMLVFINDITEMA LPNMLVFINDITEM;
alias LVM_FINDITEMA LVM_FINDITEM;
alias LVM_GETSTRINGWIDTHA LVM_GETSTRINGWIDTH;
alias LVM_EDITLABELA LVM_EDITLABEL;
alias LV_COLUMNA LV_COLUMN;
alias LVCOLUMNA LVCOLUMN;
alias LVCOLUMNA* LPLVCOLUMN;
alias LVM_GETCOLUMNA LVM_GETCOLUMN;
alias LVM_SETCOLUMNA LVM_SETCOLUMN;
alias LVM_INSERTCOLUMNA LVM_INSERTCOLUMN;
alias LVM_GETITEMTEXTA LVM_GETITEMTEXT;
alias LVM_SETITEMTEXTA LVM_SETITEMTEXT;
alias LVM_GETISEARCHSTRINGA LVM_GETISEARCHSTRING;
alias LVN_BEGINLABELEDITA LVN_BEGINLABELEDIT;
alias LVN_ENDLABELEDITA LVN_ENDLABELEDIT;
alias LVN_GETDISPINFOA LVN_GETDISPINFO;
alias LVN_SETDISPINFOA LVN_SETDISPINFO;
static if (_WIN32_IE >= 0x400) {
alias LVN_GETINFOTIPA LVN_GETINFOTIP;
alias NMLVGETINFOTIPA NMLVGETINFOTIP;
alias LPNMLVGETINFOTIPA LPNMLVGETINFOTIP;
}
alias LV_DISPINFOA LV_DISPINFO;
alias NMLVDISPINFOA NMLVDISPINFO;
alias LPNMLVDISPINFOA LPNMLVDISPINFO;
alias TVM_INSERTITEMA TVM_INSERTITEM;
alias TVM_GETITEMA TVM_GETITEM;
alias TVM_SETITEMA TVM_SETITEM;
alias TVM_EDITLABELA TVM_EDITLABEL;
alias TVM_GETISEARCHSTRINGA TVM_GETISEARCHSTRING;
alias NMTVDISPINFOA TV_DISPINFO;
alias NMTVDISPINFOA NMTVDISPINFO;
alias LPNMTVDISPINFOA LPNMTVDISPINFO;
static if (_WIN32_IE >= 0x400) {
alias NMTVGETINFOTIPA NMTVGETINFOTIP;
alias LPNMTVGETINFOTIPA LPNMTVGETINFOTIP;
alias TVN_GETINFOTIPA TVN_GETINFOTIP;
}
alias TVN_SELCHANGINGA TVN_SELCHANGING;
alias TVN_SELCHANGEDA TVN_SELCHANGED;
alias TVN_GETDISPINFOA TVN_GETDISPINFO;
alias TVN_SETDISPINFOA TVN_SETDISPINFO;
alias TVN_ITEMEXPANDINGA TVN_ITEMEXPANDING;
alias TVN_ITEMEXPANDEDA TVN_ITEMEXPANDED;
alias TVN_BEGINDRAGA TVN_BEGINDRAG;
alias TVN_BEGINRDRAGA TVN_BEGINRDRAG;
alias TVN_DELETEITEMA TVN_DELETEITEM;
alias TVN_BEGINLABELEDITA TVN_BEGINLABELEDIT;
alias TVN_ENDLABELEDITA TVN_ENDLABELEDIT;
alias TC_ITEMHEADERA TC_ITEMHEADER;
alias TC_ITEMA TC_ITEM;
alias TCITEMA TCITEM;
alias LPTCITEMA LPTCITEM;
alias TCM_GETITEMA TCM_GETITEM;
alias TCM_SETITEMA TCM_SETITEM;
alias TCM_INSERTITEMA TCM_INSERTITEM;
alias CreateStatusWindowA CreateStatusWindow;
alias DrawStatusTextA DrawStatusText;
alias ImageList_LoadImageA ImageList_LoadImage;
alias DTM_SETFORMATA DTM_SETFORMAT;
alias DTN_USERSTRINGA DTN_USERSTRING;
alias DTN_WMKEYDOWNA DTN_WMKEYDOWN;
alias DTN_FORMATA DTN_FORMAT;
alias DTN_FORMATQUERYA DTN_FORMATQUERY;
alias REBARBANDINFOA REBARBANDINFO;
alias REBARBANDINFOA* LPREBARBANDINFO;
alias LPCREBARBANDINFOA LPCREBARBANDINFO;
alias REBARBANDINFOA_V3_SIZE REBARBANDINFO_V3_SIZE;
alias RB_INSERTBANDA RB_INSERTBAND;
alias RB_SETBANDINFOA RB_SETBANDINFO;
}
alias INT function(PVOID, PVOID) PFNDPAENUMCALLBACK;
alias INT function(PVOID, PVOID) PFNDSAENUMCALLBACK;
alias INT function(PVOID, PVOID, LPARAM) PFNDPACOMPARE;
static if (_WIN32_WINNT >= 0x501) {
extern (Windows)
alias LRESULT function(HWND, UINT, WPARAM, LPARAM, UINT_PTR, DWORD_PTR)
SUBCLASSPROC;
struct LITEM {
UINT mask;
int iLink;
UINT state;
UINT stateMask;
WCHAR[MAX_LINKID_TEXT] szID;
WCHAR[L_MAX_URL_LENGTH] szUrl;
}
alias LITEM* PLITEM;
struct LHITTESTINFO {
POINT pt;
LITEM item;
}
alias LHITTESTINFO* PLHITTESTINFO;
struct NMLINK {
NMHDR hdr;
LITEM item;
}
alias NMLINK* PNMLINK;
}
uint INDEXTOOVERLAYMASK(uint i) { return i << 8; }
uint INDEXTOSTATEIMAGEMASK(uint i) { return i << 12; }
template HANDLE_WM_NOTIFY(R) {
R HANDLE_WM_NOTIFY(HWND hwnd, WPARAM wParam, LPARAM lParam,
R function(HWND, int, NMHDR*) fn) {
return fn(hwnd, wParam, cast(NMHDR*) lParam);
}
}
int FORWARD_WM_NOTIFY(HWND hwnd, int idFrom, NMHDR* pnmhdr,
int function(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) fn) {
return fn(hwnd, WM_NOTIFY, idFrom, cast(LPARAM) pnmhdr);
}
//#define CCSIZEOF_STRUCT(s, m) (((int)((PBYTE)(&((s*)0)->m)-((PBYTE)((s*)0))))+sizeof(((s*)0)->m))
LPARAM MAKEIPADDRESS(ubyte b1, ubyte b2, ubyte b3, ubyte b4) {
return (cast(DWORD) b1 << 24)
| (cast(DWORD) b2 << 16)
| (cast(DWORD) b3 << 8)
| (cast(DWORD) b4);
}
LPARAM MAKEIPRANGE(ubyte low, ubyte high) {
return (cast(int) high << 8) | low;
}
ubyte FIRST_IPADDRESS(LPARAM x) {
return cast(ubyte) (x >> 24);
}
ubyte SECOND_IPADDRESS(LPARAM x) {
return cast(ubyte) (x >> 16);
}
ubyte THIRD_IPADDRESS(LPARAM x) {
return cast(ubyte) (x >> 8);
}
ubyte FOURTH_IPADDRESS(LPARAM x) {
return cast(ubyte) x;
}
HWND Animate_Create(HWND hwndP, UINT id, DWORD dwStyle,
HINSTANCE hInstance) {
return CreateWindow(cast(TCHAR*)ANIMATE_CLASS.ptr, null, dwStyle, 0, 0, 0, 0, hwndP,
cast(HMENU) id, hInstance, null);
}
BOOL Animate_Open(HWND hwnd, LPTSTR szName) {
return cast(BOOL) SendMessage(hwnd, ACM_OPEN, 0, cast(LPARAM) szName);
}
BOOL Animate_OpenEx(HWND hwnd, HINSTANCE hInst, LPTSTR szName) {
return cast(BOOL) SendMessage(hwnd, ACM_OPEN, cast(WPARAM) hInst,
cast(LPARAM) szName);
}
BOOL Animate_Play(HWND hwnd, int from, int to, int rep) {
return cast(BOOL) SendMessage(hwnd, ACM_PLAY, rep,
MAKELONG(cast(ushort) from, cast(ushort) to));
}
BOOL Animate_Stop(HWND hwnd) {
return cast(BOOL) SendMessage(hwnd, ACM_STOP, 0, 0);
}
BOOL Animate_Close(HWND hwnd) {
return Animate_Open(hwnd, null);
}
BOOL Animate_Seek(HWND hwnd, int frame) {
return Animate_Play(hwnd, frame, frame, 1);
}
extern (Windows) {
HBITMAP CreateMappedBitmap(HINSTANCE, INT_PTR, UINT, LPCOLORMAP, int);
HWND CreateStatusWindowA(LONG, LPCSTR, HWND, UINT);
HWND CreateStatusWindowW(LONG, LPCWSTR, HWND, UINT);
HWND CreateToolbarEx(HWND, DWORD, UINT, int, HINSTANCE, UINT_PTR,
LPCTBBUTTON, int, int, int, int, int, UINT);
HWND CreateUpDownControl(DWORD, int, int, int, int, HWND, int, HINSTANCE,
HWND, int, int, int);
}
HWND DateTime_GetMonthCal(HWND hwnd) {
return cast(HWND) SendMessage(hwnd, DTM_GETMONTHCAL, 0, 0);
}
COLORREF DateTime_GetMonthCalColor(HWND hwnd, int iColor) {
return cast(COLORREF) SendMessage(hwnd, DTM_GETMCCOLOR, iColor, 0);
}
HFONT DateTime_GetMonthCalFont(HWND hwnd) {
return cast(HFONT) SendMessage(hwnd, DTM_GETMCFONT, 0, 0);
}
DWORD DateTime_GetRange(HWND hwnd, LPSYSTEMTIME lpSysTimeArray) {
return cast(DWORD) SendMessage(hwnd, DTM_GETRANGE, 0, cast(LPARAM) lpSysTimeArray);
}
DWORD DateTime_GetSystemtime(HWND hwnd, LPSYSTEMTIME lpSysTime) {
return cast(DWORD) SendMessage(hwnd, DTM_GETSYSTEMTIME, 0, cast(LPARAM) lpSysTime);
}
BOOL DateTime_SetFormat(HWND hwnd, LPCTSTR lpszFormat) {
return cast(BOOL) SendMessage(hwnd, DTM_SETFORMAT, 0,
cast(LPARAM) lpszFormat);
}
LRESULT DateTime_SetMonthCalColor(HWND hwnd, int iColor, COLORREF clr) {
return SendMessage(hwnd, DTM_SETMCCOLOR, cast(WPARAM) iColor,
cast(LPARAM) clr);
}
void DateTime_SetMonthCalFont(HWND hwnd, HFONT hfont, BOOL fRedraw) {
SendMessage(hwnd, DTM_SETMCFONT, cast(WPARAM) hfont, fRedraw);
}
BOOL DateTime_SetRange(HWND hwnd, WPARAM flags, LPSYSTEMTIME lpSysTimeArray) {
return cast(BOOL) SendMessage(hwnd, DTM_SETRANGE, flags,
cast(LPARAM) lpSysTimeArray);
}
BOOL DateTime_SetSystemtime(HWND hwnd, WPARAM flag, LPSYSTEMTIME lpSysTime) {
return cast(BOOL) SendMessage(hwnd, DTM_SETSYSTEMTIME, flag,
cast(LPARAM) lpSysTime);
}
extern (Windows) {
void DrawInsert(HWND, HWND, int);
void DrawStatusTextA(HDC, LPRECT, LPCSTR, UINT);
void DrawStatusTextW(HDC, LPRECT, LPCWSTR, UINT);
void GetEffectiveClientRect(HWND, LPRECT, LPINT);
}
int Header_GetItemCount(HWND w) {
return cast(int) SendMessage(w, HDM_GETITEMCOUNT, 0, 0);
}
int Header_InsertItem(HWND w, int i, const(HDITEM)* phdi) {
return cast(int) SendMessage(w, HDM_INSERTITEM, i, cast(LPARAM) phdi);
}
BOOL Header_DeleteItem(HWND w, int i) {
return cast(BOOL) SendMessage(w, HDM_DELETEITEM, i, 0);
}
BOOL Header_GetItem(HWND w, int i, LPHDITEM phdi) {
return cast(BOOL) SendMessage(w, HDM_GETITEM, i, cast(LPARAM) phdi);
}
BOOL Header_SetItem(HWND w, int i, const(HDITEM)* phdi) {
return cast(BOOL) SendMessage(w, HDM_SETITEM, i, cast(LPARAM) phdi);
}
BOOL Header_Layout(HWND w, LPHDLAYOUT playout) {
return cast(BOOL) SendMessage(w, HDM_LAYOUT, 0, cast(LPARAM) playout);
}
static if (_WIN32_IE >= 0x300) {
int Header_OrderToIndex(HWND w, int i) {
return cast(int) SendMessage(w, HDM_ORDERTOINDEX, i, 0);
}
BOOL Header_GetItemRect(HWND w, int i, RECT* r) {
return cast(BOOL) SendMessage(w, HDM_GETITEMRECT, i, cast(LPARAM) r);
}
BOOL Header_GetOrderArray(HWND w, int iSize, LPINT lpiArray) {
return cast(BOOL) SendMessage(w, HDM_GETORDERARRAY, iSize,
cast(LPARAM) lpiArray);
}
BOOL Header_SetOrderArray(HWND w, int iSize, LPINT lpiArray) {
return cast(BOOL) SendMessage(w, HDM_SETORDERARRAY, iSize,
cast(LPARAM) lpiArray);
}
HIMAGELIST Header_CreateDragImage(HWND w, int i) {
return cast(HIMAGELIST) SendMessage(w, HDM_CREATEDRAGIMAGE, i, 0);
}
HIMAGELIST Header_SetImageList(HWND w, HIMAGELIST himl) {
return cast(HIMAGELIST) SendMessage(w, HDM_SETIMAGELIST, 0,
cast(LPARAM) himl);
}
HIMAGELIST Header_GetImageList(HWND w) {
return cast(HIMAGELIST) SendMessage(w, HDM_GETIMAGELIST, 0, 0);
}
}
static if (_WIN32_IE >= 0x400) {
BOOL Header_GetUnicodeFormat(HWND w) {
return cast(BOOL) SendMessage(w, HDM_GETUNICODEFORMAT, 0, 0);
}
BOOL Header_SetUnicodeFormat(HWND w, BOOL fUnicode) {
return cast(BOOL) SendMessage(w, HDM_SETUNICODEFORMAT, fUnicode, 0);
}
}
extern (Windows) {
HDSA DSA_Create(INT, INT);
BOOL DSA_Destroy(HDSA);
VOID DSA_DestroyCallback(HDSA, PFNDSAENUMCALLBACK, PVOID);
PVOID DSA_GetItemPtr(HDSA, INT);
INT DSA_InsertItem(HDSA, INT, PVOID);
HDPA DPA_Create(INT);
BOOL DPA_Destroy(HDPA);
PVOID DPA_DeletePtr(HDPA, INT);
BOOL DPA_DeleteAllPtrs(HDPA);
VOID DPA_EnumCallback(HDPA, PFNDPAENUMCALLBACK, PVOID);
VOID DPA_DestroyCallback(HDPA, PFNDPAENUMCALLBACK, PVOID);
BOOL DPA_SetPtr(HDPA, INT, PVOID);
INT DPA_InsertPtr(HDPA, INT, PVOID);
PVOID DPA_GetPtr(HDPA, INT_PTR);
BOOL DPA_Sort(HDPA, PFNDPACOMPARE, LPARAM);
INT DPA_Search(HDPA, PVOID, INT, PFNDPACOMPARE, LPARAM, UINT);
BOOL Str_SetPtrW(LPWSTR*, LPCWSTR);
static if (_WIN32_IE >= 0x400) {
BOOL FlatSB_EnableScrollBar(HWND, INT, UINT);
BOOL FlatSB_ShowScrollBar(HWND, INT, BOOL);
BOOL FlatSB_GetScrollRange(HWND, INT, LPINT, LPINT);
BOOL FlatSB_GetScrollInfo(HWND, INT, LPSCROLLINFO);
INT FlatSB_GetScrollPos(HWND, INT);
BOOL FlatSB_GetScrollProp(HWND, INT, LPINT);
version (Win64) {
BOOL FlatSB_GetScrollPropPtr(HWND, INT, PINT_PTR);
} else {
alias FlatSB_GetScrollProp FlatSB_GetScrollPropPtr;
}
INT FlatSB_SetScrollPos(HWND, INT, INT, BOOL);
INT FlatSB_SetScrollInfo(HWND, INT, LPSCROLLINFO, BOOL);
INT FlatSB_SetScrollRange(HWND, INT, INT, INT, BOOL);
BOOL FlatSB_SetScrollProp(HWND, UINT, INT_PTR, BOOL);
alias FlatSB_SetScrollProp FlatSB_SetScrollPropPtr;
BOOL InitializeFlatSB(HWND);
HRESULT UninitializeFlatSB(HWND);
}
static if (_WIN32_WINNT >= 0x501) {
BOOL SetWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR);
BOOL GetWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR*);
BOOL RemoveWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR);
LRESULT DefSubclassProc(HWND, UINT, WPARAM, LPARAM);
INT DrawShadowText(HDC, LPCWSTR, UINT, RECT*, DWORD, COLORREF,
COLORREF, INT, INT);
}
int ImageList_Add(HIMAGELIST, HBITMAP, HBITMAP);
int ImageList_AddMasked(HIMAGELIST, HBITMAP, COLORREF);
BOOL ImageList_BeginDrag(HIMAGELIST, int, int, int);
HIMAGELIST ImageList_Create(int, int, UINT, int, int);
BOOL ImageList_Destroy(HIMAGELIST);
BOOL ImageList_DragEnter(HWND, int, int);
BOOL ImageList_DragLeave(HWND);
BOOL ImageList_DragMove(int, int);
BOOL ImageList_DragShowNolock(BOOL);
BOOL ImageList_Draw(HIMAGELIST, int, HDC, int, int, UINT);
BOOL ImageList_DrawEx(HIMAGELIST, int, HDC, int, int, int, int, COLORREF,
COLORREF, UINT);
void ImageList_EndDrag();
COLORREF ImageList_GetBkColor(HIMAGELIST);
HIMAGELIST ImageList_GetDragImage(LPPOINT, LPPOINT);
HICON ImageList_GetIcon(HIMAGELIST, int, UINT);
BOOL ImageList_GetIconSize(HIMAGELIST, int*, int*);
int ImageList_GetImageCount(HIMAGELIST);
BOOL ImageList_GetImageInfo(HIMAGELIST, int, IMAGEINFO*);
HIMAGELIST ImageList_LoadImageA(HINSTANCE, LPCSTR, int, int, COLORREF,
UINT, UINT);
HIMAGELIST ImageList_LoadImageW(HINSTANCE, LPCWSTR, int, int, COLORREF,
UINT, UINT);
HIMAGELIST ImageList_Merge(HIMAGELIST, int, HIMAGELIST, int, int, int);
BOOL ImageList_Remove(HIMAGELIST, int);
BOOL ImageList_Replace(HIMAGELIST, int, HBITMAP, HBITMAP);
int ImageList_ReplaceIcon(HIMAGELIST, int, HICON);
COLORREF ImageList_SetBkColor(HIMAGELIST, COLORREF);
BOOL ImageList_SetDragCursorImage(HIMAGELIST, int, int, int);
BOOL ImageList_SetIconSize(HIMAGELIST, int, int);
BOOL ImageList_SetOverlayImage(HIMAGELIST, int, int);
//#ifdef _OBJIDL_H
HIMAGELIST ImageList_Read(LPSTREAM);
BOOL ImageList_Write(HIMAGELIST, LPSTREAM);
//#endif
static if (_WIN32_IE >= 0x400) {
HIMAGELIST ImageList_Duplicate(HIMAGELIST himl);
}
void InitCommonControls();
static if (_WIN32_IE >= 0x300) {
BOOL InitCommonControlsEx(LPINITCOMMONCONTROLSEX);
}
int LBItemFromPt(HWND, POINT, BOOL);
}
int ImageList_AddIcon(HIMAGELIST himl, HICON hicon) {
return ImageList_ReplaceIcon(himl, -1, hicon);
}
HICON ImageList_ExtractIcon(HINSTANCE hi, HIMAGELIST himl, int i) {
return ImageList_GetIcon(himl, i, 0);
}
HIMAGELIST ImageList_LoadBitmap(HINSTANCE hi, LPCTSTR lpbmp, int cx,
int cGrow, COLORREF crMask) {
return ImageList_LoadImage(hi, lpbmp, cx, cGrow, crMask, IMAGE_BITMAP, 0);
}
BOOL ImageList_RemoveAll(HIMAGELIST himl) {
return ImageList_Remove(himl, -1);
}
COLORREF ListView_GetBkColor(HWND w) {
return cast(COLORREF) SendMessage(w, LVM_GETBKCOLOR, 0, 0);
}
HIMAGELIST ListView_GetImageList(HWND w, int i) {
return cast(HIMAGELIST) SendMessage(w, LVM_GETIMAGELIST, i, 0);
}
int ListView_GetItemCount(HWND w) {
return cast(int) SendMessage(w, LVM_GETITEMCOUNT, 0, 0);
}
BOOL ListView_GetItem(HWND w, LPLVITEM pitem) {
return cast(BOOL) SendMessage(w, LVM_GETITEM, 0, cast(LPARAM) pitem);
}
BOOL ListView_SetBkColor(HWND w, COLORREF c) {
return cast(BOOL) SendMessage(w, LVM_SETBKCOLOR, 0, cast(LPARAM) c);
}
HIMAGELIST ListView_SetImageList(HWND w, HIMAGELIST h, int i) {
return cast(HIMAGELIST) SendMessage(w, LVM_SETIMAGELIST, i,
cast(LPARAM) h);
}
BOOL ListView_SetItem(HWND w, const(LV_ITEM)* i) {
return cast(BOOL) SendMessage(w, LVM_SETITEM, 0, cast(LPARAM) i);
}
int ListView_InsertItem(HWND w, const(LV_ITEM)* i) {
return cast(int) SendMessage(w, LVM_INSERTITEM, 0, cast(LPARAM) i);
}
BOOL ListView_DeleteItem(HWND w, int i) {
return cast(BOOL) SendMessage(w, LVM_DELETEITEM, i, 0);
}
BOOL ListView_DeleteAllItems(HWND w) {
return cast(BOOL) SendMessage(w, LVM_DELETEALLITEMS, 0, 0);
}
UINT ListView_GetCallbackMask(HWND w) {
return cast(UINT) SendMessage(w, LVM_GETCALLBACKMASK, 0, 0);
}
BOOL ListView_SetCallbackMask(HWND w, UINT m) {
return cast(BOOL) SendMessage(w, LVM_SETCALLBACKMASK, m, 0);
}
int ListView_GetNextItem(HWND w, int i, UINT f) {
return cast(int) SendMessage(w, LVM_GETNEXTITEM, i, MAKELPARAM(cast(ushort)f, 0));
}
int ListView_FindItem(HWND w, int i, const(LV_FINDINFO)* p) {
return cast(int) SendMessage(w, LVM_FINDITEM, i, cast(LPARAM) p);
}
BOOL ListView_GetItemRect(HWND w, int i, LPRECT p, int c) {
return cast(BOOL) SendMessage(w, LVM_GETITEMRECT, i, p ?
(p.left = c, cast(LPARAM) p) : 0);
}
BOOL ListView_SetItemPosition(HWND w, int i, int x, int y) {
return cast(BOOL) SendMessage(w, LVM_SETITEMPOSITION, i, MAKELPARAM(cast(ushort)x, cast(ushort)y));
}
BOOL ListView_GetItemPosition(HWND w, int i, POINT* p) {
return cast(BOOL) SendMessage(w, LVM_GETITEMPOSITION, i, cast(LPARAM) p);
}
DWORD ListView_GetItemSpacing(HWND w, BOOL f) {
return cast(DWORD) SendMessage(w, LVM_GETITEMSPACING, f, 0);
}
int ListView_GetStringWidth(HWND w, LPCSTR s) {
return cast(int) SendMessage(w, LVM_GETSTRINGWIDTH, 0, cast(LPARAM) s);
}
int ListView_HitTest(HWND w, LPLVHITTESTINFO p) {
return cast(int) SendMessage(w, LVM_HITTEST, 0, cast(LPARAM) p);
}
BOOL ListView_EnsureVisible(HWND w, int i, BOOL f) {
return cast(BOOL) SendMessage(w, LVM_ENSUREVISIBLE, i, MAKELPARAM(cast(ushort)f, 0));
}
BOOL ListView_Scroll(HWND w, int dx, int dy) {
return cast(BOOL) SendMessage(w, LVM_SCROLL, dx, dy);
}
BOOL ListView_RedrawItems(HWND w, int f, int l) {
return cast(BOOL) SendMessage(w, LVM_REDRAWITEMS, f, l);
}
BOOL ListView_Arrange(HWND w, UINT c) {
return cast(BOOL) SendMessage(w, LVM_ARRANGE, c, 0);
}
HWND ListView_EditLabel(HWND w, int i) {
return cast(HWND) SendMessage(w, LVM_EDITLABEL, i, 0);
}
HWND ListView_GetEditControl(HWND w) {
return cast(HWND) SendMessage(w, LVM_GETEDITCONTROL, 0, 0);
}
BOOL ListView_GetColumn(HWND w, int i, LPLVCOLUMN p) {
return cast(BOOL) SendMessage(w, LVM_GETCOLUMN, i, cast(LPARAM) p);
}
BOOL ListView_SetColumn(HWND w, int i, const(LV_COLUMN)* p) {
return cast(BOOL) SendMessage(w, LVM_SETCOLUMN, i, cast(LPARAM) p);
}
int ListView_InsertColumn(HWND w, int i, const(LV_COLUMN)* p) {
return cast(int) SendMessage(w, LVM_INSERTCOLUMN, i, cast(LPARAM) p);
}
BOOL ListView_DeleteColumn(HWND w, int i) {
return cast(BOOL) SendMessage(w, LVM_DELETECOLUMN, i, 0);
}
int ListView_GetColumnWidth(HWND w, int i) {
return cast(int) SendMessage(w, LVM_GETCOLUMNWIDTH, i, 0);
}
BOOL ListView_SetColumnWidth(HWND w, int i, int x) {
return cast(BOOL) SendMessage(w, LVM_SETCOLUMNWIDTH, i, MAKELPARAM(cast(ushort)x, 0));
}
HIMAGELIST ListView_CreateDragImage(HWND w, int i, LPPOINT p) {
return cast(HIMAGELIST) SendMessage(w, LVM_CREATEDRAGIMAGE, i,
cast(LPARAM) p);
}
BOOL ListView_GetViewRect(HWND w, RECT* p) {
return cast(BOOL) SendMessage(w, LVM_GETVIEWRECT, 0, cast(LPARAM) p);
}
COLORREF ListView_GetTextColor(HWND w) {
return cast(COLORREF) SendMessage(w, LVM_GETTEXTCOLOR, 0, 0);
}
BOOL ListView_SetTextColor(HWND w, COLORREF c) {
return cast(BOOL) SendMessage(w, LVM_SETTEXTCOLOR, 0, cast(LPARAM) c);
}
COLORREF ListView_GetTextBkColor(HWND w) {
return cast(COLORREF) SendMessage(w, LVM_GETTEXTBKCOLOR, 0, 0);
}
BOOL ListView_SetTextBkColor(HWND w, COLORREF c) {
return cast(BOOL) SendMessage(w, LVM_SETTEXTBKCOLOR, 0, cast(LPARAM) c);
}
int ListView_GetTopIndex(HWND w) {
return cast(int) SendMessage(w, LVM_GETTOPINDEX, 0, 0);
}
int ListView_GetCountPerPage(HWND w) {
return cast(int) SendMessage(w, LVM_GETCOUNTPERPAGE, 0, 0);
}
BOOL ListView_GetOrigin(HWND w, LPPOINT p) {
return cast(BOOL) SendMessage(w, LVM_GETORIGIN, 0, cast(LPARAM) p);
}
BOOL ListView_Update(HWND w, WPARAM i) {
return cast(BOOL) SendMessage(w, LVM_UPDATE, i, 0);
}
void ListView_SetItemState(HWND w, int i, UINT d, UINT m) {
LV_ITEM _lvi;
_lvi.stateMask = m;
_lvi.state = d;
SendMessage(w, LVM_SETITEMSTATE, i, cast(LPARAM) &_lvi);
}
UINT ListView_GetItemState(HWND w, int i, UINT m) {
return cast(UINT) SendMessage(w, LVM_GETITEMSTATE, i, m);
}
void ListView_GetItemText(HWND w, int i, int iS, LPTSTR s, int n) {
LV_ITEM _lvi;
_lvi.iSubItem = iS;
_lvi.cchTextMax = n;
_lvi.pszText = s;
SendMessage(w, LVM_GETITEMTEXT, i, cast(LPARAM) &_lvi);
}
void ListView_SetItemText(HWND w, int i, int iS, LPTSTR s) {
LV_ITEM _lvi;
_lvi.iSubItem = iS;
_lvi.pszText = s;
SendMessage(w, LVM_SETITEMTEXT, i, cast(LPARAM) &_lvi);
}
void ListView_SetItemCount(HWND w, int n) {
SendMessage(w, LVM_SETITEMCOUNT, n, 0);
}
BOOL ListView_SortItems(HWND w, PFNLVCOMPARE f, LPARAM l) {
return cast(BOOL) SendMessage(w, LVM_SORTITEMS, l, cast(LPARAM) f);
}
void ListView_SetItemPosition32(HWND w, int i, int x, int y) {
POINT p;
p.x = x;
p.y = y;
SendMessage(w, LVM_SETITEMPOSITION32, i, cast(LPARAM) &p);
}
UINT ListView_GetSelectedCount(HWND w) {
return cast(UINT) SendMessage(w, LVM_GETSELECTEDCOUNT, 0, 0);
}
UINT ListView_GetCheckState(HWND w, UINT i) {
return ((cast(UINT) SendMessage(w, LVM_GETITEMSTATE, i, LVIS_STATEIMAGEMASK)) >> 12) - 1;
}
void ListView_SetCheckState(HWND w, UINT i, BOOL f) {
ListView_SetItemState(w, i, INDEXTOSTATEIMAGEMASK(f ? 2 : 1),
LVIS_STATEIMAGEMASK);
}
BOOL ListView_GetISearchString(HWND w, LPSTR lpsz) {
return cast(BOOL) SendMessage(w, LVM_GETISEARCHSTRING, 0,
cast(LPARAM) lpsz);
}
void ListView_CancelEditLabel(HWND w) {
SendMessage(w, LVM_CANCELEDITLABEL, 0, 0);
}
int ListView_EnableGroupView(HWND w, BOOL i) {
return cast(int) SendMessage(w, LVM_ENABLEGROUPVIEW, i, 0);
}
//static if (_WIN32_WINNT >= 0x500 || _WIN32_IE >= 0x500) {
BOOL ListView_SortItemsEx(HWND w, PFNLVCOMPARE c, LPARAM p) {
return cast(BOOL) SendMessage(w, LVM_SORTITEMSEX, cast(WPARAM) p, cast(LPARAM)c);
}
//}
static if (_WIN32_WINNT >= 0x501) {
int ListView_GetGroupInfo(HWND w, int i, PLVGROUP p) {
return cast(int) SendMessage(w, LVM_GETGROUPINFO, i, cast(LPARAM) p);
}
void ListView_GetGroupMetrics(HWND w, PLVGROUPMETRICS p) {
SendMessage(w, LVM_GETGROUPMETRICS, 0, cast(LPARAM) p);
}
BOOL ListView_GetInsertMark(HWND w, PLVINSERTMARK p) {
return cast(BOOL) SendMessage(w, LVM_GETINSERTMARK, 0, cast(LPARAM) p);
}
COLORREF ListView_GetInsertMarkColor(HWND w) {
return cast(COLORREF) SendMessage(w, LVM_GETINSERTMARKCOLOR, 0, 0);
}
int ListView_GetInsertMarkRect(HWND w, LPRECT p) {
return cast(int) SendMessage(w, LVM_GETINSERTMARKRECT, 0, cast(LPARAM) p);
}
COLORREF ListView_GetOutlineColor(HWND w) {
return cast(COLORREF) SendMessage(w, LVM_GETOUTLINECOLOR, 0, 0);
}
UINT ListView_GetSelectedColumn(HWND w) {
return cast(UINT) SendMessage(w, LVM_GETSELECTEDCOLUMN, 0, 0);
}
void ListView_GetTileInfo(HWND w, PLVTILEINFO p) {
SendMessage(w, LVM_GETTILEINFO, 0, cast(LPARAM) p);
}
void ListView_GetTileViewInfo(HWND w, PLVTILEVIEWINFO p) {
SendMessage(w, LVM_GETTILEVIEWINFO, 0, cast(LPARAM) p);
}
DWORD ListView_GetView(HWND w) {
return cast(DWORD) SendMessage(w, LVM_GETVIEW, 0, 0);
}
BOOL ListView_HasGroup(HWND w, int i) {
return cast(BOOL) SendMessage(w, LVM_HASGROUP, i, 0);
}
int ListView_InsertGroup(HWND w, int i, PLVGROUP p) {
return cast(int) SendMessage(w, LVM_INSERTGROUP, i, cast(LPARAM) p);
}
void ListView_InsertGroupSorted(HWND w, PLVINSERTGROUPSORTED p) {
SendMessage(w, LVM_INSERTGROUPSORTED, cast(WPARAM) p, 0);
}
BOOL ListView_InsertMarkHitTest(HWND w, LPPOINT p, PLVINSERTMARK t) {
return cast(BOOL) SendMessage(w, LVM_INSERTMARKHITTEST, cast(WPARAM) p, cast(LPARAM) t);
}
BOOL ListView_IsGroupViewEnabled(HWND w) {
return cast(BOOL) SendMessage(w, LVM_ISGROUPVIEWENABLED, 0, 0);
}
UINT ListView_MapIDToIndex(HWND w, UINT i) {
return cast(UINT) SendMessage(w, LVM_MAPIDTOINDEX, i, 0);
}
/* ??? MSDN documents this as "Not implemented", except in relation to
* Windows CE/Mobile.
*/
void ListView_MoveGroup(HWND w, int i, int t) {
SendMessage(w, LVM_MOVEGROUP, i, t);
}
void ListView_RemoveAllGroups(HWND w) {
SendMessage(w, LVM_REMOVEALLGROUPS, 0, 0);
}
int ListView_RemoveGroup(HWND w, int i) {
return cast(int) SendMessage(w, LVM_REMOVEGROUP, i, 0);
}
int ListView_SetGroupInfo(HWND w, int i, PLVGROUP p) {
return cast(int) SendMessage(w, LVM_SETGROUPINFO, i, cast(LPARAM) p);
}
void ListView_SetGroupMetrics(HWND w, PLVGROUPMETRICS p) {
SendMessage(w, LVM_SETGROUPMETRICS, 0, cast(LPARAM) p);
}
BOOL ListView_SetInfoTip(HWND w, PLVSETINFOTIP p) {
return cast(BOOL) SendMessage(w, LVM_SETINFOTIP, 0, cast(LPARAM) p);
}
BOOL ListView_SetInsertMark(HWND w, PLVINSERTMARK p) {
return cast(BOOL) SendMessage(w, LVM_SETINSERTMARK, 0, cast(LPARAM) p);
}
COLORREF ListView_SetInsertMarkColor(HWND w, COLORREF c) {
return cast(COLORREF) SendMessage(w, LVM_SETINSERTMARKCOLOR, 0, c);
}
COLORREF ListView_SetOutlineColor(HWND w, COLORREF c) {
return cast(COLORREF) SendMessage(w, LVM_SETOUTLINECOLOR, 0, c);
}
void ListView_SetSelectedColumn(HWND w, int i) {
SendMessage(w, LVM_SETSELECTEDCOLUMN, i, 0);
}
BOOL ListView_SetTileInfo(HWND w, PLVTILEINFO p) {
return cast(BOOL) SendMessage(w, LVM_SETTILEINFO, 0, cast(LPARAM) p);
}
BOOL ListView_SetTileViewInfo(HWND w, PLVTILEVIEWINFO p) {
return cast(BOOL) SendMessage(w, LVM_SETTILEVIEWINFO, 0, cast(LPARAM) p);
}
int ListView_SetView(HWND w, DWORD i) {
return cast(int) SendMessage(w, LVM_SETVIEW, i, 0);
}
int ListView_SortGroups(HWND w, PFNLVGROUPCOMPARE c, LPVOID p) {
return cast(int) SendMessage(w, LVM_SORTGROUPS, cast(WPARAM) c, cast(LPARAM) p);
}
}
static if (_WIN32_WINNT >= 0x501) {
enum {
CBM_FIRST = 0x1700,
CB_SETMINVISIBLE = CBM_FIRST + 1,
CB_GETMINVISIBLE = CBM_FIRST + 2,
CB_SETCUEBANNER = CBM_FIRST + 3,
CB_GETCUEBANNER = CBM_FIRST + 4,
}
BOOL ComboBox_SetMinVisible(HWND w, INT i) {
return cast(BOOL) SendMessage(w, CB_SETMINVISIBLE, cast(WPARAM) i, 0);
}
int ComboBox_GetMinVisible(HWND w) {
return cast(int) SendMessage(w, CB_GETMINVISIBLE, 0, 0);
}
}
extern (Windows) BOOL MakeDragList(HWND);
extern (Windows) void MenuHelp(UINT, WPARAM, LPARAM, HMENU, HINSTANCE, HWND,
PUINT);
COLORREF MonthCal_GetColor(HWND hwnd, INT icolor) {
return cast(COLORREF) SendMessage(hwnd, MCM_GETCOLOR,
cast(WPARAM) icolor, 0);
}
BOOL MonthCal_GetCurSel(HWND hwnd, LPSYSTEMTIME lpsystime) {
return cast(BOOL) SendMessage(hwnd, MCM_GETCURSEL, 0,
cast(LPARAM) lpsystime);
}
DWORD MonthCal_GetFirstDayOfWeek(HWND hwnd) {
return cast(DWORD) SendMessage(hwnd, MCM_GETFIRSTDAYOFWEEK, 0, 0);
}
DWORD MonthCal_GetMaxSelCount(HWND hwnd) {
return cast(DWORD) SendMessage(hwnd, MCM_GETMAXSELCOUNT, 0, 0);
}
DWORD MonthCal_GetMaxTodayWidth(HWND hwnd) {
return cast(DWORD) SendMessage(hwnd, MCM_GETMAXTODAYWIDTH, 0, 0);
}
BOOL MonthCal_GetMinReqRect(HWND hwnd, LPRECT lpRectInfo) {
return cast(BOOL) SendMessage(hwnd, MCM_GETMINREQRECT, 0,
cast(LPARAM) lpRectInfo);
}
INT MonthCal_GetMonthDelta(HWND hwnd) {
return cast(INT) SendMessage(hwnd, MCM_GETMONTHDELTA, 0, 0);
}
INT MonthCal_GetMonthRange(HWND hwnd, DWORD flag, LPSYSTEMTIME systimearray) {
return cast(INT) SendMessage(hwnd, MCM_GETMONTHRANGE, cast(WPARAM) flag,
cast(LPARAM) systimearray);
}
DWORD MonthCal_GetRange(HWND hwnd, LPSYSTEMTIME systimearray) {
return cast(DWORD) SendMessage(hwnd, MCM_GETRANGE, 0,
cast(LPARAM) systimearray);
}
BOOL MonthCal_GetSelRange(HWND hwnd, LPSYSTEMTIME systimearray) {
return cast(BOOL) SendMessage(hwnd, MCM_GETSELRANGE, 0,
cast(LPARAM) systimearray);
}
BOOL MonthCal_GetToday(HWND hwnd, LPSYSTEMTIME systime) {
return cast(BOOL) SendMessage(hwnd, MCM_GETTODAY, 0,
cast(LPARAM) systime);
}
BOOL MonthCal_GetUnicodeFormat(HWND hwnd) {
return cast(BOOL) SendMessage(hwnd, MCM_GETUNICODEFORMAT, 0, 0);
}
DWORD MonthCal_HitTest(HWND hwnd, PMCHITTESTINFO pmchittest) {
return cast(DWORD) SendMessage(hwnd, MCM_HITTEST, 0,
cast(LPARAM) pmchittest);
}
COLORREF MonthCal_SetColor(HWND hwnd, INT icolor, COLORREF clr) {
return cast(COLORREF) SendMessage(hwnd, MCM_SETCOLOR, cast(WPARAM) icolor,
cast(LPARAM) clr);
}
BOOL MonthCal_SetCurSel(HWND hwnd, LPSYSTEMTIME lpsystime) {
return cast(BOOL) SendMessage(hwnd, MCM_SETCURSEL, 0,
cast(LPARAM) lpsystime);
}
BOOL MonthCal_SetDayState(HWND hwnd, INT imonths, LPMONTHDAYSTATE lpdatestatearray) {
return cast(BOOL) SendMessage(hwnd, MCM_SETDAYSTATE, cast(WPARAM) imonths,
cast(LPARAM) lpdatestatearray);
}
DWORD MonthCal_SetFirstDayOfWeek(HWND hwnd, INT iday) {
return cast(DWORD) SendMessage(hwnd, MCM_SETFIRSTDAYOFWEEK, 0,
cast(LPARAM) iday);
}
BOOL MonthCal_SetMaxSelCount(HWND hwnd, UINT imax) {
return cast(BOOL) SendMessage(hwnd, MCM_SETMAXSELCOUNT,
cast(WPARAM) imax, 0);
}
INT MonthCal_SetMonthDelta(HWND hwnd, INT idelta) {
return cast(INT) SendMessage(hwnd, MCM_SETMONTHDELTA, cast(WPARAM) idelta, 0);
}
BOOL MonthCal_SetSelRange(HWND hwnd, LPSYSTEMTIME systimearray) {
return cast(BOOL) SendMessage(hwnd, MCM_SETSELRANGE, 0,
cast(LPARAM) systimearray);
}
void MonthCal_SetToday(HWND hwnd, LPSYSTEMTIME systime) {
SendMessage(hwnd, MCM_SETTODAY, 0, cast(LPARAM) systime);
}
BOOL MonthCal_SetUnicodeFormat(HWND hwnd, BOOL unicode) {
return cast(BOOL) SendMessage(hwnd, MCM_SETUNICODEFORMAT,
cast(WPARAM) unicode, 0);
}
BOOL MonthCal_SetRange(HWND w, DWORD f, LPSYSTEMTIME st) {
return cast(BOOL) SendMessage(w, MCM_SETRANGE, cast(WPARAM) f,
cast(LPARAM) st);
}
extern (Windows) BOOL ShowHideMenuCtl(HWND, UINT_PTR, PINT);
BOOL TabCtrl_GetItem(HWND w, int i, LPTCITEM p) {
return cast(BOOL) SendMessage(w, TCM_GETITEM, i, cast(LPARAM) p);
}
BOOL TabCtrl_SetItem(HWND w, int i, LPTCITEM p) {
return cast(BOOL) SendMessage(w, TCM_SETITEM, i, cast(LPARAM) p);
}
int TabCtrl_InsertItem(HWND w, int i, const(TC_ITEM)* p) {
return cast(int) SendMessage(w, TCM_INSERTITEM, i, cast(LPARAM) p);
}
BOOL TabCtrl_DeleteItem(HWND w, int i) {
return cast(BOOL) SendMessage(w, TCM_DELETEITEM, i, 0);
}
BOOL TabCtrl_DeleteAllItems(HWND w) {
return cast(BOOL) SendMessage(w, TCM_DELETEALLITEMS, 0, 0);
}
BOOL TabCtrl_GetItemRect(HWND w, int i, LPRECT p) {
return cast(BOOL) SendMessage(w, TCM_GETITEMRECT, i, cast(LPARAM) p);
}
int TabCtrl_GetCurSel(HWND w) {
return cast(int) SendMessage(w, TCM_GETCURSEL, 0, 0);
}
int TabCtrl_SetCurSel(HWND w, int i) {
return cast(int) SendMessage(w, TCM_SETCURSEL, i, 0);
}
int TabCtrl_HitTest(HWND w, LPTCHITTESTINFO p) {
return cast(int) SendMessage(w, TCM_HITTEST, 0, cast(LPARAM) p);
}
BOOL TabCtrl_SetItemExtra(HWND w, int c) {
return cast(BOOL) SendMessage(w, TCM_SETITEMEXTRA, c, 0);
}
int TabCtrl_AdjustRect(HWND w, BOOL b, LPRECT p) {
return cast(int) SendMessage(w, TCM_ADJUSTRECT, b, cast(LPARAM) p);
}
DWORD TabCtrl_SetItemSize(HWND w, int x, int y) {
return cast(DWORD) SendMessage(w, TCM_SETITEMSIZE, 0, MAKELPARAM(cast(ushort)x, cast(ushort)y));
}
void TabCtrl_RemoveImage(HWND w, int i) {
SendMessage(w, TCM_REMOVEIMAGE, i, 0);
}
void TabCtrl_SetPadding(HWND w, int x, int y) {
SendMessage(w, TCM_SETPADDING, 0, MAKELPARAM(cast(ushort)x, cast(ushort)y));
}
int TabCtrl_GetRowCount(HWND w) {
return cast(int) SendMessage(w, TCM_GETROWCOUNT, 0, 0);
}
HWND TabCtrl_GetToolTips(HWND w) {
return cast(HWND) SendMessage(w, TCM_GETTOOLTIPS, 0, 0);
}
void TabCtrl_SetToolTips(HWND w, HWND t) {
SendMessage(w, TCM_SETTOOLTIPS, cast(WPARAM) t, 0);
}
int TabCtrl_GetCurFocus(HWND w) {
return cast(int) SendMessage(w, TCM_GETCURFOCUS, 0, 0);
}
void TabCtrl_SetCurFocus(HWND w, int i) {
SendMessage(w, TCM_SETCURFOCUS, i, 0);
}
HIMAGELIST TabCtrl_GetImageList(HWND w) {
return cast(HIMAGELIST) SendMessage(w, TCM_GETIMAGELIST, 0, 0);
}
HIMAGELIST TabCtrl_SetImageList(HWND w, HIMAGELIST h) {
return cast(HIMAGELIST) SendMessage(w, TCM_SETIMAGELIST, 0,
cast(LPARAM) h);
}
int TabCtrl_GetItemCount(HWND w) {
return cast(int) SendMessage(w, TCM_GETITEMCOUNT, 0, 0);
}
extern (Windows) BOOL _TrackMouseEvent(LPTRACKMOUSEEVENT);
HTREEITEM TreeView_InsertItem(HWND w, LPTVINSERTSTRUCT i) {
return cast(HTREEITEM) SendMessage(w, TVM_INSERTITEM, 0, cast(LPARAM) i);
}
BOOL TreeView_DeleteItem(HWND w, HTREEITEM i) {
return cast(BOOL) SendMessage(w, TVM_DELETEITEM, 0, cast(LPARAM) i);
}
BOOL TreeView_DeleteAllItems(HWND w) {
return cast(BOOL) SendMessage(w, TVM_DELETEITEM, 0, cast(LPARAM) TVI_ROOT);
}
BOOL TreeView_Expand(HWND w, HTREEITEM i, UINT c) {
return cast(BOOL) SendMessage(w, TVM_EXPAND, c, cast(LPARAM) i);
}
BOOL TreeView_GetItemRect(HWND w, HTREEITEM i, LPRECT p, BOOL c) {
*cast(HTREEITEM*) p = i;
return cast(BOOL) SendMessage(w, TVM_GETITEMRECT, c, cast(LPARAM) p);
}
UINT TreeView_GetCount(HWND w) {
return cast(UINT) SendMessage(w, TVM_GETCOUNT, 0, 0);
}
UINT TreeView_GetIndent(HWND w) {
return cast(UINT) SendMessage(w, TVM_GETINDENT, 0, 0);
}
BOOL TreeView_SetIndent(HWND w, INT i) {
return cast(BOOL) SendMessage(w, TVM_SETINDENT, i, 0);
}
HIMAGELIST TreeView_GetImageList(HWND w, INT i) {
return cast(HIMAGELIST) SendMessage(w, TVM_GETIMAGELIST, i, 0);
}
HIMAGELIST TreeView_SetImageList(HWND w, HIMAGELIST h, INT i) {
return cast(HIMAGELIST) SendMessage(w, TVM_SETIMAGELIST, i,
cast(LPARAM) h);
}
HTREEITEM TreeView_GetNextItem(HWND w, HTREEITEM i, UINT c) {
return cast(HTREEITEM) SendMessage(w, TVM_GETNEXTITEM, c, cast(LPARAM) i);
}
HTREEITEM TreeView_GetChild(HWND w, HTREEITEM i) {
return TreeView_GetNextItem(w, i, TVGN_CHILD);
}
HTREEITEM TreeView_GetNextSibling(HWND w, HTREEITEM i) {
return TreeView_GetNextItem(w, i, TVGN_NEXT);
}
HTREEITEM TreeView_GetPrevSibling(HWND w, HTREEITEM i) {
return TreeView_GetNextItem(w, i, TVGN_PREVIOUS);
}
HTREEITEM TreeView_GetParent(HWND w, HTREEITEM i) {
return TreeView_GetNextItem(w, i, TVGN_PARENT);
}
HTREEITEM TreeView_GetFirstVisible(HWND w) {
return TreeView_GetNextItem(w, null, TVGN_FIRSTVISIBLE);
}
HTREEITEM TreeView_GetNextVisible(HWND w, HTREEITEM i) {
return TreeView_GetNextItem(w, i, TVGN_NEXTVISIBLE);
}
HTREEITEM TreeView_GetPrevVisible(HWND w, HTREEITEM i) {
return TreeView_GetNextItem(w, i, TVGN_PREVIOUSVISIBLE);
}
HTREEITEM TreeView_GetSelection(HWND w) {
return TreeView_GetNextItem(w, null, TVGN_CARET);
}
HTREEITEM TreeView_GetDropHilight(HTREEITEM w) {
return TreeView_GetNextItem(w, null, TVGN_DROPHILITE);
}
HTREEITEM TreeView_GetRoot(HWND w) {
return TreeView_GetNextItem(w, null, TVGN_ROOT);
}
BOOL TreeView_Select(HWND w, HTREEITEM i, UINT c) {
return cast(BOOL) SendMessage(w, TVM_SELECTITEM, c, cast(LPARAM) i);
}
BOOL TreeView_SelectItem(HWND w, HTREEITEM i) {
return TreeView_Select(w, i, TVGN_CARET);
}
BOOL TreeView_SelectDropTarget(HWND w, HTREEITEM i) {
return TreeView_Select(w, i, TVGN_DROPHILITE);
}
BOOL TreeView_SelectSetFirstVisible(HWND w, HTREEITEM i) {
return TreeView_Select(w, i, TVGN_FIRSTVISIBLE);
}
BOOL TreeView_GetItem(HWND w, LPTVITEM i) {
return cast(BOOL) SendMessage(w, TVM_GETITEM, 0, cast(LPARAM) i);
}
BOOL TreeView_SetItem(HWND w, const(TV_ITEM)* i) {
return cast(BOOL) SendMessage(w, TVM_SETITEM, 0, cast(LPARAM) i);
}
HWND TreeView_EditLabel(HWND w, HTREEITEM i) {
return cast(HWND) SendMessage(w, TVM_EDITLABEL, 0, cast(LPARAM) i);
}
HWND TreeView_GetEditControl(HWND w) {
return cast(HWND) SendMessage(w, TVM_GETEDITCONTROL, 0, 0);
}
UINT TreeView_GetVisibleCount(HWND w) {
return cast(UINT) SendMessage(w, TVM_GETVISIBLECOUNT, 0, 0);
}
HTREEITEM TreeView_HitTest(HWND w, LPTVHITTESTINFO p) {
return cast(HTREEITEM) SendMessage(w, TVM_HITTEST, 0, cast(LPARAM) p);
}
HIMAGELIST TreeView_CreateDragImage(HWND w, HTREEITEM i) {
return cast(HIMAGELIST) SendMessage(w, TVM_CREATEDRAGIMAGE, 0,
cast(LPARAM) i);
}
BOOL TreeView_SortChildren(HWND w, HTREEITEM i, BOOL r) {
return cast(BOOL) SendMessage(w, TVM_SORTCHILDREN, r, cast(LPARAM) i);
}
BOOL TreeView_EnsureVisible(HWND w, HTREEITEM i) {
return cast(BOOL) SendMessage(w, TVM_ENSUREVISIBLE, 0, cast(LPARAM) i);
}
BOOL TreeView_SortChildrenCB(HWND w, LPTVSORTCB s, BOOL r) {
return cast(BOOL) SendMessage(w, TVM_SORTCHILDRENCB, r, cast(LPARAM) s);
}
BOOL TreeView_EndEditLabelNow(HWND w, BOOL f) {
return cast(BOOL) SendMessage(w, TVM_ENDEDITLABELNOW, f, 0);
}
BOOL TreeView_GetISearchString(HWND w, LPTSTR s) {
return cast(BOOL) SendMessage(w, TVM_GETISEARCHSTRING, 0, cast(LPARAM) s);
}
static if (_WIN32_IE >= 0x300) {
DWORD ListView_ApproximateViewRect(HWND w, int iw, int ih, int i) {
return cast(DWORD) SendMessage(w, LVM_APPROXIMATEVIEWRECT, i,
MAKELPARAM(cast(ushort)iw, cast(ushort)ih));
}
DWORD ListView_SetExtendedListViewStyle(HWND w, DWORD s) {
return cast(DWORD) SendMessage(w, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, s);
}
DWORD ListView_GetExtendedListViewStyle(HWND w) {
return cast(DWORD) SendMessage(w, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
}
BOOL ListView_SetColumnOrderArray(HWND w, int i, int* a) {
return cast(BOOL) SendMessage(w, LVM_SETCOLUMNORDERARRAY,
cast(WPARAM) i, cast(LPARAM) a);
}
BOOL ListView_GetColumnOrderArray(HWND w, int i, int* a) {
return cast(BOOL) SendMessage(w, LVM_GETCOLUMNORDERARRAY,
cast(WPARAM) i, cast(LPARAM) a);
}
HWND ListView_GetHeader(HWND w) {
return cast(HWND) SendMessage(w, LVM_GETHEADER, 0, 0);
}
HCURSOR ListView_GetHotCursor(HWND w) {
return cast(HCURSOR) SendMessage(w, LVM_GETHOTCURSOR, 0, 0);
}
INT ListView_GetHotItem(HWND w) {
return cast(INT) SendMessage(w, LVM_GETHOTITEM, 0, 0);
}
BOOL ListView_GetSubItemRect(HWND w, int i, int isi, int c, LPRECT p) {
return cast(BOOL) SendMessage(w, LVM_GETSUBITEMRECT, i,
p ? (p.left = c, p.top = isi, cast(LPARAM) p) : 0);
}
HCURSOR ListView_SetHotCursor(HWND w, HCURSOR c) {
return cast(HCURSOR) SendMessage(w, LVM_SETHOTCURSOR, 0,
cast(LPARAM) c);
}
INT ListView_SetHotItem(HWND w, INT i) {
return cast(INT) SendMessage(w, LVM_SETHOTITEM, cast(WPARAM) i, 0);
}
DWORD ListView_SetIconSpacing(HWND w, int x, int y) {
return cast(DWORD) SendMessage(w, LVM_SETICONSPACING, 0,
MAKELONG(cast(ushort)x, cast(ushort)y));
}
INT ListView_SubItemHitTest(HWND w, LPLVHITTESTINFO p) {
return cast(INT) SendMessage(w, LVM_SUBITEMHITTEST, 0, cast(LPARAM) p);
}
BOOL ListView_SetItemCountEx(HWND w, int i, DWORD f) {
return cast(BOOL) SendMessage(w, LVM_SETITEMCOUNT, i, cast(LPARAM) f);
}
extern (Windows) {
WINBOOL ImageList_SetImageCount(HIMAGELIST, UINT);
WINBOOL ImageList_Copy(HIMAGELIST, int, HIMAGELIST, int, UINT);
WINBOOL ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*);
}
int TabCtrl_SetMinTabWidth(HWND hwnd, int x) {
return cast(int) SendMessage(hwnd, TCM_SETMINTABWIDTH, 0, x);
}
VOID TabCtrl_DeselectAll(HWND hwnd, UINT fExcludeFocus) {
SendMessage(hwnd, TCM_DESELECTALL, fExcludeFocus, 0);
}
HWND TreeView_GetToolTips(HWND w) {
return cast(HWND) SendMessage(w, TVM_GETTOOLTIPS, 0, 0);
}
HWND TreeView_SetToolTips(HWND w, HWND wt) {
return cast(HWND) SendMessage(w, TVM_SETTOOLTIPS, cast(WPARAM) wt, 0);
}
}
static if (_WIN32_IE >= 0x400) {
BOOL ListView_GetBkImage(HWND h, LPLVBKIMAGE plvbki) {
return cast(BOOL) SendMessage(h, LVM_GETBKIMAGE, 0,
cast(LPARAM) plvbki);
}
BOOL ListView_SetBkImage(HWND h, LPLVBKIMAGE plvbki) {
return cast(BOOL) SendMessage(h, LVM_SETBKIMAGE, 0,
cast(LPARAM) plvbki);
}
DWORD ListView_SetExtendedListViewStyleEx(HWND w, DWORD m, DWORD s) {
return cast(DWORD) SendMessage(w, LVM_SETEXTENDEDLISTVIEWSTYLE, m, s);
}
VOID ListView_SetWorkAreas(HWND w, INT n, LPRECT r) {
SendMessage(w, LVM_SETWORKAREAS, cast(WPARAM) n, cast(LPARAM) r);
}
VOID ListView_GetWorkAreas(HWND w, INT n, LPRECT r) {
SendMessage(w, LVM_GETWORKAREAS, cast(WPARAM) n, cast(LPARAM) r);
}
BOOL ListView_GetNumberOfWorkAreas(HWND w, LPUINT n) {
return cast(BOOL) SendMessage(w, LVM_GETNUMBEROFWORKAREAS, 0,
cast(LPARAM) n);
}
DWORD ListView_SetHoverTime(HWND w, DWORD t) {
return cast(DWORD) SendMessage(w, LVM_SETHOVERTIME, 0,
cast(LPARAM) t);
}
DWORD ListView_GetHoverTime(HWND w) {
return cast(DWORD) SendMessage(w, LVM_GETHOVERTIME, 0, 0);
}
INT ListView_GetSelectionMark(HWND w) {
return cast(INT) SendMessage(w, LVM_GETSELECTIONMARK, 0, 0);
}
INT ListView_SetSelectionMark(HWND w, INT i) {
return cast(INT) SendMessage(w, LVM_SETSELECTIONMARK, 0, cast(LPARAM) i);
}
HWND ListView_SetToolTips(HWND w, HWND n) {
return cast(HWND) SendMessage(w, LVM_SETTOOLTIPS, cast(WPARAM) n, 0);
}
HWND ListView_GetToolTips(HWND w) {
return cast(HWND) SendMessage(w, LVM_GETTOOLTIPS, 0, 0);
}
BOOL ListView_SetUnicodeFormat(HWND w, BOOL f) {
return cast(BOOL) SendMessage(w, LVM_SETUNICODEFORMAT,
cast(WPARAM) f, 0);
}
BOOL ListView_GetUnicodeFormat(HWND w) {
return cast(BOOL) SendMessage(w, LVM_GETUNICODEFORMAT, 0, 0);
}
BOOL TabCtrl_HighlightItem(HWND hwnd, INT i, WORD fHighlight) {
return cast(BOOL) SendMessage(hwnd, TCM_HIGHLIGHTITEM,
cast(WPARAM) i, cast(LPARAM) MAKELONG(fHighlight, 0));
}
DWORD TabCtrl_SetExtendedStyle(HWND hwnd, DWORD dw) {
return cast(DWORD) SendMessage(hwnd, TCM_SETEXTENDEDSTYLE, 0, dw);
}
DWORD TabCtrl_GetExtendedStyle(HWND hwnd) {
return cast(DWORD) SendMessage(hwnd, TCM_GETEXTENDEDSTYLE, 0, 0);
}
BOOL TabCtrl_SetUnicodeFormat(HWND hwnd, HWND fUnicode) {
return cast(BOOL) SendMessage(hwnd, TCM_SETUNICODEFORMAT,
cast(WPARAM) fUnicode, 0);
}
BOOL TabCtrl_GetUnicodeFormat(HWND hwnd) {
return cast(BOOL) SendMessage(hwnd, TCM_GETUNICODEFORMAT, 0, 0);
}
COLORREF TreeView_GetBkColor(HWND w) {
return cast(COLORREF) SendMessage(w, TVM_GETBKCOLOR, 0, 0);
}
COLORREF TreeView_GetInsertMarkColor(HWND w) {
return cast(COLORREF) SendMessage(w, TVM_GETINSERTMARKCOLOR, 0, 0);
}
int TreeView_GetItemHeight(HWND w) {
return cast(int) SendMessage(w, TVM_GETITEMHEIGHT, 0, 0);
}
UINT TreeView_GetScrollTime(HWND w) {
return cast(UINT) SendMessage(w, TVM_GETSCROLLTIME, 0, 0);
}
COLORREF TreeView_GetTextColor(HWND w) {
return cast(COLORREF) SendMessage(w, TVM_GETTEXTCOLOR, 0, 0);
}
COLORREF TreeView_SetBkColor(HWND w, COLORREF c) {
return cast(COLORREF) SendMessage(w, TVM_SETBKCOLOR, 0,
cast(LPARAM) c);
}
COLORREF TreeView_SetInsertMarkColor(HWND w, COLORREF c) {
return cast(COLORREF) SendMessage(w, TVM_SETINSERTMARKCOLOR, 0,
cast(LPARAM) c);
}
int TreeView_SetItemHeight(HWND w, SHORT h) {
return cast(int) SendMessage(w, TVM_SETITEMHEIGHT, cast(WPARAM) h, 0);
}
UINT TreeView_SetScrollTime(HWND w, UINT t) {
return cast(UINT) SendMessage(w, TVM_SETSCROLLTIME, cast(WPARAM) t, 0);
}
COLORREF TreeView_SetTextColor(HWND w, COLORREF c) {
return cast(COLORREF) SendMessage(w, TVM_SETTEXTCOLOR, 0,
cast(LPARAM) c);
}
BOOL TreeView_SetInsertMark(HWND w, HTREEITEM i, BOOL a) {
return cast(BOOL) SendMessage(w, TVM_SETINSERTMARK, cast(WPARAM) a,
cast(LPARAM) i);
}
BOOL TreeView_SetUnicodeFormat(HWND w, BOOL u) {
return cast(BOOL) SendMessage(w, TVM_SETUNICODEFORMAT,
cast(WPARAM) u, 0);
}
BOOL TreeView_GetUnicodeFormat(HWND w) {
return cast(BOOL) SendMessage(w, TVM_GETUNICODEFORMAT, 0, 0);
}
HTREEITEM TreeView_GetLastVisible(HWND w) {
return TreeView_GetNextItem(w, null, TVGN_LASTVISIBLE);
}
}
static if (_WIN32_IE >= 0x500) {
UINT TreeView_GetItemState(HWND w, HTREEITEM i, UINT m) {
return cast(UINT) SendMessage(w, TVM_GETITEMSTATE, cast(WPARAM) i,
cast(LPARAM) m);
}
BOOL TreeView_SetItemState(HWND w, HTREEITEM i, UINT d, UINT m) {
TVITEM _tvi;
_tvi.mask = TVIF_STATE;
_tvi.hItem = i;
_tvi.stateMask = m;
_tvi.state = d;
return cast(BOOL) SendMessage(w, TVM_SETITEM, 0, cast(LPARAM) &_tvi);
}
}
//#ifdef _WIN32_WCE // these are PPC only
/+
extern (Windows) {
HWND CommandBar_Create(HINSTANCE, HWND, int);
BOOL CommandBar_Show(HWND, BOOL);
int CommandBar_AddBitmap(HWND, HINSTANCE, int, int, int, int);
HWND CommandBar_InsertComboBox(HWND, HINSTANCE, int, UINT, WORD, WORD);
BOOL CommandBar_InsertMenubar(HWND, HINSTANCE, WORD, WORD );
BOOL CommandBar_InsertMenubarEx(HWND, HINSTANCE, LPTSTR, WORD);
BOOL CommandBar_DrawMenuBar(HWND, WORD);
HMENU CommandBar_GetMenu(HWND, WORD);
BOOL CommandBar_AddAdornments(HWND, DWORD, DWORD);
int CommandBar_Height(HWND hwndCB);
}
// MinGW: These two are not in the DLL
void CommandBar_InsertButton(HWND hwnd, int i, LPTBBUTTON lptbbutton) {
SendMessage(hwnd, TB_INSERTBUTTON, i, lptbbutton);
}
alias DestroyWindow CommandBar_Destroy;
+/
//#endif // _WIN32_WCE
static if (_WIN32_WINNT >= 0x501) {
struct EDITBALLOONTIP
{
DWORD cbStruct;
LPCWSTR pszTitle;
LPCWSTR pszText;
INT ttiIcon;
}
alias EDITBALLOONTIP* PEDITBALLOONTIP;
const EM_SETCUEBANNER = ECM_FIRST + 1;
const EM_GETCUEBANNER = ECM_FIRST + 2;
const EM_SHOWBALLOONTIP = ECM_FIRST + 3;
const EM_HIDEBALLOONTIP = ECM_FIRST + 4;
}
static if (_WIN32_WINNT >= 0x600) {
const EM_SETHILITE = ECM_FIRST + 5;
const EM_GETHILITE = ECM_FIRST + 6;
}
|
D
|
/**
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1999-2018 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/doc.d, _doc.d)
*/
module dmd.doc;
// Online documentation: https://dlang.org/phobos/dmd_doc.html
import core.stdc.ctype;
import core.stdc.stdlib;
import core.stdc.stdio;
import core.stdc.string;
import core.stdc.time;
import dmd.aggregate;
import dmd.arraytypes;
import dmd.attrib;
import dmd.dclass;
import dmd.declaration;
import dmd.denum;
import dmd.dmacro;
import dmd.dmodule;
import dmd.dscope;
import dmd.dstruct;
import dmd.dsymbol;
import dmd.dsymbolsem;
import dmd.dtemplate;
import dmd.errors;
import dmd.func;
import dmd.globals;
import dmd.hdrgen;
import dmd.id;
import dmd.identifier;
import dmd.lexer;
import dmd.mtype;
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.tokens;
import dmd.utf;
import dmd.utils;
import dmd.visitor;
struct Escape
{
const(char)*[256] strings;
/***************************************
* Find character string to replace c with.
*/
extern (C++) const(char)* escapeChar(uint c)
{
version (all)
{
assert(c < 256);
//printf("escapeChar('%c') => %p, %p\n", c, strings, strings[c]);
return strings[c];
}
else
{
const(char)* s;
switch (c)
{
case '<':
s = "<";
break;
case '>':
s = ">";
break;
case '&':
s = "&";
break;
default:
s = null;
break;
}
return s;
}
}
}
/***********************************************************
*/
extern (C++) class Section
{
const(char)* name;
size_t namelen;
const(char)* _body;
size_t bodylen;
int nooutput;
void write(Loc loc, DocComment* dc, Scope* sc, Dsymbols* a, OutBuffer* buf)
{
assert(a.dim);
if (namelen)
{
static __gshared const(char)** table =
[
"AUTHORS",
"BUGS",
"COPYRIGHT",
"DATE",
"DEPRECATED",
"EXAMPLES",
"HISTORY",
"LICENSE",
"RETURNS",
"SEE_ALSO",
"STANDARDS",
"THROWS",
"VERSION",
null
];
for (size_t i = 0; table[i]; i++)
{
if (icmp(table[i], name, namelen) == 0)
{
buf.printf("$(DDOC_%s ", table[i]);
goto L1;
}
}
buf.writestring("$(DDOC_SECTION ");
// Replace _ characters with spaces
buf.writestring("$(DDOC_SECTION_H ");
size_t o = buf.offset;
for (size_t u = 0; u < namelen; u++)
{
char c = name[u];
buf.writeByte((c == '_') ? ' ' : c);
}
escapeStrayParenthesis(loc, buf, o);
buf.writestring(")");
}
else
{
buf.writestring("$(DDOC_DESCRIPTION ");
}
L1:
size_t o = buf.offset;
buf.write(_body, bodylen);
escapeStrayParenthesis(loc, buf, o);
highlightText(sc, a, buf, o);
buf.writestring(")");
}
}
/***********************************************************
*/
extern (C++) final class ParamSection : Section
{
override void write(Loc loc, DocComment* dc, Scope* sc, Dsymbols* a, OutBuffer* buf)
{
assert(a.dim);
Dsymbol s = (*a)[0]; // test
const(char)* p = _body;
size_t len = bodylen;
const(char)* pend = p + len;
const(char)* tempstart = null;
size_t templen = 0;
const(char)* namestart = null;
size_t namelen = 0; // !=0 if line continuation
const(char)* textstart = null;
size_t textlen = 0;
size_t paramcount = 0;
buf.writestring("$(DDOC_PARAMS ");
while (p < pend)
{
// Skip to start of macro
while (1)
{
switch (*p)
{
case ' ':
case '\t':
p++;
continue;
case '\n':
p++;
goto Lcont;
default:
if (isIdStart(p) || isCVariadicArg(p, pend - p))
break;
if (namelen)
goto Ltext;
// continuation of prev macro
goto Lskipline;
}
break;
}
tempstart = p;
while (isIdTail(p))
p += utfStride(p);
if (isCVariadicArg(p, pend - p))
p += 3;
templen = p - tempstart;
while (*p == ' ' || *p == '\t')
p++;
if (*p != '=')
{
if (namelen)
goto Ltext;
// continuation of prev macro
goto Lskipline;
}
p++;
if (namelen)
{
// Output existing param
L1:
//printf("param '%.*s' = '%.*s'\n", namelen, namestart, textlen, textstart);
++paramcount;
HdrGenState hgs;
buf.writestring("$(DDOC_PARAM_ROW ");
{
buf.writestring("$(DDOC_PARAM_ID ");
{
size_t o = buf.offset;
Parameter fparam = isFunctionParameter(a, namestart, namelen);
if (!fparam)
{
// Comments on a template might refer to function parameters within.
// Search the parameters of nested eponymous functions (with the same name.)
fparam = isEponymousFunctionParameter(a, namestart, namelen);
}
bool isCVariadic = isCVariadicParameter(a, namestart, namelen);
if (isCVariadic)
{
buf.writestring("...");
}
else if (fparam && fparam.type && fparam.ident)
{
.toCBuffer(fparam.type, buf, fparam.ident, &hgs);
}
else
{
if (isTemplateParameter(a, namestart, namelen))
{
// 10236: Don't count template parameters for params check
--paramcount;
}
else if (!fparam)
{
warning(s.loc, "Ddoc: function declaration has no parameter '%.*s'", namelen, namestart);
}
buf.write(namestart, namelen);
}
escapeStrayParenthesis(loc, buf, o);
highlightCode(sc, a, buf, o);
}
buf.writestring(")");
buf.writestring("$(DDOC_PARAM_DESC ");
{
size_t o = buf.offset;
buf.write(textstart, textlen);
escapeStrayParenthesis(loc, buf, o);
highlightText(sc, a, buf, o);
}
buf.writestring(")");
}
buf.writestring(")");
namelen = 0;
if (p >= pend)
break;
}
namestart = tempstart;
namelen = templen;
while (*p == ' ' || *p == '\t')
p++;
textstart = p;
Ltext:
while (*p != '\n')
p++;
textlen = p - textstart;
p++;
Lcont:
continue;
Lskipline:
// Ignore this line
while (*p++ != '\n')
{
}
}
if (namelen)
goto L1;
// write out last one
buf.writestring(")");
TypeFunction tf = a.dim == 1 ? isTypeFunction(s) : null;
if (tf)
{
size_t pcount = (tf.parameters ? tf.parameters.dim : 0) + cast(int)(tf.varargs == 1);
if (pcount != paramcount)
{
warning(s.loc, "Ddoc: parameter count mismatch");
}
}
}
}
/***********************************************************
*/
extern (C++) final class MacroSection : Section
{
override void write(Loc loc, DocComment* dc, Scope* sc, Dsymbols* a, OutBuffer* buf)
{
//printf("MacroSection::write()\n");
DocComment.parseMacros(dc.pescapetable, dc.pmacrotable, _body, bodylen);
}
}
alias Sections = Array!(Section);
// Workaround for missing Parameter instance for variadic params. (it's unnecessary to instantiate one).
extern (C++) bool isCVariadicParameter(Dsymbols* a, const(char)* p, size_t len)
{
for (size_t i = 0; i < a.dim; i++)
{
TypeFunction tf = isTypeFunction((*a)[i]);
if (tf && tf.varargs == 1 && cmp("...", p, len) == 0)
return true;
}
return false;
}
private Dsymbol getEponymousMember(TemplateDeclaration td)
{
if (!td.onemember)
return null;
if (AggregateDeclaration ad = td.onemember.isAggregateDeclaration())
return ad;
if (FuncDeclaration fd = td.onemember.isFuncDeclaration())
return fd;
if (auto em = td.onemember.isEnumMember())
return null; // Keep backward compatibility. See compilable/ddoc9.d
if (VarDeclaration vd = td.onemember.isVarDeclaration())
return td.constraint ? null : vd;
return null;
}
private TemplateDeclaration getEponymousParent(Dsymbol s)
{
if (!s.parent)
return null;
TemplateDeclaration td = s.parent.isTemplateDeclaration();
return (td && getEponymousMember(td)) ? td : null;
}
extern (C++) __gshared const(char)* ddoc_default = import("default_ddoc_theme.ddoc");
extern (C++) __gshared const(char)* ddoc_decl_s = "$(DDOC_DECL ";
extern (C++) __gshared const(char)* ddoc_decl_e = ")\n";
extern (C++) __gshared const(char)* ddoc_decl_dd_s = "$(DDOC_DECL_DD ";
extern (C++) __gshared const(char)* ddoc_decl_dd_e = ")\n";
/****************************************************
*/
extern (C++) void gendocfile(Module m)
{
static __gshared OutBuffer mbuf;
static __gshared int mbuf_done;
OutBuffer buf;
//printf("Module::gendocfile()\n");
if (!mbuf_done) // if not already read the ddoc files
{
mbuf_done = 1;
// Use our internal default
mbuf.write(ddoc_default, strlen(ddoc_default));
// Override with DDOCFILE specified in the sc.ini file
char* p = getenv("DDOCFILE");
if (p)
global.params.ddocfiles.shift(p);
// Override with the ddoc macro files from the command line
for (size_t i = 0; i < global.params.ddocfiles.dim; i++)
{
auto f = FileName(global.params.ddocfiles[i]);
auto file = File(&f);
readFile(m.loc, &file);
// BUG: convert file contents to UTF-8 before use
//printf("file: '%.*s'\n", file.len, file.buffer);
mbuf.write(file.buffer, file.len);
}
}
DocComment.parseMacros(&m.escapetable, &m.macrotable, mbuf.peekSlice().ptr, mbuf.peekSlice().length);
Scope* sc = Scope.createGlobal(m); // create root scope
DocComment* dc = DocComment.parse(sc, m, m.comment);
dc.pmacrotable = &m.macrotable;
dc.pescapetable = &m.escapetable;
sc.lastdc = dc;
// Generate predefined macros
// Set the title to be the name of the module
{
const(char)* p = m.toPrettyChars();
Macro.define(&m.macrotable, "TITLE", p[0 .. strlen(p)]);
}
// Set time macros
{
time_t t;
time(&t);
char* p = ctime(&t);
p = mem.xstrdup(p);
Macro.define(&m.macrotable, "DATETIME", p[0 .. strlen(p)]);
Macro.define(&m.macrotable, "YEAR", p[20 .. 20 + 4]);
}
const srcfilename = m.srcfile.toChars();
Macro.define(&m.macrotable, "SRCFILENAME", srcfilename[0 .. strlen(srcfilename)]);
const docfilename = m.docfile.toChars();
Macro.define(&m.macrotable, "DOCFILENAME", docfilename[0 .. strlen(docfilename)]);
if (dc.copyright)
{
dc.copyright.nooutput = 1;
Macro.define(&m.macrotable, "COPYRIGHT", dc.copyright._body[0 .. dc.copyright.bodylen]);
}
if (m.isDocFile)
{
Loc loc = m.md ? m.md.loc : m.loc;
size_t commentlen = strlen(cast(char*)m.comment);
Dsymbols a;
// https://issues.dlang.org/show_bug.cgi?id=9764
// Don't push m in a, to prevent emphasize ddoc file name.
if (dc.macros)
{
commentlen = dc.macros.name - m.comment;
dc.macros.write(loc, dc, sc, &a, &buf);
}
buf.write(m.comment, commentlen);
highlightText(sc, &a, &buf, 0);
}
else
{
Dsymbols a;
a.push(m);
dc.writeSections(sc, &a, &buf);
emitMemberComments(m, &buf, sc);
}
//printf("BODY= '%.*s'\n", buf.offset, buf.data);
Macro.define(&m.macrotable, "BODY", buf.peekSlice());
OutBuffer buf2;
buf2.writestring("$(DDOC)");
size_t end = buf2.offset;
m.macrotable.expand(&buf2, 0, &end, null);
version (all)
{
/* Remove all the escape sequences from buf2,
* and make CR-LF the newline.
*/
{
const slice = buf2.peekSlice();
buf.setsize(0);
buf.reserve(slice.length);
auto p = slice.ptr;
for (size_t j = 0; j < slice.length; j++)
{
char c = p[j];
if (c == 0xFF && j + 1 < slice.length)
{
j++;
continue;
}
if (c == '\n')
buf.writeByte('\r');
else if (c == '\r')
{
buf.writestring("\r\n");
if (j + 1 < slice.length && p[j + 1] == '\n')
{
j++;
}
continue;
}
buf.writeByte(c);
}
}
// Transfer image to file
assert(m.docfile);
m.docfile.setbuffer(cast(void*)buf.peekSlice().ptr, buf.peekSlice().length);
m.docfile._ref = 1;
ensurePathToNameExists(Loc(), m.docfile.toChars());
writeFile(m.loc, m.docfile);
}
else
{
/* Remove all the escape sequences from buf2
*/
{
size_t i = 0;
char* p = buf2.data;
for (size_t j = 0; j < buf2.offset; j++)
{
if (p[j] == 0xFF && j + 1 < buf2.offset)
{
j++;
continue;
}
p[i] = p[j];
i++;
}
buf2.setsize(i);
}
// Transfer image to file
m.docfile.setbuffer(buf2.data, buf2.offset);
m.docfile._ref = 1;
ensurePathToNameExists(Loc(), m.docfile.toChars());
writeFile(m.loc, m.docfile);
}
}
/****************************************************
* Having unmatched parentheses can hose the output of Ddoc,
* as the macros depend on properly nested parentheses.
* This function replaces all ( with $(LPAREN) and ) with $(RPAREN)
* to preserve text literally. This also means macros in the
* text won't be expanded.
*/
extern (C++) void escapeDdocString(OutBuffer* buf, size_t start)
{
for (size_t u = start; u < buf.offset; u++)
{
char c = buf.data[u];
switch (c)
{
case '$':
buf.remove(u, 1);
buf.insert(u, "$(DOLLAR)");
u += 8;
break;
case '(':
buf.remove(u, 1); //remove the (
buf.insert(u, "$(LPAREN)"); //insert this instead
u += 8; //skip over newly inserted macro
break;
case ')':
buf.remove(u, 1); //remove the )
buf.insert(u, "$(RPAREN)"); //insert this instead
u += 8; //skip over newly inserted macro
break;
default:
break;
}
}
}
/****************************************************
* Having unmatched parentheses can hose the output of Ddoc,
* as the macros depend on properly nested parentheses.
*
* Fix by replacing unmatched ( with $(LPAREN) and unmatched ) with $(RPAREN).
*/
extern (C++) void escapeStrayParenthesis(Loc loc, OutBuffer* buf, size_t start)
{
uint par_open = 0;
bool inCode = 0;
for (size_t u = start; u < buf.offset; u++)
{
char c = buf.data[u];
switch (c)
{
case '(':
if (!inCode)
par_open++;
break;
case ')':
if (!inCode)
{
if (par_open == 0)
{
//stray ')'
warning(loc, "Ddoc: Stray ')'. This may cause incorrect Ddoc output. Use $(RPAREN) instead for unpaired right parentheses.");
buf.remove(u, 1); //remove the )
buf.insert(u, "$(RPAREN)"); //insert this instead
u += 8; //skip over newly inserted macro
}
else
par_open--;
}
break;
version (none)
{
// For this to work, loc must be set to the beginning of the passed
// text which is currently not possible
// (loc is set to the Loc of the Dsymbol)
case '\n':
loc.linnum++;
break;
}
case '-':
// Issue 15465: don't try to escape unbalanced parens inside code
// blocks.
int numdash = 0;
while (u < buf.offset && buf.data[u] == '-')
{
numdash++;
u++;
}
if (numdash >= 3)
inCode = !inCode;
break;
default:
break;
}
}
if (par_open) // if any unmatched lparens
{
par_open = 0;
for (size_t u = buf.offset; u > start;)
{
u--;
char c = buf.data[u];
switch (c)
{
case ')':
par_open++;
break;
case '(':
if (par_open == 0)
{
//stray '('
warning(loc, "Ddoc: Stray '('. This may cause incorrect Ddoc output. Use $(LPAREN) instead for unpaired left parentheses.");
buf.remove(u, 1); //remove the (
buf.insert(u, "$(LPAREN)"); //insert this instead
}
else
par_open--;
break;
default:
break;
}
}
}
}
// Basically, this is to skip over things like private{} blocks in a struct or
// class definition that don't add any components to the qualified name.
private Scope* skipNonQualScopes(Scope* sc)
{
while (sc && !sc.scopesym)
sc = sc.enclosing;
return sc;
}
private bool emitAnchorName(OutBuffer* buf, Dsymbol s, Scope* sc, bool includeParent)
{
if (!s || s.isPackage() || s.isModule())
return false;
// Add parent names first
bool dot = false;
auto eponymousParent = getEponymousParent(s);
if (includeParent && s.parent || eponymousParent)
dot = emitAnchorName(buf, s.parent, sc, includeParent);
else if (includeParent && sc)
dot = emitAnchorName(buf, sc.scopesym, skipNonQualScopes(sc.enclosing), includeParent);
// Eponymous template members can share the parent anchor name
if (eponymousParent)
return dot;
if (dot)
buf.writeByte('.');
// Use "this" not "__ctor"
TemplateDeclaration td;
if (s.isCtorDeclaration() || ((td = s.isTemplateDeclaration()) !is null && td.onemember && td.onemember.isCtorDeclaration()))
{
buf.writestring("this");
}
else
{
/* We just want the identifier, not overloads like TemplateDeclaration::toChars.
* We don't want the template parameter list and constraints. */
buf.writestring(s.Dsymbol.toChars());
}
return true;
}
private void emitAnchor(OutBuffer* buf, Dsymbol s, Scope* sc, bool forHeader = false)
{
Identifier ident;
{
OutBuffer anc;
emitAnchorName(&anc, s, skipNonQualScopes(sc), true);
ident = Identifier.idPool(anc.peekSlice());
}
auto pcount = cast(void*)ident in sc.anchorCounts;
typeof(*pcount) count;
if (!forHeader)
{
if (pcount)
{
// Existing anchor,
// don't write an anchor for matching consecutive ditto symbols
TemplateDeclaration td = getEponymousParent(s);
if (sc.prevAnchor == ident && sc.lastdc && (isDitto(s.comment) || (td && isDitto(td.comment))))
return;
count = ++*pcount;
}
else
{
sc.anchorCounts[cast(void*)ident] = 1;
count = 1;
}
}
// cache anchor name
sc.prevAnchor = ident;
auto macroName = forHeader ? "DDOC_HEADER_ANCHOR" : "DDOC_ANCHOR";
auto symbolName = ident.toString();
buf.printf("$(%.*s %.*s", cast(int) macroName.length, macroName.ptr,
cast(int) symbolName.length, symbolName.ptr);
// only append count once there's a duplicate
if (count > 1)
buf.printf(".%u", count);
if (forHeader)
{
Identifier shortIdent;
{
OutBuffer anc;
emitAnchorName(&anc, s, skipNonQualScopes(sc), false);
shortIdent = Identifier.idPool(anc.peekSlice());
}
auto shortName = shortIdent.toString();
buf.printf(", %.*s", cast(int) shortName.length, shortName.ptr);
}
buf.writeByte(')');
}
/******************************* emitComment **********************************/
/** Get leading indentation from 'src' which represents lines of code. */
private size_t getCodeIndent(const(char)* src)
{
while (src && (*src == '\r' || *src == '\n'))
++src; // skip until we find the first non-empty line
size_t codeIndent = 0;
while (src && (*src == ' ' || *src == '\t'))
{
codeIndent++;
src++;
}
return codeIndent;
}
/** Recursively expand template mixin member docs into the scope. */
private void expandTemplateMixinComments(TemplateMixin tm, OutBuffer* buf, Scope* sc)
{
if (!tm.semanticRun)
tm.dsymbolSemantic(sc);
TemplateDeclaration td = (tm && tm.tempdecl) ? tm.tempdecl.isTemplateDeclaration() : null;
if (td && td.members)
{
for (size_t i = 0; i < td.members.dim; i++)
{
Dsymbol sm = (*td.members)[i];
TemplateMixin tmc = sm.isTemplateMixin();
if (tmc && tmc.comment)
expandTemplateMixinComments(tmc, buf, sc);
else
emitComment(sm, buf, sc);
}
}
}
private void emitMemberComments(ScopeDsymbol sds, OutBuffer* buf, Scope* sc)
{
if (!sds.members)
return;
//printf("ScopeDsymbol::emitMemberComments() %s\n", toChars());
const(char)* m = "$(DDOC_MEMBERS ";
if (sds.isTemplateDeclaration())
m = "$(DDOC_TEMPLATE_MEMBERS ";
else if (sds.isClassDeclaration())
m = "$(DDOC_CLASS_MEMBERS ";
else if (sds.isStructDeclaration())
m = "$(DDOC_STRUCT_MEMBERS ";
else if (sds.isEnumDeclaration())
m = "$(DDOC_ENUM_MEMBERS ";
else if (sds.isModule())
m = "$(DDOC_MODULE_MEMBERS ";
size_t offset1 = buf.offset; // save starting offset
buf.writestring(m);
size_t offset2 = buf.offset; // to see if we write anything
sc = sc.push(sds);
for (size_t i = 0; i < sds.members.dim; i++)
{
Dsymbol s = (*sds.members)[i];
//printf("\ts = '%s'\n", s.toChars());
// only expand if parent is a non-template (semantic won't work)
if (s.comment && s.isTemplateMixin() && s.parent && !s.parent.isTemplateDeclaration())
expandTemplateMixinComments(cast(TemplateMixin)s, buf, sc);
emitComment(s, buf, sc);
}
emitComment(null, buf, sc);
sc.pop();
if (buf.offset == offset2)
{
/* Didn't write out any members, so back out last write
*/
buf.offset = offset1;
}
else
buf.writestring(")");
}
extern (C++) void emitProtection(OutBuffer* buf, Prot prot)
{
if (prot.kind != PROTundefined && prot.kind != PROTpublic)
{
protectionToBuffer(buf, prot);
buf.writeByte(' ');
}
}
private void emitComment(Dsymbol s, OutBuffer* buf, Scope* sc)
{
extern (C++) final class EmitComment : Visitor
{
alias visit = Visitor.visit;
public:
OutBuffer* buf;
Scope* sc;
extern (D) this(OutBuffer* buf, Scope* sc)
{
this.buf = buf;
this.sc = sc;
}
override void visit(Dsymbol)
{
}
override void visit(InvariantDeclaration)
{
}
override void visit(UnitTestDeclaration)
{
}
override void visit(PostBlitDeclaration)
{
}
override void visit(DtorDeclaration)
{
}
override void visit(StaticCtorDeclaration)
{
}
override void visit(StaticDtorDeclaration)
{
}
override void visit(TypeInfoDeclaration)
{
}
void emit(Scope* sc, Dsymbol s, const(char)* com)
{
if (s && sc.lastdc && isDitto(com))
{
sc.lastdc.a.push(s);
return;
}
// Put previous doc comment if exists
if (DocComment* dc = sc.lastdc)
{
assert(dc.a.dim > 0, "Expects at least one declaration for a" ~
"documentation comment");
auto symbol = dc.a[0];
auto symbolName = symbol.ident.toString;
buf.writestring("$(DDOC_MEMBER");
buf.writestring("$(DDOC_MEMBER_HEADER");
emitAnchor(buf, symbol, sc, true);
buf.writeByte(')');
// Put the declaration signatures as the document 'title'
buf.writestring(ddoc_decl_s);
for (size_t i = 0; i < dc.a.dim; i++)
{
Dsymbol sx = dc.a[i];
// the added linebreaks in here make looking at multiple
// signatures more appealing
if (i == 0)
{
size_t o = buf.offset;
toDocBuffer(sx, buf, sc);
highlightCode(sc, sx, buf, o);
buf.writestring("$(DDOC_OVERLOAD_SEPARATOR)");
continue;
}
buf.writestring("$(DDOC_DITTO ");
{
size_t o = buf.offset;
toDocBuffer(sx, buf, sc);
highlightCode(sc, sx, buf, o);
}
buf.writestring("$(DDOC_OVERLOAD_SEPARATOR)");
buf.writeByte(')');
}
buf.writestring(ddoc_decl_e);
// Put the ddoc comment as the document 'description'
buf.writestring(ddoc_decl_dd_s);
{
dc.writeSections(sc, &dc.a, buf);
if (ScopeDsymbol sds = dc.a[0].isScopeDsymbol())
emitMemberComments(sds, buf, sc);
}
buf.writestring(ddoc_decl_dd_e);
buf.writeByte(')');
//printf("buf.2 = [[%.*s]]\n", buf.offset - o0, buf.data + o0);
}
if (s)
{
DocComment* dc = DocComment.parse(sc, s, com);
dc.pmacrotable = &sc._module.macrotable;
sc.lastdc = dc;
}
}
override void visit(Declaration d)
{
//printf("Declaration::emitComment(%p '%s'), comment = '%s'\n", d, d.toChars(), d.comment);
//printf("type = %p\n", d.type);
const(char)* com = d.comment;
if (TemplateDeclaration td = getEponymousParent(d))
{
if (isDitto(td.comment))
com = td.comment;
else
com = Lexer.combineComments(td.comment, com, true);
}
else
{
if (!d.ident)
return;
if (!d.type)
{
if (!d.isCtorDeclaration() &&
!d.isAliasDeclaration() &&
!d.isVarDeclaration())
{
return;
}
}
if (d.protection.kind == PROTprivate || sc.protection.kind == PROTprivate)
return;
}
if (!com)
return;
emit(sc, d, com);
}
override void visit(AggregateDeclaration ad)
{
//printf("AggregateDeclaration::emitComment() '%s'\n", ad.toChars());
const(char)* com = ad.comment;
if (TemplateDeclaration td = getEponymousParent(ad))
{
if (isDitto(td.comment))
com = td.comment;
else
com = Lexer.combineComments(td.comment, com, true);
}
else
{
if (ad.prot().kind == PROTprivate || sc.protection.kind == PROTprivate)
return;
if (!ad.comment)
return;
}
if (!com)
return;
emit(sc, ad, com);
}
override void visit(TemplateDeclaration td)
{
//printf("TemplateDeclaration::emitComment() '%s', kind = %s\n", td.toChars(), td.kind());
if (td.prot().kind == PROTprivate || sc.protection.kind == PROTprivate)
return;
if (!td.comment)
return;
if (Dsymbol ss = getEponymousMember(td))
{
ss.accept(this);
return;
}
emit(sc, td, td.comment);
}
override void visit(EnumDeclaration ed)
{
if (ed.prot().kind == PROTprivate || sc.protection.kind == PROTprivate)
return;
if (ed.isAnonymous() && ed.members)
{
for (size_t i = 0; i < ed.members.dim; i++)
{
Dsymbol s = (*ed.members)[i];
emitComment(s, buf, sc);
}
return;
}
if (!ed.comment)
return;
if (ed.isAnonymous())
return;
emit(sc, ed, ed.comment);
}
override void visit(EnumMember em)
{
//printf("EnumMember::emitComment(%p '%s'), comment = '%s'\n", em, em.toChars(), em.comment);
if (em.prot().kind == PROTprivate || sc.protection.kind == PROTprivate)
return;
if (!em.comment)
return;
emit(sc, em, em.comment);
}
override void visit(AttribDeclaration ad)
{
//printf("AttribDeclaration::emitComment(sc = %p)\n", sc);
/* A general problem with this,
* illustrated by https://issues.dlang.org/show_bug.cgi?id=2516
* is that attributes are not transmitted through to the underlying
* member declarations for template bodies, because semantic analysis
* is not done for template declaration bodies
* (only template instantiations).
* Hence, Ddoc omits attributes from template members.
*/
Dsymbols* d = ad.include(null);
if (d)
{
for (size_t i = 0; i < d.dim; i++)
{
Dsymbol s = (*d)[i];
//printf("AttribDeclaration::emitComment %s\n", s.toChars());
emitComment(s, buf, sc);
}
}
}
override void visit(ProtDeclaration pd)
{
if (pd.decl)
{
Scope* scx = sc;
sc = sc.copy();
sc.protection = pd.protection;
visit(cast(AttribDeclaration)pd);
scx.lastdc = sc.lastdc;
sc = sc.pop();
}
}
override void visit(ConditionalDeclaration cd)
{
//printf("ConditionalDeclaration::emitComment(sc = %p)\n", sc);
if (cd.condition.inc)
{
visit(cast(AttribDeclaration)cd);
return;
}
/* If generating doc comment, be careful because if we're inside
* a template, then include(null) will fail.
*/
Dsymbols* d = cd.decl ? cd.decl : cd.elsedecl;
for (size_t i = 0; i < d.dim; i++)
{
Dsymbol s = (*d)[i];
emitComment(s, buf, sc);
}
}
}
scope EmitComment v = new EmitComment(buf, sc);
if (!s)
v.emit(sc, null, null);
else
s.accept(v);
}
private void toDocBuffer(Dsymbol s, OutBuffer* buf, Scope* sc)
{
extern (C++) final class ToDocBuffer : Visitor
{
alias visit = Visitor.visit;
public:
OutBuffer* buf;
Scope* sc;
extern (D) this(OutBuffer* buf, Scope* sc)
{
this.buf = buf;
this.sc = sc;
}
override void visit(Dsymbol s)
{
//printf("Dsymbol::toDocbuffer() %s\n", s.toChars());
HdrGenState hgs;
hgs.ddoc = true;
.toCBuffer(s, buf, &hgs);
}
void prefix(Dsymbol s)
{
if (s.isDeprecated())
buf.writestring("deprecated ");
if (Declaration d = s.isDeclaration())
{
emitProtection(buf, d.protection);
if (d.isStatic())
buf.writestring("static ");
else if (d.isFinal())
buf.writestring("final ");
else if (d.isAbstract())
buf.writestring("abstract ");
if (d.isFuncDeclaration()) // functionToBufferFull handles this
return;
if (d.isImmutable())
buf.writestring("immutable ");
if (d.storage_class & STCshared)
buf.writestring("shared ");
if (d.isWild())
buf.writestring("inout ");
if (d.isConst())
buf.writestring("const ");
if (d.isSynchronized())
buf.writestring("synchronized ");
if (d.storage_class & STCmanifest)
buf.writestring("enum ");
// Add "auto" for the untyped variable in template members
if (!d.type && d.isVarDeclaration() &&
!d.isImmutable() && !(d.storage_class & STCshared) && !d.isWild() && !d.isConst() &&
!d.isSynchronized())
{
buf.writestring("auto ");
}
}
}
override void visit(Declaration d)
{
if (!d.ident)
return;
TemplateDeclaration td = getEponymousParent(d);
//printf("Declaration::toDocbuffer() %s, originalType = %s, td = %s\n", d.toChars(), d.originalType ? d.originalType.toChars() : "--", td ? td.toChars() : "--");
HdrGenState hgs;
hgs.ddoc = true;
if (d.isDeprecated())
buf.writestring("$(DEPRECATED ");
prefix(d);
if (d.type)
{
Type origType = d.originalType ? d.originalType : d.type;
if (origType.ty == Tfunction)
{
functionToBufferFull(cast(TypeFunction)origType, buf, d.ident, &hgs, td);
}
else
.toCBuffer(origType, buf, d.ident, &hgs);
}
else
buf.writestring(d.ident.toChars());
if (d.isVarDeclaration() && td)
{
buf.writeByte('(');
if (td.origParameters && td.origParameters.dim)
{
for (size_t i = 0; i < td.origParameters.dim; i++)
{
if (i)
buf.writestring(", ");
toCBuffer((*td.origParameters)[i], buf, &hgs);
}
}
buf.writeByte(')');
}
// emit constraints if declaration is a templated declaration
if (td && td.constraint)
{
bool noFuncDecl = td.isFuncDeclaration() is null;
if (noFuncDecl)
{
buf.writestring("$(DDOC_CONSTRAINT ");
}
.toCBuffer(td.constraint, buf, &hgs);
if (noFuncDecl)
{
buf.writestring(")");
}
}
if (d.isDeprecated())
buf.writestring(")");
buf.writestring(";\n");
}
override void visit(AliasDeclaration ad)
{
//printf("AliasDeclaration::toDocbuffer() %s\n", ad.toChars());
if (!ad.ident)
return;
if (ad.isDeprecated())
buf.writestring("deprecated ");
emitProtection(buf, ad.protection);
buf.printf("alias %s = ", ad.toChars());
if (Dsymbol s = ad.aliassym) // ident alias
{
prettyPrintDsymbol(s, ad.parent);
}
else if (Type type = ad.getType()) // type alias
{
if (type.ty == Tclass || type.ty == Tstruct || type.ty == Tenum)
{
if (Dsymbol s = type.toDsymbol(null)) // elaborate type
prettyPrintDsymbol(s, ad.parent);
else
buf.writestring(type.toChars());
}
else
{
// simple type
buf.writestring(type.toChars());
}
}
buf.writestring(";\n");
}
void parentToBuffer(Dsymbol s)
{
if (s && !s.isPackage() && !s.isModule())
{
parentToBuffer(s.parent);
buf.writestring(s.toChars());
buf.writestring(".");
}
}
static bool inSameModule(Dsymbol s, Dsymbol p)
{
for (; s; s = s.parent)
{
if (s.isModule())
break;
}
for (; p; p = p.parent)
{
if (p.isModule())
break;
}
return s == p;
}
void prettyPrintDsymbol(Dsymbol s, Dsymbol parent)
{
if (s.parent && (s.parent == parent)) // in current scope -> naked name
{
buf.writestring(s.toChars());
}
else if (!inSameModule(s, parent)) // in another module -> full name
{
buf.writestring(s.toPrettyChars());
}
else // nested in a type in this module -> full name w/o module name
{
// if alias is nested in a user-type use module-scope lookup
if (!parent.isModule() && !parent.isPackage())
buf.writestring(".");
parentToBuffer(s.parent);
buf.writestring(s.toChars());
}
}
override void visit(AggregateDeclaration ad)
{
if (!ad.ident)
return;
version (none)
{
emitProtection(buf, ad.protection);
}
buf.printf("%s %s", ad.kind(), ad.toChars());
buf.writestring(";\n");
}
override void visit(StructDeclaration sd)
{
//printf("StructDeclaration::toDocbuffer() %s\n", sd.toChars());
if (!sd.ident)
return;
version (none)
{
emitProtection(buf, sd.protection);
}
if (TemplateDeclaration td = getEponymousParent(sd))
{
toDocBuffer(td, buf, sc);
}
else
{
buf.printf("%s %s", sd.kind(), sd.toChars());
}
buf.writestring(";\n");
}
override void visit(ClassDeclaration cd)
{
//printf("ClassDeclaration::toDocbuffer() %s\n", cd.toChars());
if (!cd.ident)
return;
version (none)
{
emitProtection(buf, cd.protection);
}
if (TemplateDeclaration td = getEponymousParent(cd))
{
toDocBuffer(td, buf, sc);
}
else
{
if (!cd.isInterfaceDeclaration() && cd.isAbstract())
buf.writestring("abstract ");
buf.printf("%s %s", cd.kind(), cd.toChars());
}
int any = 0;
for (size_t i = 0; i < cd.baseclasses.dim; i++)
{
BaseClass* bc = (*cd.baseclasses)[i];
if (bc.sym && bc.sym.ident == Id.Object)
continue;
if (any)
buf.writestring(", ");
else
{
buf.writestring(": ");
any = 1;
}
emitProtection(buf, Prot(PROTpublic));
if (bc.sym)
{
buf.printf("$(DDOC_PSUPER_SYMBOL %s)", bc.sym.toPrettyChars());
}
else
{
HdrGenState hgs;
.toCBuffer(bc.type, buf, null, &hgs);
}
}
buf.writestring(";\n");
}
override void visit(EnumDeclaration ed)
{
if (!ed.ident)
return;
buf.printf("%s %s", ed.kind(), ed.toChars());
if (ed.memtype)
{
buf.writestring(": $(DDOC_ENUM_BASETYPE ");
HdrGenState hgs;
.toCBuffer(ed.memtype, buf, null, &hgs);
buf.writestring(")");
}
buf.writestring(";\n");
}
override void visit(EnumMember em)
{
if (!em.ident)
return;
buf.writestring(em.toChars());
}
}
scope ToDocBuffer v = new ToDocBuffer(buf, sc);
s.accept(v);
}
/***********************************************************
*/
struct DocComment
{
Sections sections; // Section*[]
Section summary;
Section copyright;
Section macros;
Macro** pmacrotable;
Escape** pescapetable;
Dsymbols a;
extern (C++) static DocComment* parse(Scope* sc, Dsymbol s, const(char)* comment)
{
//printf("parse(%s): '%s'\n", s.toChars(), comment);
auto dc = new DocComment();
dc.a.push(s);
if (!comment)
return dc;
dc.parseSections(comment);
for (size_t i = 0; i < dc.sections.dim; i++)
{
Section sec = dc.sections[i];
if (icmp("copyright", sec.name, sec.namelen) == 0)
{
dc.copyright = sec;
}
if (icmp("macros", sec.name, sec.namelen) == 0)
{
dc.macros = sec;
}
}
return dc;
}
/************************************************
* Parse macros out of Macros: section.
* Macros are of the form:
* name1 = value1
*
* name2 = value2
*/
extern (C++) static void parseMacros(Escape** pescapetable, Macro** pmacrotable, const(char)* m, size_t mlen)
{
const(char)* p = m;
size_t len = mlen;
const(char)* pend = p + len;
const(char)* tempstart = null;
size_t templen = 0;
const(char)* namestart = null;
size_t namelen = 0; // !=0 if line continuation
const(char)* textstart = null;
size_t textlen = 0;
while (p < pend)
{
// Skip to start of macro
while (1)
{
if (p >= pend)
goto Ldone;
switch (*p)
{
case ' ':
case '\t':
p++;
continue;
case '\r':
case '\n':
p++;
goto Lcont;
default:
if (isIdStart(p))
break;
if (namelen)
goto Ltext; // continuation of prev macro
goto Lskipline;
}
break;
}
tempstart = p;
while (1)
{
if (p >= pend)
goto Ldone;
if (!isIdTail(p))
break;
p += utfStride(p);
}
templen = p - tempstart;
while (1)
{
if (p >= pend)
goto Ldone;
if (!(*p == ' ' || *p == '\t'))
break;
p++;
}
if (*p != '=')
{
if (namelen)
goto Ltext; // continuation of prev macro
goto Lskipline;
}
p++;
if (p >= pend)
goto Ldone;
if (namelen)
{
// Output existing macro
L1:
//printf("macro '%.*s' = '%.*s'\n", namelen, namestart, textlen, textstart);
if (icmp("ESCAPES", namestart, namelen) == 0)
parseEscapes(pescapetable, textstart, textlen);
else
Macro.define(pmacrotable, namestart[0 ..namelen], textstart[0 .. textlen]);
namelen = 0;
if (p >= pend)
break;
}
namestart = tempstart;
namelen = templen;
while (p < pend && (*p == ' ' || *p == '\t'))
p++;
textstart = p;
Ltext:
while (p < pend && *p != '\r' && *p != '\n')
p++;
textlen = p - textstart;
p++;
//printf("p = %p, pend = %p\n", p, pend);
Lcont:
continue;
Lskipline:
// Ignore this line
while (p < pend && *p != '\r' && *p != '\n')
p++;
}
Ldone:
if (namelen)
goto L1; // write out last one
}
/**************************************
* Parse escapes of the form:
* /c/string/
* where c is a single character.
* Multiple escapes can be separated
* by whitespace and/or commas.
*/
extern (C++) static void parseEscapes(Escape** pescapetable, const(char)* textstart, size_t textlen)
{
Escape* escapetable = *pescapetable;
if (!escapetable)
{
escapetable = new Escape();
memset(escapetable, 0, Escape.sizeof);
*pescapetable = escapetable;
}
//printf("parseEscapes('%.*s') pescapetable = %p\n", textlen, textstart, pescapetable);
const(char)* p = textstart;
const(char)* pend = p + textlen;
while (1)
{
while (1)
{
if (p + 4 >= pend)
return;
if (!(*p == ' ' || *p == '\t' || *p == '\r' || *p == '\n' || *p == ','))
break;
p++;
}
if (p[0] != '/' || p[2] != '/')
return;
char c = p[1];
p += 3;
const(char)* start = p;
while (1)
{
if (p >= pend)
return;
if (*p == '/')
break;
p++;
}
size_t len = p - start;
char* s = cast(char*)memcpy(mem.xmalloc(len + 1), start, len);
s[len] = 0;
escapetable.strings[c] = s;
//printf("\t%c = '%s'\n", c, s);
p++;
}
}
/*****************************************
* Parse next paragraph out of *pcomment.
* Update *pcomment to point past paragraph.
* Returns NULL if no more paragraphs.
* If paragraph ends in 'identifier:',
* then (*pcomment)[0 .. idlen] is the identifier.
*/
extern (C++) void parseSections(const(char)* comment)
{
const(char)* p;
const(char)* pstart;
const(char)* pend;
const(char)* idstart = null; // dead-store to prevent spurious warning
size_t idlen;
const(char)* name = null;
size_t namelen = 0;
//printf("parseSections('%s')\n", comment);
p = comment;
while (*p)
{
const(char)* pstart0 = p;
p = skipwhitespace(p);
pstart = p;
pend = p;
/* Find end of section, which is ended by one of:
* 'identifier:' (but not inside a code section)
* '\0'
*/
idlen = 0;
int inCode = 0;
while (1)
{
// Check for start/end of a code section
if (*p == '-')
{
if (!inCode)
{
// restore leading indentation
while (pstart0 < pstart && isIndentWS(pstart - 1))
--pstart;
}
int numdash = 0;
while (*p == '-')
{
++numdash;
p++;
}
// BUG: handle UTF PS and LS too
if ((!*p || *p == '\r' || *p == '\n') && numdash >= 3)
inCode ^= 1;
pend = p;
}
if (!inCode && isIdStart(p))
{
const(char)* q = p + utfStride(p);
while (isIdTail(q))
q += utfStride(q);
// Detected tag ends it
if (*q == ':' && isupper(*p)
&& (isspace(q[1]) || q[1] == 0))
{
idlen = q - p;
idstart = p;
for (pend = p; pend > pstart; pend--)
{
if (pend[-1] == '\n')
break;
}
p = q + 1;
break;
}
}
while (1)
{
if (!*p)
goto L1;
if (*p == '\n')
{
p++;
if (*p == '\n' && !summary && !namelen && !inCode)
{
pend = p;
p++;
goto L1;
}
break;
}
p++;
pend = p;
}
p = skipwhitespace(p);
}
L1:
if (namelen || pstart < pend)
{
Section s;
if (icmp("Params", name, namelen) == 0)
s = new ParamSection();
else if (icmp("Macros", name, namelen) == 0)
s = new MacroSection();
else
s = new Section();
s.name = name;
s.namelen = namelen;
s._body = pstart;
s.bodylen = pend - pstart;
s.nooutput = 0;
//printf("Section: '%.*s' = '%.*s'\n", s.namelen, s.name, s.bodylen, s.body);
sections.push(s);
if (!summary && !namelen)
summary = s;
}
if (idlen)
{
name = idstart;
namelen = idlen;
}
else
{
name = null;
namelen = 0;
if (!*p)
break;
}
}
}
extern (C++) void writeSections(Scope* sc, Dsymbols* a, OutBuffer* buf)
{
assert(a.dim);
//printf("DocComment::writeSections()\n");
Loc loc = (*a)[0].loc;
if (Module m = (*a)[0].isModule())
{
if (m.md)
loc = m.md.loc;
}
size_t offset1 = buf.offset;
buf.writestring("$(DDOC_SECTIONS ");
size_t offset2 = buf.offset;
for (size_t i = 0; i < sections.dim; i++)
{
Section sec = sections[i];
if (sec.nooutput)
continue;
//printf("Section: '%.*s' = '%.*s'\n", sec.namelen, sec.name, sec.bodylen, sec.body);
if (!sec.namelen && i == 0)
{
buf.writestring("$(DDOC_SUMMARY ");
size_t o = buf.offset;
buf.write(sec._body, sec.bodylen);
escapeStrayParenthesis(loc, buf, o);
highlightText(sc, a, buf, o);
buf.writestring(")");
}
else
sec.write(loc, &this, sc, a, buf);
}
for (size_t i = 0; i < a.dim; i++)
{
Dsymbol s = (*a)[i];
if (Dsymbol td = getEponymousParent(s))
s = td;
for (UnitTestDeclaration utd = s.ddocUnittest; utd; utd = utd.ddocUnittest)
{
if (utd.protection.kind == PROTprivate || !utd.comment || !utd.fbody)
continue;
// Strip whitespaces to avoid showing empty summary
const(char)* c = utd.comment;
while (*c == ' ' || *c == '\t' || *c == '\n' || *c == '\r')
++c;
buf.writestring("$(DDOC_EXAMPLES ");
size_t o = buf.offset;
buf.writestring(cast(char*)c);
if (utd.codedoc)
{
auto codedoc = utd.codedoc.stripLeadingNewlines;
size_t n = getCodeIndent(codedoc);
while (n--)
buf.writeByte(' ');
buf.writestring("----\n");
buf.writestring(codedoc);
buf.writestring("----\n");
highlightText(sc, a, buf, o);
}
buf.writestring(")");
}
}
if (buf.offset == offset2)
{
/* Didn't write out any sections, so back out last write
*/
buf.offset = offset1;
buf.writestring("\n");
}
else
buf.writestring(")");
}
}
/******************************************
* Compare 0-terminated string with length terminated string.
* Return < 0, ==0, > 0
*/
extern (C++) int cmp(const(char)* stringz, const(void)* s, size_t slen)
{
size_t len1 = strlen(stringz);
if (len1 != slen)
return cast(int)(len1 - slen);
return memcmp(stringz, s, slen);
}
extern (C++) int icmp(const(char)* stringz, const(void)* s, size_t slen)
{
size_t len1 = strlen(stringz);
if (len1 != slen)
return cast(int)(len1 - slen);
return Port.memicmp(stringz, cast(char*)s, slen);
}
/*****************************************
* Return true if comment consists entirely of "ditto".
*/
extern (C++) bool isDitto(const(char)* comment)
{
if (comment)
{
const(char)* p = skipwhitespace(comment);
if (Port.memicmp(p, "ditto", 5) == 0 && *skipwhitespace(p + 5) == 0)
return true;
}
return false;
}
/**********************************************
* Skip white space.
*/
extern (C++) const(char)* skipwhitespace(const(char)* p)
{
for (; 1; p++)
{
switch (*p)
{
case ' ':
case '\t':
case '\n':
continue;
default:
break;
}
break;
}
return p;
}
/************************************************
* Scan forward to one of:
* start of identifier
* beginning of next line
* end of buf
*/
extern (C++) size_t skiptoident(OutBuffer* buf, size_t i)
{
const slice = buf.peekSlice();
while (i < slice.length)
{
dchar c;
size_t oi = i;
if (utf_decodeChar(slice.ptr, slice.length, i, c))
{
/* Ignore UTF errors, but still consume input
*/
break;
}
if (c >= 0x80)
{
if (!isUniAlpha(c))
continue;
}
else if (!(isalpha(c) || c == '_' || c == '\n'))
continue;
i = oi;
break;
}
return i;
}
/************************************************
* Scan forward past end of identifier.
*/
extern (C++) size_t skippastident(OutBuffer* buf, size_t i)
{
const slice = buf.peekSlice();
while (i < slice.length)
{
dchar c;
size_t oi = i;
if (utf_decodeChar(slice.ptr, slice.length, i, c))
{
/* Ignore UTF errors, but still consume input
*/
break;
}
if (c >= 0x80)
{
if (isUniAlpha(c))
continue;
}
else if (isalnum(c) || c == '_')
continue;
i = oi;
break;
}
return i;
}
/************************************************
* Scan forward past URL starting at i.
* We don't want to highlight parts of a URL.
* Returns:
* i if not a URL
* index just past it if it is a URL
*/
extern (C++) size_t skippastURL(OutBuffer* buf, size_t i)
{
const slice = buf.peekSlice()[i .. $];
size_t j;
bool sawdot = false;
if (slice.length > 7 && Port.memicmp(slice.ptr, "http://", 7) == 0)
{
j = 7;
}
else if (slice.length > 8 && Port.memicmp(slice.ptr, "https://", 8) == 0)
{
j = 8;
}
else
goto Lno;
for (; j < slice.length; j++)
{
const c = slice[j];
if (isalnum(c))
continue;
if (c == '-' || c == '_' || c == '?' || c == '=' || c == '%' ||
c == '&' || c == '/' || c == '+' || c == '#' || c == '~')
continue;
if (c == '.')
{
sawdot = true;
continue;
}
break;
}
if (sawdot)
return i + j;
Lno:
return i;
}
/****************************************************
*/
extern (C++) bool isIdentifier(Dsymbols* a, const(char)* p, size_t len)
{
for (size_t i = 0; i < a.dim; i++)
{
const(char)* s = (*a)[i].ident.toChars();
if (cmp(s, p, len) == 0)
return true;
}
return false;
}
/****************************************************
*/
extern (C++) bool isKeyword(const(char)* p, size_t len)
{
immutable string[3] table = ["true", "false", "null"];
foreach (s; table)
{
if (cmp(s.ptr, p, len) == 0)
return true;
}
return false;
}
/****************************************************
*/
extern (C++) TypeFunction isTypeFunction(Dsymbol s)
{
FuncDeclaration f = s.isFuncDeclaration();
/* f.type may be NULL for template members.
*/
if (f && f.type)
{
Type t = f.originalType ? f.originalType : f.type;
if (t.ty == Tfunction)
return cast(TypeFunction)t;
}
return null;
}
/****************************************************
*/
private Parameter isFunctionParameter(Dsymbol s, const(char)* p, size_t len)
{
TypeFunction tf = isTypeFunction(s);
if (tf && tf.parameters)
{
for (size_t k = 0; k < tf.parameters.dim; k++)
{
Parameter fparam = (*tf.parameters)[k];
if (fparam.ident && cmp(fparam.ident.toChars(), p, len) == 0)
{
return fparam;
}
}
}
return null;
}
/****************************************************
*/
extern (C++) Parameter isFunctionParameter(Dsymbols* a, const(char)* p, size_t len)
{
for (size_t i = 0; i < a.dim; i++)
{
Parameter fparam = isFunctionParameter((*a)[i], p, len);
if (fparam)
{
return fparam;
}
}
return null;
}
/****************************************************
*/
private Parameter isEponymousFunctionParameter(Dsymbols *a, const(char) *p, size_t len)
{
for (size_t i = 0; i < a.dim; i++)
{
TemplateDeclaration td = (*a)[i].isTemplateDeclaration();
if (td && td.onemember)
{
/* Case 1: we refer to a template declaration inside the template
/// ...ddoc...
template case1(T) {
void case1(R)() {}
}
*/
td = td.onemember.isTemplateDeclaration();
}
if (!td)
{
/* Case 2: we're an alias to a template declaration
/// ...ddoc...
alias case2 = case1!int;
*/
AliasDeclaration ad = (*a)[i].isAliasDeclaration();
if (ad && ad.aliassym)
{
td = ad.aliassym.isTemplateDeclaration();
}
}
while (td)
{
Dsymbol sym = getEponymousMember(td);
if (sym)
{
Parameter fparam = isFunctionParameter(sym, p, len);
if (fparam)
{
return fparam;
}
}
td = td.overnext;
}
}
return null;
}
/****************************************************
*/
extern (C++) TemplateParameter isTemplateParameter(Dsymbols* a, const(char)* p, size_t len)
{
for (size_t i = 0; i < a.dim; i++)
{
TemplateDeclaration td = (*a)[i].isTemplateDeclaration();
// Check for the parent, if the current symbol is not a template declaration.
if (!td)
td = getEponymousParent((*a)[i]);
if (td && td.origParameters)
{
for (size_t k = 0; k < td.origParameters.dim; k++)
{
TemplateParameter tp = (*td.origParameters)[k];
if (tp.ident && cmp(tp.ident.toChars(), p, len) == 0)
{
return tp;
}
}
}
}
return null;
}
/****************************************************
* Return true if str is a reserved symbol name
* that starts with a double underscore.
*/
extern (C++) bool isReservedName(const(char)* str, size_t len)
{
immutable string[] table =
[
"__ctor",
"__dtor",
"__postblit",
"__invariant",
"__unitTest",
"__require",
"__ensure",
"__dollar",
"__ctfe",
"__withSym",
"__result",
"__returnLabel",
"__vptr",
"__monitor",
"__gate",
"__xopEquals",
"__xopCmp",
"__LINE__",
"__FILE__",
"__MODULE__",
"__FUNCTION__",
"__PRETTY_FUNCTION__",
"__DATE__",
"__TIME__",
"__TIMESTAMP__",
"__VENDOR__",
"__VERSION__",
"__EOF__",
"__LOCAL_SIZE",
"___tls_get_addr",
"__entrypoint",
];
foreach (s; table)
{
if (cmp(s.ptr, str, len) == 0)
return true;
}
return false;
}
/**************************************************
* Highlight text section.
*/
extern (C++) void highlightText(Scope* sc, Dsymbols* a, OutBuffer* buf, size_t offset)
{
Dsymbol s = a.dim ? (*a)[0] : null; // test
//printf("highlightText()\n");
int leadingBlank = 1;
int inCode = 0;
int inBacktick = 0;
//int inComment = 0; // in <!-- ... --> comment
int inMacro = 0;
size_t iCodeStart = 0; // start of code section
size_t codeIndent = 0;
size_t iLineStart = offset;
for (size_t i = offset; i < buf.offset; i++)
{
char c = buf.data[i];
Lcont:
switch (c)
{
case ' ':
case '\t':
break;
case '\n':
if (inBacktick)
{
// `inline code` is only valid if contained on a single line
// otherwise, the backticks should be output literally.
//
// This lets things like `output from the linker' display
// unmolested while keeping the feature consistent with GitHub.
inBacktick = false;
inCode = false; // the backtick also assumes we're in code
// Nothing else is necessary since the DDOC_BACKQUOTED macro is
// inserted lazily at the close quote, meaning the rest of the
// text is already OK.
}
if (!inCode && i == iLineStart && i + 1 < buf.offset) // if "\n\n"
{
i = buf.insert(i, "$(DDOC_BLANKLINE)");
}
leadingBlank = 1;
iLineStart = i + 1;
break;
case '<':
{
leadingBlank = 0;
if (inCode)
break;
const slice = buf.peekSlice();
auto p = &slice[i];
const se = sc._module.escapetable.escapeChar('<');
if (se && strcmp(se, "<") == 0)
{
// Generating HTML
// Skip over comments
if (p[1] == '!' && p[2] == '-' && p[3] == '-')
{
size_t j = i + 4;
p += 4;
while (1)
{
if (j == slice.length)
goto L1;
if (p[0] == '-' && p[1] == '-' && p[2] == '>')
{
i = j + 2; // place on closing '>'
break;
}
j++;
p++;
}
break;
}
// Skip over HTML tag
if (isalpha(p[1]) || (p[1] == '/' && isalpha(p[2])))
{
size_t j = i + 2;
p += 2;
while (1)
{
if (j == slice.length)
break;
if (p[0] == '>')
{
i = j; // place on closing '>'
break;
}
j++;
p++;
}
break;
}
}
L1:
// Replace '<' with '<' character entity
if (se)
{
const len = strlen(se);
buf.remove(i, 1);
i = buf.insert(i, se, len);
i--; // point to ';'
}
break;
}
case '>':
{
leadingBlank = 0;
if (inCode)
break;
// Replace '>' with '>' character entity
const(char)* se = sc._module.escapetable.escapeChar('>');
if (se)
{
size_t len = strlen(se);
buf.remove(i, 1);
i = buf.insert(i, se, len);
i--; // point to ';'
}
break;
}
case '&':
{
leadingBlank = 0;
if (inCode)
break;
char* p = cast(char*)&buf.data[i];
if (p[1] == '#' || isalpha(p[1]))
break;
// already a character entity
// Replace '&' with '&' character entity
const(char)* se = sc._module.escapetable.escapeChar('&');
if (se)
{
size_t len = strlen(se);
buf.remove(i, 1);
i = buf.insert(i, se, len);
i--; // point to ';'
}
break;
}
case '`':
{
if (inBacktick)
{
inBacktick = 0;
inCode = 0;
OutBuffer codebuf;
codebuf.write(buf.peekSlice().ptr + iCodeStart + 1, i - (iCodeStart + 1));
// escape the contents, but do not perform highlighting except for DDOC_PSYMBOL
highlightCode(sc, a, &codebuf, 0);
buf.remove(iCodeStart, i - iCodeStart + 1); // also trimming off the current `
immutable pre = "$(DDOC_BACKQUOTED ";
i = buf.insert(iCodeStart, pre);
i = buf.insert(i, codebuf.peekSlice());
i = buf.insert(i, ")");
i--; // point to the ending ) so when the for loop does i++, it will see the next character
break;
}
if (inCode)
break;
inCode = 1;
inBacktick = 1;
codeIndent = 0; // inline code is not indented
// All we do here is set the code flags and record
// the location. The macro will be inserted lazily
// so we can easily cancel the inBacktick if we come
// across a newline character.
iCodeStart = i;
break;
}
case '-':
/* A line beginning with --- delimits a code section.
* inCode tells us if it is start or end of a code section.
*/
if (leadingBlank)
{
size_t istart = i;
size_t eollen = 0;
leadingBlank = 0;
while (1)
{
++i;
if (i >= buf.offset)
break;
c = buf.data[i];
if (c == '\n')
{
eollen = 1;
break;
}
if (c == '\r')
{
eollen = 1;
if (i + 1 >= buf.offset)
break;
if (buf.data[i + 1] == '\n')
{
eollen = 2;
break;
}
}
// BUG: handle UTF PS and LS too
if (c != '-')
goto Lcont;
}
if (i - istart < 3)
goto Lcont;
// We have the start/end of a code section
// Remove the entire --- line, including blanks and \n
buf.remove(iLineStart, i - iLineStart + eollen);
i = iLineStart;
if (inCode && (i <= iCodeStart))
{
// Empty code section, just remove it completely.
inCode = 0;
break;
}
if (inCode)
{
inCode = 0;
// The code section is from iCodeStart to i
OutBuffer codebuf;
codebuf.write(buf.data + iCodeStart, i - iCodeStart);
codebuf.writeByte(0);
// Remove leading indentations from all lines
bool lineStart = true;
char* endp = cast(char*)codebuf.data + codebuf.offset;
for (char* p = cast(char*)codebuf.data; p < endp;)
{
if (lineStart)
{
size_t j = codeIndent;
char* q = p;
while (j-- > 0 && q < endp && isIndentWS(q))
++q;
codebuf.remove(p - cast(char*)codebuf.data, q - p);
assert(cast(char*)codebuf.data <= p);
assert(p < cast(char*)codebuf.data + codebuf.offset);
lineStart = false;
endp = cast(char*)codebuf.data + codebuf.offset; // update
continue;
}
if (*p == '\n')
lineStart = true;
++p;
}
highlightCode2(sc, a, &codebuf, 0);
buf.remove(iCodeStart, i - iCodeStart);
i = buf.insert(iCodeStart, codebuf.peekSlice());
i = buf.insert(i, ")\n");
i -= 2; // in next loop, c should be '\n'
}
else
{
static __gshared const(char)* d_code = "$(D_CODE ";
inCode = 1;
codeIndent = istart - iLineStart; // save indent count
i = buf.insert(i, d_code, strlen(d_code));
iCodeStart = i;
i--; // place i on >
leadingBlank = true;
}
}
break;
case '$':
{
/* Look for the start of a macro, '$(Identifier'
*/
leadingBlank = 0;
if (inCode || inBacktick)
break;
const slice = buf.peekSlice();
auto p = &slice[i];
if (p[1] == '(' && isIdStart(&p[2]))
++inMacro;
break;
}
case ')':
{ /* End of macro
*/
leadingBlank = 0;
if (inCode || inBacktick)
break;
if (inMacro)
--inMacro;
break;
}
default:
leadingBlank = 0;
if (sc._module.isDocFile || inCode)
break;
const start = cast(char*)buf.data + i;
if (isIdStart(start))
{
size_t j = skippastident(buf, i);
if (i < j)
{
size_t k = skippastURL(buf, i);
if (i < k)
{
/* The URL is buf[i..k]
*/
if (inMacro)
/* Leave alone if already in a macro
*/
i = k - 1;
else
{
/* Replace URL with '$(LINK URL)'
*/
i = buf.bracket(i, "$(LINK ", k, ")") - 1;
}
break;
}
}
else
break;
size_t len = j - i;
// leading '_' means no highlight unless it's a reserved symbol name
if (c == '_' && (i == 0 || !isdigit(*(start - 1))) && (i == buf.offset - 1 || !isReservedName(start, len)))
{
buf.remove(i, 1);
i = j - 1;
break;
}
if (isIdentifier(a, start, len))
{
i = buf.bracket(i, "$(DDOC_PSYMBOL ", j, ")") - 1;
break;
}
if (isKeyword(start, len))
{
i = buf.bracket(i, "$(DDOC_KEYWORD ", j, ")") - 1;
break;
}
if (isFunctionParameter(a, start, len))
{
//printf("highlighting arg '%s', i = %d, j = %d\n", arg.ident.toChars(), i, j);
i = buf.bracket(i, "$(DDOC_PARAM ", j, ")") - 1;
break;
}
i = j - 1;
}
break;
}
}
if (inCode)
error(s ? s.loc : Loc(), "unmatched --- in DDoc comment");
}
/**************************************************
* Highlight code for DDOC section.
*/
extern (C++) void highlightCode(Scope* sc, Dsymbol s, OutBuffer* buf, size_t offset)
{
//printf("highlightCode(s = %s '%s')\n", s.kind(), s.toChars());
OutBuffer ancbuf;
emitAnchor(&ancbuf, s, sc);
buf.insert(offset, ancbuf.peekSlice());
offset += ancbuf.offset;
Dsymbols a;
a.push(s);
highlightCode(sc, &a, buf, offset);
}
/****************************************************
*/
extern (C++) void highlightCode(Scope* sc, Dsymbols* a, OutBuffer* buf, size_t offset)
{
//printf("highlightCode(a = '%s')\n", a.toChars());
bool resolvedTemplateParameters = false;
for (size_t i = offset; i < buf.offset; i++)
{
char c = buf.data[i];
const(char)* se = sc._module.escapetable.escapeChar(c);
if (se)
{
size_t len = strlen(se);
buf.remove(i, 1);
i = buf.insert(i, se, len);
i--; // point to ';'
continue;
}
char* start = cast(char*)buf.data + i;
if (isIdStart(start))
{
size_t j = skippastident(buf, i);
if (i < j)
{
size_t len = j - i;
if (isIdentifier(a, start, len))
{
i = buf.bracket(i, "$(DDOC_PSYMBOL ", j, ")") - 1;
continue;
}
if (isFunctionParameter(a, start, len))
{
//printf("highlighting arg '%s', i = %d, j = %d\n", arg.ident.toChars(), i, j);
i = buf.bracket(i, "$(DDOC_PARAM ", j, ")") - 1;
continue;
}
i = j - 1;
}
}
else if (!resolvedTemplateParameters)
{
size_t previ = i;
// hunt for template declarations:
foreach (symi; 0 .. a.dim)
{
FuncDeclaration fd = (*a)[symi].isFuncDeclaration();
if (!fd || !fd.parent || !fd.parent.isTemplateDeclaration())
{
continue;
}
TemplateDeclaration td = fd.parent.isTemplateDeclaration();
// build the template parameters
Array!(size_t) paramLens;
paramLens.reserve(td.parameters.dim);
OutBuffer parametersBuf;
HdrGenState hgs;
parametersBuf.writeByte('(');
foreach (parami; 0 .. td.parameters.dim)
{
TemplateParameter tp = (*td.parameters)[parami];
if (parami)
parametersBuf.writestring(", ");
size_t lastOffset = parametersBuf.offset;
.toCBuffer(tp, ¶metersBuf, &hgs);
paramLens[parami] = parametersBuf.offset - lastOffset;
}
parametersBuf.writeByte(')');
const templateParams = parametersBuf.peekString();
const templateParamsLen = parametersBuf.peekSlice().length;
//printf("templateDecl: %s\ntemplateParams: %s\nstart: %s\n", td.toChars(), templateParams, start);
if (cmp(templateParams, start, templateParamsLen) == 0)
{
immutable templateParamListMacro = "$(DDOC_TEMPLATE_PARAM_LIST ";
buf.bracket(i, templateParamListMacro.ptr, i + templateParamsLen, ")");
// We have the parameter list. While we're here we might
// as well wrap the parameters themselves as well
// + 1 here to take into account the opening paren of the
// template param list
i += templateParamListMacro.length + 1;
foreach (const len; paramLens)
{
i = buf.bracket(i, "$(DDOC_TEMPLATE_PARAM ", i + len, ")");
// increment two here for space + comma
i += 2;
}
resolvedTemplateParameters = true;
// reset i to be positioned back before we found the template
// param list this assures that anything within the template
// param list that needs to be escaped or otherwise altered
// has an opportunity for that to happen outside of this context
i = previ;
continue;
}
}
}
}
}
/****************************************
*/
extern (C++) void highlightCode3(Scope* sc, OutBuffer* buf, const(char)* p, const(char)* pend)
{
for (; p < pend; p++)
{
const(char)* s = sc._module.escapetable.escapeChar(*p);
if (s)
buf.writestring(s);
else
buf.writeByte(*p);
}
}
/**************************************************
* Highlight code for CODE section.
*/
extern (C++) void highlightCode2(Scope* sc, Dsymbols* a, OutBuffer* buf, size_t offset)
{
uint errorsave = global.errors;
scope Lexer lex = new Lexer(null, cast(char*)buf.data, 0, buf.offset - 1, 0, 1);
OutBuffer res;
const(char)* lastp = cast(char*)buf.data;
//printf("highlightCode2('%.*s')\n", buf.offset - 1, buf.data);
res.reserve(buf.offset);
while (1)
{
Token tok;
lex.scan(&tok);
highlightCode3(sc, &res, lastp, tok.ptr);
const(char)* highlight = null;
switch (tok.value)
{
case TOKidentifier:
{
if (!sc)
break;
size_t len = lex.p - tok.ptr;
if (isIdentifier(a, tok.ptr, len))
{
highlight = "$(D_PSYMBOL ";
break;
}
if (isFunctionParameter(a, tok.ptr, len))
{
//printf("highlighting arg '%s', i = %d, j = %d\n", arg.ident.toChars(), i, j);
highlight = "$(D_PARAM ";
break;
}
break;
}
case TOKcomment:
highlight = "$(D_COMMENT ";
break;
case TOKstring:
highlight = "$(D_STRING ";
break;
default:
if (tok.isKeyword())
highlight = "$(D_KEYWORD ";
break;
}
if (highlight)
{
res.writestring(highlight);
size_t o = res.offset;
highlightCode3(sc, &res, tok.ptr, lex.p);
if (tok.value == TOKcomment || tok.value == TOKstring)
/* https://issues.dlang.org/show_bug.cgi?id=7656
* https://issues.dlang.org/show_bug.cgi?id=7715
* https://issues.dlang.org/show_bug.cgi?id=10519
*/
escapeDdocString(&res, o);
res.writeByte(')');
}
else
highlightCode3(sc, &res, tok.ptr, lex.p);
if (tok.value == TOKeof)
break;
lastp = lex.p;
}
buf.setsize(offset);
buf.write(&res);
global.errors = errorsave;
}
/****************************************
* Determine if p points to the start of a "..." parameter identifier.
*/
extern (C++) bool isCVariadicArg(const(char)* p, size_t len)
{
return len >= 3 && cmp("...", p, 3) == 0;
}
/****************************************
* Determine if p points to the start of an identifier.
*/
extern (C++) bool isIdStart(const(char)* p)
{
dchar c = *p;
if (isalpha(c) || c == '_')
return true;
if (c >= 0x80)
{
size_t i = 0;
if (utf_decodeChar(p, 4, i, c))
return false; // ignore errors
if (isUniAlpha(c))
return true;
}
return false;
}
/****************************************
* Determine if p points to the rest of an identifier.
*/
extern (C++) bool isIdTail(const(char)* p)
{
dchar c = *p;
if (isalnum(c) || c == '_')
return true;
if (c >= 0x80)
{
size_t i = 0;
if (utf_decodeChar(p, 4, i, c))
return false; // ignore errors
if (isUniAlpha(c))
return true;
}
return false;
}
/****************************************
* Determine if p points to the indentation space.
*/
extern (C++) bool isIndentWS(const(char)* p)
{
return (*p == ' ') || (*p == '\t');
}
/*****************************************
* Return number of bytes in UTF character.
*/
extern (C++) int utfStride(const(char)* p)
{
dchar c = *p;
if (c < 0x80)
return 1;
size_t i = 0;
utf_decodeChar(p, 4, i, c); // ignore errors, but still consume input
return cast(int)i;
}
inout(char)* stripLeadingNewlines(inout(char)* s)
{
while (s && *s == '\n' || *s == '\r')
s++;
return s;
}
|
D
|
/Users/ryanmcwhorter/Documents/GIT/rust_basics/sorting/target/debug/build/matrixmultiply-c7663b838e7742cc/build_script_build-c7663b838e7742cc: /Users/ryanmcwhorter/.cargo/registry/src/github.com-1ecc6299db9ec823/matrixmultiply-0.1.15/build.rs
/Users/ryanmcwhorter/Documents/GIT/rust_basics/sorting/target/debug/build/matrixmultiply-c7663b838e7742cc/build_script_build-c7663b838e7742cc.d: /Users/ryanmcwhorter/.cargo/registry/src/github.com-1ecc6299db9ec823/matrixmultiply-0.1.15/build.rs
/Users/ryanmcwhorter/.cargo/registry/src/github.com-1ecc6299db9ec823/matrixmultiply-0.1.15/build.rs:
|
D
|
/*
TEST_OUTPUT:
---
fail_compilation/fail265.d-mixin-10(10): Error: found `End of File` instead of statement
---
*/
void main()
{
mixin(`for(;;)`);
}
|
D
|
/*
* Copyright 2017 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.
*/
package android.support.mediacompat.testlib;
/**
* Constants for testing the media session.
*/
public class MediaSessionConstants {
// MediaSessionCompat methods.
public static final int SET_EXTRAS = 101;
public static final int SET_FLAGS = 102;
public static final int SET_METADATA = 103;
public static final int SET_PLAYBACK_STATE = 104;
public static final int SET_QUEUE = 105;
public static final int SET_QUEUE_TITLE = 106;
public static final int SET_SESSION_ACTIVITY = 107;
public static final int SET_CAPTIONING_ENABLED = 108;
public static final int SET_REPEAT_MODE = 109;
public static final int SET_SHUFFLE_MODE = 110;
public static final int SEND_SESSION_EVENT = 112;
public static final int SET_ACTIVE = 113;
public static final int RELEASE = 114;
public static final int SET_PLAYBACK_TO_LOCAL = 115;
public static final int SET_PLAYBACK_TO_REMOTE = 116;
public static final int SET_RATING_TYPE = 117;
public static final String TEST_SESSION_TAG = "test-session-tag";
public static final String TEST_KEY = "test-key";
public static final String TEST_VALUE = "test-val";
public static final String TEST_SESSION_EVENT = "test-session-event";
public static final String TEST_COMMAND = "test-command";
public static final int TEST_FLAGS = 5;
public static final int TEST_CURRENT_VOLUME = 10;
public static final int TEST_MAX_VOLUME = 11;
public static final long TEST_QUEUE_ID_1 = 10L;
public static final long TEST_QUEUE_ID_2 = 20L;
public static final String TEST_MEDIA_ID_1 = "media_id_1";
public static final String TEST_MEDIA_ID_2 = "media_id_2";
public static final String TEST_MEDIA_TITLE_1 = "media_title_1";
public static final String TEST_MEDIA_TITLE_2 = "media_title_2";
public static final long TEST_ACTION = 55L;
public static final int TEST_ERROR_CODE = 0x3;
public static final String TEST_ERROR_MSG = "test-error-msg";
private MediaSessionConstants() {
}
}
|
D
|
module std.internal.unicode_grapheme;
import std.internal.unicode_tables;
static if (size_t.sizeof == 8)
{
//832 bytes
enum hangulLVTrieEntries = TrieEntry!(bool, 8, 5, 8)([0x0, 0x20, 0x40],
[0x100, 0x80, 0xa00], [0x2010000000000, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x4000300020001, 0x1000700060005, 0x5000400030002,
0x2000100070006, 0x6000500040003, 0x3000200010007,
0x7000600050004, 0x4000300020001, 0x1000700060005,
0x5000400030002, 0x8000100070006, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x100000010000001,
0x1000000100000, 0x10000001000, 0x1000000100000010,
0x10000001000000, 0x100000010000,
0x1000000100, 0x100000010000001, 0x1000000100000,
0x10000001000, 0x1000000100000010, 0x10000001000000,
0x100000010000, 0x1000000100, 0x100000010000001,
0x1000000100000, 0x10000001000, 0x1000000100000010,
0x10000001000000, 0x100000010000,
0x1000000100, 0x100000010000001, 0x1000000100000,
0x10000001000, 0x1000000100000010, 0x10000001000000,
0x100000010000, 0x1000000100, 0x10000001000000,
0x100000010000, 0x100, 0x0, 0x0, 0x0, 0x0, 0x0]);
//832 bytes
enum hangulLVTTrieEntries = TrieEntry!(bool, 8, 5, 8)([0x0, 0x20, 0x40],
[0x100, 0x80, 0xa00], [0x2010000000000, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x4000300020001, 0x1000700060005, 0x5000400030002,
0x2000100070006, 0x6000500040003, 0x3000200010007,
0x7000600050004, 0x4000300020001, 0x1000700060005,
0x5000400030002, 0x8000100070006, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfeffffffeffffffe,
0xfffeffffffefffff, 0xfffffeffffffefff, 0xeffffffeffffffef,
0xffeffffffeffffff, 0xffffeffffffeffff,
0xffffffeffffffeff, 0xfeffffffeffffffe, 0xfffeffffffefffff,
0xfffffeffffffefff, 0xeffffffeffffffef, 0xffeffffffeffffff,
0xffffeffffffeffff, 0xffffffeffffffeff, 0xfeffffffeffffffe,
0xfffeffffffefffff,
0xfffffeffffffefff,
0xeffffffeffffffef, 0xffeffffffeffffff, 0xffffeffffffeffff,
0xffffffeffffffeff, 0xfeffffffeffffffe, 0xfffeffffffefffff,
0xfffffeffffffefff, 0xeffffffeffffffef, 0xffeffffffeffffff,
0xffffeffffffeffff,
0xffffffeffffffeff, 0xffeffffffeffffff,
0xffffeffffffeffff, 0xffffffeff, 0x0, 0x0, 0x0, 0x0, 0x0]);
//1760 bytes
enum mcTrieEntries = TrieEntry!(bool, 8, 5, 8)([0x0, 0x20, 0x60], [0x100,
0x100, 0x1f00], [0x202030202020100, 0x206020205020204,
0x202020202020202, 0x202020202020202,
0x202020202020202, 0x202020202020202, 0x202020202020202,
0x202020202020202, 0x202020202020202,
0x202020202020202, 0x202020202020202, 0x202020202020202,
0x202020202020202, 0x202020202020202, 0x202020202020202,
0x202020202020202, 0x202020202020202, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x3000200010000,
0x6000000050004, 0x7, 0x8000000000000, 0xb000a00090000, 0xc,
0x0, 0x0, 0x0, 0x0, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x110010000f000e, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x15001400130012,
0x19001800170016, 0x1a00000000,
0x1b, 0x0, 0x0, 0x0, 0x1c000000000000, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x1d0000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc800000000000008,
0xde01, 0xc00000000000000c, 0x801981,
0xc000000000000008,
0x1, 0xc000000000000008, 0x1a01, 0x400000000000000c, 0x801981,
0xc000000000000000,
0x801dc6, 0xe, 0x1e, 0x400000000000000c, 0x600d9f,
0xc00000000000000c, 0x801dc1,
0xc, 0xc0000ff038000, 0xc000000000000000, 0x8000000000000000,
0x0, 0x0, 0x1902180000000000, 0x3f9c00c00000,
0x1c009f98, 0x0, 0x0,
0x0, 0xc040000000000000, 0x1bf, 0x1fb0e7800000000, 0x0, 0x0,
0x0, 0x6000000, 0x7e01a00a00000, 0x0, 0x0,
0xe820000000000010,
0x1b, 0x4c200000004, 0xc5c8000000000, 0x300ff000000000, 0x0,
0x0, 0x8c000200000000, 0xc00000000000,
0x0, 0x0, 0x0,
0x9800000000, 0x0, 0xfff0000000000003, 0xf, 0x0, 0xc0000,
0xec30000000000008, 0x1, 0x19800000000000,
0x2800000000002000,
0x0, 0x20c80000000000, 0x0, 0x0, 0x0, 0x16d800000000, 0x5, 0x0,
0x187000000000004, 0x0, 0x100000000000,
0x0, 0x8038000000000004, 0x1, 0x2c700000000000, 0x0, 0x0,
0x700000000, 0xc00000000000000c,
0xc0080399e, 0x0, 0x0,
0xe0000000000000, 0x23, 0x7a07000000000000, 0x2, 0x0, 0x0,
0x4f03800000000000, 0x0, 0x5807000000000000,
0x0, 0x40d00000000000,
0x0, 0x4300000000, 0x0, 0x0, 0x0, 0x200000000000180, 0x1800000,
0x800000, 0x0, 0x4000800000000000, 0x0,
0x12020000000000, 0x0, 0x0, 0x7ffffffffffe0000, 0x0, 0x0, 0x0,
0x7e06000000000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]);
//3040 bytes
enum graphemeExtendTrieEntries = TrieEntry!(bool, 8, 5, 8)([0x0, 0x20,
0x80], [0x100, 0x180, 0x3f00], [0x402030202020100,
0x908070206020205, 0x202020202020202, 0x202020202020202,
0x202020202020202, 0x202020202020202, 0x202020202020202,
0x202020202020202, 0x202020202020202,
0x202020202020202, 0x202020202020202, 0x202020202020202,
0x202020202020202, 0x202020202020202, 0x20202020202020a,
0x202020202020202, 0x202020202020202, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x1000000000000, 0x5000400030002, 0x9000800070006,
0xd000c000b000a,
0xf00000000000e, 0x10000000000000, 0x14001300120011, 0x160015,
0x17, 0x0,
0x0, 0x190018, 0x1a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x1b00000000, 0x1f001e001d001c, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20000000000000,
0x22002100000000, 0x25002400230000,
0x0, 0x2600000000, 0x0, 0x2a002900280027, 0x2e002d002c002b,
0x2f00000000, 0x310030, 0x0, 0x0, 0x33003200000000,
0x34000000000000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x35, 0x0, 0x0, 0x0, 0x0, 0x3700360000, 0x0,
0x3800000000, 0x0, 0x39, 0x0, 0x3b003a, 0x0, 0x0, 0x0, 0x0,
0x0, 0x3d003c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0xffffffffffffffff,
0xffffffffffff, 0x0, 0x0, 0x0, 0x0, 0x3f8, 0x0, 0x0, 0x0,
0xbffffffffffe0000, 0xb6, 0x7ff0000,
0x10000fffff800,
0x0, 0x3d9f9fc00000, 0xffff000000020000, 0x7ff,
0x1ffc000000000, 0xff80000000000, 0x3eeffbc00000,
0xe000000, 0x0, 0xfffffffbfff00000, 0x1400000000000007,
0xc00fe21fe, 0x5000000000000002, 0xc0080201e,
0x1000000000000006, 0x23000000023986, 0x1000000000000006,
0xfc00000c000021be, 0xd000000000000002, 0xc00c0201e,
0x4000000000000004, 0x802001, 0xc000000000000001,
0xc00603dc1,
0x9000000000000002, 0xc00603044, 0x5800000000000003,
0xc0080201e, 0x0, 0x805c8400, 0x7f2000000000000, 0x7f80,
0x1bf2000000000000, 0x3f00, 0x2a0000003000000,
0x7ffe000000000000,
0x1ffffffffeffe0df, 0x40, 0x66fde00000000000,
0x1e0001c3000000, 0x20002064, 0x0, 0x0, 0xe0000000, 0x0, 0x0,
0x1c0000001c0000, 0xc0000000c0000,
0x3fb0000000000000, 0x200ffe40,
0x3800, 0x0, 0x20000000060, 0x0, 0xe04018700000000, 0x0, 0x0,
0x0, 0x9800000, 0x9ff81fe57f400000, 0x7fff000000000000,
0x0, 0x17d000000000000f, 0xff80000000004,
0x3b3c00000003, 0x3a34000000000, 0xcff00000000000, 0x0, 0x0,
0x31021fdfff70000, 0x0, 0x0, 0x0,
0xfbffffffffffffff,
0x1000, 0x0, 0x0, 0x1ffffffff0000, 0x0, 0x0, 0x0,
0x3800000000000, 0x0, 0x8000000000000000, 0x0,
0xffffffff00000000, 0xfc0000000000, 0x0, 0x6000000, 0x0, 0x0,
0x3ff7800000000000, 0xc0000000, 0x3000000000000,
0x6000000844, 0x0, 0x0, 0x3ffff00000030,
0x3fc000000000, 0x3ff80, 0x13c8000000000007, 0x2000000000,
0x667e0000000000, 0x1000000000001008, 0xc19d000000000000,
0x40300000000002, 0x0, 0x0, 0x0,
0x212000000000, 0x40000000, 0x0, 0x0, 0x0, 0xffff0000ffff, 0x0,
0x0, 0x0,
0x0, 0x0, 0xc0000000, 0x0, 0x0, 0x0, 0x0, 0x2000000000000000,
0x0, 0x0, 0x0, 0x100000000,
0x0, 0x7c0000000000000, 0x0, 0x0, 0x870000000000f06e, 0x0, 0x0,
0x6000000000, 0xff00000000000002, 0x800000000000007f,
0x678000000000003, 0x0, 0x1fef8000000007, 0x8000000000000,
0x7fc0000000000003, 0x1c00, 0x40d3800000000000, 0x0, 0x0,
0x7f880000000, 0x5000000000000003, 0x1f1fc000800001,
0x0, 0x0, 0xff00000000000000,
0x5c, 0xa5f9000000000000, 0xd, 0x0, 0x0, 0xb03c800000000000,
0x30000001, 0xa7f8000000000000, 0x1,
0xbf280000000000, 0x0,
0xfbce0000000, 0x0, 0x0, 0x0, 0x79f800000000067e, 0xe7e0080,
0x37ffc00, 0x0, 0xbf7f000000000000,
0x0, 0x6dfcfffffc0000,
0x0, 0xb47e000000000000, 0xbf, 0x0, 0x0, 0x0, 0x0, 0x0,
0x1f000000000000,
0x7f000000000000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x78000, 0x0, 0x0,
0x0, 0x60000000,
0x0, 0x0, 0xf807c3a000000000, 0x3c0000000fe7, 0x0, 0x0, 0x1c,
0x0, 0x0, 0xf87fffffffffffff, 0x201fffffffffff,
0xfffef8000010, 0x0, 0x7dbf9ffff7f, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x7f0000, 0x0,
0x7f0, 0x0, 0x0, 0xffffffff00000000, 0xffffffffffffffff, 0x0,
0x0, 0xffffffffffffffff,
0xffffffffffffffff,
0xffffffffffffffff, 0xffffffffffff, 0x0, 0x0, 0x0, 0x0]);
}
static if (size_t.sizeof == 4)
{
//832 bytes
enum hangulLVTrieEntries = TrieEntry!(bool, 8, 5, 8)([0x0, 0x40, 0x80],
[0x100, 0x80, 0xa00], [0x0, 0x20100, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20001, 0x40003, 0x60005,
0x10007,
0x30002, 0x50004, 0x70006, 0x20001, 0x40003, 0x60005, 0x10007,
0x30002, 0x50004, 0x70006, 0x20001,
0x40003, 0x60005, 0x10007, 0x30002, 0x50004, 0x70006, 0x80001,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x10000001, 0x1000000, 0x100000, 0x10000,
0x1000, 0x100, 0x10,
0x10000001, 0x1000000, 0x100000, 0x10000, 0x1000, 0x100, 0x10,
0x10000001, 0x1000000, 0x100000, 0x10000,
0x1000, 0x100, 0x10, 0x10000001, 0x1000000, 0x100000, 0x10000,
0x1000, 0x100, 0x10, 0x10000001,
0x1000000, 0x100000, 0x10000, 0x1000, 0x100, 0x10, 0x10000001,
0x1000000, 0x100000, 0x10000, 0x1000,
0x100, 0x10, 0x10000001, 0x1000000, 0x100000, 0x10000, 0x1000,
0x100, 0x10, 0x10000001,
0x1000000, 0x100000, 0x10000, 0x1000, 0x100, 0x10, 0x1000000,
0x100000,
0x10000, 0x1000, 0x100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0]);
//832 bytes
enum hangulLVTTrieEntries = TrieEntry!(bool, 8, 5, 8)([0x0, 0x40, 0x80],
[0x100, 0x80, 0xa00], [0x0, 0x20100, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20001, 0x40003, 0x60005,
0x10007,
0x30002, 0x50004, 0x70006, 0x20001, 0x40003, 0x60005, 0x10007,
0x30002, 0x50004, 0x70006, 0x20001,
0x40003, 0x60005, 0x10007, 0x30002, 0x50004, 0x70006, 0x80001,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0xeffffffe, 0xfeffffff, 0xffefffff,
0xfffeffff, 0xffffefff, 0xfffffeff, 0xffffffef,
0xeffffffe,
0xfeffffff, 0xffefffff, 0xfffeffff, 0xffffefff, 0xfffffeff,
0xffffffef, 0xeffffffe, 0xfeffffff, 0xffefffff,
0xfffeffff, 0xffffefff, 0xfffffeff,
0xffffffef, 0xeffffffe, 0xfeffffff, 0xffefffff, 0xfffeffff,
0xffffefff, 0xfffffeff, 0xffffffef, 0xeffffffe,
0xfeffffff, 0xffefffff, 0xfffeffff,
0xffffefff, 0xfffffeff, 0xffffffef, 0xeffffffe, 0xfeffffff,
0xffefffff, 0xfffeffff, 0xffffefff, 0xfffffeff,
0xffffffef, 0xeffffffe, 0xfeffffff,
0xffefffff, 0xfffeffff, 0xffffefff, 0xfffffeff, 0xffffffef,
0xeffffffe, 0xfeffffff, 0xffefffff, 0xfffeffff,
0xffffefff, 0xfffffeff, 0xffffffef,
0xfeffffff, 0xffefffff, 0xfffeffff, 0xffffefff, 0xfffffeff,
0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]);
//1760 bytes
enum mcTrieEntries = TrieEntry!(bool, 8, 5, 8)([0x0, 0x40, 0xc0], [0x100,
0x100, 0x1f00], [0x2020100,
0x2020302, 0x5020204, 0x2060202, 0x2020202, 0x2020202,
0x2020202, 0x2020202, 0x2020202, 0x2020202,
0x2020202, 0x2020202, 0x2020202,
0x2020202, 0x2020202, 0x2020202, 0x2020202, 0x2020202,
0x2020202, 0x2020202, 0x2020202, 0x2020202,
0x2020202, 0x2020202, 0x2020202,
0x2020202, 0x2020202, 0x2020202, 0x2020202, 0x2020202,
0x2020202, 0x2020202,
0x2020202, 0x2020202, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x10000, 0x30002, 0x50004, 0x60000, 0x7, 0x0, 0x0,
0x80000, 0x90000, 0xb000a, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf000e, 0x110010, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x130012, 0x150014, 0x170016, 0x190018,
0x0, 0x1a, 0x1b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x1c0000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1d0000, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x8, 0xc8000000, 0xde01, 0x0, 0xc, 0xc0000000,
0x801981, 0x0, 0x8, 0xc0000000, 0x1, 0x0, 0x8, 0xc0000000,
0x1a01, 0x0,
0xc, 0x40000000, 0x801981, 0x0, 0x0, 0xc0000000, 0x801dc6, 0x0,
0xe, 0x0, 0x1e, 0x0, 0xc, 0x40000000, 0x600d9f, 0x0, 0xc,
0xc0000000,
0x801dc1, 0x0, 0xc, 0x0, 0xff038000, 0xc0000, 0x0, 0xc0000000,
0x0,
0x80000000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x19021800, 0xc00000,
0x3f9c, 0x1c009f98, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0xc0400000, 0x1bf, 0x0, 0x0, 0x1fb0e78, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x6000000, 0x0, 0xa00000, 0x7e01a, 0x0, 0x0, 0x0,
0x0, 0x10, 0xe8200000, 0x1b, 0x0, 0x4, 0x4c2, 0x0, 0xc5c80,
0x0, 0x300ff0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8c0002, 0x0, 0xc000,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x98, 0x0, 0x0, 0x3,
0xfff00000, 0xf, 0x0, 0x0, 0x0, 0xc0000, 0x0, 0x8, 0xec300000,
0x1, 0x0, 0x0, 0x198000, 0x2000, 0x28000000, 0x0, 0x0, 0x0,
0x20c800, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x16d8, 0x5, 0x0,
0x0, 0x0, 0x4, 0x1870000, 0x0, 0x0, 0x0, 0x1000, 0x0, 0x0, 0x4,
0x80380000, 0x1, 0x0, 0x0, 0x2c7000, 0x0, 0x0, 0x0, 0x0, 0x0,
0x7, 0xc, 0xc0000000, 0x80399e, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0,
0xe00000, 0x23, 0x0, 0x0, 0x7a070000, 0x2, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x4f038000, 0x0, 0x0, 0x0, 0x58070000, 0x0, 0x0, 0x0,
0x40d000, 0x0, 0x0, 0x0, 0x43, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x180, 0x2000000, 0x1800000, 0x0, 0x800000, 0x0, 0x0, 0x0, 0x0,
0x40008000, 0x0, 0x0, 0x0, 0x120200, 0x0, 0x0, 0x0, 0x0,
0xfffe0000, 0x7fffffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x7e060, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]);
//3040 bytes
enum graphemeExtendTrieEntries = TrieEntry!(bool, 8, 5, 8)([0x0, 0x40,
0x100], [0x100, 0x180, 0x3f00], [0x2020100,
0x4020302, 0x6020205, 0x9080702, 0x2020202, 0x2020202,
0x2020202, 0x2020202, 0x2020202, 0x2020202,
0x2020202, 0x2020202, 0x2020202,
0x2020202, 0x2020202, 0x2020202, 0x2020202, 0x2020202,
0x2020202, 0x2020202, 0x2020202, 0x2020202,
0x2020202, 0x2020202, 0x2020202,
0x2020202, 0x2020202, 0x2020202, 0x202020a, 0x2020202,
0x2020202, 0x2020202,
0x2020202, 0x2020202, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10000,
0x30002, 0x50004, 0x70006, 0x90008, 0xb000a, 0xd000c, 0xe,
0xf0000, 0x0,
0x100000, 0x120011, 0x140013, 0x160015, 0x0, 0x17, 0x0, 0x0,
0x0, 0x0, 0x0, 0x190018, 0x0, 0x1a, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1b, 0x1d001c,
0x1f001e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x200000, 0x0, 0x220021, 0x230000, 0x250024, 0x0, 0x0,
0x0,
0x26, 0x0, 0x0, 0x280027, 0x2a0029, 0x2c002b, 0x2e002d, 0x0,
0x2f, 0x310030, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x330032, 0x0,
0x340000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x35, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x360000,
0x37, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x39, 0x0, 0x0, 0x0,
0x3b003a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x3d003c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffffffff, 0xffffffff,
0xffffffff, 0xffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x3f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfffe0000,
0xbfffffff,
0xb6, 0x0, 0x7ff0000, 0x0, 0xfffff800, 0x10000, 0x0, 0x0,
0x9fc00000,
0x3d9f, 0x20000, 0xffff0000, 0x7ff, 0x0, 0x0, 0x1ffc0, 0x0,
0xff800, 0xfbc00000,
0x3eef, 0xe000000, 0x0, 0x0, 0x0, 0xfff00000, 0xfffffffb, 0x7,
0x14000000, 0xfe21fe,
0xc, 0x2, 0x50000000, 0x80201e, 0xc, 0x6, 0x10000000, 0x23986,
0x230000, 0x6, 0x10000000,
0x21be, 0xfc00000c, 0x2, 0xd0000000, 0xc0201e, 0xc, 0x4,
0x40000000, 0x802001, 0x0,
0x1, 0xc0000000, 0x603dc1, 0xc, 0x2, 0x90000000, 0x603044, 0xc,
0x3,
0x58000000, 0x80201e, 0xc, 0x0, 0x0, 0x805c8400, 0x0, 0x0,
0x7f20000, 0x7f80,
0x0, 0x0, 0x1bf20000, 0x3f00, 0x0, 0x3000000, 0x2a00000, 0x0,
0x7ffe0000, 0xfeffe0df,
0x1fffffff, 0x40, 0x0, 0x0, 0x66fde000, 0xc3000000, 0x1e0001,
0x20002064,
0x0, 0x0, 0x0, 0x0, 0x0, 0xe0000000, 0x0, 0x0, 0x0, 0x0, 0x0,
0x1c0000, 0x1c0000, 0xc0000, 0xc0000, 0x0, 0x3fb00000,
0x200ffe40,
0x0, 0x3800, 0x0, 0x0, 0x0, 0x60, 0x200, 0x0, 0x0, 0x0,
0xe040187, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9800000, 0x0,
0x7f400000,
0x9ff81fe5, 0x0, 0x7fff0000, 0x0, 0x0, 0xf, 0x17d00000, 0x4,
0xff800, 0x3, 0x3b3c, 0x0, 0x3a340, 0x0, 0xcff000, 0x0, 0x0,
0x0, 0x0, 0xfff70000, 0x31021fd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0xffffffff, 0xfbffffff, 0x1000, 0x0, 0x0, 0x0, 0x0, 0x0,
0xffff0000, 0x1ffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x38000, 0x0, 0x0, 0x0, 0x80000000, 0x0, 0x0, 0x0, 0xffffffff,
0x0, 0xfc00, 0x0, 0x0, 0x6000000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x3ff78000, 0xc0000000, 0x0, 0x0, 0x30000, 0x844, 0x60, 0x0,
0x0, 0x0, 0x0, 0x30, 0x3ffff, 0x0, 0x3fc0, 0x3ff80, 0x0, 0x7,
0x13c80000, 0x0, 0x20, 0x0, 0x667e00, 0x1008, 0x10000000, 0x0,
0xc19d0000, 0x2, 0x403000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x2120, 0x40000000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffff,
0xffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0xc0000000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x20000000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0,
0x0, 0x7c00000, 0x0, 0x0, 0x0, 0x0, 0xf06e, 0x87000000, 0x0,
0x0, 0x0, 0x0, 0x0, 0x60, 0x2, 0xff000000, 0x7f, 0x80000000,
0x3, 0x6780000, 0x0, 0x0, 0x7, 0x1fef80, 0x0, 0x80000, 0x3,
0x7fc00000, 0x1c00, 0x0, 0x0, 0x40d38000, 0x0, 0x0, 0x0, 0x0,
0x80000000,
0x7f8, 0x3, 0x50000000, 0x800001, 0x1f1fc0, 0x0, 0x0, 0x0, 0x0,
0x0, 0xff000000, 0x5c, 0x0, 0x0, 0xa5f90000, 0xd, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0xb03c8000, 0x30000001, 0x0, 0x0,
0xa7f80000,
0x1, 0x0, 0x0, 0xbf2800, 0x0, 0x0, 0xe0000000, 0xfbc, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x67e, 0x79f80000, 0xe7e0080, 0x0,
0x37ffc00,
0x0, 0x0, 0x0, 0x0, 0xbf7f0000, 0x0, 0x0, 0xfffc0000, 0x6dfcff,
0x0, 0x0, 0x0, 0xb47e0000, 0xbf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f0000, 0x0, 0x7f0000, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x78000, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x60000000, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0xf807c3a0, 0xfe7, 0x3c00, 0x0, 0x0, 0x0, 0x0, 0x1c, 0x0,
0x0, 0x0, 0x0, 0x0, 0xffffffff, 0xf87fffff, 0xffffffff,
0x201fff, 0xf8000010,
0xfffe, 0x0, 0x0, 0xf9ffff7f, 0x7db, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f0000, 0x0, 0x0, 0x0,
0x7f0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffffffff, 0xffffffff,
0xffffffff,
0x0, 0x0, 0x0, 0x0, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0]);
}
|
D
|
/*******************************************************************************
copyright: Copyright (c) 2004 Kris Bell. все rights reserved
license: BSD стиль: $(LICENSE)
version: Initial release: Oct 2004
authors: Kris
Быстрый Unicode transcoders. These are particularly sensitive в_
minor changes on 32bit x86 devices, because the регистрируй установи of
those devices is so small. Beware of subtle changes which might
extend the execution-период by as much as 200%. Because of this,
three of the six transcoders might читай past the конец of ввод by
one, two, or three байты before arresting themselves. Note that
support for Потокing добавьs a 15% overhead в_ the дим => сим
conversion, but имеется little effect on the другие.
These routines were tuned on an Intel P4; другой devices may work
ещё efficiently with a slightly different approach, though this
is likely в_ be reasonably optimal on AMD x86 CPUs also. These
algorithms would benefit significantly из_ those extra AMD64
registers. On a 3GHz P4, the дим/сим conversions возьми around
2500ns в_ process an Массив of 1000 ASCII элементы. Invoking the
память manager doubles that период, и quadruples the время for
массивы of 100 элементы. Memory allocation can slow down notably
in a multi-threaded environment, so avoопр that where possible.
Surrogate-pairs are dealt with in a non-optimal fashion when
transcoding between utf16 и utf8. Such cases are consопрered
в_ be boundary-conditions for this module.
There are three common cases where the ввод may be incomplete,
включая each 'wопрening' case of utf8 => utf16, utf8 => utf32,
и utf16 => utf32. An edge-case is utf16 => utf8, if surrogate
pairs are present. Such cases will throw an исключение, unless
Потокing-режим is включен ~ in the latter режим, an добавьitional
целое is returned indicating как many элементы of the ввод
have been consumed. In все cases, a correct срез of the вывод
is returned.
For details on Unicode processing see:
$(UL $(LINK http://www.utf-8.com/))
$(UL $(LINK http://www.hackcraft.net/xmlUnicode/))
$(UL $(LINK http://www.azillionmonkeys.com/qed/unicode.html/))
$(UL $(LINK http://icu.sourceforge.net/docs/papers/forms_of_unicode/))
*******************************************************************************/
module text.convert.Utf;
public extern (C) проц onUnicodeError (ткст сооб, т_мера индкс = 0);
/*******************************************************************************
Symmetric calls for equivalent типы; these return the provопрed
ввод with no conversion
*******************************************************************************/
ткст вТкст (ткст ист, ткст приёмн, бцел* ate=пусто) {return ист;}
шим[] вТкст (шим[] ист, шим[] приёмн, бцел* ate=пусто) {return ист;}
дим[] вТкст (дим[] ист, дим[] приёмн, бцел* ate=пусто) {return ист;}
/*******************************************************************************
Encode Utf8 up в_ a maximum of 4 байты дол (five & six байт
variations are not supported).
If the вывод is provопрed off the стэк, it should be large
enough в_ encompass the entire transcoding; failing в_ do
so will cause the вывод в_ be moved onto the куча instead.
Returns a срез of the вывод буфер, corresponding в_ the
преобразованый characters. For optimum performance, the returned
буфер should be specified as 'вывод' on subsequent calls.
For example:
---
ткст вывод;
ткст результат = вТкст (ввод, вывод);
// сбрось вывод after a realloc
if (результат.length > вывод.length)
вывод = результат;
---
Where 'ate' is provопрed, it will be установи в_ the число of
элементы consumed из_ the ввод, и the вывод буфер
will not be resized (or allocated). This represents a
Потокing режим, where slices of the ввод are processed
in sequence rather than все at one время (should use 'ate'
as an индекс for slicing преобр_в unconsumed ввод).
*******************************************************************************/
ткст вТкст (шим[] ввод, ткст вывод=пусто, бцел* ate=пусто)
{
if (ate)
*ate = ввод.length;
else
{
// potentially reallocate вывод
цел estimate = ввод.length * 2 + 3;
if (вывод.length < estimate)
вывод.length = estimate;
}
сим* pOut = вывод.ptr;
сим* pMax = pOut + вывод.length - 3;
foreach (цел eaten, шим b; ввод)
{
// about в_ перебор the вывод?
if (pOut > pMax)
{
// if Потокing, just return the неиспользовано ввод
if (ate)
{
*ate = eaten;
break;
}
// reallocate the вывод буфер
цел длин = pOut - вывод.ptr;
вывод.length = длин + длин / 2;
pOut = вывод.ptr + длин;
pMax = вывод.ptr + вывод.length - 3;
}
if (b < 0x80)
*pOut++ = b;
else
if (b < 0x0800)
{
pOut[0] = cast(шим)(0xc0 | ((b >> 6) & 0x3f));
pOut[1] = cast(шим)(0x80 | (b & 0x3f));
pOut += 2;
}
else
if (b < 0xd800 || b > 0xdfff)
{
pOut[0] = cast(шим)(0xe0 | ((b >> 12) & 0x3f));
pOut[1] = cast(шим)(0x80 | ((b >> 6) & 0x3f));
pOut[2] = cast(шим)(0x80 | (b & 0x3f));
pOut += 3;
}
else
// deal with surrogate-pairs
return вТкст (вТкст32(ввод, пусто, ate), вывод);
}
// return the produced вывод
return вывод [0..(pOut - вывод.ptr)];
}
/*******************************************************************************
Decode Utf8 produced by the above вТкст() метод.
If the вывод is provопрed off the стэк, it should be large
enough в_ encompass the entire transcoding; failing в_ do
so will cause the вывод в_ be moved onto the куча instead.
Returns a срез of the вывод буфер, corresponding в_ the
преобразованый characters. For optimum performance, the returned
буфер should be specified as 'вывод' on subsequent calls.
Where 'ate' is provопрed, it will be установи в_ the число of
элементы consumed из_ the ввод, и the вывод буфер
will not be resized (or allocated). This represents a
Потокing режим, where slices of the ввод are processed
in sequence rather than все at one время (should use 'ate'
as an индекс for slicing преобр_в unconsumed ввод).
*******************************************************************************/
шим[] вТкст16 (ткст ввод, шим[] вывод=пусто, бцел* ate=пусто)
{
цел produced;
сим* pIn = ввод.ptr;
сим* pMax = pIn + ввод.length;
сим* pValid;
if (ate is пусто)
if (ввод.length > вывод.length)
вывод.length = ввод.length;
if (ввод.length)
foreach (ref шим d; вывод)
{
pValid = pIn;
шим b = cast(шим) *pIn;
if (b & 0x80)
if (b < 0xe0)
{
b &= 0x1f;
b = cast(шим)((b << 6) | (*++pIn & 0x3f));
}
else
if (b < 0xf0)
{
b &= 0x0f;
b = cast(шим)((b << 6) | (pIn[1] & 0x3f));
b = cast(шим)((b << 6) | (pIn[2] & 0x3f));
pIn += 2;
}
else
// deal with surrogate-pairs
return вТкст16 (вТкст32(ввод, пусто, ate), вывод);
d = b;
++produced;
// dопр we читай past the конец of the ввод?
if (++pIn >= pMax)
if (pIn > pMax)
{
// yep ~ return хвост or throw ошибка?
if (ate)
{
pIn = pValid;
--produced;
break;
}
onUnicodeError ("Unicode.вТкст16 : utf8 ввод неполон", pIn - ввод.ptr);
}
else
break;
}
// do we still have some ввод left?
if (ate)
*ate = pIn - ввод.ptr;
else
if (pIn < pMax)
// this should never happen!
onUnicodeError ("Unicode.вТкст16 : utf8 перебор", pIn - ввод.ptr);
// return the produced вывод
return вывод [0..produced];
}
/*******************************************************************************
Encode Utf8 up в_ a maximum of 4 байты дол (five & six
байт variations are not supported). Throws an исключение
where the ввод дим is greater than 0x10ffff.
If the вывод is provопрed off the стэк, it should be large
enough в_ encompass the entire transcoding; failing в_ do
so will cause the вывод в_ be moved onto the куча instead.
Returns a срез of the вывод буфер, corresponding в_ the
преобразованый characters. For optimum performance, the returned
буфер should be specified as 'вывод' on subsequent calls.
Where 'ate' is provопрed, it will be установи в_ the число of
элементы consumed из_ the ввод, и the вывод буфер
will not be resized (or allocated). This represents a
Потокing режим, where slices of the ввод are processed
in sequence rather than все at one время (should use 'ate'
as an индекс for slicing преобр_в unconsumed ввод).
*******************************************************************************/
ткст вТкст (дим[] ввод, ткст вывод=пусто, бцел* ate=пусто)
{
if (ate)
*ate = ввод.length;
else
{
// potentially reallocate вывод
цел estimate = ввод.length * 2 + 4;
if (вывод.length < estimate)
вывод.length = estimate;
}
сим* pOut = вывод.ptr;
сим* pMax = pOut + вывод.length - 4;
foreach (цел eaten, дим b; ввод)
{
// about в_ перебор the вывод?
if (pOut > pMax)
{
// if Потокing, just return the неиспользовано ввод
if (ate)
{
*ate = eaten;
break;
}
// reallocate the вывод буфер
цел длин = pOut - вывод.ptr;
вывод.length = длин + длин / 2;
pOut = вывод.ptr + длин;
pMax = вывод.ptr + вывод.length - 4;
}
if (b < 0x80)
*pOut++ = b;
else
if (b < 0x0800)
{
pOut[0] = cast(шим)(0xc0 | ((b >> 6) & 0x3f));
pOut[1] = cast(шим)(0x80 | (b & 0x3f));
pOut += 2;
}
else
if (b < 0x10000)
{
pOut[0] = cast(шим)(0xe0 | ((b >> 12) & 0x3f));
pOut[1] = cast(шим)(0x80 | ((b >> 6) & 0x3f));
pOut[2] = cast(шим)(0x80 | (b & 0x3f));
pOut += 3;
}
else
if (b < 0x110000)
{
pOut[0] = cast(шим)(0xf0 | ((b >> 18) & 0x3f));
pOut[1] = cast(шим)(0x80 | ((b >> 12) & 0x3f));
pOut[2] = cast(шим)(0x80 | ((b >> 6) & 0x3f));
pOut[3] = cast(шим)(0x80 | (b & 0x3f));
pOut += 4;
}
else
onUnicodeError ("Unicode.вТкст : неправильный дим", eaten);
}
// return the produced вывод
return вывод [0..(pOut - вывод.ptr)];
}
/*******************************************************************************
Decode Utf8 produced by the above вТкст() метод.
If the вывод is provопрed off the стэк, it should be large
enough в_ encompass the entire transcoding; failing в_ do
so will cause the вывод в_ be moved onto the куча instead.
Returns a срез of the вывод буфер, corresponding в_ the
преобразованый characters. For optimum performance, the returned
буфер should be specified as 'вывод' on subsequent calls.
Where 'ate' is provопрed, it will be установи в_ the число of
элементы consumed из_ the ввод, и the вывод буфер
will not be resized (or allocated). This represents a
Потокing режим, where slices of the ввод are processed
in sequence rather than все at one время (should use 'ate'
as an индекс for slicing преобр_в unconsumed ввод).
*******************************************************************************/
дим[] вТкст32 (ткст ввод, дим[] вывод=пусто, бцел* ate=пусто)
{
цел produced;
сим* pIn = ввод.ptr;
сим* pMax = pIn + ввод.length;
сим* pValid;
if (ate is пусто)
if (ввод.length > вывод.length)
вывод.length = ввод.length;
if (ввод.length)
foreach (ref дим d; вывод)
{
pValid = pIn;
дим b = cast(дим) *pIn;
if (b & 0x80)
if (b < 0xe0)
{
b &= 0x1f;
b = (b << 6) | (*++pIn & 0x3f);
}
else
if (b < 0xf0)
{
b &= 0x0f;
b = (b << 6) | (pIn[1] & 0x3f);
b = (b << 6) | (pIn[2] & 0x3f);
pIn += 2;
}
else
{
b &= 0x07;
b = (b << 6) | (pIn[1] & 0x3f);
b = (b << 6) | (pIn[2] & 0x3f);
b = (b << 6) | (pIn[3] & 0x3f);
if (b >= 0x110000)
onUnicodeError ("Unicode.вТкст32 : utf8 ввод ошибочен", pIn - ввод.ptr);
pIn += 3;
}
d = b;
++produced;
// dопр we читай past the конец of the ввод?
if (++pIn >= pMax)
if (pIn > pMax)
{
// yep ~ return хвост or throw ошибка?
if (ate)
{
pIn = pValid;
--produced;
break;
}
onUnicodeError ("Unicode.вТкст32 : utf8 ввод неполон", pIn - ввод.ptr);
}
else
break;
}
// do we still have some ввод left?
if (ate)
*ate = pIn - ввод.ptr;
else
if (pIn < pMax)
// this should never happen!
onUnicodeError ("Unicode.вТкст32 : utf8 перебор", pIn - ввод.ptr);
// return the produced вывод
return вывод [0..produced];
}
/*******************************************************************************
Encode Utf16 up в_ a maximum of 2 байты дол. Throws an исключение
where the ввод дим is greater than 0x10ffff.
If the вывод is provопрed off the стэк, it should be large
enough в_ encompass the entire transcoding; failing в_ do
so will cause the вывод в_ be moved onto the куча instead.
Returns a срез of the вывод буфер, corresponding в_ the
преобразованый characters. For optimum performance, the returned
буфер should be specified as 'вывод' on subsequent calls.
Where 'ate' is provопрed, it will be установи в_ the число of
элементы consumed из_ the ввод, и the вывод буфер
will not be resized (or allocated). This represents a
Потокing режим, where slices of the ввод are processed
in sequence rather than все at one время (should use 'ate'
as an индекс for slicing преобр_в unconsumed ввод).
*******************************************************************************/
шим[] вТкст16 (дим[] ввод, шим[] вывод=пусто, бцел* ate=пусто)
{
if (ate)
*ate = ввод.length;
else
{
цел estimate = ввод.length * 2 + 2;
if (вывод.length < estimate)
вывод.length = estimate;
}
шим* pOut = вывод.ptr;
шим* pMax = pOut + вывод.length - 2;
foreach (цел eaten, дим b; ввод)
{
// about в_ перебор the вывод?
if (pOut > pMax)
{
// if Потокing, just return the неиспользовано ввод
if (ate)
{
*ate = eaten;
break;
}
// reallocate the вывод буфер
цел длин = pOut - вывод.ptr;
вывод.length = длин + длин / 2;
pOut = вывод.ptr + длин;
pMax = вывод.ptr + вывод.length - 2;
}
if (b < 0x10000)
*pOut++ = b;
else
if (b < 0x110000)
{
pOut[0] = cast(шим)(0xd800 | (((b - 0x10000) >> 10) & 0x3ff));
pOut[1] = cast(шим)(0xdc00 | ((b - 0x10000) & 0x3ff));
pOut += 2;
}
else
onUnicodeError ("Unicode.вТкст16 : неправильный дим", eaten);
}
// return the produced вывод
return вывод [0..(pOut - вывод.ptr)];
}
/*******************************************************************************
Decode Utf16 produced by the above вТкст16() метод.
If the вывод is provопрed off the стэк, it should be large
enough в_ encompass the entire transcoding; failing в_ do
so will cause the вывод в_ be moved onto the куча instead.
Returns a срез of the вывод буфер, corresponding в_ the
преобразованый characters. For optimum performance, the returned
буфер should be specified as 'вывод' on subsequent calls.
Where 'ate' is provопрed, it will be установи в_ the число of
элементы consumed из_ the ввод, и the вывод буфер
will not be resized (or allocated). This represents a
Потокing режим, where slices of the ввод are processed
in sequence rather than все at one время (should use 'ate'
as an индекс for slicing преобр_в unconsumed ввод).
*******************************************************************************/
дим[] вТкст32 (шим[] ввод, дим[] вывод=пусто, бцел* ate=пусто)
{
цел produced;
шим* pIn = ввод.ptr;
шим* pMax = pIn + ввод.length;
шим* pValid;
if (ate is пусто)
if (ввод.length > вывод.length)
вывод.length = ввод.length;
if (ввод.length)
foreach (ref дим d; вывод)
{
pValid = pIn;
дим b = cast(дим) *pIn;
// simple conversion ~ see http://www.unicode.org/faq/utf_bom.html#35
if (b >= 0xd800 && b <= 0xdfff)
b = ((b - 0xd7c0) << 10) + (*++pIn - 0xdc00);
if (b >= 0x110000)
onUnicodeError ("Unicode.вТкст32 :utf16 ввод неверен", pIn - ввод.ptr);
d = b;
++produced;
if (++pIn >= pMax)
if (pIn > pMax)
{
// yep ~ return хвост or throw ошибка?
if (ate)
{
pIn = pValid;
--produced;
break;
}
onUnicodeError ("Unicode.вТкст32 : utf16 ввод неполон", pIn - ввод.ptr);
}
else
break;
}
// do we still have some ввод left?
if (ate)
*ate = pIn - ввод.ptr;
else
if (pIn < pMax)
// this should never happen!
onUnicodeError ("Unicode.вТкст32 : utf16 перебор", pIn - ввод.ptr);
// return the produced вывод
return вывод [0..produced];
}
/*******************************************************************************
Decodes a single дим из_ the given ист текст, и indicates как
many симвы were consumed из_ ист в_ do so.
*******************************************************************************/
дим раскодируй (ткст ист, ref бцел ate)
{
дим[1] возвр;
return вТкст32 (ист, возвр, &ate)[0];
}
/*******************************************************************************
Decodes a single дим из_ the given ист текст, и indicates как
many wchars were consumed из_ ист в_ do so.
*******************************************************************************/
дим раскодируй (шим[] ист, ref бцел ate)
{
дим[1] возвр;
return вТкст32 (ист, возвр, &ate)[0];
}
/*******************************************************************************
Encode a дим преобр_в the provопрed приёмн Массив, и return a срез of
it representing the кодировка
*******************************************************************************/
ткст кодируй (ткст приёмн, дим c)
{
return вТкст ((&c)[0..1], приёмн);
}
/*******************************************************************************
Encode a дим преобр_в the provопрed приёмн Массив, и return a срез of
it representing the кодировка
*******************************************************************************/
шим[] кодируй (шим[] приёмн, дим c)
{
return вТкст16 ((&c)[0..1], приёмн);
}
/*******************************************************************************
Is the given character действителен?
*******************************************************************************/
бул действителен (дим c)
{
return (c < 0xD800 || (c > 0xDFFF && c <= 0x10FFFF));
}
/*******************************************************************************
Convert из_ a ткст преобр_в the тип of the приёмн provопрed.
Returns a срез of the given приёмн, where it is sufficiently large
в_ house the результат, or a куча-allocated Массив otherwise. Returns
the original ввод where no conversion is требуется.
*******************************************************************************/
T[] изТкст8(T) (ткст s, T[] приёмн)
{
static if (is (T == сим))
return s;
static if (is (T == шим))
return .вТкст16 (s, приёмн);
static if (is (T == дим))
return .вТкст32 (s, приёмн);
}
/*******************************************************************************
Convert из_ a шим[] преобр_в the тип of the приёмн provопрed.
Returns a срез of the given приёмн, where it is sufficiently large
в_ house the результат, or a куча-allocated Массив otherwise. Returns
the original ввод where no conversion is требуется.
*******************************************************************************/
T[] изТкст16(T) (шим[] s, T[] приёмн)
{
static if (is (T == шим))
return s;
static if (is (T == сим))
return .вТкст (s, приёмн);
static if (is (T == дим))
return .вТкст32 (s, приёмн);
}
/*******************************************************************************
Convert из_ a дим[] преобр_в the тип of the приёмн provопрed.
Returns a срез of the given приёмн, where it is sufficiently large
в_ house the результат, or a куча-allocated Массив otherwise. Returns
the original ввод where no conversion is требуется.
*******************************************************************************/
T[] изТкст32(T) (дим[] s, T[] приёмн)
{
static if (is (T == дим))
return s;
static if (is (T == сим))
return .вТкст (s, приёмн);
static if (is (T == шим))
return .вТкст16 (s, приёмн);
}
/*******************************************************************************
Adjust the контент such that no partial encodings exist on the
left sопрe of the provопрed текст.
Returns a срез of the ввод
*******************************************************************************/
T[] отрежьЛево(T) (T[] s)
{
static if (is (T == сим))
for (цел i=0; i < s.length && (s[i] & 0x80); ++i)
if ((s[i] & 0xc0) is 0xc0)
return s [i..$];
static if (is (T == шим))
// пропусти if первый сим is a trailing surrogate
if ((s[0] & 0xfffffc00) is 0xdc00)
return s [1..$];
return s;
}
/*******************************************************************************
Adjust the контент such that no partial encodings exist on the
right sопрe of the provопрed текст.
Returns a срез of the ввод
*******************************************************************************/
T[] отрежьПраво(T) (T[] s)
{
if (s.length)
{
бцел i = s.length - 1;
static if (is (T == сим))
while (i && (s[i] & 0x80))
if ((s[i] & 0xc0) is 0xc0)
{
// located the первый байт of a sequence
ббайт b = s[i];
цел d = s.length - i;
// is it a 3 байт sequence?
if (b & 0x20)
--d;
// or a four байт sequence?
if (b & 0x10)
--d;
// is the sequence complete?
if (d is 2)
i = s.length;
return s [0..i];
}
else
--i;
static if (is (T == шим))
// пропусти if последний сим is a leading surrogate
if ((s[i] & 0xfffffc00) is 0xd800)
return s [0..$-1];
}
return s;
}
/*******************************************************************************
*******************************************************************************/
debug (Utf)
{
import io.Console;
проц main()
{
auto s = "[\xc2\xa2\xc2\xa2\xc2\xa2]";
Квывод (s).нс;
Квывод (отрежьЛево(s[0..$])).нс;
Квывод (отрежьЛево(s[1..$])).нс;
Квывод (отрежьЛево(s[2..$])).нс;
Квывод (отрежьЛево(s[3..$])).нс;
Квывод (отрежьЛево(s[4..$])).нс;
Квывод (отрежьЛево(s[5..$])).нс;
Квывод (отрежьПраво(s[0..$])).нс;
Квывод (отрежьПраво(s[0..$-1])).нс;
Квывод (отрежьПраво(s[0..$-2])).нс;
Квывод (отрежьПраво(s[0..$-3])).нс;
Квывод (отрежьПраво(s[0..$-4])).нс;
Квывод (отрежьПраво(s[0..$-5])).нс;
}
}
|
D
|
/**
Contains routines for high level path handling.
Copyright: © 2012 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.internal.vibecompat.inet.path;
version (Have_vibe_d) public import vibe.inet.path;
else:
import std.algorithm;
import std.array;
import std.conv;
import std.exception;
import std.string;
import std.path : extension;
/**
Represents an absolute or relative file system path.
This struct allows to do safe operations on paths, such as concatenation and sub paths. Checks
are done to disallow invalid operations such as concatenating two absolute paths. It also
validates path strings and allows for easy checking of malicious relative paths.
*/
struct Path {
private {
immutable(PathEntry)[] m_nodes;
bool m_absolute = false;
bool m_endsWithSlash = false;
}
/// Constructs a Path object by parsing a path string.
this(string pathstr)
{
m_nodes = cast(immutable)splitPath(pathstr);
m_absolute = (pathstr.startsWith("/") || m_nodes.length > 0 && (m_nodes[0].toString().countUntil(':')>0 || m_nodes[0] == "\\"));
m_endsWithSlash = pathstr.endsWith("/");
}
/// Constructs a path object from a list of PathEntry objects.
this(immutable(PathEntry)[] nodes, bool absolute)
{
m_nodes = nodes;
m_absolute = absolute;
}
/// Constructs a relative path with one path entry.
this(PathEntry entry){
m_nodes = [entry];
m_absolute = false;
}
/// Determines if the path is absolute.
@property bool absolute() const { return m_absolute; }
/// Resolves all '.' and '..' path entries as far as possible.
void normalize()
{
immutable(PathEntry)[] newnodes;
foreach( n; m_nodes ){
switch(n.toString()){
default:
newnodes ~= n;
break;
case "", ".": break;
case "..":
enforce(!m_absolute || newnodes.length > 0, "Path goes below root node.");
if( newnodes.length > 0 && newnodes[$-1] != ".." ) newnodes = newnodes[0 .. $-1];
else newnodes ~= n;
break;
}
}
m_nodes = newnodes;
}
/// Converts the Path back to a string representation using slashes.
string toString()
const {
if( m_nodes.empty ) return absolute ? "/" : "";
Appender!string ret;
// for absolute paths start with /
version(Windows)
{
// Make sure windows path isn't "DRIVE:"
if( absolute && !m_nodes[0].toString().endsWith(':') )
ret.put('/');
}
else
{
if( absolute )
{
ret.put('/');
}
}
foreach( i, f; m_nodes ){
if( i > 0 ) ret.put('/');
ret.put(f.toString());
}
if( m_nodes.length > 0 && m_endsWithSlash )
ret.put('/');
return ret.data;
}
/// Converts the Path object to a native path string (backslash as path separator on Windows).
string toNativeString()
const {
if (m_nodes.empty) {
version(Windows) {
assert(!absolute, "Empty absolute path detected.");
return m_endsWithSlash ? ".\\" : ".";
} else return absolute ? "/" : m_endsWithSlash ? "./" : ".";
}
Appender!string ret;
// for absolute unix paths start with /
version(Posix) { if(absolute) ret.put('/'); }
foreach( i, f; m_nodes ){
version(Windows) { if( i > 0 ) ret.put('\\'); }
version(Posix) { if( i > 0 ) ret.put('/'); }
else { enforce("Unsupported OS"); }
ret.put(f.toString());
}
if( m_nodes.length > 0 && m_endsWithSlash ){
version(Windows) { ret.put('\\'); }
version(Posix) { ret.put('/'); }
}
return ret.data;
}
/// Tests if `rhs` is an anchestor or the same as this path.
bool startsWith(const Path rhs) const {
if( rhs.m_nodes.length > m_nodes.length ) return false;
foreach( i; 0 .. rhs.m_nodes.length )
if( m_nodes[i] != rhs.m_nodes[i] )
return false;
return true;
}
string ext() {
if(m_nodes.length == 0) return null;
return extension(m_nodes[$-1].toString());
}
/// Computes the relative path from `parentPath` to this path.
Path relativeTo(const Path parentPath) const {
assert(this.absolute && parentPath.absolute);
version(Windows){
// a path such as ..\C:\windows is not valid, so force the path to stay absolute in this case
if( this.absolute && !this.empty &&
(m_nodes[0].toString().endsWith(":") && !parentPath.startsWith(this[0 .. 1]) ||
m_nodes[0] == "\\" && !parentPath.startsWith(this[0 .. min(2, $)])))
{
return this;
}
}
int nup = 0;
while( parentPath.length > nup && !startsWith(parentPath[0 .. parentPath.length-nup]) ){
nup++;
}
Path ret = Path(null, false);
ret.m_endsWithSlash = true;
foreach( i; 0 .. nup ) ret ~= "..";
ret ~= Path(m_nodes[parentPath.length-nup .. $], false);
ret.m_endsWithSlash = this.m_endsWithSlash;
return ret;
}
/// The last entry of the path
@property ref immutable(PathEntry) head() const { enforce(m_nodes.length > 0); return m_nodes[$-1]; }
/// The parent path
@property Path parentPath() const { return this[0 .. length-1]; }
/// The ist of path entries of which this path is composed
@property immutable(PathEntry)[] nodes() const { return m_nodes; }
/// The number of path entries of which this path is composed
@property size_t length() const { return m_nodes.length; }
/// True if the path contains no entries
@property bool empty() const { return m_nodes.length == 0; }
/// Determines if the path ends with a slash (i.e. is a directory)
@property bool endsWithSlash() const { return m_endsWithSlash; }
/// ditto
@property void endsWithSlash(bool v) { m_endsWithSlash = v; }
/// Determines if this path goes outside of its base path (i.e. begins with '..').
@property bool external() const { return !m_absolute && m_nodes.length > 0 && m_nodes[0].m_name == ".."; }
ref immutable(PathEntry) opIndex(size_t idx) const { return m_nodes[idx]; }
Path opSlice(size_t start, size_t end) const {
auto ret = Path(m_nodes[start .. end], start == 0 ? absolute : false);
if( end == m_nodes.length ) ret.m_endsWithSlash = m_endsWithSlash;
return ret;
}
size_t opDollar(int dim)() const if(dim == 0) { return m_nodes.length; }
Path opBinary(string OP)(const Path rhs) const if( OP == "~" ) {
Path ret;
ret.m_nodes = m_nodes;
ret.m_absolute = m_absolute;
ret.m_endsWithSlash = rhs.m_endsWithSlash;
ret.normalize(); // needed to avoid "."~".." become "" instead of ".."
assert(!rhs.absolute, "Trying to append absolute path.");
size_t idx = m_nodes.length;
foreach(folder; rhs.m_nodes){
switch(folder.toString()){
default: ret.m_nodes = ret.m_nodes ~ folder; break;
case "", ".": break;
case "..":
enforce(!ret.absolute || ret.m_nodes.length > 0, "Relative path goes below root node!");
if( ret.m_nodes.length > 0 && ret.m_nodes[$-1].toString() != ".." )
ret.m_nodes = ret.m_nodes[0 .. $-1];
else ret.m_nodes = ret.m_nodes ~ folder;
break;
}
}
return ret;
}
Path opBinary(string OP)(string rhs) const if( OP == "~" ) { assert(rhs.length > 0, "Cannot append empty path string."); return opBinary!"~"(Path(rhs)); }
Path opBinary(string OP)(PathEntry rhs) const if( OP == "~" ) { assert(rhs.toString().length > 0, "Cannot append empty path string."); return opBinary!"~"(Path(rhs)); }
void opOpAssign(string OP)(string rhs) if( OP == "~" ) { assert(rhs.length > 0, "Cannot append empty path string."); opOpAssign!"~"(Path(rhs)); }
void opOpAssign(string OP)(PathEntry rhs) if( OP == "~" ) { assert(rhs.toString().length > 0, "Cannot append empty path string."); opOpAssign!"~"(Path(rhs)); }
void opOpAssign(string OP)(Path rhs) if( OP == "~" ) { auto p = this ~ rhs; m_nodes = p.m_nodes; m_endsWithSlash = rhs.m_endsWithSlash; }
/// Tests two paths for equality using '=='.
bool opEquals(ref const Path rhs) const {
if( m_absolute != rhs.m_absolute ) return false;
if( m_endsWithSlash != rhs.m_endsWithSlash ) return false;
if( m_nodes.length != rhs.length ) return false;
foreach( i; 0 .. m_nodes.length )
if( m_nodes[i] != rhs.m_nodes[i] )
return false;
return true;
}
/// ditto
bool opEquals(const Path other) const { return opEquals(other); }
int opCmp(ref const Path rhs) const {
if( m_absolute != rhs.m_absolute ) return cast(int)m_absolute - cast(int)rhs.m_absolute;
foreach( i; 0 .. min(m_nodes.length, rhs.m_nodes.length) )
if( m_nodes[i] != rhs.m_nodes[i] )
return m_nodes[i].opCmp(rhs.m_nodes[i]);
if( m_nodes.length > rhs.m_nodes.length ) return 1;
if( m_nodes.length < rhs.m_nodes.length ) return -1;
return 0;
}
hash_t toHash()
const nothrow @trusted {
hash_t ret;
auto strhash = &typeid(string).getHash;
try foreach (n; nodes) ret ^= strhash(&n.m_name);
catch assert(false);
if (m_absolute) ret ^= 0xfe3c1738;
if (m_endsWithSlash) ret ^= 0x6aa4352d;
return ret;
}
}
struct PathEntry {
private {
string m_name;
}
this(string str)
{
assert(str.countUntil('/') < 0 && (str.countUntil('\\') < 0 || str.length == 1));
m_name = str;
}
string toString() const { return m_name; }
Path opBinary(string OP)(PathEntry rhs) const if( OP == "~" ) { return Path(cast(immutable)[this, rhs], false); }
bool opEquals(ref const PathEntry rhs) const { return m_name == rhs.m_name; }
bool opEquals(PathEntry rhs) const { return m_name == rhs.m_name; }
bool opEquals(string rhs) const { return m_name == rhs; }
int opCmp(ref const PathEntry rhs) const { return m_name.cmp(rhs.m_name); }
int opCmp(string rhs) const { return m_name.cmp(rhs); }
}
private bool isValidFilename(string str)
{
foreach( ch; str )
if( ch == '/' || /*ch == ':' ||*/ ch == '\\' ) return false;
return true;
}
/// Joins two path strings. subpath must be relative.
string joinPath(string basepath, string subpath)
{
Path p1 = Path(basepath);
Path p2 = Path(subpath);
return (p1 ~ p2).toString();
}
/// Splits up a path string into its elements/folders
PathEntry[] splitPath(string path)
{
if( path.startsWith("/") || path.startsWith("\\") ) path = path[1 .. $];
if( path.empty ) return null;
if( path.endsWith("/") || path.endsWith("\\") ) path = path[0 .. $-1];
// count the number of path nodes
size_t nelements = 0;
foreach( i, char ch; path )
if( ch == '\\' || ch == '/' )
nelements++;
nelements++;
// reserve space for the elements
auto elements = new PathEntry[nelements];
size_t eidx = 0;
// detect UNC path
if(path.startsWith("\\"))
{
elements[eidx++] = PathEntry(path[0 .. 1]);
path = path[1 .. $];
}
// read and return the elements
size_t startidx = 0;
foreach( i, char ch; path )
if( ch == '\\' || ch == '/' ){
elements[eidx++] = PathEntry(path[startidx .. i]);
startidx = i+1;
}
elements[eidx++] = PathEntry(path[startidx .. $]);
assert(eidx == nelements);
return elements;
}
unittest
{
Path p;
assert(p.toNativeString() == ".");
p.endsWithSlash = true;
version(Windows) assert(p.toNativeString() == ".\\");
else assert(p.toNativeString() == "./");
p = Path("test/");
version(Windows) assert(p.toNativeString() == "test\\");
else assert(p.toNativeString() == "test/");
p.endsWithSlash = false;
assert(p.toNativeString() == "test");
}
unittest
{
{
auto unc = "\\\\server\\share\\path";
auto uncp = Path(unc);
uncp.normalize();
version(Windows) assert(uncp.toNativeString() == unc);
assert(uncp.absolute);
assert(!uncp.endsWithSlash);
}
{
auto abspath = "/test/path/";
auto abspathp = Path(abspath);
assert(abspathp.toString() == abspath);
version(Windows) {} else assert(abspathp.toNativeString() == abspath);
assert(abspathp.absolute);
assert(abspathp.endsWithSlash);
assert(abspathp.length == 2);
assert(abspathp[0] == "test");
assert(abspathp[1] == "path");
}
{
auto relpath = "test/path/";
auto relpathp = Path(relpath);
assert(relpathp.toString() == relpath);
version(Windows) assert(relpathp.toNativeString() == "test\\path\\");
else assert(relpathp.toNativeString() == relpath);
assert(!relpathp.absolute);
assert(relpathp.endsWithSlash);
assert(relpathp.length == 2);
assert(relpathp[0] == "test");
assert(relpathp[1] == "path");
}
{
auto winpath = "C:\\windows\\test";
auto winpathp = Path(winpath);
version(Windows) {
assert(winpathp.toString() == "C:/windows/test", winpathp.toString());
assert(winpathp.toNativeString() == winpath);
} else {
assert(winpathp.toString() == "/C:/windows/test", winpathp.toString());
assert(winpathp.toNativeString() == "/C:/windows/test");
}
assert(winpathp.absolute);
assert(!winpathp.endsWithSlash);
assert(winpathp.length == 3);
assert(winpathp[0] == "C:");
assert(winpathp[1] == "windows");
assert(winpathp[2] == "test");
}
{
auto dotpath = "/test/../test2/././x/y";
auto dotpathp = Path(dotpath);
assert(dotpathp.toString() == "/test/../test2/././x/y");
dotpathp.normalize();
assert(dotpathp.toString() == "/test2/x/y");
}
{
auto dotpath = "/test/..////test2//./x/y";
auto dotpathp = Path(dotpath);
assert(dotpathp.toString() == "/test/..////test2//./x/y");
dotpathp.normalize();
assert(dotpathp.toString() == "/test2/x/y");
}
{
auto parentpath = "/path/to/parent";
auto parentpathp = Path(parentpath);
auto subpath = "/path/to/parent/sub/";
auto subpathp = Path(subpath);
auto subpath_rel = "sub/";
assert(subpathp.relativeTo(parentpathp).toString() == subpath_rel);
auto subfile = "/path/to/parent/child";
auto subfilep = Path(subfile);
auto subfile_rel = "child";
assert(subfilep.relativeTo(parentpathp).toString() == subfile_rel);
}
{ // relative paths across Windows devices are not allowed
version (Windows) {
auto p1 = Path("\\\\server\\share"); assert(p1.absolute);
auto p2 = Path("\\\\server\\othershare"); assert(p2.absolute);
auto p3 = Path("\\\\otherserver\\share"); assert(p3.absolute);
auto p4 = Path("C:\\somepath"); assert(p4.absolute);
auto p5 = Path("C:\\someotherpath"); assert(p5.absolute);
auto p6 = Path("D:\\somepath"); assert(p6.absolute);
assert(p4.relativeTo(p5) == Path("../somepath"));
assert(p4.relativeTo(p6) == Path("C:\\somepath"));
assert(p4.relativeTo(p1) == Path("C:\\somepath"));
assert(p1.relativeTo(p2) == Path("../share"));
assert(p1.relativeTo(p3) == Path("\\\\server\\share"));
assert(p1.relativeTo(p4) == Path("\\\\server\\share"));
}
}
}
|
D
|
//Written in the D programming language
/**
gen_uni is a quick & dirty source code generator for unicode datastructures
*/
import fred;
import std.ascii, std.stdio, std.conv, std.algorithm,
std.array, std.format, std.string, std.bitmanip,
std.range;
import core.bitop;
CodepointSet[int] casefold;//entries by delta
CodepointSet[string] props;
string[string] aliases;
CodepointSet[string] normalization;
string[] blacklist = [ ];
enum mixedCCEntry = q{
struct CommonCaseEntry
{
dchar start, end;
uint op;
@property uint delta() const { return op & 0xFF_FFFF; }
@property uint xor()const { return op & doXor; }
@property uint neg()const { return op & doMinus; }
enum doXor = 1<<31, doMinus = 1<<30;
}
};
mixin(mixedCCEntry);
void scanUniData(alias Fn)(string name, Regex!char r)
{
foreach(line; File(name).byLine)
{
auto m = match(line, r);
if(!m.empty)
Fn(m);
}
}
void main(string[] argv)
{
writeln("//Written in the D programming language
/**
* Fast Regular expressions for D
*
* License: $(WEB boost.org/LICENSE_1_0.txt, Boost License 1.0).
*
* Authors: Dmitry Olshansky
*
*/
//Automatically generated from Unicode Character Database files
import fred;");
loadCaseFolding("Casefolding.txt");
loadBlocks("Blocks.txt");
loadProperties("PropList.txt");
loadProperties("DerivedGeneralCategory.txt");
loadProperties("DerivedCoreProperties.txt");
loadProperties("Scripts.txt");
loadNormalization("DerivedNormalizationProps.txt");
writeCaseFolding();
writeProperties();
writeNormalization();
}
void loadCaseFolding(string name)
{
uint[uint] hash;
auto r = regex("([^;]*); [CS];\\s*([^;]*);");
auto f = File(name);
foreach(line; f.byLine)
{
auto m = match(line, r);
if(!m.empty)
{
auto s1 = m.captures[1];
auto s2 = m.captures[2];
auto a1 = parse!uint(s1, 16);
auto a2 = parse!uint(s2, 16);
hash[a1] = a2;
}
}
foreach(k, v; hash)
{
auto d = cast(int)k - cast(int)v;
uint val;
if(d > 0 )
val = v;
else
{
val = k;
d = -d;
}
//store as lesser codepoint interval + positive delta
if(d !in casefold)
casefold[d] = CodepointSet.init;
casefold[d].add(val);
}
auto copy = casefold[1].dup;
//merge for first bit flipped intervals
foreach(ch; copy[])
{
casefold[1].add(1 + ch);
}
}
void loadBlocks(string f)
{
auto r = regex(`^([0-9A-F]+)\.\.([0-9A-F]+);\s*(.*)\s*$`);
scanUniData!((m){
auto s1 = m.captures[1];
auto s2 = m.captures[2];
auto a1 = parse!uint(s1, 16);
auto a2 = parse!uint(s2, 16);
props["In"~to!string(m.captures[3])] = CodepointSet([a1, a2+1]);
})(f, r);
}
void loadProperties(string inp)
{
auto r = regex(`^(?:(?:([0-9A-F]+)\.\.([0-9A-F]+)|([0-9A-F]+))\s*;\s*([a-zA-Z_0-9]*)\s*#|# [a-zA-Z_0-9]+=([a-zA-Z_0-9]+))`);
string aliasStr;
scanUniData!((m){
auto name = to!string(m.captures[4]);
if(!m.captures[5].empty)
aliasStr = to!string(m.captures[5]);
else if(!m.captures[1].empty)
{
auto sa = m.captures[1];
auto sb = m.captures[2];
uint a = parse!uint(sa, 16);
uint b = parse!uint(sb, 16);
if(name !in props)
props[name] = CodepointSet.init;
props[name].add(Interval(a,b));
if(!aliasStr.empty)
{
aliases[name] = aliasStr;
aliasStr = "";
}
}
else if(!m.captures[3].empty)
{
auto sx = m.captures[3];
uint x = parse!uint(sx, 16);
if(name !in props)
props[name] = CodepointSet.init;
props[name].add(x);
if(!aliasStr.empty)
{
aliases[name] = aliasStr;
aliasStr = "";
}
}
})(inp, r);
}
void loadNormalization(string inp)
{
auto r = regex(`^(?:([0-9A-F]+)\.\.([0-9A-F]+)|([0-9A-F]+))\s*;\s*(NFC_QC)\s*;\s*([NM])|#\s*[a-zA-Z_0-9]+=([a-zA-Z_0-9]+)`);
string aliasStr;
scanUniData!((m){
auto name = to!string(m.captures[4]) ~ to!string(m.captures[5]);
/*if(!m.captures[6].empty)
aliasStr = to!string(m.captures[6]);
else*/ if(!m.captures[1].empty)
{
auto sa = m.captures[1];
auto sb = m.captures[2];
uint a = parse!uint(sa, 16);
uint b = parse!uint(sb, 16);
if(name !in normalization)
normalization[name] = CodepointSet.init;
normalization[name].add(Interval(a,b));
}
else if(!m.captures[3].empty)
{
auto sx = m.captures[3];
uint x = parse!uint(sx, 16);
if(name !in normalization)
normalization[name] = CodepointSet.init;
normalization[name].add(x);
}
//stderr.writeln(m.hit);
})(inp, r);
}
string charsetString(in CodepointSet set, string sep=";\n")
{
auto app = appender!(char[])();
formattedWrite(app,"CodepointSet([\n");
foreach(ival; set.byInterval)
formattedWrite(app, " 0x%05x, 0x%05x,\n", ival.begin, ival.end);
formattedWrite(app, "])%s\n",sep);
return cast(string)app.data;
}
void writeCaseFolding()
{
writeln(mixedCCEntry, "
//sorted by .start, however they do intersect
immutable commonCaseTable = [");
CommonCaseEntry[] table;
foreach(k, v; casefold)
{
CommonCaseEntry e;
foreach(ival; v.byInterval)
{
auto xored = map!((x){ return x ^ k; })(iota(ival.begin,ival.end));
auto plused = map!((x){ return x + k; })(iota(ival.begin,ival.end));
e.start = ival.begin;
e.end = ival.end;
e.op = k;
if(equal(xored, plused) || k == 1)
{
e.op |= CommonCaseEntry.doXor;
table ~= e;
if(k != 1)
table ~= CommonCaseEntry(e.start+k, e.end+k, e.op);
}
else
{
table ~= e;
table ~= CommonCaseEntry(e.start+k, e.end+k, CommonCaseEntry.doMinus | e.op);
}
}
}
alias uint[4] ebh;
ebh[] mapper = new ebh[0x11_0000];
foreach(v; table)
{
int i;
foreach(ch; iota(cast(uint)v.start, cast(uint)v.end))
{
for(i=0; i<4;i++)
if(!mapper[ch][i])
{
mapper[ch][i] = v.op;
break;
}
assert(i != 4);
}
}
table.length = 0;
uint cur = 0;
for(uint i=1; i<mapper.length;i++)
{
if(mapper[cur] != mapper[i])
{
foreach(v; mapper[cur][])
if(v)
table ~= CommonCaseEntry(cur, i, v);
cur = i;
}
}
for(size_t i=0; i<table.length; i++)
for(size_t j=i+1;j<table.length; j++)
{
assert(table[i].start <= table[j].start);
assert(table[i].end <= table[j].end);
}
foreach(e; table)
{
writefln("CommonCaseEntry(0x%05x, 0x%05x, %s),", e.start, e.end, e.op);
}
writeln("];\n");
}
string identName(string s)
{
auto app = appender!(char[])();
foreach(c; s)
if(c == '-' || c == ' ')
app.put('_');
else
app.put(c);
return cast(string)app.data;
}
string uniformName(string s)
{
auto app = appender!(char[])();
foreach(c; s)
if(c != '-' && c != ' ' && c != '_')
app.put(toLower(c));
return cast(string)app.data;
}
void writeProperties()
{
File hashf = File("HashKeys.txt", "wb");
writeln("struct UnicodeProperty
{
string name;
immutable CodepointSet set;
}");
foreach(k, v; props)
{
if(countUntil(blacklist, k) < 0)
{
writef("immutable(CodepointSet) unicode%s = ", identName(k));
write(charsetString(v));
}
}
write("immutable(UnicodeProperty)[] unicodeProperties = [\n");
string[] lines;
string[] hashLines;
auto app = appender!(char[])();
auto keys = props.keys;
foreach(k; keys)
{
if(countUntil(blacklist, k) < 0)
{
formattedWrite(app, "UnicodeProperty(\"%s\", unicode%s),\n", k, identName(k));
lines ~= app.data.idup;
hashLines ~= uniformName(k);
app.shrinkTo(0);
if(k in aliases)
{
stderr.writeln(aliases[k]);
formattedWrite(app, "UnicodeProperty(\"%s\", unicode%s),\n",aliases[k], identName(k));
lines ~= app.data.idup;
hashLines ~= uniformName(aliases[k]);
app.shrinkTo(0);
}
}
}
assert(hashLines.length ==lines.length);
int[] index = new int[lines.length];
makeIndex!propertyNameLess(lines, index);
foreach(i, v; lines)
{
//auto j = countUntil(globalIndex, i);
//write(lines[j]);
write(lines[index[i]]);
hashf.writeln(hashLines[index[i]]);
}
writeln("];");
}
void writeNormalization()
{
foreach(key, value; normalization)
{
writef("immutable %s = %s",key, charsetString(value));
}
}
|
D
|
/**
* Authors: Oliver Rümpelein
* Date: 2016-01-24
* License: MIT
*/
module queryparser;
import std.exception: enforce;
import kxml.xml;
/**********
* Parse `text` for XML-Node `argument`.
*/
class QueryParser {
private:
string result;
public:
/**
* Construct a QueryParser.
*
* Params:
* text = String containing XML-text to be parsed
* argument = Name of tag to seach for
*
* Enforces:
* `text` has to be valid XML and (currently) must contain exactly one leaf of type `result`
*/
this(in string text, in string argument) {
auto xml= readDocument(text);
auto xmlResult = xml.parseXPath("//"~argument);
enforce(xmlResult.length == 1);
auto node = xmlResult[0];
result = node.getCData();
}
/**
* Returns the CData found in `text` below `argument`
*/
override string toString() const {
return result;
}
}
|
D
|
instance Mod_747_MIL_Rangar_NW (Npc_Default)
{
// ------ NSC ------
name = "Rangar";
guild = GIL_OUT;
id = 747;
voice = 7;
flags = 0;
npctype = NPCTYPE_MAIN;
// ------ Attribute ------
B_SetAttributesToChapter (self, 4);
aivar[AIV_ToughGuy] = TRUE;
// ------ Kampf-Taktik ------
fight_tactic = FAI_HUMAN_STRONG;
// ------ Equippte Waffen ------
EquipItem (self, ItMw_Milizschwert);
CreateInvItems (self,ItKe_City_Tower_02,1);
// ------ Inventory ------
B_CreateAmbientInv (self);
// ------ visuals ------
B_SetNpcVisual (self, MALE, "Hum_Head_Bald", Face_N_Tough_Skip, BodyTex_N, ITAR_MIL_L);
Mdl_SetModelFatness (self,0);
Mdl_ApplyOverlayMds (self, "Humans_Militia.mds");
// ------ NSC-relevante Talente vergeben ------
B_GiveNpcTalents (self);
// ------ Kampf-Talente ------
B_SetFightSkills (self, 40);
// ------ TA anmelden ------
daily_routine = Rtn_Start_747;
};
FUNC VOID Rtn_Start_747()
{
TA_Stand_Drinking (08,00,20,00,"NW_CITY_BEER_06");
TA_Stand_Drinking (20,00,08,00,"NW_CITY_BEER_06");
};
FUNC VOID Rtn_Pass_747 ()
{
TA_Stand_ArmsCrossed (08,00,22,00,"NW_PASS_GATE_01");
TA_Stand_ArmsCrossed (22,00,08,00,"NW_PASS_GATE_01");
};
FUNC VOID Rtn_AtNandor_747 ()
{
TA_Sit_Campfire (08,00,23,00,"WP_NANDOR_TENT_01");
TA_Sit_Campfire (23,00,08,00,"WP_NANDOR_TENT_01");
};
FUNC VOID Rtn_Freibier_747()
{
TA_Smalltalk_Plaudern (08,00,20,00,"NW_CITY_BEER_04");
TA_Smalltalk_Plaudern (20,00,08,00,"NW_CITY_BEER_04");
};
|
D
|
/Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/TemplateKit.build/Utilities/Exports.swift.o : /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateData.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateEmbed.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Deprecated.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSource.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataStorage.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/ASTCache.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataRepresentable.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/HTMLEscape.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntaxType.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Uppercase.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Lowercase.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Capitalize.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateTag.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConditional.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateCustom.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateExpression.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Var.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataEncoder.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIdentifier.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateByteScanner.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateRenderer.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagRenderer.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/PlaintextRenderer.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/ViewRenderer.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateParser.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateSerializer.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/TemplateError.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIterator.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Contains.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/Exports.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/DateFormat.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConstant.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Comment.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Print.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Count.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateDataContext.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagContext.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Raw.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateRaw.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/View.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntax.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/swift-nio-zlib-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/TemplateKit.build/Utilities/Exports~partial.swiftmodule : /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateData.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateEmbed.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Deprecated.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSource.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataStorage.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/ASTCache.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataRepresentable.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/HTMLEscape.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntaxType.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Uppercase.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Lowercase.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Capitalize.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateTag.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConditional.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateCustom.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateExpression.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Var.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataEncoder.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIdentifier.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateByteScanner.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateRenderer.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagRenderer.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/PlaintextRenderer.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/ViewRenderer.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateParser.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateSerializer.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/TemplateError.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIterator.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Contains.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/Exports.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/DateFormat.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConstant.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Comment.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Print.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Count.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateDataContext.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagContext.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Raw.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateRaw.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/View.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntax.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/swift-nio-zlib-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/TemplateKit.build/Utilities/Exports~partial.swiftdoc : /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateData.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateEmbed.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Deprecated.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSource.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataStorage.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/ASTCache.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataRepresentable.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/HTMLEscape.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntaxType.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Uppercase.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Lowercase.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Capitalize.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateTag.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConditional.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateCustom.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateExpression.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Var.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataEncoder.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIdentifier.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateByteScanner.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateRenderer.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagRenderer.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/PlaintextRenderer.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/ViewRenderer.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateParser.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateSerializer.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/TemplateError.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIterator.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Contains.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/Exports.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/DateFormat.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConstant.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Comment.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Print.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Count.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateDataContext.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagContext.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Raw.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateRaw.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/View.swift /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntax.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/nathanwhite/Desktop/vaporserver/simpleVapor/.build/checkouts/swift-nio-zlib-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
FoldExpression:
__Fold(AccumulatorDecl $(OPT = Expression); FoldLoopDecl => NextExpression)
FoldLoopDecl:
foreach(Identifier; SeqExpression)
foreach(Identifier; LwrExpression .. UprExpression)
AccumulatorDecl:
Identifier
BasicType Identifier
alias Identifier
Identifier...
alias Map(alias Tem, S...) =
__Fold(Acc...; foreach(E; S) => AliasSeq!(Acc, Tem!E))
/// this file makes extensive use of bool converting to 0 or 1
// pred!E gives 0 or 1
alias Filter(alias pred, S...) =
__Fold(Acc...; foreach(E; S) => AliasSeq!(Acc, AliasSeq!E[0..pred!E]));
alias NoDuplicates(S...) =
__Fold(Acc...; foreach(E; S) =>
AliasSeq!(Acc, AliasSeq!E[0..staticIndexOf!(E, Acc) == -1]));
/// we can't implement short-circuit staticIndexOf just with foreach
FoldLoopDecl~=
FoldLoopDecl while (Expression)
/// stop evaluating when the while condition is no longer true
// isSame may be expensive, so avoid more instantiation after first match
enum staticIndexOf(alias A, S...) =
__Fold(int acc = -1; foreach(i, E; S) while (acc == -1)
=> [-1, i][isSame!(A, E)]);
/// we can't implement std.traits.fullyQualifiedName with foreach
/// make the accumulator include other info as additional element(s)
FoldLoopDecl~=
while (Expression)
// Use the accumulator length to index S
alias Map(alias Tem, S...) =
__Fold(Acc...; while (Acc.length != S.length) =>
AliasSeq!(Acc, Tem!(S[Acc.length])));
/// the following examples are hard to read, see the next grammar
/// variant for better syntax
// although this form allows a NextExpression of int[2] rather than an AliasSeq
// acc is (sIndex, matchIndex)
enum staticIndexOf(alias A, S...) =
__Fold(int[2] acc = [0, -1]; while (acc[1] == -1 && acc[0] != S.length)
=> [acc[0] + 1, [-1, acc[0]][isSame!(A, S[acc[0]])]])[1];
// similar to std.traits.fullyQualifiedName (the real version would
// instantiate a formatting template instead of using stringof).
// use a 2-element AliasSeq for the AccumulatorDecl as A is not a value
enum fqn(alias A) =
__Fold(Acc... = AliasSeq!(A.stringof, A);
while (__traits(compiles(parent, Acc[1]))) =>
AliasSeq!(__traits(parent, Acc[1]).stringof ~ '.' ~ Acc[0],
__traits(parent, Acc[1])))[0];
/// this form allows separate naming of each component of the accumulator above
AccumulatorDecl~=
AccumulatorDecl; AccumulatorDecl
/// each NextExpression is unpacked to match the AccumulatorDecls
/// Limitation: Only one AccumulatorDecl can be a sequence
enum staticIndexOf(alias A, S...) =
__Fold(int acc = -1; uint i = 0; while (acc == -1 && i != S.length)
=> AliasSeq!([-1, i][isSame!(A, S[i])], i + 1))[0];
enum fqn(alias A) =
__Fold(string acc = A.stringof; alias S = A;
while (__traits(compiles(parent, S))) =>
AliasSeq!(__traits(parent, S).stringof ~ '.' ~ acc,
__traits(parent, S)))[0];
/// branchless style here is repetitive, see Block form at end
template Merge(alias Less, uint half, S...)
{
alias Result = __Fold(uint i = 0; uint j = half; Acc...;
while (i != half && j != S.length)
=> AliasSeq!(
i + Less!(S[i], S[j]),
j + !Less!(S[i], S[j]), Acc,
AliasSeq!(S[i], S[j])[Less!(S[i], S[j])]));
// fold handles min(half, S.length - half) elements of S
// then append any remaining elements
alias Merge = AliasSeq!(Result[2..$],
S[Result[0]..half], S[Result[1]..$]);
}
/// this form separates the loop logic from the NextExpression
FoldLoopDecl~=
for(Declaration; Expression; AssignExpression)
alias Map(alias Tem, S...) =
__Fold(Acc...; for (uint i = 0; i != S.length; i++) =>
AliasSeq!(Acc, Tem!(S[i])));
enum staticIndexOf(alias A, S...) =
__Fold(int acc = -1; for (uint i = 0; acc == -1 && i != S.length; i++)
=> [-1, i][isSame!(A, S[i])]);
enum fqn(alias A) =
__Fold(string acc = A.stringof;
for (alias S = A;
__traits(compiles(parent, S)); S = __traits(parent, S))
=> __traits(parent, S).stringof ~ '.' ~ acc);
/// can't implement Merge because i,j are incremented independently
FoldExpression:
__Fold(AccumulatorDecls) if (Expression) {FoldStatements}
FoldStatement:
__Fold!(Expressions);
static if (Expression) FoldStatement else FoldStatement
enum Identifier = Expression; FoldStatement
alias Identifier = Expression; FoldStatement
alias Map(alias Tem, S...) =
__Fold(Acc...) if (Acc.length != S.length) {
__Fold!(Acc, Tem!(S[Acc.length]));
};
// same
alias Map(alias Tem, S...) =
__Fold(uint i = 0; Acc...) if (i != S.length) {
__Fold!(i + 1, Acc, Tem!(S[i]));
}[1..$];
alias Filter(alias pred, S...) =
__Fold(uint i = 0; Acc...) if (i != S.length) {
static if (pred!(S[i]))
__Fold!(i + 1, Acc, S[i]);
else
__Fold!(i + 1, Acc);
}[1..$];
enum anySatisfy(alias pred, S...) =
__Fold(bool found = false; uint i = 0)
if (!found && i != S.length) {
static if (pred!(S[i]))
__Fold!(true, i);
else
__Fold!(false, i + 1);
}[0];
enum staticIndexOf(alias A, S...) =
__Fold(bool found = false, uint i = 0)
while (!found && i != S.length)
{
static if (isSame!(A, S[i]))
__Fold!(true, i));
else
__Fold!(false, i + 1);
}[1];
// AssignExpression style (harder for compiler, order of eval issues)
enum staticIndexOf(alias A, S...) =
__Fold(bool found = false, uint i = 0)
while(!found && i != S.length) {
static if (isSame!(A, S[i]))
found = true;
else
i++;
}.i;
// closer to nested template - see foldtpl.d
enum staticIndexOf(alias A, S...) =
__Fold(uint i = 0)
{
static if (i != S.length)
{
static if (isSame!(A, S[i]))
i;
else
__Fold!(i + 1);
}
else -1;
};
alias NoDuplicates(S...) =
__Fold(uint i = 0; Acc...) if (i != S.length) {
static if (staticIndexOf!(E, Acc) == -1)
__Fold!(i + 1, Acc);
else
__Fold!(i + 1, Acc, S[i]);
}[1..$];
enum fqn(alias A) =
__Fold(string acc = A.stringof; alias S = A)
if (__traits(compiles(parent, S))) {
__Fold!(__traits(parent, S).stringof ~ '.' ~ acc,
__traits(parent, S));
}[0];
template Merge(alias Less, uint half, S...)
{
alias Result = __Fold(uint i = 0; uint j = half; Acc...)
if (i != half && j != S.length) {
static if (Less!(S[i], S[j]))
__Fold!(i + 1, j, Acc, S[i]);
else
__Fold!(i, j + 1, Acc, S[j]);
};
// fold handles min(half, S.length - half) elements of S
// then append any remaining elements
alias Merge = AliasSeq!(Result.Acc,
S[Result.i .. half], S[Result.j .. $]);
}
|
D
|
import original = dython;
import bootstrapped = dython3;
auto test(string code)() {
enum gen1code = original.dythonize(code);
enum gen3code = bootstrapped.dythonize(code);
static assert(gen1code == gen3code, "G1 != G3 for:\n" ~ code);
mixin(gen1code);
}
void main() {
test!q{
import std.algorithm.iteration
struct Point
public:
int x, y
Point myPoint = {
x: 0,
y: 1,
};//This semicolon is mandatory.
auto dg = (ref Point p)
p.x++
;
// ^ So is this one.
auto a = [myPoint]
a.each!dg()
assert(myPoint.x == 0)
assert(a[0].x == 1)
};
test!q{
//Valid yet weird.
enum six = ()
return 2 + 2 * 2
()
static assert(is(typeof(six) == int))
static assert(six == 6)
};
test!q{
import std.algorithm.sorting
auto arr = [-2, 1, 3]
alias predicate = (a, b) =>
a^^2 < b^^2
arr.sort!predicate()
assert(arr == [1, -2, 3])
};
test!q{
auto x = test!q{
//We need to go deeper!
auto y = test!q{
return 123
}
assert(y == 123)
return y + 1
}
assert(x == 124)
};
test!q{
static auto takesDelegate(int x, alias f, bool b)()
return f(x, b)
takesDelegate!(0, (a, b) {
assert(a == 0)
assert(b == true)
}, true)
};
}
|
D
|
import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric;
void main()
{
auto nmlx = readln.split.to!(int[]);
auto N = nmlx[0];
auto M = nmlx[1];
auto L = nmlx[2];
auto X = nmlx[3];
auto as = readln.split.to!(int[]);
auto DP = new int[][](2, M);
DP[0][] = int.max/3;
DP[0][0] = 0;
foreach (i; 0..N) {
auto i1 = i%2;
auto i2 = (i+1)%2;
DP[i2][] = int.max/3;
foreach (j; 0..M) {
DP[i2][j] = min(DP[i2][j], DP[i1][j]);
auto k = (j+as[i]) % M;
if (j + as[i] >= M) {
DP[i2][k] = min(DP[i2][k], DP[i1][j] + (j + as[i]) / M);
} else {
DP[i2][k] = min(DP[i2][k], DP[i1][j]);
}
}
}
writeln(DP[N%2][L] < X ? "Yes" : "No");
}
|
D
|
/Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Pods.build/Debug-iphonesimulator/RxCocoa.build/Objects-normal/x86_64/InfiniteSequence.o : /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/RxCocoa.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Deprecated.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/Observable+Bind.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/SharedSequence/ObservableConvertibleType+SharedSequence.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/SharedSequence/SchedulerType+SharedSequence.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/SharedSequence/SharedSequence.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/DataStructures/InfiniteSequence.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/DataSources/RxTableViewReactiveArrayDataSource.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/DataSources/RxCollectionViewReactiveArrayDataSource.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx+KVORepresentable.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx+RawRepresentable.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/SectionedViewDataSourceType.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxTableViewDataSourceType.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxCollectionViewDataSourceType.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxPickerViewDataSourceType.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/DelegateProxyType.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/DataStructures/Queue.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/DataStructures/PriorityQueue.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/DataStructures/Bag.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/Logging.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/RecursiveLock.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Signal/ObservableConvertibleType+Signal.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Signal/ControlEvent+Signal.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Signal/PublishRelay+Signal.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Signal/Signal.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/Platform.Darwin.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Signal/Signal+Subscription.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Driver/Driver+Subscription.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/Binder.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/KeyPathBinder.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/DataSources/RxPickerViewAdapter.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Driver/ObservableConvertibleType+Driver.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Driver/ControlEvent+Driver.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Driver/BehaviorRelay+Driver.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Driver/ControlProperty+Driver.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Driver/Driver.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable+CoreGraphics.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/DispatchQueue+Extensions.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/RxCocoaObjCRuntimeError+Extensions.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/SharedSequence/SharedSequence+Operators.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Events/ItemEvents.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/ControlTarget.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/RxTarget.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable+Swift.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/ControlEvent.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/TextInput.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UITextField+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSTextField+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/NSTextStorage+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UISwitch+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UILabel+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIControl+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSControl+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UISegmentedControl+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIPageControl+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIRefreshControl+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UINavigationItem+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIBarButtonItem+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UITabBarItem+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/URLSession+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIApplication+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIAlertAction+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIButton+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSButton+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UITabBar+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UISearchBar+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UISlider+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSSlider+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIDatePicker+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UISearchController+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UINavigationController+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UITabBarController+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIViewController+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIStepper+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/NotificationCenter+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIGestureRecognizer+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/NSLayoutConstraint+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIImageView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSImageView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UITableView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIScrollView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UICollectionView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIPickerView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIActivityIndicatorView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIProgressView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UITextView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSTextView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/Platform.Linux.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/SharedSequence/SharedSequence+Operators+arity.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/ControlProperty.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDataSourceProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDataSourceProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxPickerViewDataSourceProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/DelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTextStorageDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTabBarDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxSearchBarDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxSearchControllerDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxNavigationControllerDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTabBarControllerDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxScrollViewDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxPickerViewDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTextViewDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDataSourcePrefetchingProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDataSourcePrefetchingProxy.swift /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Metal.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/UIKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/RxSwift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Debug-iphonesimulator/RxRelay/RxRelay.framework/Modules/RxRelay.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Runtime/include/_RX.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/Target\ Support\ Files/RxCocoa/RxCocoa-umbrella.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/Target\ Support\ Files/RxSwift/RxSwift-umbrella.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/Target\ Support\ Files/RxRelay/RxRelay-umbrella.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/RxCocoa.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Runtime/include/_RXObjCRuntime.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Runtime/include/RxCocoaRuntime.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Runtime/include/_RXKVOObserver.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-Swift.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Debug-iphonesimulator/RxRelay/RxRelay.framework/Headers/RxRelay-Swift.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Runtime/include/_RXDelegateProxy.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Pods.build/Debug-iphonesimulator/RxCocoa.build/unextended-module.modulemap /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Pods.build/Debug-iphonesimulator/RxSwift.build/module.modulemap /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Pods.build/Debug-iphonesimulator/RxRelay.build/module.modulemap /Users/MohamedNawar/Desktop/sharzein/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit.modulemap /Users/MohamedNawar/Desktop/sharzein/build/Debug-iphonesimulator/FBSDKCoreKit/FBSDKCoreKit.modulemap /Users/MohamedNawar/Desktop/sharzein/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.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.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Pods.build/Debug-iphonesimulator/RxCocoa.build/Objects-normal/x86_64/InfiniteSequence~partial.swiftmodule : /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/RxCocoa.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Deprecated.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/Observable+Bind.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/SharedSequence/ObservableConvertibleType+SharedSequence.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/SharedSequence/SchedulerType+SharedSequence.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/SharedSequence/SharedSequence.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/DataStructures/InfiniteSequence.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/DataSources/RxTableViewReactiveArrayDataSource.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/DataSources/RxCollectionViewReactiveArrayDataSource.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx+KVORepresentable.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx+RawRepresentable.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/SectionedViewDataSourceType.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxTableViewDataSourceType.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxCollectionViewDataSourceType.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxPickerViewDataSourceType.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/DelegateProxyType.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/DataStructures/Queue.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/DataStructures/PriorityQueue.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/DataStructures/Bag.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/Logging.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/RecursiveLock.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Signal/ObservableConvertibleType+Signal.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Signal/ControlEvent+Signal.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Signal/PublishRelay+Signal.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Signal/Signal.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/Platform.Darwin.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Signal/Signal+Subscription.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Driver/Driver+Subscription.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/Binder.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/KeyPathBinder.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/DataSources/RxPickerViewAdapter.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Driver/ObservableConvertibleType+Driver.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Driver/ControlEvent+Driver.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Driver/BehaviorRelay+Driver.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Driver/ControlProperty+Driver.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Driver/Driver.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable+CoreGraphics.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/DispatchQueue+Extensions.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/RxCocoaObjCRuntimeError+Extensions.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/SharedSequence/SharedSequence+Operators.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Events/ItemEvents.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/ControlTarget.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/RxTarget.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable+Swift.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/ControlEvent.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/TextInput.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UITextField+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSTextField+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/NSTextStorage+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UISwitch+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UILabel+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIControl+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSControl+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UISegmentedControl+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIPageControl+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIRefreshControl+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UINavigationItem+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIBarButtonItem+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UITabBarItem+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/URLSession+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIApplication+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIAlertAction+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIButton+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSButton+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UITabBar+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UISearchBar+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UISlider+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSSlider+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIDatePicker+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UISearchController+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UINavigationController+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UITabBarController+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIViewController+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIStepper+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/NotificationCenter+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIGestureRecognizer+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/NSLayoutConstraint+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIImageView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSImageView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UITableView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIScrollView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UICollectionView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIPickerView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIActivityIndicatorView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIProgressView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UITextView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSTextView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/Platform.Linux.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/SharedSequence/SharedSequence+Operators+arity.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/ControlProperty.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDataSourceProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDataSourceProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxPickerViewDataSourceProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/DelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTextStorageDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTabBarDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxSearchBarDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxSearchControllerDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxNavigationControllerDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTabBarControllerDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxScrollViewDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxPickerViewDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTextViewDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDataSourcePrefetchingProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDataSourcePrefetchingProxy.swift /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Metal.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/UIKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/RxSwift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Debug-iphonesimulator/RxRelay/RxRelay.framework/Modules/RxRelay.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Runtime/include/_RX.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/Target\ Support\ Files/RxCocoa/RxCocoa-umbrella.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/Target\ Support\ Files/RxSwift/RxSwift-umbrella.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/Target\ Support\ Files/RxRelay/RxRelay-umbrella.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/RxCocoa.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Runtime/include/_RXObjCRuntime.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Runtime/include/RxCocoaRuntime.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Runtime/include/_RXKVOObserver.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-Swift.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Debug-iphonesimulator/RxRelay/RxRelay.framework/Headers/RxRelay-Swift.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Runtime/include/_RXDelegateProxy.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Pods.build/Debug-iphonesimulator/RxCocoa.build/unextended-module.modulemap /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Pods.build/Debug-iphonesimulator/RxSwift.build/module.modulemap /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Pods.build/Debug-iphonesimulator/RxRelay.build/module.modulemap /Users/MohamedNawar/Desktop/sharzein/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit.modulemap /Users/MohamedNawar/Desktop/sharzein/build/Debug-iphonesimulator/FBSDKCoreKit/FBSDKCoreKit.modulemap /Users/MohamedNawar/Desktop/sharzein/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.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.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Pods.build/Debug-iphonesimulator/RxCocoa.build/Objects-normal/x86_64/InfiniteSequence~partial.swiftdoc : /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/RxCocoa.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Deprecated.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/Observable+Bind.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/SharedSequence/ObservableConvertibleType+SharedSequence.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/SharedSequence/SchedulerType+SharedSequence.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/SharedSequence/SharedSequence.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/DataStructures/InfiniteSequence.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/DataSources/RxTableViewReactiveArrayDataSource.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/DataSources/RxCollectionViewReactiveArrayDataSource.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx+KVORepresentable.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx+RawRepresentable.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/SectionedViewDataSourceType.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxTableViewDataSourceType.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxCollectionViewDataSourceType.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxPickerViewDataSourceType.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/DelegateProxyType.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/DataStructures/Queue.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/DataStructures/PriorityQueue.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/DataStructures/Bag.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/Logging.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/RecursiveLock.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Signal/ObservableConvertibleType+Signal.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Signal/ControlEvent+Signal.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Signal/PublishRelay+Signal.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Signal/Signal.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/Platform.Darwin.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Signal/Signal+Subscription.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Driver/Driver+Subscription.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/Binder.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/KeyPathBinder.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/DataSources/RxPickerViewAdapter.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Driver/ObservableConvertibleType+Driver.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Driver/ControlEvent+Driver.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Driver/BehaviorRelay+Driver.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Driver/ControlProperty+Driver.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/Driver/Driver.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable+CoreGraphics.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/DispatchQueue+Extensions.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/RxCocoaObjCRuntimeError+Extensions.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/SharedSequence/SharedSequence+Operators.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Events/ItemEvents.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/ControlTarget.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/RxTarget.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable+Swift.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/ControlEvent.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/TextInput.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UITextField+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSTextField+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/NSTextStorage+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UISwitch+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UILabel+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIControl+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSControl+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UISegmentedControl+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIPageControl+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIRefreshControl+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UINavigationItem+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIBarButtonItem+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UITabBarItem+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/URLSession+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIApplication+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIAlertAction+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIButton+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSButton+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UITabBar+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UISearchBar+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UISlider+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSSlider+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIDatePicker+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UISearchController+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UINavigationController+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UITabBarController+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIViewController+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIStepper+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/NotificationCenter+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIGestureRecognizer+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/NSLayoutConstraint+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIImageView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSImageView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UITableView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIScrollView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UICollectionView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIPickerView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIActivityIndicatorView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UIProgressView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/UITextView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/macOS/NSTextView+Rx.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/Platform/Platform.Linux.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/SharedSequence/SharedSequence+Operators+arity.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Traits/ControlProperty.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDataSourceProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDataSourceProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxPickerViewDataSourceProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Common/DelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTextStorageDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTabBarDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxSearchBarDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxSearchControllerDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxNavigationControllerDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTabBarControllerDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxScrollViewDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxPickerViewDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTextViewDelegateProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDataSourcePrefetchingProxy.swift /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDataSourcePrefetchingProxy.swift /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Metal.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/UIKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/RxSwift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Debug-iphonesimulator/RxRelay/RxRelay.framework/Modules/RxRelay.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Runtime/include/_RX.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/Target\ Support\ Files/RxCocoa/RxCocoa-umbrella.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/Target\ Support\ Files/RxSwift/RxSwift-umbrella.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/Target\ Support\ Files/RxRelay/RxRelay-umbrella.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/RxCocoa.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Runtime/include/_RXObjCRuntime.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Runtime/include/RxCocoaRuntime.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Runtime/include/_RXKVOObserver.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-Swift.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Debug-iphonesimulator/RxRelay/RxRelay.framework/Headers/RxRelay-Swift.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/Pods/RxCocoa/RxCocoa/Runtime/include/_RXDelegateProxy.h /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Pods.build/Debug-iphonesimulator/RxCocoa.build/unextended-module.modulemap /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Pods.build/Debug-iphonesimulator/RxSwift.build/module.modulemap /Users/MohamedNawar/Desktop/MyMVVMRxSwiftExample/build/Pods.build/Debug-iphonesimulator/RxRelay.build/module.modulemap /Users/MohamedNawar/Desktop/sharzein/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit.modulemap /Users/MohamedNawar/Desktop/sharzein/build/Debug-iphonesimulator/FBSDKCoreKit/FBSDKCoreKit.modulemap /Users/MohamedNawar/Desktop/sharzein/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.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.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
module owlchain.meterics.meteredInterface;
import core.time;
import owlchain.meterics.metricProcessor;
interface MeteredInterface
{
Duration rate_unit();
string event_type();
long count();
double fifteen_minute_rate();
double five_minute_rate();
double one_minute_rate();
double mean_rate();
}
|
D
|
// Copyright Gushcha Anton 2012.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
/**
* License: Boost 1.0
* Authors: Gushcha Anton (NCrashed)
*
* Custom memory allocator to handle fixed-size memory chunks called pages.
*/
module util.allocators.pagepool;
import std.c.stdlib;
import std.c.string;
alias PagePool!1 CBuffer;
/**
* Class wrapper around memory pool of $(B pageSize) memory blocks. Provides
* interface for reallocating and relative pointer access.
*/
class PagePool(size_t pageSize)
{
this(size_t pageCount)
{
memoryPool = malloc(pageCount * pageSize);
mPageCount = pageCount;
}
this(size_t pageCount, void* memory)
{
this(pageCount);
memcpy(memoryPool, memory, pageCount*pageSize);
}
~this()
{
free(memoryPool);
}
void* memory() @property
{
return memoryPool;
}
size_t pageCount() @property
{
return mPageCount;
}
size_t memorySize() @property
{
return mPageCount*pageSize;
}
private
{
private void* memoryPool = null;
size_t mPageCount;
}
}
|
D
|
module PatcherLib;
import core.stdc.string;
import std.algorithm;
import std.net.curl;
import std.exception;
import std.file;
import std.digest.md;
import std.parallelism;
import std.range;
import std.stdio;
import std.string;
void log(T...)(string fmt, T args)
{
debug
{
stdout.writefln(fmt, args);
}
}
export extern (C) int GetFileCount(const char* directory)
{
try
{
log("GetFileCount: Opening %s", directory);
return dirEntries(cast(string)fromStringz(directory), "*", SpanMode.breadth).count!(x => x.isFile);
}
catch(Exception ex)
{
log("Error: %s", ex.msg);
return -1;
}
}
export extern (C) void GetFileList(const char* directory, int fileCount, int* fileListLengths, char** fileList)
{
try
{
log("GetFileCount: Opening %s", directory);
int i = 0;
if(fileList == null)
foreach(DirEntry file; dirEntries(cast(string)fromStringz(directory), "*", SpanMode.breadth).filter!(x => x.isFile))
fileListLengths[i++] = file.name.length+1;
else
foreach(DirEntry file; dirEntries(cast(string)fromStringz(directory), "*", SpanMode.breadth).filter!(x => x.isFile))
{
memcpy(fileList[i], toStringz(file.name), fileListLengths[i]);
++i;
}
if(i > fileCount)
{
throw new Exception(format("Number of files found (%i) is higher than expected file count (%i)", i, fileCount));
}
}
catch(Exception ex)
{
log("Error: %s", ex.msg);
}
}
// SF94 did it
ubyte[] HashFile(HashType)(in char* path) if (isDigest!HashType)
{
HashType hash;
hash.start();
File file = File(fromStringz(path), "rb");
if (!file.isOpen)
return null;
foreach (ubyte[] buffer; file.byChunk(0x8000))
hash.put(buffer);
file.close();
return hash.finish().dup;
}
alias char[32 + 1] md5string;
export extern (C) void GetMd5OfFile(const char* fileName, md5string* md5)
{
try
{
memcpy(cast(void*)md5, toStringz(toHexString(HashFile!MD5(fileName))), md5string.sizeof);
}
catch(Exception ex)
{
throw new Exception(format("Error: %s", ex.msg));
}
}
export extern (C) void GetMd5List(char** fileList, int fileCount, md5string* md5List, uint maxThreads)
{
try
{
if(maxThreads == 0)
maxThreads = totalCPUs;
auto pool = new TaskPool(maxThreads);
foreach(int i; pool.parallel(iota(0,fileCount-1)))
GetMd5OfFile(fileList[i], &md5List[i]);
pool.finish(true);
}
catch(Exception ex)
{
log("Error: %s", ex.msg);
}
}
export extern (C) void DownloadFile(const char* uri, const char* dest, const char* userAgent)
{
HTTP http = HTTP();
http.setUserAgent(fromStringz(userAgent));
download(fromStringz(uri), cast(string)fromStringz(dest), http);
}
export extern (C) void DownloadFiles(const char** uriList, const char** destList, int uriCount, const char* userAgent, uint maxThreads)
{
try
{
if(maxThreads == 0)
maxThreads = totalCPUs;
auto pool = new TaskPool(maxThreads);
foreach(int i; pool.parallel(iota(0,uriCount-1)))
DownloadFile(uriList[i], destList[i], userAgent);
pool.finish(true);
}
catch(Exception ex)
{
log("Error: %s", ex.msg);
}
}
|
D
|
module prova.math.vector4;
import prova.math;
import std.math;
///
struct Vector4
{
///
float x = 0;
///
float y = 0;
///
float z = 0;
///
float w = 0;
///
this(float x, float y, float z, float w)
{
set(x, y, z, w);
}
///
this(Vector3 vector)
{
set(vector.x, vector.y, vector.z, 0);
}
///
this(Vector2 vector)
{
set(vector.x, vector.y, 0, 0);
}
/// Sets the values of x, y, z, and w in a single statement
void set(float x, float y, float z, float w)
{
this.x = x;
this.y = y;
this.z = z;
this.w = w;
}
/// Creates a normalized vector with a random direction
static Vector4 random()
{
Vector4 vector = Vector4(
randomF(-1, 1),
randomF(-1, 1),
randomF(-1, 1),
randomF(-1, 1)
);
vector.normalize();
return vector;
}
///
@property Vector2 xy() const
{
return Vector2(x, y);
}
///
@property Vector3 xyz() const
{
return Vector3(x, y, z);
}
/// Returns a normalized copy of this vector
Vector4 getNormalized() const
{
const float magnitude = getMagnitude();
Vector4 result;
if(magnitude != 0) {
result.x = x / magnitude;
result.y = y / magnitude;
result.z = z / magnitude;
result.w = w / magnitude;
}
return result;
}
/// Normalizes the vector
void normalize()
{
const float magnitude = getMagnitude();
if(magnitude == 0)
return;
x = x / magnitude;
y = y / magnitude;
z = z / magnitude;
w = w / magnitude;
}
/// Returns the magnitude of the vector
float getMagnitude() const
{
return sqrt(x * x + y * y + z * z + w * w);
}
/**
* Sets the magnitude of this vector
*
* If the previous magnitude is zero, the x value
* of the vector will be set to the magnitude
*/
void setMagnitude(float magnitude)
{
if(getMagnitude() == 0) {
x = magnitude;
return;
}
normalize();
x *= magnitude;
y *= magnitude;
z *= magnitude;
w *= magnitude;
}
/// Returns the distance between the vectors
float distanceTo(Vector4 vector) const
{
const float a = vector.x - x;
const float b = vector.y - y;
const float c = vector.z - z;
const float d = vector.w - w;
return sqrt(a * a + b * b + c * c + d * d);
}
/// Returns the squared distance between the vectors
float distanceToSquared(Vector4 vector) const
{
const float a = vector.x - x;
const float b = vector.y - y;
const float c = vector.z - z;
const float d = vector.w - w;
return a * a + b * b + c * c + d * d;
}
/// Returns the dot product of the two vectors
float dot(Vector4 vector) const
{
return x * vector.x + y * vector.y + z * vector.z + w * vector.w;
}
// assignment overloading
///
Vector4 opAddAssign(Vector4 vector)
{
x += vector.x;
y += vector.y;
z += vector.z;
w += vector.w;
return this;
}
///
Vector4 opSubAssign(Vector4 vector)
{
x -= vector.x;
y -= vector.y;
z -= vector.z;
w -= vector.w;
return this;
}
///
Vector4 opMulAssign(Vector4 vector)
{
x *= vector.x;
y *= vector.y;
z *= vector.z;
w *= vector.w;
return this;
}
///
Vector4 opMulAssign(float a)
{
x *= a;
y *= a;
z *= a;
w *= a;
return this;
}
///
Vector3 opDiv(Vector3 vector)
{
Vector3 result;
result.x = x * vector.x;
result.y = y * vector.y;
result.z = z * vector.z;
return result;
}
///
Vector4 opDivAssign(Vector4 vector)
{
x /= vector.x;
y /= vector.y;
z /= vector.z;
w /= vector.w;
return this;
}
///
Vector4 opDivAssign(float a)
{
x /= a;
y /= a;
z /= a;
w /= a;
return this;
}
// arithmetic overloading
///
Vector4 opAdd(Vector4 vector) const
{
Vector4 result;
result.x = x + vector.x;
result.y = y + vector.y;
result.z = z + vector.z;
result.w = w + vector.w;
return result;
}
///
Vector4 opSub(Vector4 vector) const
{
Vector4 result;
result.x = x - vector.x;
result.y = y - vector.y;
result.z = z - vector.z;
result.w = w - vector.w;
return result;
}
///
Vector4 opUnary(string s)() const if (s == "-")
{
Vector4 result;
result.x = -x;
result.y = -y;
result.z = -z;
result.w = -w;
return result;
}
///
Vector4 opMul(Vector4 vector) const
{
Vector4 result;
result.x = x * vector.x;
result.y = y * vector.y;
result.z = z * vector.z;
result.w = w * vector.w;
return result;
}
///
Vector4 opMul(float a) const
{
Vector4 result;
result.x = x * a;
result.y = y * a;
result.z = z * a;
result.w = w * a;
return result;
}
///
Vector4 opDiv(Vector4 vector)
{
Vector4 result;
result.x = x / vector.x;
result.y = y / vector.y;
result.z = z / vector.z;
result.w = w / vector.w;
return result;
}
///
Vector4 opDiv(float a) const
{
Vector4 result;
result.x = x / a;
result.y = y / a;
result.z = z / a;
result.w = w / a;
return result;
}
///
void opAssign(Vector2 vector)
{
x = vector.x;
y = vector.y;
z = 0;
w = 0;
}
///
void opAssign(Vector3 vector)
{
x = vector.x;
y = vector.y;
z = vector.z;
w = 0;
}
}
|
D
|
/////////////////////////////////////////
// Flex /////////////////////////////////
/////////////////////////////////////////
instance PIR_1396_Addon_InExtremo_Flex(Npc_Default)
{
//-------- primary data --------
name = "Flex";
npctype = npctype_main;
guild = GIL_NONE;
level = 4;
flags = 0;
voice = 0;
id = 1396;
flags = NPC_FLAG_IMMORTAL;
//-------- abilities --------
attribute[ATR_STRENGTH] = 20;
attribute[ATR_DEXTERITY] = 10;
attribute[ATR_MANA_MAX] = 0;
attribute[ATR_MANA] = 0;
attribute[ATR_HITPOINTS_MAX] = 88;
attribute[ATR_HITPOINTS] = 88;
//-------- inventory --------
CreateInvItem (self, ItMi_IEDudelBlau);
//-------- visuals --------
// animations
Mdl_SetVisual (self, "HUMANS.MDS");
// Body-Mesh Body-Tex Skin-Color Head-MMS Head-Tex Teeth-Tex ARMOR
Mdl_SetVisualBody (self, "Hum_IE_Flex_INSTRUMENT", DEFAULT, DEFAULT, "HUM_HEAD_Flex", DEFAULT, DEFAULT, -1);
fight_tactic = FAI_HUMAN_STRONG;
Npc_SetTalentSkill (self,NPC_TALENT_1H,1);
// ------ TA anmelden ------
daily_routine = Rtn_Start_1396;
};
FUNC VOID Rtn_Start_1396 ()
{
TA_Concert (05,00,20,00,"OCR_IE_FLEX");
TA_Concert (20,00,05,00,"OCR_IE_FLEX");
};
|
D
|
module mach.sdl.init.sdl;
public:
import mach.sdl.init.sdl.sdl;
|
D
|
a mistake resulting from inattention
a break or intermission in the occurrence of something
a failure to maintain a higher state
pass into a specified state or condition
end, at least for a long time
drop to a lower level, as in one's morals or standards
go back to bad behavior
let slip
pass by
|
D
|
/**
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1999-2018 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/globals.d, _globals.d)
* Documentation: https://dlang.org/phobos/dmd_globals.html
* Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/globals.d
*/
module dmd.globals;
import core.stdc.stdint;
import core.stdc.stdio;
import dmd.root.array;
import dmd.root.filename;
import dmd.root.outbuffer;
import dmd.compiler;
import dmd.identifier;
template xversion(string s)
{
enum xversion = mixin(`{ version (` ~ s ~ `) return true; else return false; }`)();
}
enum IN_GCC = xversion!`IN_GCC`;
enum TARGET_LINUX = xversion!`linux`;
enum TARGET_OSX = xversion!`OSX`;
enum TARGET_FREEBSD = xversion!`FreeBSD`;
enum TARGET_OPENBSD = xversion!`OpenBSD`;
enum TARGET_SOLARIS = xversion!`Solaris`;
enum TARGET_WINDOS = xversion!`Windows`;
enum CHECKENABLE : ubyte
{
_default, // initial value
off, // never do checking
on, // always do checking
safeonly, // do checking only in @safe functions
}
enum CHECKACTION : ubyte
{
D, // call D assert on failure
C, // call C assert on failure
}
enum CPU
{
x87,
mmx,
sse,
sse2,
sse3,
ssse3,
sse4_1,
sse4_2,
avx, // AVX1 instruction set
avx2, // AVX2 instruction set
avx512, // AVX-512 instruction set
// Special values that don't survive past the command line processing
baseline, // (default) the minimum capability CPU
native // the machine the compiler is being run on
}
// Put command line switches in here
struct Param
{
bool obj = true; // write object file
bool link = true; // perform link
bool dll; // generate shared dynamic library
bool lib; // write library file instead of object file(s)
bool multiobj; // break one object file into multiple ones
bool oneobj; // write one object file instead of multiple ones
bool trace; // insert profiling hooks
bool tracegc; // instrument calls to 'new'
bool verbose; // verbose compile
bool vcg_ast; // write-out codegen-ast
bool showColumns; // print character (column) numbers in diagnostics
bool vtls; // identify thread local variables
bool vgc; // identify gc usage
bool vfield; // identify non-mutable field variables
bool vcomplex; // identify complex/imaginary type usage
ubyte symdebug; // insert debug symbolic information
bool symdebugref; // insert debug information for all referenced types, too
bool alwaysframe; // always emit standard stack frame
bool optimize; // run optimizer
bool map; // generate linker .map file
bool is64bit = (size_t.sizeof == 8); // generate 64 bit code; true by default for 64 bit dmd
bool isLP64; // generate code for LP64
bool isLinux; // generate code for linux
bool isOSX; // generate code for Mac OSX
bool isWindows; // generate code for Windows
bool isFreeBSD; // generate code for FreeBSD
bool isOpenBSD; // generate code for OpenBSD
bool isSolaris; // generate code for Solaris
bool hasObjectiveC; // target supports Objective-C
bool mscoff = false; // for Win32: write MsCoff object files instead of OMF
// 0: don't allow use of deprecated features
// 1: silently allow use of deprecated features
// 2: warn about the use of deprecated features
byte useDeprecated = 2;
bool useInvariants = true; // generate class invariant checks
bool useIn = true; // generate precondition checks
bool useOut = true; // generate postcondition checks
bool stackstomp; // add stack stomping code
bool useUnitTests; // generate unittest code
bool useInline = false; // inline expand functions
bool useDIP25; // implement http://wiki.dlang.org/DIP25
bool release; // build release version
bool preservePaths; // true means don't strip path from source file
// 0: disable warnings
// 1: warnings as errors
// 2: informational warnings (no errors)
byte warnings;
bool pic; // generate position-independent-code for shared libs
bool color = true; // use ANSI colors in console output
bool cov; // generate code coverage data
ubyte covPercent; // 0..100 code coverage percentage required
bool nofloat; // code should not pull in floating point support
bool ignoreUnsupportedPragmas; // rather than error on them
bool enforcePropertySyntax;
bool useModuleInfo = true; // generate runtime module information
bool useTypeInfo = true; // generate runtime type information
bool useExceptions = true; // support exception handling
bool betterC; // be a "better C" compiler; no dependency on D runtime
bool addMain; // add a default main() function
bool allInst; // generate code for all template instantiations
bool check10378; // check for issues transitioning to 10738
bool bug10378; // use pre- https://issues.dlang.org/show_bug.cgi?id=10378 search strategy
bool fix16997; // fix integral promotions for unary + - ~ operators
// https://issues.dlang.org/show_bug.cgi?id=16997
bool vsafe; // use enhanced @safe checking
bool ehnogc; // use @nogc exception handling
/** The --transition=safe switch should only be used to show code with
* silent semantics changes related to @safe improvements. It should not be
* used to hide a feature that will have to go through deprecate-then-error
* before becoming default.
*/
bool showGaggedErrors; // print gagged errors anyway
bool manual; // open browser on compiler manual
bool usage; // print usage and exit
bool mcpuUsage; // print help on -mcpu switch
bool transitionUsage; // print help on -transition switch
bool logo; // print compiler logo
CPU cpu = CPU.baseline; // CPU instruction set to target
CHECKENABLE useArrayBounds = CHECKENABLE._default; // when to generate code for array bounds checks
CHECKENABLE useAssert = CHECKENABLE._default; // when to generate code for assert()'s
CHECKENABLE useSwitchError = CHECKENABLE._default; // check for switches without a default
CHECKACTION checkAction; // action to take when bounds, asserts or switch defaults are violated
uint errorLimit = 20;
const(char)* argv0; // program name
Array!(const(char)*)* modFileAliasStrings; // array of char*'s of -I module filename alias strings
Array!(const(char)*)* imppath; // array of char*'s of where to look for import modules
Array!(const(char)*)* fileImppath; // array of char*'s of where to look for file import modules
const(char)* objdir; // .obj/.lib file output directory
const(char)* objname; // .obj file output name
const(char)* libname; // .lib file output name
bool doDocComments; // process embedded documentation comments
const(char)* docdir; // write documentation file to docdir directory
const(char)* docname; // write documentation file to docname
Array!(const(char)*) ddocfiles; // macro include files for Ddoc
bool doHdrGeneration; // process embedded documentation comments
const(char)* hdrdir; // write 'header' file to docdir directory
const(char)* hdrname; // write 'header' file to docname
bool hdrStripPlainFunctions = true; // strip the bodies of plain (non-template) functions
bool doJsonGeneration; // write JSON file
const(char)* jsonfilename; // write JSON file to jsonfilename
uint debuglevel; // debug level
Array!(const(char)*)* debugids; // debug identifiers
uint versionlevel; // version level
Array!(const(char)*)* versionids; // version identifiers
const(char)* defaultlibname; // default library for non-debug builds
const(char)* debuglibname; // default library for debug builds
const(char)* mscrtlib; // MS C runtime library
const(char)* moduleDepsFile; // filename for deps output
OutBuffer* moduleDeps; // contents to be written to deps file
// Hidden debug switches
bool debugb;
bool debugc;
bool debugf;
bool debugr;
bool debugx;
bool debugy;
bool run; // run resulting executable
Strings runargs; // arguments for executable
// Linker stuff
Array!(const(char)*) objfiles;
Array!(const(char)*) linkswitches;
Array!(const(char)*) libfiles;
Array!(const(char)*) dllfiles;
const(char)* deffile;
const(char)* resfile;
const(char)* exefile;
const(char)* mapfile;
}
alias structalign_t = uint;
// magic value means "match whatever the underlying C compiler does"
// other values are all powers of 2
enum STRUCTALIGN_DEFAULT = (cast(structalign_t)~0);
struct Global
{
const(char)* inifilename;
const(char)* mars_ext = "d";
const(char)* obj_ext;
const(char)* lib_ext;
const(char)* dll_ext;
const(char)* doc_ext = "html"; // for Ddoc generated files
const(char)* ddoc_ext = "ddoc"; // for Ddoc macro include files
const(char)* hdr_ext = "di"; // for D 'header' import files
const(char)* json_ext = "json"; // for JSON files
const(char)* map_ext = "map"; // for .map files
bool run_noext; // allow -run sources without extensions.
const(char)* copyright = "Copyright (C) 1999-2018 by The D Language Foundation, All Rights Reserved";
const(char)* written = "written by Walter Bright";
const(char)* main_d = "__main.d"; // dummy filename for dummy main()
Array!(const(char)*)* path; // Array of char*'s which form the import lookup path
Array!(const(char)*)* filePath; // Array of char*'s which form the file import lookup path
const(char)* _version;
Compiler compiler;
Param params;
uint errors; // number of errors reported so far
uint warnings; // number of warnings reported so far
FILE* stdmsg; // where to send verbose messages
uint gag; // !=0 means gag reporting of errors & warnings
uint gaggedErrors; // number of errors reported while gagged
void* console; // opaque pointer to console for controlling text attributes
Array!Identifier* versionids; // command line versions and predefined versions
Array!Identifier* debugids; // command line debug versions and predefined versions
/* Start gagging. Return the current number of gagged errors
*/
extern (C++) uint startGagging()
{
++gag;
return gaggedErrors;
}
/* End gagging, restoring the old gagged state.
* Return true if errors occurred while gagged.
*/
extern (C++) bool endGagging(uint oldGagged)
{
bool anyErrs = (gaggedErrors != oldGagged);
--gag;
// Restore the original state of gagged errors; set total errors
// to be original errors + new ungagged errors.
errors -= (gaggedErrors - oldGagged);
gaggedErrors = oldGagged;
return anyErrs;
}
/* Increment the error count to record that an error
* has occurred in the current context. An error message
* may or may not have been printed.
*/
extern (C++) void increaseErrorCount()
{
if (gag)
++gaggedErrors;
++errors;
}
extern (C++) void _init()
{
static if (TARGET_WINDOS)
{
obj_ext = "obj";
}
else static if (TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS)
{
obj_ext = "o";
}
else
{
static assert(0, "fix this");
}
static if (TARGET_WINDOS)
{
lib_ext = "lib";
}
else static if (TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS)
{
lib_ext = "a";
}
else
{
static assert(0, "fix this");
}
static if (TARGET_WINDOS)
{
dll_ext = "dll";
}
else static if (TARGET_LINUX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS)
{
dll_ext = "so";
}
else static if (TARGET_OSX)
{
dll_ext = "dylib";
}
else
{
static assert(0, "fix this");
}
static if (TARGET_WINDOS)
{
run_noext = false;
}
else static if (TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS)
{
// Allow 'script' D source files to have no extension.
run_noext = true;
}
else
{
static assert(0, "fix this");
}
_version = (import("VERSION") ~ '\0').ptr;
compiler.vendor = "Digital Mars D";
stdmsg = stdout;
}
}
// Because int64_t and friends may be any integral type of the
// correct size, we have to explicitly ask for the correct
// integer type to get the correct mangling with dmd
// Be careful not to care about sign when using dinteger_t
// use this instead of integer_t to
// avoid conflicts with system #include's
alias dinteger_t = ulong;
// Signed and unsigned variants
alias sinteger_t = long;
alias uinteger_t = ulong;
alias d_int8 = int8_t;
alias d_uns8 = uint8_t;
alias d_int16 = int16_t;
alias d_uns16 = uint16_t;
alias d_int32 = int32_t;
alias d_uns32 = uint32_t;
alias d_int64 = int64_t;
alias d_uns64 = uint64_t;
// file location
struct Loc
{
const(char)* filename;
uint linnum;
uint charnum;
nothrow:
extern (D) this(const(char)* filename, uint linnum, uint charnum)
{
this.linnum = linnum;
this.charnum = charnum;
this.filename = filename;
}
extern (C++) const(char)* toChars() const
{
OutBuffer buf;
if (filename)
{
buf.writestring(filename);
}
if (linnum)
{
buf.writeByte('(');
buf.print(linnum);
if (global.params.showColumns && charnum)
{
buf.writeByte(',');
buf.print(charnum);
}
buf.writeByte(')');
}
return buf.extractString();
}
extern (C++) bool equals(ref const(Loc) loc)
{
return (!global.params.showColumns || charnum == loc.charnum) && linnum == loc.linnum && FileName.equals(filename, loc.filename);
}
}
enum LINK : int
{
def, // default
d,
c,
cpp,
windows,
pascal,
objc,
system,
}
alias LINKdefault = LINK.def;
alias LINKd = LINK.d;
alias LINKc = LINK.c;
alias LINKcpp = LINK.cpp;
alias LINKwindows = LINK.windows;
alias LINKpascal = LINK.pascal;
alias LINKobjc = LINK.objc;
alias LINKsystem = LINK.system;
enum CPPMANGLE : int
{
def,
asStruct,
asClass,
}
alias CPPMANGLEdefault = CPPMANGLE.def;
alias CPPMANGLEstruct = CPPMANGLE.asStruct;
alias CPPMANGLEclass = CPPMANGLE.asClass;
enum MATCH : int
{
nomatch, // no match
convert, // match with conversions
constant, // match with conversion to const
exact, // exact match
}
enum PINLINE : int
{
def, // as specified on the command line
never, // never inline
always, // always inline
}
alias PINLINEdefault = PINLINE.def;
alias PINLINEnever = PINLINE.never;
alias PINLINEalways = PINLINE.always;
alias StorageClass = uinteger_t;
extern (C++) __gshared Global global;
|
D
|
module hunt.http.codec.websocket.decode.Parser;
import hunt.http.codec.websocket.frame;
import hunt.http.codec.websocket.model;
import hunt.http.codec.websocket.decode.payload;
import hunt.http.Exceptions;
import hunt.http.WebSocketCommon;
import hunt.http.WebSocketConnection;
import hunt.http.WebSocketFrame;
import hunt.http.WebSocketPolicy;
import hunt.logging;
import hunt.collection;
import hunt.text.Common;
import hunt.util.StringBuilder;
import std.algorithm;
import std.conv;
/**
* Parsing of a frames in WebSocket land.
*/
class Parser {
private enum State {
START,
PAYLOAD_LEN,
PAYLOAD_LEN_BYTES,
MASK,
MASK_BYTES,
PAYLOAD
}
private WebSocketPolicy policy;
// State specific
private State state = State.START;
private int cursor = 0;
// WebSocketFrame
private AbstractWebSocketFrame frame;
private bool priorDataFrame;
// payload specific
private ByteBuffer payload;
private int payloadLength;
private PayloadProcessor maskProcessor;
// private PayloadProcessor strictnessProcessor;
/**
* Is there an extension using RSV flag?
* <p>
* <p>
* <pre>
* 0100_0000 (0x40) = rsv1
* 0010_0000 (0x20) = rsv2
* 0001_0000 (0x10) = rsv3
* </pre>
*/
private byte flagsInUse = 0x00;
private IncomingFrames incomingFramesHandler;
this(WebSocketPolicy wspolicy) {
this.policy = wspolicy;
maskProcessor = new DeMaskProcessor();
}
private void assertSanePayloadLength(long len) {
version(HUNT_HTTP_DEBUG) {
tracef("%s Payload Length: %s - %s", policy.getBehavior(),
len.to!string(), this.toString());
}
// Since we use ByteBuffer so often, having lengths over int.max is really impossible.
if (len > int.max) {
// OMG! Sanity Check! DO NOT WANT! Won't anyone think of the memory!
throw new MessageTooLargeException("[int-sane!] cannot handle payload lengths larger than "
~ to!string(int.max));
}
switch (frame.getOpCode()) {
case OpCode.CLOSE:
if (len == 1) {
throw new ProtocolException("Invalid close frame payload length, [" ~
payloadLength.to!string() ~ "]");
}
goto case;
// fall thru
case OpCode.PING:
goto case;
case OpCode.PONG:
if (len > ControlFrame.MAX_CONTROL_PAYLOAD) {
throw new ProtocolException("Invalid control frame payload length, [" ~
payloadLength.to!string() ~ "] cannot exceed [" ~
ControlFrame.MAX_CONTROL_PAYLOAD.to!string() ~ "]");
}
break;
case OpCode.TEXT:
policy.assertValidTextMessageSize(cast(int) len);
break;
case OpCode.BINARY:
policy.assertValidBinaryMessageSize(cast(int) len);
break;
default:
break;
}
}
void configureFromExtensions(Extension[] exts) {
// default
flagsInUse = 0x00;
// configure from list of extensions in use
foreach (Extension ext ; exts) {
if (ext.isRsv1User()) {
flagsInUse = cast(byte) (flagsInUse | 0x40);
}
if (ext.isRsv2User()) {
flagsInUse = cast(byte) (flagsInUse | 0x20);
}
if (ext.isRsv3User()) {
flagsInUse = cast(byte) (flagsInUse | 0x10);
}
}
}
IncomingFrames getIncomingFramesHandler() {
return incomingFramesHandler;
}
WebSocketPolicy getPolicy() {
return policy;
}
bool isRsv1InUse() {
return (flagsInUse & 0x40) != 0;
}
bool isRsv2InUse() {
return (flagsInUse & 0x20) != 0;
}
bool isRsv3InUse() {
return (flagsInUse & 0x10) != 0;
}
protected void notifyFrame(WebSocketFrame f) {
version(HUNT_HTTP_DEBUG_MORE)
tracef("%s Notify %s", policy.getBehavior(), getIncomingFramesHandler());
if (policy.getBehavior() == WebSocketBehavior.SERVER) {
/* Parsing on server.
*
* Then you MUST make sure all incoming frames are masked!
*
* Technically, this test is in violation of RFC-6455, Section 5.1
* http://tools.ietf.org/html/rfc6455#section-5.1
*
* But we can't trust the client at this point, so hunt opts to close
* the connection as a Protocol error.
*/
if (!f.isMasked()) {
throw new ProtocolException("Client MUST mask all frames (RFC-6455: Section 5.1)");
}
} else if (policy.getBehavior() == WebSocketBehavior.CLIENT) {
// Required by RFC-6455 / Section 5.1
if (f.isMasked()) {
throw new ProtocolException("Server MUST NOT mask any frames (RFC-6455: Section 5.1)");
}
}
if (incomingFramesHandler is null) {
version(HUNT_DEBUG) warning("incomingFramesHandler is null");
return;
}
try {
incomingFramesHandler.incomingFrame(f);
} catch (WebSocketException e) {
throw e;
} catch (Exception t) {
throw new WebSocketException(t);
}
}
void parse(ByteBuffer buffer) {
version(HUNT_HTTP_DEBUG) {
byte[] bufdata = buffer.peekRemaining();
tracef("remaining: %d, date: %(%02X %)", buffer.remaining(), bufdata);
}
if (buffer.remaining() <= 0) {
return;
}
try {
// parse through all the frames in the buffer
while (parseFrame(buffer)) {
version(HUNT_DEBUG) {
tracef("%s Parsed WebSocketFrame: %s", policy.getBehavior(), frame);
// info(BufferUtils.toDetailString(frame.getPayload()));
}
notifyFrame(frame);
if (frame.isDataFrame()) {
priorDataFrame = !frame.isFin();
}
reset();
}
} catch (WebSocketException e) {
buffer.position(buffer.limit()); // consume remaining
reset();
// need to throw for proper close behavior in connection
throw e;
} catch (Exception t) {
buffer.position(buffer.limit()); // consume remaining
reset();
// need to throw for proper close behavior in connection
throw new WebSocketException(t);
}
}
private void reset() {
if (frame !is null)
frame.reset();
frame = null;
payload = null;
}
/**
* Parse the base framing protocol buffer.
* <p>
* Note the first byte (fin,rsv1,rsv2,rsv3,opcode) are parsed by the {@link Parser#parse(ByteBuffer)} method
* <p>
* Not overridable
*
* @param buffer the buffer to parse from.
* @return true if done parsing base framing protocol and ready for parsing of the payload. false if incomplete parsing of base framing protocol.
*/
private bool parseFrame(ByteBuffer buffer) {
version(HUNT_DEBUG) {
tracef("%s Parsing %s bytes", policy.getBehavior(), buffer.remaining());
}
while (buffer.hasRemaining()) {
switch (state) {
case State.START: {
// peek at byte
byte b = buffer.get();
bool fin = ((b & 0x80) != 0);
byte opcode = cast(byte) (b & 0x0F);
if (!OpCode.isKnown(opcode)) {
throw new ProtocolException("Unknown opcode: " ~ opcode);
}
version(HUNT_DEBUG)
tracef("%s OpCode %s, fin=%s rsv=%s%s%s",
policy.getBehavior(),
OpCode.name(opcode),
fin,
(((b & 0x40) != 0) ? '1' : '.'),
(((b & 0x20) != 0) ? '1' : '.'),
(((b & 0x10) != 0) ? '1' : '.'));
// base framing flags
switch (opcode) {
case OpCode.TEXT:
frame = new TextFrame();
// data validation
if (priorDataFrame) {
throw new ProtocolException("Unexpected " ~ OpCode.name(opcode) ~
" frame, was expecting CONTINUATION");
}
break;
case OpCode.BINARY:
frame = new BinaryFrame();
// data validation
if (priorDataFrame) {
throw new ProtocolException("Unexpected " ~ OpCode.name(opcode) ~
" frame, was expecting CONTINUATION");
}
break;
case OpCode.CONTINUATION:
frame = new ContinuationFrame();
// continuation validation
if (!priorDataFrame) {
throw new ProtocolException("CONTINUATION frame without prior !FIN");
}
// Be careful to use the original opcode
break;
case OpCode.CLOSE:
frame = new CloseFrame();
// control frame validation
if (!fin) {
throw new ProtocolException("Fragmented Close WebSocketFrame [" ~
OpCode.name(opcode) ~ "]");
}
break;
case OpCode.PING:
frame = new PingFrame();
// control frame validation
if (!fin) {
throw new ProtocolException("Fragmented Ping WebSocketFrame [" ~
OpCode.name(opcode) ~ "]");
}
break;
case OpCode.PONG:
frame = new PongFrame();
// control frame validation
if (!fin) {
throw new ProtocolException("Fragmented Pong WebSocketFrame [" ~
OpCode.name(opcode) ~ "]");
}
break;
default: break;
}
frame.setFin(fin);
// Are any flags set?
if ((b & 0x70) != 0) {
/*
* RFC 6455 Section 5.2
*
* MUST be 0 unless an extension is negotiated that defines meanings for non-zero values. If a nonzero value is received and none of the
* negotiated extensions defines the meaning of such a nonzero value, the receiving endpoint MUST _Fail the WebSocket Connection_.
*/
if ((b & 0x40) != 0) {
if (isRsv1InUse())
frame.setRsv1(true);
else {
string err = "RSV1 not allowed to be set";
version(HUNT_DEBUG) {
tracef(err ~ ": Remaining buffer: %s", BufferUtils.toDetailString(buffer));
}
throw new ProtocolException(err);
}
}
if ((b & 0x20) != 0) {
if (isRsv2InUse())
frame.setRsv2(true);
else {
string err = "RSV2 not allowed to be set";
version(HUNT_DEBUG) {
tracef(err ~ ": Remaining buffer: %s", BufferUtils.toDetailString(buffer));
}
throw new ProtocolException(err);
}
}
if ((b & 0x10) != 0) {
if (isRsv3InUse())
frame.setRsv3(true);
else {
string err = "RSV3 not allowed to be set";
version(HUNT_DEBUG) {
tracef(err ~ ": Remaining buffer: %s", BufferUtils.toDetailString(buffer));
}
throw new ProtocolException(err);
}
}
}
state = State.PAYLOAD_LEN;
break;
}
case State.PAYLOAD_LEN: {
byte b = buffer.get();
frame.setMasked((b & 0x80) != 0);
payloadLength = cast(byte) (0x7F & b);
if (payloadLength == 127) // 0x7F
{
// length 8 bytes (extended payload length)
payloadLength = 0;
state = State.PAYLOAD_LEN_BYTES;
cursor = 8;
break; // continue onto next state
} else if (payloadLength == 126) // 0x7E
{
// length 2 bytes (extended payload length)
payloadLength = 0;
state = State.PAYLOAD_LEN_BYTES;
cursor = 2;
break; // continue onto next state
}
assertSanePayloadLength(payloadLength);
if (frame.isMasked()) {
state = State.MASK;
} else {
// special case for empty payloads (no more bytes left in buffer)
if (payloadLength == 0) {
state = State.START;
return true;
}
maskProcessor.reset(frame);
state = State.PAYLOAD;
}
break;
}
case State.PAYLOAD_LEN_BYTES: {
byte b = buffer.get();
--cursor;
payloadLength |= (b & 0xFF) << (8 * cursor);
if (cursor == 0) {
assertSanePayloadLength(payloadLength);
if (frame.isMasked()) {
state = State.MASK;
} else {
// special case for empty payloads (no more bytes left in buffer)
if (payloadLength == 0) {
state = State.START;
return true;
}
maskProcessor.reset(frame);
state = State.PAYLOAD;
}
}
break;
}
case State.MASK: {
byte[] m = new byte[4];
frame.setMask(m);
if (buffer.remaining() >= 4) {
buffer.get(m, 0, 4);
// special case for empty payloads (no more bytes left in buffer)
if (payloadLength == 0) {
state = State.START;
return true;
}
maskProcessor.reset(frame);
state = State.PAYLOAD;
} else {
state = State.MASK_BYTES;
cursor = 4;
}
break;
}
case State.MASK_BYTES: {
byte b = buffer.get();
frame.getMask()[4 - cursor] = b;
--cursor;
if (cursor == 0) {
// special case for empty payloads (no more bytes left in buffer)
if (payloadLength == 0) {
state = State.START;
return true;
}
maskProcessor.reset(frame);
state = State.PAYLOAD;
}
break;
}
case State.PAYLOAD: {
frame.assertValid();
if (parsePayload(buffer)) {
// special check for close
if (frame.getOpCode() == OpCode.CLOSE) {
// TODO: yuck. Don't create an object to do validation checks!
new CloseInfo(frame);
}
state = State.START;
// we have a frame!
return true;
}
break;
}
default: break;
}
}
return false;
}
/**
* Implementation specific parsing of a payload
*
* @param buffer the payload buffer
* @return true if payload is done reading, false if incomplete
*/
private bool parsePayload(ByteBuffer buffer) {
if (payloadLength == 0) {
return true;
}
if (buffer.hasRemaining()) {
// Create a small window of the incoming buffer to work with.
// this should only show the payload itself, and not any more
// bytes that could belong to the start of the next frame.
int bytesSoFar = payload is null ? 0 : payload.position();
int bytesExpected = payloadLength - bytesSoFar;
int bytesAvailable = buffer.remaining();
int windowBytes = std.algorithm.min(bytesAvailable, bytesExpected);
int limit = buffer.limit();
buffer.limit(buffer.position() + windowBytes);
ByteBuffer window = buffer.slice();
buffer.limit(limit);
buffer.position(buffer.position() + window.remaining());
maskProcessor.process(window);
version(HUNT_HTTP_DEBUG) {
tracef("%s Window(unmarked): %s", policy.getBehavior(), BufferUtils.toDetailString(window));
}
if (window.remaining() == payloadLength) {
// We have the whole content, no need to copy.
frame.setPayload(window);
return true;
} else {
if (payload is null) {
payload = BufferUtils.allocate(payloadLength);
BufferUtils.clearToFill(payload);
}
// Copy the payload.
payload.put(window);
if (payload.position() == payloadLength) {
BufferUtils.flipToFlush(payload, 0);
frame.setPayload(payload);
return true;
}
}
}
return false;
}
void setIncomingFramesHandler(IncomingFrames incoming) {
this.incomingFramesHandler = incoming;
}
override
string toString() {
StringBuilder builder = new StringBuilder();
builder.append("Parser@").append(toHash().to!string(16));
builder.append("[");
if (incomingFramesHandler is null) {
builder.append("NO_HANDLER");
} else {
builder.append(typeid(incomingFramesHandler).name);
}
builder.append(",s=").append(state.to!string());
builder.append(",c=").append(cursor.to!string());
builder.append(",len=").append(payloadLength);
builder.append(",f=").append(frame.toString());
// builder.append(",p=").append(policy);
builder.append("]");
return builder.toString();
}
}
|
D
|
/**
*
* THIS FILE IS AUTO-GENERATED BY ./parse_specs.d FOR MCU at76c711 WITH ARCHITECTURE avr3
*
*/
module avr.specs.specs_at76c711;
enum __AVR_ARCH__ = 3;
enum __AVR_ASM_ONLY__ = false;
enum __AVR_ENHANCED__ = false;
enum __AVR_HAVE_MUL__ = false;
enum __AVR_HAVE_JMP_CALL__ = true;
enum __AVR_MEGA__ = true;
enum __AVR_HAVE_LPMX__ = false;
enum __AVR_HAVE_MOVW__ = false;
enum __AVR_HAVE_ELPM__ = false;
enum __AVR_HAVE_ELPMX__ = false;
enum __AVR_HAVE_EIJMP_EICALL_ = false;
enum __AVR_2_BYTE_PC__ = true;
enum __AVR_3_BYTE_PC__ = false;
enum __AVR_XMEGA__ = false;
enum __AVR_HAVE_RAMPX__ = false;
enum __AVR_HAVE_RAMPY__ = false;
enum __AVR_HAVE_RAMPZ__ = false;
enum __AVR_HAVE_RAMPD__ = false;
enum __AVR_TINY__ = false;
enum __AVR_PM_BASE_ADDRESS__ = 0;
enum __AVR_SFR_OFFSET__ = 32;
enum __AVR_DEVICE_NAME__ = "at76c711";
|
D
|
/*
* Licensed under the GNU Lesser General Public License Version 3
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the license, or
* (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
// generated automatically - do not change
module glib.Mutex;
private import gi.glib;
public import gi.glibtypes;
/**
* The #GMutex struct is an opaque data structure to represent a mutex
* (mutual exclusion). It can be used to protect data against shared
* access.
*
* Take for example the following function:
* |[<!-- language="C" -->
* int
* give_me_next_number (void)
* {
* static int current_number = 0;
*
* // now do a very complicated calculation to calculate the new
* // number, this might for example be a random number generator
* current_number = calc_next_number (current_number);
*
* return current_number;
* }
* ]|
* It is easy to see that this won't work in a multi-threaded
* application. There current_number must be protected against shared
* access. A #GMutex can be used as a solution to this problem:
* |[<!-- language="C" -->
* int
* give_me_next_number (void)
* {
* static GMutex mutex;
* static int current_number = 0;
* int ret_val;
*
* g_mutex_lock (&mutex);
* ret_val = current_number = calc_next_number (current_number);
* g_mutex_unlock (&mutex);
*
* return ret_val;
* }
* ]|
* Notice that the #GMutex is not initialised to any particular value.
* Its placement in static storage ensures that it will be initialised
* to all-zeros, which is appropriate.
*
* If a #GMutex is placed in other contexts (eg: embedded in a struct)
* then it must be explicitly initialised using g_mutex_init().
*
* A #GMutex should only be accessed via g_mutex_ functions.
*/
public class Mutex
{
/** the main GObject struct */
protected GMutex* gMutex;
/** Get the main GObject struct */
public GMutex* getMutexStruct()
{
return gMutex;
}
/** the main GObject struct as a void* */
protected void* getStruct()
{
return cast(void*)gMutex;
}
/**
* Sets our main struct and passes it to the parent class.
*/
public this (GMutex* gMutex)
{
this.gMutex = gMutex;
}
/**
* Frees the resources allocated to a mutex with g_mutex_init().
*
* This function should not be used with a #GMutex that has been
* statically allocated.
*
* Calling g_mutex_clear() on a locked mutex leads to undefined
* behaviour.
*
* Sine: 2.32
*/
public void clear()
{
g_mutex_clear(gMutex);
}
/**
* Initializes a #GMutex so that it can be used.
*
* This function is useful to initialize a mutex that has been
* allocated on the stack, or as part of a larger structure.
* It is not necessary to initialize a mutex that has been
* statically allocated.
*
* |[<!-- language="C" -->
* typedef struct {
* GMutex m;
* ...
* } Blob;
*
* Blob *b;
*
* b = g_new (Blob, 1);
* g_mutex_init (&b->m);
* ]|
*
* To undo the effect of g_mutex_init() when a mutex is no longer
* needed, use g_mutex_clear().
*
* Calling g_mutex_init() on an already initialized #GMutex leads
* to undefined behaviour.
*
* Since: 2.32
*/
public void init()
{
g_mutex_init(gMutex);
}
/**
* Locks @mutex. If @mutex is already locked by another thread, the
* current thread will block until @mutex is unlocked by the other
* thread.
*
* #GMutex is neither guaranteed to be recursive nor to be
* non-recursive. As such, calling g_mutex_lock() on a #GMutex that has
* already been locked by the same thread results in undefined behaviour
* (including but not limited to deadlocks).
*/
public void lock()
{
g_mutex_lock(gMutex);
}
/**
* Tries to lock @mutex. If @mutex is already locked by another thread,
* it immediately returns %FALSE. Otherwise it locks @mutex and returns
* %TRUE.
*
* #GMutex is neither guaranteed to be recursive nor to be
* non-recursive. As such, calling g_mutex_lock() on a #GMutex that has
* already been locked by the same thread results in undefined behaviour
* (including but not limited to deadlocks or arbitrary return values).
*
* Return: %TRUE if @mutex could be locked
*/
public bool trylock()
{
return g_mutex_trylock(gMutex) != 0;
}
/**
* Unlocks @mutex. If another thread is blocked in a g_mutex_lock()
* call for @mutex, it will become unblocked and can lock @mutex itself.
*
* Calling g_mutex_unlock() on a mutex that is not locked by the
* current thread leads to undefined behaviour.
*/
public void unlock()
{
g_mutex_unlock(gMutex);
}
}
|
D
|
// EXTRA_OBJC_SOURCES: objc_instance_variable.m
// REQUIRED_ARGS: -L-framework -LFoundation
extern (Objective-C) class NSObject {}
// Defined in `runnable/extra-files/objc_instance_variable.m`
extern (Objective-C)
class Foo : NSObject
{
// int a = 1;
// int b = 2;
// int c = 3;
// Intentionally not declared the above instance variables here to simulate
// that the base class has changed.
}
extern (Objective-C)
class Bar : Foo
{
int d;
static Bar alloc() @selector("alloc");
Bar init() @selector("init");
void release() @selector("release");
void bar() @selector("bar") {}
}
// This is implemented in `runnable/extra-files/objc_instance_variable.m` and
// returns the value of instance variable `c`.
extern (C) int getInstanceVariableC(Foo);
// This is implemented in `runnable/extra-files/objc_instance_variable.m` and
// sets the a value for the instance variables `a`, `b` and `c`.
extern (C) int setInstanceVariables(Foo);
import std.stdio;
void main()
{
auto bar = Bar.alloc.init;
scope (exit) bar.release();
setInstanceVariables(bar);
bar.d = 4;
// if non-fragile instance variables didn't work this would be `4`.
assert(getInstanceVariableC(bar) == 3);
}
|
D
|
/*******************************************************************************
* Copyright (c) 2000, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
* Port to the D programming language:
* Frank Benoit <benoit@tionex.de>
*******************************************************************************/
module org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Scrollable;
import org.eclipse.swt.widgets.Layout;
import org.eclipse.swt.widgets.Decorations;
import org.eclipse.swt.widgets.ScrollBar;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.graphics.GCData;
import org.eclipse.swt.internal.gtk.OS;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Region;
import org.eclipse.swt.internal.cairo.Cairo : Cairo;
import org.eclipse.swt.internal.gtk.OS;
import org.eclipse.swt.graphics.Rectangle;
import java.lang.all;
/**
* Instances of this class are controls which are capable
* of containing other controls.
* <dl>
* <dt><b>Styles:</b></dt>
* <dd>NO_BACKGROUND, NO_FOCUS, NO_MERGE_PAINTS, NO_REDRAW_RESIZE, NO_RADIO_GROUP, EMBEDDED, DOUBLE_BUFFERED</dd>
* <dt><b>Events:</b></dt>
* <dd>(none)</dd>
* </dl>
* <p>
* Note: The <code>NO_BACKGROUND</code>, <code>NO_FOCUS</code>, <code>NO_MERGE_PAINTS</code>,
* and <code>NO_REDRAW_RESIZE</code> styles are intended for use with <code>Canvas</code>.
* They can be used with <code>Composite</code> if you are drawing your own, but their
* behavior is undefined if they are used with subclasses of <code>Composite</code> other
* than <code>Canvas</code>.
* </p><p>
* Note: The <code>CENTER</code> style, although undefined for composites, has the
* same value as <code>EMBEDDED</code> (which is used to embed widgets from other
* widget toolkits into SWT). On some operating systems (GTK, Motif), this may cause
* the children of this composite to be obscured. The <code>EMBEDDED</code> style
* is for use by other widget toolkits and should normally never be used.
* </p><p>
* This class may be subclassed by custom control implementors
* who are building controls that are constructed from aggregates
* of other controls.
* </p>
*
* @see Canvas
* @see <a href="http://www.eclipse.org/swt/snippets/#composite">Composite snippets</a>
* @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
*/
public class Composite : Scrollable {
alias Scrollable.computeSize computeSize;
alias Scrollable.fixStyle fixStyle;
alias Scrollable.forceFocus forceFocus;
alias Scrollable.gtk_button_press_event gtk_button_press_event;
alias Scrollable.moveAbove moveAbove;
alias Scrollable.moveBelow moveBelow;
alias Scrollable.setBounds setBounds;
alias Scrollable.translateMnemonic translateMnemonic;
alias Scrollable.translateTraversal translateTraversal;
public int embeddedHandle;
GtkIMContext* imHandle_;
GtkWidget* socketHandle;
Layout layout_;
Control[] tabList;
int layoutCount, backgroundMode;
static const String NO_INPUT_METHOD = "org.eclipse.swt.internal.gtk.noInputMethod"; //$NON-NLS-1$
this () {
/* Do nothing */
}
/**
* Constructs a new instance of this class given its parent
* and a style value describing its behavior and appearance.
* <p>
* The style value is either one of the style constants defined in
* class <code>SWT</code> which is applicable to instances of this
* class, or must be built by <em>bitwise OR</em>'ing together
* (that is, using the <code>int</code> "|" operator) two or more
* of those <code>SWT</code> style constants. The class description
* lists the style constants that are applicable to the class.
* Style bits are also inherited from superclasses.
* </p>
*
* @param parent a widget which will be the parent of the new instance (cannot be null)
* @param style the style of widget to construct
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
* </ul>
* @exception SWTException <ul>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li>
* </ul>
*
* @see SWT#NO_BACKGROUND
* @see SWT#NO_FOCUS
* @see SWT#NO_MERGE_PAINTS
* @see SWT#NO_REDRAW_RESIZE
* @see SWT#NO_RADIO_GROUP
* @see Widget#getStyle
*/
public this (Composite parent, int style) {
super (parent, checkStyle (style));
}
static int checkStyle (int style) {
style &= ~SWT.TRANSPARENT;
return style;
}
Control [] _getChildren () {
auto parentHandle = parentingHandle ();
auto list = OS.gtk_container_get_children (cast(GtkContainer*)parentHandle);
if (list is null) return new Control [0];
int count = OS.g_list_length (list);
Control [] children = new Control [count];
int i = 0;
auto temp = list;
while (temp !is null) {
auto handle = cast(GtkWidget*)OS.g_list_data (temp);
if (handle !is null) {
Widget widget = display.getWidget (handle);
if (widget !is null && widget !is this) {
if (auto c = cast(Control)widget) {
children [i++] = c;
}
}
}
temp = cast(GList*)OS.g_list_next (temp);
}
OS.g_list_free (list);
if (i is count) return children;
Control [] newChildren = new Control [i];
System.arraycopy (children, 0, newChildren, 0, i);
return newChildren;
}
Control [] _getTabList () {
if (tabList is null) return tabList;
int count = 0;
for (int i=0; i<tabList.length; i++) {
if (!tabList [i].isDisposed ()) count++;
}
if (count is tabList.length) return tabList;
Control [] newList = new Control [count];
int index = 0;
for (int i=0; i<tabList.length; i++) {
if (!tabList [i].isDisposed ()) {
newList [index++] = tabList [i];
}
}
tabList = newList;
return tabList;
}
/**
* Clears any data that has been cached by a Layout for all widgets that
* are in the parent hierarchy of the changed control up to and including the
* receiver. If an ancestor does not have a layout, it is skipped.
*
* @param changed an array of controls that changed state and require a recalculation of size
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_INVALID_ARGUMENT - if the changed array is null any of its controls are null or have been disposed</li>
* <li>ERROR_INVALID_PARENT - if any control in changed is not in the widget tree of the receiver</li>
* </ul>
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
* @since 3.1
*/
public void changed (Control[] changed) {
checkWidget ();
if (changed is null) error (SWT.ERROR_INVALID_ARGUMENT);
for (int i=0; i<changed.length; i++) {
Control control = changed [i];
if (control is null) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
bool ancestor = false;
Composite composite = control.parent;
while (composite !is null) {
ancestor = composite is this;
if (ancestor) break;
composite = composite.parent;
}
if (!ancestor) error (SWT.ERROR_INVALID_PARENT);
}
for (int i=0; i<changed.length; i++) {
Control child = changed [i];
Composite composite = child.parent;
while (child !is this) {
if (composite.layout_ is null || !composite.layout_.flushCache (child)) {
composite.state |= LAYOUT_CHANGED;
}
child = composite;
composite = child.parent;
}
}
}
override void checkBuffered () {
if ((style & SWT.DOUBLE_BUFFERED) is 0 && (style & SWT.NO_BACKGROUND) !is 0) {
return;
}
super.checkBuffered();
}
override protected void checkSubclass () {
/* Do nothing - Subclassing is allowed */
}
override GtkStyle* childStyle () {
if (scrolledHandle !is null) return null;
return super.childStyle ();
}
override public Point computeSize (int wHint, int hHint, bool changed) {
checkWidget ();
if (wHint !is SWT.DEFAULT && wHint < 0) wHint = 0;
if (hHint !is SWT.DEFAULT && hHint < 0) hHint = 0;
Point size;
if (layout_ !is null) {
if (wHint is SWT.DEFAULT || hHint is SWT.DEFAULT) {
changed |= (state & LAYOUT_CHANGED) !is 0;
size = layout_.computeSize (this, wHint, hHint, changed);
state &= ~LAYOUT_CHANGED;
} else {
size = new Point (wHint, hHint);
}
} else {
size = minimumSize (wHint, hHint, changed);
}
if (size.x is 0) size.x = DEFAULT_WIDTH;
if (size.y is 0) size.y = DEFAULT_HEIGHT;
if (wHint !is SWT.DEFAULT) size.x = wHint;
if (hHint !is SWT.DEFAULT) size.y = hHint;
Rectangle trim = computeTrim (0, 0, size.x, size.y);
return new Point (trim.width, trim.height);
}
override Control [] computeTabList () {
Control result [] = super.computeTabList ();
if (result.length is 0) return result;
Control [] list = tabList !is null ? _getTabList () : _getChildren ();
for (int i=0; i<list.length; i++) {
Control child = list [i];
Control [] childList = child.computeTabList ();
if (childList.length !is 0) {
Control [] newResult = new Control [result.length + childList.length];
System.arraycopy (result, 0, newResult, 0, result.length);
System.arraycopy (childList, 0, newResult, result.length, childList.length);
result = newResult;
}
}
return result;
}
override void createHandle (int index) {
state |= HANDLE | CANVAS;
bool scrolled = (style & (SWT.H_SCROLL | SWT.V_SCROLL)) !is 0;
if (!scrolled) state |= THEME_BACKGROUND;
createHandle (index, true, scrolled || (style & SWT.BORDER) !is 0);
}
void createHandle (int index, bool fixed, bool scrolled) {
if (scrolled) {
if (fixed) {
fixedHandle = cast(GtkWidget*) OS.g_object_new (display.gtk_fixed_get_type (), null);
if (fixedHandle is null) error (SWT.ERROR_NO_HANDLES);
OS.gtk_fixed_set_has_window (cast(GtkFixed*)fixedHandle, true);
}
auto vadj = cast(GtkAdjustment*)OS.gtk_adjustment_new (0, 0, 100, 1, 10, 10);
if (vadj is null) error (SWT.ERROR_NO_HANDLES);
auto hadj = cast(GtkAdjustment*)OS.gtk_adjustment_new (0, 0, 100, 1, 10, 10);
if (hadj is null) error (SWT.ERROR_NO_HANDLES);
scrolledHandle = cast(GtkWidget*) OS.gtk_scrolled_window_new (hadj, vadj);
if (scrolledHandle is null) SWT.error (SWT.ERROR_NO_HANDLES);
}
handle = cast(GtkWidget*)OS.g_object_new (display.gtk_fixed_get_type (), null);
if (handle is null) SWT.error (SWT.ERROR_NO_HANDLES);
OS.gtk_fixed_set_has_window (cast(GtkFixed*)handle, true);
OS.GTK_WIDGET_SET_FLAGS(handle, OS.GTK_CAN_FOCUS);
if ((style & SWT.EMBEDDED) is 0) {
if ((state & CANVAS) !is 0) {
/* Prevent an input method context from being created for the Browser widget */
if (display.getData (NO_INPUT_METHOD) is null) {
imHandle_ = OS.gtk_im_multicontext_new ();
if (imHandle_ is null) error (SWT.ERROR_NO_HANDLES);
}
}
}
if (scrolled) {
if (fixed) OS.gtk_container_add (cast(GtkContainer*)fixedHandle, scrolledHandle);
/*
* Force the scrolledWindow to have a single child that is
* not scrolled automatically. Calling gtk_container_add()
* seems to add the child correctly but cause a warning.
*/
bool warnings = display.getWarnings ();
display.setWarnings (false);
OS.gtk_container_add (cast(GtkContainer*)scrolledHandle, handle);
display.setWarnings (warnings);
int hsp = (style & SWT.H_SCROLL) !is 0 ? OS.GTK_POLICY_ALWAYS : OS.GTK_POLICY_NEVER;
int vsp = (style & SWT.V_SCROLL) !is 0 ? OS.GTK_POLICY_ALWAYS : OS.GTK_POLICY_NEVER;
OS.gtk_scrolled_window_set_policy (cast(GtkScrolledWindow*)scrolledHandle, hsp, vsp);
if (hasBorder ()) {
OS.gtk_scrolled_window_set_shadow_type (cast(GtkScrolledWindow*)scrolledHandle, OS.GTK_SHADOW_ETCHED_IN);
}
}
if ((style & SWT.EMBEDDED) !is 0) {
socketHandle = OS.gtk_socket_new ();
if (socketHandle is null) SWT.error (SWT.ERROR_NO_HANDLES);
OS.gtk_container_add (cast(GtkContainer*)handle, cast(GtkWidget*)socketHandle);
}
if ((style & SWT.NO_REDRAW_RESIZE) !is 0 && (style & SWT.RIGHT_TO_LEFT) is 0) {
OS.gtk_widget_set_redraw_on_allocate (handle, false);
}
/*
* Bug in GTK. When a widget is double buffered and the back
* pixmap is null, the double buffer pixmap is filled with the
* background of the widget rather than the current contents of
* the screen. If nothing is drawn during an expose event,
* the pixels are altered. The fix is to clear double buffering
* when NO_BACKGROUND is set and DOUBLE_BUFFERED
* is not explicitly set.
*/
if ((style & SWT.DOUBLE_BUFFERED) is 0 && (style & SWT.NO_BACKGROUND) !is 0) {
OS.gtk_widget_set_double_buffered (handle, false);
}
}
override void deregister () {
super.deregister ();
if (socketHandle !is null) display.removeWidget (cast(GtkWidget*)socketHandle);
}
void drawBackground (GC gc, int x, int y, int width, int height) {
Control control = findBackgroundControl ();
if (control !is null) {
GCData data = gc.getGCData ();
auto cairo = data.cairo;
if (cairo !is null) {
Cairo.cairo_save (cairo);
if (control.backgroundImage !is null) {
Point pt = display.map (this, control, 0, 0);
Cairo.cairo_translate (cairo, -pt.x, -pt.y);
x += pt.x;
y += pt.y;
auto xDisplay = OS.GDK_DISPLAY ();
auto xVisual = OS.gdk_x11_visual_get_xvisual (OS.gdk_visual_get_system());
auto drawable = control.backgroundImage.pixmap;
auto xDrawable = OS.GDK_PIXMAP_XID (drawable);
int w, h;
OS.gdk_drawable_get_size (cast(GdkDrawable*)drawable, &w, &h);
auto surface = Cairo.cairo_xlib_surface_create (xDisplay, xDrawable, xVisual, w, h);
if (surface is null) error (SWT.ERROR_NO_HANDLES);
auto pattern = Cairo.cairo_pattern_create_for_surface (surface);
if (pattern is null) error (SWT.ERROR_NO_HANDLES);
Cairo.cairo_pattern_set_extend (pattern, Cairo.CAIRO_EXTEND_REPEAT);
if ((data.style & SWT.MIRRORED) !is 0) {
double[] matrix = [-1.0, 0, 0, 1, 0, 0 ];
Cairo.cairo_pattern_set_matrix(pattern, cast(cairo_matrix_t*)matrix.ptr);
}
Cairo.cairo_set_source (cairo, pattern);
Cairo.cairo_surface_destroy (surface);
Cairo.cairo_pattern_destroy (pattern);
} else {
GdkColor* color = control.getBackgroundColor ();
Cairo.cairo_set_source_rgba (cairo, (color.red & 0xFFFF) / cast(float)0xFFFF, (color.green & 0xFFFF) / cast(float)0xFFFF, (color.blue & 0xFFFF) / cast(float)0xFFFF, data.alpha / cast(float)0xFF);
}
Cairo.cairo_rectangle (cairo, x, y, width, height);
Cairo.cairo_fill (cairo);
Cairo.cairo_restore (cairo);
} else {
auto gdkGC = gc.handle;
GdkGCValues* values = new GdkGCValues ();
OS.gdk_gc_get_values (gdkGC, values);
if (control.backgroundImage !is null) {
Point pt = display.map (this, control, 0, 0);
OS.gdk_gc_set_fill (gdkGC, OS.GDK_TILED);
OS.gdk_gc_set_ts_origin (gdkGC, -pt.x, -pt.y);
OS.gdk_gc_set_tile (gdkGC, control.backgroundImage.pixmap);
OS.gdk_draw_rectangle (data.drawable, gdkGC, 1, x, y, width, height);
OS.gdk_gc_set_fill (gdkGC, values.fill);
OS.gdk_gc_set_ts_origin (gdkGC, values.ts_x_origin, values.ts_y_origin);
} else {
GdkColor* color = control.getBackgroundColor ();
OS.gdk_gc_set_foreground (gdkGC, color);
OS.gdk_draw_rectangle (data.drawable, gdkGC, 1, x, y, width, height);
color.pixel = values.foreground.pixel;
OS.gdk_gc_set_foreground (gdkGC, color);
}
}
} else {
gc.fillRectangle (x, y, width, height);
}
}
override void enableWidget (bool enabled) {
if ((state & CANVAS) !is 0) return;
super.enableWidget (enabled);
}
Composite findDeferredControl () {
return layoutCount > 0 ? this : parent.findDeferredControl ();
}
override Menu [] findMenus (Control control) {
if (control is this) return new Menu [0];
Menu result [] = super.findMenus (control);
Control [] children = _getChildren ();
for (int i=0; i<children.length; i++) {
Control child = children [i];
Menu [] menuList = child.findMenus (control);
if (menuList.length !is 0) {
Menu [] newResult = new Menu [result.length + menuList.length];
System.arraycopy (result, 0, newResult, 0, result.length);
System.arraycopy (menuList, 0, newResult, result.length, menuList.length);
result = newResult;
}
}
return result;
}
override void fixChildren (Shell newShell, Shell oldShell, Decorations newDecorations, Decorations oldDecorations, Menu [] menus) {
super.fixChildren (newShell, oldShell, newDecorations, oldDecorations, menus);
Control [] children = _getChildren ();
for (int i=0; i<children.length; i++) {
children [i].fixChildren (newShell, oldShell, newDecorations, oldDecorations, menus);
}
}
override
void fixModal(GtkWidget* group, GtkWidget* modalGroup) {
Control[] controls = _getChildren ();
for (int i = 0; i < controls.length; i++) {
controls[i].fixModal (group, modalGroup);
}
}
override void fixStyle () {
super.fixStyle ();
if (scrolledHandle is null) fixStyle (handle);
Control[] children = _getChildren ();
for (int i = 0; i < children.length; i++) {
children [i].fixStyle ();
}
}
void fixTabList (Control control) {
if (tabList is null) return;
int count = 0;
for (int i=0; i<tabList.length; i++) {
if (tabList [i] is control) count++;
}
if (count is 0) return;
Control [] newList = null;
int length = tabList.length - count;
if (length !is 0) {
newList = new Control [length];
int index = 0;
for (int i=0; i<tabList.length; i++) {
if (tabList [i] !is control) {
newList [index++] = tabList [i];
}
}
}
tabList = newList;
}
void fixZOrder () {
if ((state & CANVAS) !is 0) return;
auto parentHandle = parentingHandle ();
auto parentWindow = OS.GTK_WIDGET_WINDOW (cast(GtkWidget*)parentHandle);
if (parentWindow is null) return;
GObject* userData;
auto windowList = OS.gdk_window_get_children (parentWindow);
if (windowList !is null) {
auto windows = windowList;
while (windows !is null) {
auto window = cast(GdkDrawable*)OS.g_list_data (windows);
if (window !is redrawWindow) {
OS.gdk_window_get_user_data (window, cast(void**)&userData);
if (userData is null || OS.G_OBJECT_TYPE (cast(GTypeInstance*)userData) !is display.gtk_fixed_get_type ()) {
OS.gdk_window_lower (window);
}
}
windows = cast(GList*)OS.g_list_next (windows);
}
OS.g_list_free (windowList);
}
}
override GtkWidget* focusHandle () {
if (socketHandle !is null) return socketHandle;
return super.focusHandle ();
}
override bool forceFocus (GtkWidget* focusHandle) {
if (socketHandle !is null) OS.GTK_WIDGET_SET_FLAGS (focusHandle, OS.GTK_CAN_FOCUS);
bool result = super.forceFocus (focusHandle);
if (socketHandle !is null) OS.GTK_WIDGET_UNSET_FLAGS (focusHandle, OS.GTK_CAN_FOCUS);
return result;
}
/**
* Returns the receiver's background drawing mode. This
* will be one of the following constants defined in class
* <code>SWT</code>:
* <code>INHERIT_NONE</code>, <code>INHERIT_DEFAULT</code>,
* <code>INHERTIT_FORCE</code>.
*
* @return the background mode
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
* @see SWT
*
* @since 3.2
*/
public int getBackgroundMode () {
checkWidget ();
return backgroundMode;
}
/**
* Returns a (possibly empty) array containing the receiver's children.
* Children are returned in the order that they are drawn. The topmost
* control appears at the beginning of the array. Subsequent controls
* draw beneath this control and appear later in the array.
* <p>
* Note: This is not the actual structure used by the receiver
* to maintain its list of children, so modifying the array will
* not affect the receiver.
* </p>
*
* @return an array of children
*
* @see Control#moveAbove
* @see Control#moveBelow
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
public Control [] getChildren () {
checkWidget();
return _getChildren ();
}
int getChildrenCount () {
/*
* NOTE: The current implementation will count
* non-registered children.
*/
auto list = OS.gtk_container_get_children (cast(GtkContainer*)handle);
if (list is null) return 0;
int count = OS.g_list_length (list);
OS.g_list_free (list);
return count;
}
override public Rectangle getClientArea () {
checkWidget();
if ((state & CANVAS) !is 0) {
if ((state & ZERO_WIDTH) !is 0 && (state & ZERO_HEIGHT) !is 0) {
return new Rectangle (0, 0, 0, 0);
}
forceResize ();
auto clientHandle = clientHandle ();
int width = (state & ZERO_WIDTH) !is 0 ? 0 : OS.GTK_WIDGET_WIDTH (clientHandle);
int height = (state & ZERO_HEIGHT) !is 0 ? 0 : OS.GTK_WIDGET_HEIGHT (clientHandle);
return new Rectangle (0, 0, width, height);
}
return super.getClientArea();
}
override
int getClientWidth() {
return (state & ZERO_WIDTH) !is 0 ? 0 : OS.GTK_WIDGET_WIDTH (clientHandle ());
}
/**
* Returns layout which is associated with the receiver, or
* null if one has not been set.
*
* @return the receiver's layout or null
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
public Layout getLayout () {
checkWidget();
return layout_;
}
/**
* Returns <code>true</code> if the receiver has deferred
* the performing of layout, and <code>false</code> otherwise.
*
* @return the receiver's deferred layout state
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
* @see #setLayoutDeferred(bool)
* @see #isLayoutDeferred()
*
* @since 3.1
*/
public bool getLayoutDeferred () {
checkWidget ();
return layoutCount > 0 ;
}
/**
* Gets the (possibly empty) tabbing order for the control.
*
* @return tabList the ordered list of controls representing the tab order
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
* @see #setTabList
*/
public Control [] getTabList () {
checkWidget ();
Control [] tabList = _getTabList ();
if (tabList is null) {
int count = 0;
Control [] list =_getChildren ();
for (int i=0; i<list.length; i++) {
if (list [i].isTabGroup ()) count++;
}
tabList = new Control [count];
int index = 0;
for (int i=0; i<list.length; i++) {
if (list [i].isTabGroup ()) {
tabList [index++] = list [i];
}
}
}
return tabList;
}
override int /*long*/ gtk_button_press_event (GtkWidget* widget, GdkEventButton* event) {
auto result = super.gtk_button_press_event (widget, event);
if (result !is 0) return result;
if ((state & CANVAS) !is 0) {
if ((style & SWT.NO_FOCUS) is 0 && hooksKeys ()) {
if (event.button is 1) {
if (getChildrenCount () is 0) setFocus ();
}
}
}
return result;
}
override int /*long*/ gtk_expose_event (GtkWidget* widget, GdkEventExpose* eventPtr) {
if ((state & OBSCURED) !is 0) return 0;
if ((state & CANVAS) is 0) {
return super.gtk_expose_event (widget, eventPtr);
}
if ((style & SWT.NO_MERGE_PAINTS) is 0) {
return super.gtk_expose_event (widget, eventPtr);
}
if (!hooks (SWT.Paint) && !filters (SWT.Paint)) return 0;
GdkEventExpose* gdkEvent = eventPtr;
GdkRectangle* rectangles;
int n_rectangles;
OS.gdk_region_get_rectangles (gdkEvent.region, &rectangles, &n_rectangles);
for (int i=0; i<n_rectangles; i++) {
Event event = new Event ();
event.x = rectangles[i].x;
event.y = rectangles[i].y;
event.width = rectangles[i].width;
event.height = rectangles[i].height;
if ((style & SWT.MIRRORED) !is 0) event.x = getClientWidth () - event.width - event.x;
auto damageRgn = OS.gdk_region_new ();
OS.gdk_region_union_with_rect (damageRgn, rectangles + i );
GCData data = new GCData ();
data.damageRgn = damageRgn;
GC gc = event.gc = GC.gtk_new (this, data);
OS.gdk_gc_set_clip_region (gc.handle, damageRgn);
sendEvent (SWT.Paint, event);
gc.dispose ();
OS.gdk_region_destroy (damageRgn);
event.gc = null;
}
OS.g_free (rectangles);
return 0;
}
override int /*long*/ gtk_key_press_event (GtkWidget* widget, GdkEventKey* event) {
auto result = super.gtk_key_press_event (widget, event);
if (result !is 0) return result;
/*
* Feature in GTK. The default behavior when the return key
* is pressed is to select the default button. This is not the
* expected behavior for Composite and its subclasses. The
* fix is to avoid calling the default handler.
*/
if ((state & CANVAS) !is 0 && socketHandle is null) {
GdkEventKey* keyEvent = event;
int key = keyEvent.keyval;
switch (key) {
case OS.GDK_Return:
case OS.GDK_KP_Enter: return 1;
default:
}
}
return result;
}
override int /*long*/ gtk_focus (GtkWidget* widget, int directionType) {
if (widget is socketHandle) return 0;
return super.gtk_focus (widget, directionType);
}
override int /*long*/ gtk_focus_in_event (GtkWidget* widget, GdkEventFocus* event) {
int /*long*/ result = super.gtk_focus_in_event (widget, event);
return (state & CANVAS) !is 0 ? 1 : result;
}
override int /*long*/ gtk_focus_out_event (GtkWidget* widget, GdkEventFocus* event) {
auto result = super.gtk_focus_out_event (widget, event);
return (state & CANVAS) !is 0 ? 1 : result;
}
override int /*long*/ gtk_map (GtkWidget* widget) {
fixZOrder ();
return 0;
}
override int /*long*/ gtk_realize (GtkWidget* widget) {
auto result = super.gtk_realize (widget);
if ((style & SWT.NO_BACKGROUND) !is 0) {
auto window = OS.GTK_WIDGET_WINDOW (paintHandle ());
if (window !is null) OS.gdk_window_set_back_pixmap (window, null, false);
}
if (socketHandle !is null) {
embeddedHandle = OS.gtk_socket_get_id (cast(GtkSocket*)socketHandle);
}
return result;
}
override int /*long*/ gtk_scroll_child (GtkWidget* widget, int /*long*/ scrollType, int /*long*/ horizontal) {
/* Stop GTK scroll child signal for canvas */
OS.g_signal_stop_emission_by_name (widget, OS.scroll_child.ptr);
return 1;
}
override int /*long*/ gtk_style_set (GtkWidget* widget, int /*long*/ previousStyle) {
auto result = super.gtk_style_set (widget, previousStyle);
if ((style & SWT.NO_BACKGROUND) !is 0) {
auto window = OS.GTK_WIDGET_WINDOW (paintHandle ());
if (window !is null) OS.gdk_window_set_back_pixmap (window, null, false);
}
return result;
}
bool hasBorder () {
return (style & SWT.BORDER) !is 0;
}
override void hookEvents () {
super.hookEvents ();
if ((state & CANVAS) !is 0) {
OS.gtk_widget_add_events (handle, OS.GDK_POINTER_MOTION_HINT_MASK);
if (scrolledHandle !is null) {
OS.g_signal_connect_closure (scrolledHandle, OS.scroll_child.ptr, display.closures [SCROLL_CHILD], false);
}
}
}
bool hooksKeys () {
return hooks (SWT.KeyDown) || hooks (SWT.KeyUp);
}
override GtkIMContext* imHandle () {
return imHandle_;
}
/**
* Returns <code>true</code> if the receiver or any ancestor
* up to and including the receiver's nearest ancestor shell
* has deferred the performing of layouts. Otherwise, <code>false</code>
* is returned.
*
* @return the receiver's deferred layout state
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
* @see #setLayoutDeferred(bool)
* @see #getLayoutDeferred()
*
* @since 3.1
*/
public bool isLayoutDeferred () {
checkWidget ();
return findDeferredControl () !is null;
}
override bool isTabGroup() {
if ((state & CANVAS) !is 0) return true;
return super.isTabGroup();
}
/**
* If the receiver has a layout, asks the layout to <em>lay out</em>
* (that is, set the size and location of) the receiver's children.
* If the receiver does not have a layout, do nothing.
* <p>
* This is equivalent to calling <code>layout(true)</code>.
* </p>
* <p>
* Note: Layout is different from painting. If a child is
* moved or resized such that an area in the parent is
* exposed, then the parent will paint. If no child is
* affected, the parent will not paint.
* </p>
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
public void layout () {
checkWidget ();
layout (true);
}
/**
* If the receiver has a layout, asks the layout to <em>lay out</em>
* (that is, set the size and location of) the receiver's children.
* If the argument is <code>true</code> the layout must not rely
* on any information it has cached about the immediate children. If it
* is <code>false</code> the layout may (potentially) optimize the
* work it is doing by assuming that none of the receiver's
* children has changed state since the last layout.
* If the receiver does not have a layout, do nothing.
* <p>
* If a child is resized as a result of a call to layout, the
* resize event will invoke the layout of the child. The layout
* will cascade down through all child widgets in the receiver's widget
* tree until a child is encountered that does not resize. Note that
* a layout due to a resize will not flush any cached information
* (same as <code>layout(false)</code>).
* </p>
* <p>
* Note: Layout is different from painting. If a child is
* moved or resized such that an area in the parent is
* exposed, then the parent will paint. If no child is
* affected, the parent will not paint.
* </p>
*
* @param changed <code>true</code> if the layout must flush its caches, and <code>false</code> otherwise
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
public void layout (bool changed) {
checkWidget ();
if (layout_ is null) return;
layout (changed, false);
}
/**
* If the receiver has a layout, asks the layout to <em>lay out</em>
* (that is, set the size and location of) the receiver's children.
* If the changed argument is <code>true</code> the layout must not rely
* on any information it has cached about its children. If it
* is <code>false</code> the layout may (potentially) optimize the
* work it is doing by assuming that none of the receiver's
* children has changed state since the last layout.
* If the all argument is <code>true</code> the layout will cascade down
* through all child widgets in the receiver's widget tree, regardless of
* whether the child has changed size. The changed argument is applied to
* all layouts. If the all argument is <code>false</code>, the layout will
* <em>not</em> cascade down through all child widgets in the receiver's widget
* tree. However, if a child is resized as a result of a call to layout, the
* resize event will invoke the layout of the child. Note that
* a layout due to a resize will not flush any cached information
* (same as <code>layout(false)</code>).
* </p>
* <p>
* Note: Layout is different from painting. If a child is
* moved or resized such that an area in the parent is
* exposed, then the parent will paint. If no child is
* affected, the parent will not paint.
* </p>
*
* @param changed <code>true</code> if the layout must flush its caches, and <code>false</code> otherwise
* @param all <code>true</code> if all children in the receiver's widget tree should be laid out, and <code>false</code> otherwise
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
* @since 3.1
*/
public void layout (bool changed, bool all) {
checkWidget ();
if (layout_ is null && !all) return;
markLayout (changed, all);
updateLayout (all);
}
/**
* Forces a lay out (that is, sets the size and location) of all widgets that
* are in the parent hierarchy of the changed control up to and including the
* receiver. The layouts in the hierarchy must not rely on any information
* cached about the changed control or any of its ancestors. The layout may
* (potentially) optimize the work it is doing by assuming that none of the
* peers of the changed control have changed state since the last layout.
* If an ancestor does not have a layout, skip it.
* <p>
* Note: Layout is different from painting. If a child is
* moved or resized such that an area in the parent is
* exposed, then the parent will paint. If no child is
* affected, the parent will not paint.
* </p>
*
* @param changed a control that has had a state change which requires a recalculation of its size
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_INVALID_ARGUMENT - if the changed array is null any of its controls are null or have been disposed</li>
* <li>ERROR_INVALID_PARENT - if any control in changed is not in the widget tree of the receiver</li>
* </ul>
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
* @since 3.1
*/
public void layout (Control [] changed) {
checkWidget ();
if (changed is null) error (SWT.ERROR_INVALID_ARGUMENT);
for (int i=0; i<changed.length; i++) {
Control control = changed [i];
if (control is null) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
bool ancestor = false;
Composite composite = control.parent;
while (composite !is null) {
ancestor = composite is this;
if (ancestor) break;
composite = composite.parent;
}
if (!ancestor) error (SWT.ERROR_INVALID_PARENT);
}
int updateCount = 0;
Composite [] update = new Composite [16];
for (int i=0; i<changed.length; i++) {
Control child = changed [i];
Composite composite = child.parent;
while (child !is this) {
if (composite.layout_ !is null) {
composite.state |= LAYOUT_NEEDED;
if (!composite.layout_.flushCache (child)) {
composite.state |= LAYOUT_CHANGED;
}
}
if (updateCount is update.length) {
Composite [] newUpdate = new Composite [update.length + 16];
System.arraycopy (update, 0, newUpdate, 0, update.length);
update = newUpdate;
}
child = update [updateCount++] = composite;
composite = child.parent;
}
}
for (int i=updateCount-1; i>=0; i--) {
update [i].updateLayout (false);
}
}
override void markLayout (bool changed, bool all) {
if (layout_ !is null) {
state |= LAYOUT_NEEDED;
if (changed) state |= LAYOUT_CHANGED;
}
if (all) {
Control [] children = _getChildren ();
for (int i=0; i<children.length; i++) {
children [i].markLayout (changed, all);
}
}
}
void moveAbove (GtkWidget* child, GtkWidget* sibling) {
if (child is sibling) return;
auto parentHandle = parentingHandle ();
auto fixed = cast(GtkFixed*)parentHandle;
GList* children = fixed.children;
if (children is null) return;
void* data;
GtkWidget* widget;
void* childData;
GList* childLink, siblingLink;
GList* temp = children;
while (temp !is null) {
data = temp.data;
widget = *cast(GtkWidget**) data;
if (child is widget) {
childLink = temp;
childData = data;
} else if (sibling is widget) {
siblingLink = temp;
}
if (childData !is null && (sibling is null || siblingLink !is null)) break;
temp = cast(GList*)OS.g_list_next (temp);
}
children = OS.g_list_remove_link (children, childLink);
if (siblingLink is null || siblingLink.prev is null) {
OS.g_list_free_1 (childLink);
children = OS.g_list_prepend (children, childData);
} else {
temp = siblingLink.prev;
childLink.prev = temp;
temp.next = childLink;
childLink.next = siblingLink;
siblingLink.prev = childLink;
}
fixed.children = children;
parentHandle = cast(GtkWidget*)fixed;
}
alias Scrollable.moveBelow moveBelow;
void moveBelow (GtkWidget* child, GtkWidget* sibling) {
if (child is sibling) return;
auto parentHandle = parentingHandle ();
if (sibling is null && cast(GtkWidget*)parentHandle is cast(GtkWidget*)fixedHandle) {
moveAbove (child, scrolledHandle !is null ? cast(GtkWidget*)scrolledHandle : handle);
return;
}
auto fixed = cast(GtkFixed*)parentHandle;
GList* children = fixed.children;
if (children is null) return;
void* data;
GtkWidget* widget;
void* childData;
GList* childLink;
GList* siblingLink;
GList* temp = children;
while (temp !is null) {
data = temp.data;
widget = *cast(GtkWidget**) temp.data;
if (child is widget) {
childLink = temp;
childData = data;
} else if (sibling is widget) {
siblingLink = temp;
}
if (childData !is null && (sibling is null || siblingLink !is null)) break;
temp = OS.g_list_next(temp);
}
children = OS.g_list_remove_link (children, childLink);
if (siblingLink is null || OS.g_list_next(siblingLink) is null) {
OS.g_list_free_1 (childLink);
children = OS.g_list_append (children, childData);
} else {
temp = OS.g_list_next( siblingLink );
OS.g_list_set_next (childLink, temp);
OS.g_list_set_previous (temp, childLink);
OS.g_list_set_previous (childLink, siblingLink);
OS.g_list_set_next (siblingLink, childLink);
}
fixed.children = children;
parentHandle = cast(GtkWidget*)fixed;
}
override
void moveChildren(int oldWidth) {
Control[] children = _getChildren ();
for (int i = 0; i < children.length; i++) {
Control child = children[i];
auto topHandle = child.topHandle ();
int x = OS.GTK_WIDGET_X (topHandle);
int y = OS.GTK_WIDGET_Y (topHandle);
int controlWidth = (child.state & ZERO_WIDTH) !is 0 ? 0 : OS.GTK_WIDGET_WIDTH (topHandle);
x = oldWidth - controlWidth - x;
int clientWidth = getClientWidth ();
x = clientWidth - controlWidth - x;
if (child.enableWindow !is null) {
OS.gdk_window_move (child.enableWindow, x, y);
}
child.moveHandle (x, y);
/*
* Cause a size allocation this widget's topHandle. Note that
* all calls to gtk_widget_size_allocate() must be preceded by
* a call to gtk_widget_size_request().
*/
GtkRequisition requisition;
gtk_widget_size_request (topHandle, &requisition);
GtkAllocation allocation;
allocation.x = x;
allocation.y = y;
allocation.width = OS.GTK_WIDGET_WIDTH (topHandle);
allocation.height = OS.GTK_WIDGET_HEIGHT (topHandle);
OS.gtk_widget_size_allocate (topHandle, &allocation);
Control control = child.findBackgroundControl ();
if (control !is null && control.backgroundImage !is null) {
if (child.isVisible ()) child.redrawWidget (0, 0, 0, 0, true, true, true);
}
}
}
Point minimumSize (int wHint, int hHint, bool changed) {
Control [] children = _getChildren ();
int width = 0, height = 0;
for (int i=0; i<children.length; i++) {
Rectangle rect = children [i].getBounds ();
width = Math.max (width, rect.x + rect.width);
height = Math.max (height, rect.y + rect.height);
}
return new Point (width, height);
}
GtkWidget* parentingHandle () {
if ((state & CANVAS) !is 0) return handle;
return fixedHandle !is null ? fixedHandle : handle;
}
override void printWidget (GC gc, GdkDrawable* drawable, int depth, int x, int y) {
Region oldClip = new Region (gc.getDevice ());
Region newClip = new Region (gc.getDevice ());
gc.getClipping (oldClip);
Rectangle rect = getBounds ();
newClip.add (oldClip);
newClip.intersect (x, y, rect.width, rect.height);
gc.setClipping (newClip);
super.printWidget (gc, drawable, depth, x, y);
Rectangle clientRect = getClientArea ();
Point pt = display.map (this, parent, clientRect.x, clientRect.y);
clientRect.x = x + pt.x - rect.x;
clientRect.y = y + pt.y - rect.y;
newClip.intersect (clientRect);
gc.setClipping (newClip);
Control [] children = _getChildren ();
for (int i=children.length-1; i>=0; --i) {
Control child = children [i];
if (child.getVisible ()) {
Point location = child.getLocation ();
child.printWidget (gc, drawable, depth, x + location.x, y + location.y);
}
}
gc.setClipping (oldClip);
oldClip.dispose ();
newClip.dispose ();
}
override void redrawChildren () {
super.redrawChildren ();
Control [] children = _getChildren ();
for (int i = 0; i < children.length; i++) {
Control child = children [i];
if ((child.state & PARENT_BACKGROUND) !is 0) {
child.redrawWidget (0, 0, 0, 0, true, false, true);
child.redrawChildren ();
}
}
}
override void register () {
super.register ();
if (socketHandle !is null) display.addWidget (socketHandle, this);
}
override void releaseChildren (bool destroy) {
Control [] children = _getChildren ();
for (int i=0; i<children.length; i++) {
Control child = children [i];
if (child !is null && !child.isDisposed ()) {
child.release (false);
}
}
super.releaseChildren (destroy);
}
override void releaseHandle () {
super.releaseHandle ();
socketHandle = null;
embeddedHandle = 0;
}
override void releaseWidget () {
super.releaseWidget ();
if (imHandle_ !is null) OS.g_object_unref (imHandle_);
imHandle_ = null;
layout_ = null;
tabList = null;
}
void removeControl (Control control) {
fixTabList (control);
}
override void resizeHandle (int width, int height) {
super.resizeHandle (width, height);
if (socketHandle !is null) OS.gtk_widget_set_size_request (socketHandle, width, height);
}
/**
* Sets the background drawing mode to the argument which should
* be one of the following constants defined in class <code>SWT</code>:
* <code>INHERIT_NONE</code>, <code>INHERIT_DEFAULT</code>,
* <code>INHERIT_FORCE</code>.
*
* @param mode the new background mode
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
* @see SWT
*
* @since 3.2
*/
public void setBackgroundMode (int mode) {
checkWidget ();
backgroundMode = mode;
Control[] children = _getChildren ();
for (int i = 0; i < children.length; i++) {
children [i].updateBackgroundMode ();
}
}
override int setBounds (int x, int y, int width, int height, bool move, bool resize) {
int result = super.setBounds (x, y, width, height, move, resize);
if ((result & RESIZED) !is 0 && layout_ !is null) {
markLayout (false, false);
updateLayout (false);
}
return result;
}
override public bool setFocus () {
checkWidget();
Control [] children = _getChildren ();
for (int i=0; i<children.length; i++) {
Control child = children [i];
if (child.getVisible () && child.setFocus ()) return true;
}
return super.setFocus ();
}
/**
* Sets the layout which is associated with the receiver to be
* the argument which may be null.
*
* @param layout the receiver's new layout or null
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
public void setLayout (Layout layout) {
checkWidget();
this.layout_ = layout;
}
/**
* If the argument is <code>true</code>, causes subsequent layout
* operations in the receiver or any of its children to be ignored.
* No layout of any kind can occur in the receiver or any of its
* children until the flag is set to false.
* Layout operations that occurred while the flag was
* <code>true</code> are remembered and when the flag is set to
* <code>false</code>, the layout operations are performed in an
* optimized manner. Nested calls to this method are stacked.
*
* @param defer the new defer state
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
* @see #layout(bool)
* @see #layout(Control[])
*
* @since 3.1
*/
public void setLayoutDeferred (bool defer) {
if (!defer) {
if (--layoutCount is 0) {
if ((state & LAYOUT_CHILD) !is 0 || (state & LAYOUT_NEEDED) !is 0) {
updateLayout (true);
}
}
} else {
layoutCount++;
}
}
override bool setScrollBarVisible (ScrollBar bar, bool visible) {
bool changed = super.setScrollBarVisible (bar, visible);
if (changed && layout_ !is null) {
markLayout (false, false);
updateLayout (false);
}
return changed;
}
override bool setTabGroupFocus (bool next) {
if (isTabItem ()) return setTabItemFocus (next);
bool takeFocus = (style & SWT.NO_FOCUS) is 0;
if ((state & CANVAS) !is 0) takeFocus = hooksKeys ();
if (socketHandle !is null) takeFocus = true;
if (takeFocus && setTabItemFocus (next)) return true;
Control [] children = _getChildren ();
for (int i=0; i<children.length; i++) {
Control child = children [i];
if (child.isTabItem () && child.setTabItemFocus (next)) return true;
}
return false;
}
override bool setTabItemFocus (bool next) {
if (!super.setTabItemFocus (next)) return false;
if (socketHandle !is null) {
int direction = next ? OS.GTK_DIR_TAB_FORWARD : OS.GTK_DIR_TAB_BACKWARD;
OS.GTK_WIDGET_UNSET_FLAGS (socketHandle, OS.GTK_HAS_FOCUS);
OS.gtk_widget_child_focus (socketHandle, direction);
OS.GTK_WIDGET_SET_FLAGS (socketHandle, OS.GTK_HAS_FOCUS);
}
return true;
}
/**
* Sets the tabbing order for the specified controls to
* match the order that they occur in the argument list.
*
* @param tabList the ordered list of controls representing the tab order or null
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_INVALID_ARGUMENT - if a widget in the tabList is null or has been disposed</li>
* <li>ERROR_INVALID_PARENT - if widget in the tabList is not in the same widget tree</li>
* </ul>
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
public void setTabList (Control [] tabList) {
checkWidget ();
if (tabList !is null) {
for (int i=0; i<tabList.length; i++) {
Control control = tabList [i];
if (control is null) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.parent !is this) error (SWT.ERROR_INVALID_PARENT);
}
Control [] newList = new Control [tabList.length];
System.arraycopy (tabList, 0, newList, 0, tabList.length);
tabList = newList;
}
this.tabList = tabList;
}
override void showWidget () {
super.showWidget ();
if (socketHandle !is null) {
OS.gtk_widget_show (socketHandle);
embeddedHandle = OS.gtk_socket_get_id (cast(GtkSocket*)socketHandle);
}
if (scrolledHandle is null) fixStyle (handle);
}
override bool translateMnemonic (Event event, Control control) {
if (super.translateMnemonic (event, control)) return true;
if (control !is null) {
Control [] children = _getChildren ();
for (int i=0; i<children.length; i++) {
Control child = children [i];
if (child.translateMnemonic (event, control)) return true;
}
}
return false;
}
override int traversalCode(int key, GdkEventKey* event) {
if ((state & CANVAS) !is 0) {
if ((style & SWT.NO_FOCUS) !is 0) return 0;
if (hooksKeys ()) return 0;
}
return super.traversalCode (key, event);
}
override bool translateTraversal (GdkEventKey* keyEvent) {
if (socketHandle !is null) return false;
return super.translateTraversal (keyEvent);
}
override void updateBackgroundMode () {
super.updateBackgroundMode ();
Control [] children = _getChildren ();
for (int i = 0; i < children.length; i++) {
children [i].updateBackgroundMode ();
}
}
override void updateLayout (bool all) {
Composite parent = findDeferredControl ();
if (parent !is null) {
parent.state |= LAYOUT_CHILD;
return;
}
if ((state & LAYOUT_NEEDED) !is 0) {
bool changed = (state & LAYOUT_CHANGED) !is 0;
state &= ~(LAYOUT_NEEDED | LAYOUT_CHANGED);
layout_.layout (this, changed);
}
if (all) {
state &= ~LAYOUT_CHILD;
Control [] children = _getChildren ();
for (int i=0; i<children.length; i++) {
children [i].updateLayout (all);
}
}
}
}
|
D
|
// REQUIRED_ARGS: -c
/*
TEST_OUTPUT:
---
fail_compilation/imports/foo10727b.d(25): Error: undefined identifier 'Frop'
---
*/
import imports.foo10727b;
|
D
|
module org.serviio.dlna.AudioCodec;
import java.lang.String;
public class AudioCodec
{
enum AudioCodecEnum
{
MP3,
MP2,
MP1,
AAC,
AC3,
LPCM,
DTS,
WMA,
WMA_PRO,
FLAC,
VORBIS,
TRUEHD,
AMR,
REAL,
}
AudioCodecEnum audioCodec;
alias audioCodec this;
public String getFFmpegEncoderName()
{
switch(audioCodec)
{
case MP3:
return "libmp3lame";
case MP2:
return "mp2";
case MP1:
return "mp1";
case AAC:
return "aac";
case AC3:
if (System.getProperty("serviio.fixedPointEncoders") is null) {
return "ac3";
}
return "ac3_fixed";
case LPCM:
return "pcm_s16be";
case DTS:
return "dca";
case WMA:
return "wmav2";
case WMA_PRO:
return "wmapro";
case FLAC:
return "flac";
case VORBIS:
return "vorbis";
case TRUEHD:
return "truehd";
case AMR:
return "amrnb";
case REAL:
throw new RuntimeException("RealAudio is not supported");
}
return "";
}
public static AudioCodecEnum getByFFmpegDecoderName(String ffmpegName)
{
if (ffmpegName !is null) {
if (ffmpegName.equals("mp3"))
return MP3;
if ((ffmpegName.equals("ac3")) || (ffmpegName.startsWith("ac-3")) || (ffmpegName.equals("liba52")) || (ffmpegName.equals("eac3")))
{
return AC3;
}if ((ffmpegName.equals("aac")) || (ffmpegName.equals("mpeg4aac")) || (ffmpegName.equals("aac_latm")))
return AAC;
if ((ffmpegName.startsWith("dca")) || (ffmpegName.startsWith("dts")))
return DTS;
if ((ffmpegName.equals("wmav1")) || (ffmpegName.equals("wmav2")))
return WMA;
if ((ffmpegName.equals("lpcm")) || (ffmpegName.startsWith("pcm_")) || (ffmpegName.startsWith("adpcm_")))
return LPCM;
if ((ffmpegName.equals("wmapro")) || (ffmpegName.equals("0x0162")))
return WMA_PRO;
if (ffmpegName.equals("mp2"))
return MP2;
if (ffmpegName.equals("mp1"))
return MP1;
if (ffmpegName.equals("flac"))
return FLAC;
if (ffmpegName.equals("vorbis"))
return VORBIS;
if (ffmpegName.equals("truehd"))
return TRUEHD;
if ((ffmpegName.equals("amrnb")) || (ffmpegName.equals("amrwb")) || (ffmpegName.equals("amr_nb")) || (ffmpegName.equals("amr_wb")))
return AMR;
if ((ffmpegName.equals("ralf")) || (ffmpegName.startsWith("real")) || (ffmpegName.equals("sipr")) || (ffmpegName.equals("cook"))) {
return REAL;
}
}
return null;
}
}
/* Location: D:\Program Files\Serviio\lib\serviio.jar
* Qualified Name: org.serviio.dlna.AudioCodec
* JD-Core Version: 0.6.2
*/
|
D
|
putlin (2) --- put a line on a file 03/25/82
_C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n
integer function putlin (line, fd)
character line (ARB)
file_des fd
Library: vswtlb (standard Subsystem library)
_F_u_n_c_t_i_o_n
'Putlin' is the primary Subsystem output routine. The
character string supplied as the first argument is placed on
the file specified by the second argument. The function
return is OK if the write was successful, ERR otherwise.
_I_m_p_l_e_m_e_n_t_a_t_i_o_n
'Putlin' first calls 'mapsu' to map any standard unit which
may have been supplied on the call to a file descriptor.
The file specified by this descriptor is checked to insure
writeability. If the last operation on the given file was
not a 'putlin', 'flush$' is called to place the file's
buffer in the empty state. Depending on the device type
associated with the file, one of the device dependent
drivers 'dputl$' (for disk files) or 'tputl$' (for terminal
files) is called to perform the actual data transfer. No
data transfer takes place for the null device (/dev/null).
The function return is the value returned by the device
dependent driver chosen, and is OK for a successful trans-
fer, ERR for an unsuccessful transfer.
_C_a_l_l_s
mapsu, dputl$, tputl$, flush$
_S_e_e _A_l_s_o
mapsu (2), dputl$ (6), tputl$ (6), putch (2), getlin (2)
putlin (2) - 1 - putlin (2)
|
D
|
/**
Helper functions to interact with the Python C API
*/
module python.cooked;
import python.raw;
import python.boilerplate: Module, CFunctions, Aggregates;
/**
Creates a Python3 module from the given C functions.
Each function has the same name in Python.
*/
auto createModule(Module module_, alias cfunctions, alias aggregates)()
if(isPython3 &&
is(cfunctions == CFunctions!F, F...) &&
is(aggregates == Aggregates!T, T...))
{
static PyModuleDef moduleDef;
auto pyMethodDefs = cFunctionsToPyMethodDefs!(cfunctions);
moduleDef = pyModuleDef(module_.name.ptr, null /*doc*/, -1 /*size*/, pyMethodDefs);
auto module_ = pyModuleCreate(&moduleDef);
addModuleTypes!aggregates(module_);
return module_;
}
/**
Calls Py_InitModule. It's the Python2 way of creating a new Python module.
Each function has the same name in Python.
*/
void initModule(Module module_, alias cfunctions, alias aggregates)()
if(isPython2 &&
is(cfunctions == CFunctions!F, F...) &&
is(aggregates == Aggregates!T, T...))
{
auto module_ = pyInitModule(&module_.name[0], cFunctionsToPyMethodDefs!(cfunctions));
addModuleTypes!aggregates(module_);
}
private void addModuleTypes(alias aggregates)(PyObject* module_) {
import python.type: PythonType;
static foreach(T; aggregates.Types) {
if(PyType_Ready(PythonType!T.pyType) < 0)
throw new Exception("Could not get type ready for `" ~ __traits(identifier, T) ~ "`");
pyIncRef(PythonType!T.pyObject);
PyModule_AddObject(module_, __traits(identifier, T), PythonType!T.pyObject);
}
}
/// Returns a PyMethodDef for each cfunction.
private PyMethodDef* cFunctionsToPyMethodDefs(alias cfunctions)()
if(is(cfunctions == CFunctions!(A), A...))
{
// +1 due to the sentinel that Python uses to know when to
// stop incrementing through the pointer.
static PyMethodDef[cfunctions.length + 1] methods;
static foreach(i, cfunction; cfunctions.symbols) {
// TODO: make it possible to use a different name with a UDA
static assert(is(typeof(&cfunction): PyCFunction) ||
is(typeof(&cfunction): PyCFunctionWithKeywords),
__traits(identifier, cfunction) ~ " is not a Python C function");
methods[i] = pyMethodDef!(__traits(identifier, cfunction))(cast(PyCFunction) &cfunction);
}
return &methods[0];
}
/**
Helper function to get around the C syntax problem with
PyModuleDef_HEAD_INIT - it doesn't compile in D.
*/
private auto pyModuleDef(A...)(auto ref A args) if(isPython3) {
import std.functional: forward;
return PyModuleDef(
// the line below is a manual D version expansion of PyModuleDef_HEAD_INIT
PyModuleDef_Base(PyObject(1 /*ref count*/, null /*type*/), null /*m_init*/, 0/*m_index*/, null/*m_copy*/),
forward!args
);
}
/**
Helper function to create PyMethodDef structs.
The strings are compile-time parameters to avoid passing GC-allocated memory
to Python (by calling std.string.toStringz or manually appending the null
terminator).
*/
auto pyMethodDef(string name, int flags = MethodArgs.Var | MethodArgs.Keywords, string doc = "", F)
(F cfunction) pure
{
import std.traits: ReturnType, Parameters, isPointer;
import std.meta: allSatisfy;
static assert(isPointer!(ReturnType!F),
"C function method implementation must return a pointer");
static assert(allSatisfy!(isPointer, Parameters!F),
"C function method implementation must take pointers");
static assert(Parameters!F.length == 2 || Parameters!F.length == 3,
"C function method implementation must take 2 or 3 pointers");
return PyMethodDef(name.ptr, cast(PyCFunction) cfunction, flags, doc.ptr);
}
|
D
|
module UnrealScript.UnrealEd.InterpTrackHelper;
import ScriptClasses;
import UnrealScript.Helpers;
import UnrealScript.Core.UObject;
extern(C++) interface InterpTrackHelper : UObject
{
public extern(D):
private static __gshared ScriptClass mStaticClass;
@property final static ScriptClass StaticClass() { mixin(MGSCC("Class UnrealEd.InterpTrackHelper")); }
private static __gshared InterpTrackHelper mDefaultProperties;
@property final static InterpTrackHelper DefaultProperties() { mixin(MGDPC("InterpTrackHelper", "InterpTrackHelper UnrealEd.Default__InterpTrackHelper")); }
}
|
D
|
# FIXED
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/source/F2837xS_PieVect.c
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_device.h
F2837xS_PieVect.obj: C:/ti/ti-cgt-c2000_18.1.1.LTS/include/assert.h
F2837xS_PieVect.obj: C:/ti/ti-cgt-c2000_18.1.1.LTS/include/_ti_config.h
F2837xS_PieVect.obj: C:/ti/ti-cgt-c2000_18.1.1.LTS/include/linkage.h
F2837xS_PieVect.obj: C:/ti/ti-cgt-c2000_18.1.1.LTS/include/stdarg.h
F2837xS_PieVect.obj: C:/ti/ti-cgt-c2000_18.1.1.LTS/include/stdbool.h
F2837xS_PieVect.obj: C:/ti/ti-cgt-c2000_18.1.1.LTS/include/stddef.h
F2837xS_PieVect.obj: C:/ti/ti-cgt-c2000_18.1.1.LTS/include/stdint.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_adc.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_analogsubsys.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_cla.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_cmpss.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_cputimer.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_dac.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_dcsm.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_dma.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_ecap.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_emif.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_epwm.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_epwm_xbar.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_eqep.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_flash.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_gpio.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_i2c.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_input_xbar.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_mcbsp.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_memconfig.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_nmiintrupt.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_output_xbar.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_piectrl.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_pievect.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_sci.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_sdfm.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_spi.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_sysctrl.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_upp.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_xbar.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_xint.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_can.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Examples.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_GlobalPrototypes.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_cputimervars.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Cla_defines.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_EPwm_defines.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Adc_defines.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Emif_defines.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Gpio_defines.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_I2c_defines.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Pie_defines.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Dma_defines.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_SysCtrl_defines.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Upp_defines.h
F2837xS_PieVect.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_defaultisr.h
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/source/F2837xS_PieVect.c:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_device.h:
C:/ti/ti-cgt-c2000_18.1.1.LTS/include/assert.h:
C:/ti/ti-cgt-c2000_18.1.1.LTS/include/_ti_config.h:
C:/ti/ti-cgt-c2000_18.1.1.LTS/include/linkage.h:
C:/ti/ti-cgt-c2000_18.1.1.LTS/include/stdarg.h:
C:/ti/ti-cgt-c2000_18.1.1.LTS/include/stdbool.h:
C:/ti/ti-cgt-c2000_18.1.1.LTS/include/stddef.h:
C:/ti/ti-cgt-c2000_18.1.1.LTS/include/stdint.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_adc.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_analogsubsys.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_cla.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_cmpss.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_cputimer.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_dac.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_dcsm.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_dma.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_ecap.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_emif.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_epwm.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_epwm_xbar.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_eqep.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_flash.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_gpio.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_i2c.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_input_xbar.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_mcbsp.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_memconfig.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_nmiintrupt.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_output_xbar.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_piectrl.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_pievect.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_sci.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_sdfm.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_spi.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_sysctrl.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_upp.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_xbar.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_xint.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_can.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Examples.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_GlobalPrototypes.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_cputimervars.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Cla_defines.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_EPwm_defines.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Adc_defines.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Emif_defines.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Gpio_defines.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_I2c_defines.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Pie_defines.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Dma_defines.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_SysCtrl_defines.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Upp_defines.h:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_defaultisr.h:
|
D
|
/**
* Contains TelegramMessageAutoDeleteTimerChanged
*/
module tg.types.telegram_message_auto_delete_timer_changed;
import tg.core.type, tg.core.exception;
import std.json, tg.type;
/**
* This object represents a service message about a change in auto-delete timer settings.
*/
class TelegramMessageAutoDeleteTimerChanged : TelegramType {
/**
* Creates new type object
*/
nothrow pure public this () @safe {
_message_auto_delete_time = 0;
}
/** Add constructor with data init from response */
mixin(TelegramTypeConstructor);
override public void setFromJson (JSONValue data) {
if ( "message_auto_delete_time" !in data ) throw new TelegramException("Could not find reqired entry : message_auto_delete_time");
_message_auto_delete_time = data["message_auto_delete_time"].integer();
}
override public JSONValue getAsJson () {
JSONValue data = parseJSON("");
data["message_auto_delete_time"] = _message_auto_delete_time;
return data;
}
/** New auto-delete time for messages in the chat */
private ulong _message_auto_delete_time;
/**
* Getter for '_message_auto_delete_time'
* Returns: Current value of '_message_auto_delete_time'
*/
@property ulong messageAutoDeleteTime () { return _message_auto_delete_time; }
/**
* Setter for '_message_auto_delete_time'
* Params: messageAutoDeleteTimeNew = New value of '_message_auto_delete_time'
* Returns: New value of '_message_auto_delete_time'
*/
@property ulong messageAutoDeleteTime ( ulong messageAutoDeleteTimeNew ) { return _message_auto_delete_time = messageAutoDeleteTimeNew; }
}
|
D
|
module RoundRobinTask;
interface IRoundRobinTask
{
void Task();
}
abstract class RoundRobinTask : IRoundRobinTask
{
int Period;
this(int period)
{
Period = period;
}
void Task();
}
|
D
|
#!/usr/bin/env rdmd -i -I..
import std.stdio;
import std.range;
import std.algorithm;
import std.conv;
import std.datetime;
import std.typecons;
import kreikey.intmath;
void main() {
auto triplets = iota!long(3, 1500001)
.map!(a => a, countPythagoreanTriples)
.filter!(a => a[1] > 0)
.each!(a => writefln("%(%s %s%)", a))();
}
|
D
|
import std.stdio;
import derelict.sdl2.sdl;
import derelict.sdl2.image;
import derelict.opengl3.gl;
import derelict.opengl3.gl3;
import game.timer;
import game.application;
import game.texture;
class Game : Application
{
override void initialize()
{
texture = new Texture("data/beacon.png");
}
override void shutdown()
{
}
override void doFrame(float elapsedSeconds)
{
if (input.isKeyJustPressed(SDL_SCANCODE_ESCAPE))
{
quit = true;
}
dx = dy = 0;
if (input.isKeyDown(SDL_SCANCODE_UP))
{
dy = -1;
}
else if (input.isKeyDown(SDL_SCANCODE_DOWN))
{
dy = 1;
}
if (input.isKeyDown(SDL_SCANCODE_LEFT))
{
dx = -1;
}
else if (input.isKeyDown(SDL_SCANCODE_RIGHT))
{
dx = 1;
}
const float speed = 200;
coordX += dx * speed * elapsedSeconds;
coordY += dy * speed * elapsedSeconds;
glClearColor(0.0, 0.1, 0.4, 1);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_TEXTURE_2D);
texture.use();
glBegin(GL_QUADS);
glTexCoord2f(0, 0);
glVertex2f(coordX + 0, coordY + 0);
glTexCoord2f(1, 0);
glVertex2f(coordX + 64, coordY + 0);
glTexCoord2f(1, 1);
glVertex2f(coordX + 64, coordY + 64);
glTexCoord2f(0, 1);
glVertex2f(coordX + 0, coordY + 64);
glEnd();
glDisable(GL_TEXTURE_2D);
if (fpsCounter.timeToShow())
{
writeln("FPS: ", fpsCounter.getFps());
}
}
Texture texture;
float dx, dy;
float coordX = 0;
float coordY = 0;
}
void main()
{
Game game = new Game();
game.run();
}
|
D
|
/*******************************************************************************
* Copyright (c) 2003, 2005 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.draw2d.graph.CompoundPopulateRanks;
import dwt.dwthelper.utils;
import dwtx.dwtxhelper.Collection;
import dwtx.draw2d.graph.PopulateRanks;
import dwtx.draw2d.graph.DirectedGraph;
import dwtx.draw2d.graph.Subgraph;
import dwtx.draw2d.graph.CompoundDirectedGraph;
import dwtx.draw2d.graph.Edge;
import dwtx.draw2d.graph.NodeList;
import dwtx.draw2d.graph.Node;
/**
* Places nodes into ranks for a compound directed graph. If a subgraph spans a rank
* without any nodes which belong to that rank, a bridge node is inserted to prevent nodes
* from violating the subgraph boundary.
* @author Randy Hudson
* @since 2.1.2
*/
class CompoundPopulateRanks : PopulateRanks {
public void visit(DirectedGraph g) {
CompoundDirectedGraph graph = cast(CompoundDirectedGraph)g;
/**
* Remove long containment edges at this point so they don't affect MinCross.
*/
Iterator containment = graph.containment.iterator();
while (containment.hasNext()) {
Edge e = cast(Edge)containment.next();
if (e.getSlack() > 0) {
graph.removeEdge(e);
containment.remove();
}
}
super.visit(g);
NodeList subgraphs = graph.subgraphs;
for (int i = 0; i < subgraphs.size(); i++) {
Subgraph subgraph = cast(Subgraph)subgraphs.get(i);
bridgeSubgraph(subgraph, graph);
}
}
/**
* @param subgraph
*/
private void bridgeSubgraph(Subgraph subgraph, CompoundDirectedGraph g) {
int offset = subgraph.head.rank;
bool occupied[] = new bool[subgraph.tail.rank - subgraph.head.rank + 1];
Node bridge[] = new Node[occupied.length];
for (int i = 0; i < subgraph.members.size(); i++) {
Node n = cast(Node)subgraph.members.get(i);
if (auto s = cast(Subgraph)n ) {
for (int r = s.head.rank; r <= s.tail.rank; r++)
occupied[r - offset] = true;
} else
occupied[n.rank - offset] = true;
}
for (int i = 0; i < bridge.length; i++) {
if (!occupied[i]) {
Node br = bridge[i] = new Node(stringcast("bridge"), subgraph); //$NON-NLS-1$
br.rank = i + offset;
br.height = br.width = 0;
br.nestingIndex = subgraph.nestingIndex;
g.ranks.getRank(br.rank).add(br);
g.nodes.add(br);
}
}
}
}
|
D
|
import std.socket;
interface Connection {
public:
void setSocket(Socket);
void start();
void recv(ubyte[] data);
ulong send(ubyte[] data);
void close();
}
class TCPConnection : Connection{
protected:
Socket socket;
public:
override void setSocket(Socket socket) {
this.socket = socket;
}
override void start() {}
override void recv(ubyte[] data) {
import std.string:assumeUTF;
string s = data.assumeUTF;
send(cast(ubyte[])s);
}
override ulong send(ubyte[] data) {
ulong sent = 0;
while (true) {
if (!socket.isAlive) { return sent; }
auto l = socket.send(data);
sent += l;
if (l >= data.length) {
break;
}
data = data[l..$];
}
return sent;
}
override void close() {
import std.stdio;
writeln("CLOSE");
}
}
class TCPListener(TCPConnection)
if (is(TCPConnection:Connection))
{
private:
Socket listener;
TCPConnection[] conns;
ulong id;
public:
void listen(ushort port) {
this.listener = new TcpSocket();
listener.setOption(SocketOptionLevel.SOCKET, SocketOption.REUSEADDR, true);
listener.bind(new InternetAddress(port));
listener.listen(128);
auto socketSet = new SocketSet();
auto errorSet = new SocketSet();
while (true) {
socketSet.reset();
socketSet.add(listener);
foreach (conn; this.conns) {
socketSet.add(conn.socket);
}
errorSet.reset();
errorSet.add(listener);
foreach (conn; this.conns) {
errorSet.add(conn.socket);
}
// wait for event
Socket.select(socketSet, null, errorSet);
// accept new connection
if (socketSet.isSet(listener)) {
auto sock = listener.accept();
auto conn = new TCPConnection();
conn.setSocket(sock);
conns ~= conn;
}
ulong[] rmlist;
foreach (i, conn; this.conns) {
// when-error
if (errorSet.isSet(conn.socket)) {
conn.close();
rmlist ~= i;
continue;
}
if (socketSet.isSet(conn.socket)) {
ubyte[1024] buf;
// error check
auto r = conn.socket.receive(buf);
if (r == 0 || r == Socket.ERROR) {
conn.close();
rmlist ~= i;
continue;
}
conn.recv(buf);
}
}
// remove closed connection
import std.algorithm:remove, sort;
foreach (i; rmlist.sort!"a > b") {
conns = conns.remove(i);
}
}
}
}
void main()
{
auto listener = new TCPListener!TCPConnection();
listener.listen(8888);
}
|
D
|
module claro.graphics.widgets.progress;
import std.stdio;
import std.string;
private import claro.graphics.widget;
extern (C) {
object_t *progress_widget_create( object_t *parent, bounds_t *bounds, int flags );
void progress_set_range( object_t *progress, double minimum, double maximum );
void progress_set_level( object_t *progress, double value );
void progress_set_orientation( object_t *progress, int style );
double progress_get_value( object_t *progress );
}
enum cProgressOrientation {
LeftRight = 0x0,
RightLeft = 0x01,
TopBottom = 0x02,
BottomTop = 0x03,
}
class ProgressWidget : Widget {
double _minimum = 0;
double _maximum = 1;
this( CObject parent, Bounds b, int flags ) {
super( parent );
this.b = b;
this.obj = progress_widget_create( CObject.getObj(parent), this.b.obj, flags );
this.created( );
}
this( CObject parent, Bounds b ) {
this( parent, b, 0 );
}
void value( double d )
{
progress_set_level( this.obj, d );
}
void orientation( int s )
{
progress_set_orientation( this.obj, s );
}
}
|
D
|
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96254
// { dg-do compile }
mixin template test()
{
int next;
}
void foo(alias l)()
{
l.next = 0; // { dg-error "cannot get frame pointer to 'D main'" }
}
void bar(alias l, alias t)()
{
l.next = 0; // { dg-error "cannot get frame pointer to 'D main'" }
}
void main()
{
mixin test l1;
mixin test l2;
foo!(l1);
bar!(l1,l2);
}
|
D
|
module org.serviio.library.metadata.AbstractCDSLibraryIndexingListener;
import java.lang;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicBoolean;
import org.serviio.upnp.Device;
import org.serviio.upnp.service.contentdirectory.ContentDirectory;
import org.serviio.util.ServiioThreadFactory;
import org.serviio.util.ThreadUtils;
import org.serviio.library.metadata.LibraryIndexingListener;
import org.serviio.library.metadata.MediaFileType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public abstract class AbstractCDSLibraryIndexingListener : LibraryIndexingListener
{
private static Logger log;
private static immutable int UPDATE_THREAD_INTERVAL_SECONDS = 5;
private int threadUpdateInterval = 5;
protected ContentDirectory cds;
private AtomicBoolean libraryUpdated;
private String lastAddedFile;
private int numberOfAddedFiles = 0;
private Map!(MediaFileType, String) fileTypeUpdateIds;
static this()
{
log = LoggerFactory.getLogger!(AbstractCDSLibraryIndexingListener);
}
public this()
{
cds = cast(ContentDirectory)Device.getInstance().getServiceById("urn:upnp-org:serviceId:ContentDirectory");
libraryUpdated = new AtomicBoolean(false);
fileTypeUpdateIds = new HashMap!(MediaFileType, String)();
ServiioThreadFactory.getInstance().newThread(new CDSNotifierThread(null), "CDS library notifier", true).start();
storeNewUpdateId(MediaFileType.IMAGE);
storeNewUpdateId(MediaFileType.VIDEO);
storeNewUpdateId(MediaFileType.AUDIO);
}
public this(int intervalSeconds)
{
this();
this.threadUpdateInterval = intervalSeconds;
}
public void resetForAdding()
{
this.lastAddedFile = null;
this.numberOfAddedFiles = 0;
}
public void itemAdded(MediaFileType fileType, String file)
{
this.lastAddedFile = file;
this.numberOfAddedFiles += 1;
storeNewUpdateId(fileType);
isLibraryUpdated().set(true);
}
public void itemDeleted(MediaFileType fileType, String file)
{
storeNewUpdateId(fileType);
isLibraryUpdated().set(true);
}
public void itemUpdated(MediaFileType fileType, String file)
{
storeNewUpdateId(fileType);
isLibraryUpdated().set(true);
}
protected abstract void performCDSUpdate();
protected void notifyCDS()
{
log.debug_("Library updated, notifying CDS");
performCDSUpdate();
isLibraryUpdated().set(false);
}
public String getUpdateId(MediaFileType fileType)
{
return cast(String)this.fileTypeUpdateIds.get(fileType);
}
public AtomicBoolean isLibraryUpdated()
{
return this.libraryUpdated;
}
public String getLastAddedFile()
{
return this.lastAddedFile;
}
public int getNumberOfAddedFiles()
{
return this.numberOfAddedFiles;
}
private void storeNewUpdateId(MediaFileType fileType)
{
if (fileType !is null) {
this.fileTypeUpdateIds.put(fileType, UUID.randomUUID().toString());
}
}
private class CDSNotifierThread : Runnable
{
private this() {}
public void run()
{
for (;;)
{
if (this.outer.isLibraryUpdated().get()) {
this.outer.notifyCDS();
}
ThreadUtils.currentThreadSleep(this.outer.threadUpdateInterval * 1000);
}
}
}
}
/* Location: C:\Users\Main\Downloads\serviio.jar
* Qualified Name: org.serviio.library.metadata.AbstractCDSLibraryIndexingListener
* JD-Core Version: 0.7.0.1
*/
|
D
|
/Users/muyiming/workspace/rustpath/github/examplerust/test_thread/target/debug/build/syn-de8c9801733858b1/build_script_build-de8c9801733858b1: /Users/muyiming/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/syn-1.0.72/build.rs
/Users/muyiming/workspace/rustpath/github/examplerust/test_thread/target/debug/build/syn-de8c9801733858b1/build_script_build-de8c9801733858b1.d: /Users/muyiming/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/syn-1.0.72/build.rs
/Users/muyiming/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/syn-1.0.72/build.rs:
|
D
|
module neton.snap.SnapShotter;
import std.stdio;
import std.file;
import std.path;
import std.array;
import std.format;
// import protocol.Msg;
import hunt.util.Serialize;
import hunt.logging;
import std.algorithm.sorting;
// import raft.Node;
import hunt.raft;
const string snapSuffix = ".snap";
const string ErrNoSnapshot = "snap: no available snapshot";
const string ErrEmptySnapshot = "snap: empty snapshot";
const string ErrCRCMismatch = "snap: crc mismatch";
// struct SnapData {
// string data;
// }
class Snapshotter
{
string _dir;
struct snapName
{
int term;
int index;
}
this(string dir)
{
_dir = dir;
}
void SaveSnap(Snapshot snapshot)
{
if (IsEmptySnap(snapshot))
return;
auto writer = appender!string();
formattedWrite(writer, "%s/%s-%s%s", _dir, snapshot.Metadata.Term,
snapshot.Metadata.Index, snapSuffix);
logInfo("savesnap file name : ", writer.data);
auto b = serialize(snapshot);
auto file = File(writer.data, "wb");
file.rawWrite(b);
file.close();
auto snaps = snapNames();
foreach (snap; snaps)
{
auto filepath = _dir ~ "/" ~ snap;
if (filepath != writer.data)
{
remove(filepath);
}
}
}
Snapshot loadSnap()
{
Snapshot snapshot;
string lastName = getLastSnapName();
if (lastName is null)
{
logInfo("-------- no snap shot info ");
return snapshot;
}
auto file = File(lastName, "rb");
byte[] content;
byte[] data = new byte[1024];
while (!file.eof())
{
content ~= file.rawRead(data);
}
file.close();
snapshot = unserialize!Snapshot(content);
return snapshot;
}
string[] snapNames()
{
string[] names;
foreach (string name; dirEntries(_dir, SpanMode.shallow))
{
names ~= std.path.baseName(name);
}
return names;
}
string getLastSnapName()
{
string[] names = snapNames();
if (names.length == 0)
return string.init;
snapName[] snap;
foreach (string name; names)
{
int term, index;
formattedRead(name, "%s-%s.snap", &term, &index);
snap ~= snapName(term, index);
}
multiSort!("a.term > b.term", "a.index > b.index")(snap);
logInfo("last snap shot ,term : ", snap[0].term, " index : ", snap[0].index);
auto lastName = appender!string();
formattedWrite(lastName, "%s/%s-%s%s", _dir, snap[0].term, snap[0].index, snapSuffix);
return lastName.data;
}
}
|
D
|
/******************************************************************************
Struct containing the fields for the RedistributeRequest. These are wrapped
in a struct in order for them to be conveniently returnable by the user's
input delegate.
Copyright:
Copyright (c) 2016-2017 dunnhumby Germany GmbH. All rights reserved.
License:
Boost Software License Version 1.0. See LICENSE.txt for details.
******************************************************************************/
module dlsproto.client.legacy.internal.request.params.RedistributeInfo;
public struct RedistributeInfo
{
import swarm.Const: NodeItem;
/**************************************************************************
Fraction of the data that node needs to send to other nodes.
**************************************************************************/
public float fraction_of_data_to_send;
/**************************************************************************
The list of node address/port which the node receiving the Redistribute
request should forward data to.
**************************************************************************/
public NodeItem[] redist_nodes;
}
|
D
|
module dtk.widgets.entry;
import dtk.widget;
alias Entry Edit;
class Entry : Widget
{
this(Widget parent) {
class_name = "entry";
super(parent);
}
void clear()
{
tk.eval(name, "delete 0 end");
}
void value(string text)
{
clear();
tk.eval(name, "insert 0", text);
}
string value()
{
return tk.gets(name,"get");
}
string opAssign(T)(T v)
{
string s = to!(string)(v);
value(s);
return s;
}
mixin generate_configure!("background", int,"borderwidth", "cursor", "disabledbackground", "disabledforeground", "exportselection", "font", "foreground", "highlightbackground", "highlightcolor", "highlightthickness", "insertbackground", "insertborderwidth", "insertofftime", "insertontime", "insertwidth", "invalidcommand", "justify", "readonlybackground", "relief", "selectbackground", "selectborderwidth", "selectforeground", "show", "state", "takefocus", "textvariable", "validate", "validatecommand", int,"width");
}
|
D
|
/**
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (c) 1999-2017 by Digital Mars, All Rights Reserved
* Authors: $(LINK2 http://www.digitalmars.com, Walter Bright)
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
* Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/ddmd/argtypes.d, _argtypes.d)
*/
module ddmd.argtypes;
// Online documentation: https://dlang.org/phobos/ddmd_argtypes.html
import core.stdc.stdio;
import ddmd.declaration;
import ddmd.globals;
import ddmd.mtype;
import ddmd.visitor;
/****************************************************
* This breaks a type down into 'simpler' types that can be passed to a function
* in registers, and returned in registers.
* It's highly platform dependent.
* Params:
* t = type to break down
* Returns:
* tuple of types, each element can be passed in a register.
* A tuple of zero length means the type cannot be passed/returned in registers.
*/
extern (C++) TypeTuple toArgTypes(Type t)
{
extern (C++) final class ToArgTypes : Visitor
{
alias visit = super.visit;
public:
TypeTuple result;
override void visit(Type)
{
// not valid for a parameter
}
override void visit(TypeError)
{
result = new TypeTuple(Type.terror);
}
override void visit(TypeBasic t)
{
Type t1 = null;
Type t2 = null;
switch (t.ty)
{
case Tvoid:
return;
case Tbool:
case Tint8:
case Tuns8:
case Tint16:
case Tuns16:
case Tint32:
case Tuns32:
case Tfloat32:
case Tint64:
case Tuns64:
case Tint128:
case Tuns128:
case Tfloat64:
case Tfloat80:
t1 = t;
break;
case Timaginary32:
t1 = Type.tfloat32;
break;
case Timaginary64:
t1 = Type.tfloat64;
break;
case Timaginary80:
t1 = Type.tfloat80;
break;
case Tcomplex32:
if (global.params.is64bit)
t1 = Type.tfloat64;
else
{
t1 = Type.tfloat64;
t2 = Type.tfloat64;
}
break;
case Tcomplex64:
t1 = Type.tfloat64;
t2 = Type.tfloat64;
break;
case Tcomplex80:
t1 = Type.tfloat80;
t2 = Type.tfloat80;
break;
case Tchar:
t1 = Type.tuns8;
break;
case Twchar:
t1 = Type.tuns16;
break;
case Tdchar:
t1 = Type.tuns32;
break;
default:
assert(0);
}
if (t1)
{
if (t2)
result = new TypeTuple(t1, t2);
else
result = new TypeTuple(t1);
}
else
result = new TypeTuple();
}
override void visit(TypeVector t)
{
result = new TypeTuple(t);
}
override void visit(TypeSArray t)
{
if (t.dim)
{
/* Should really be done as if it were a struct with dim members
* of the array's elements.
* I.e. int[2] should be done like struct S { int a; int b; }
*/
dinteger_t sz = t.dim.toInteger();
// T[1] should be passed like T
if (sz == 1)
{
t.next.accept(this);
return;
}
}
result = new TypeTuple(); // pass on the stack for efficiency
}
override void visit(TypeAArray)
{
result = new TypeTuple(Type.tvoidptr);
}
override void visit(TypePointer)
{
result = new TypeTuple(Type.tvoidptr);
}
/*************************************
* Convert a floating point type into the equivalent integral type.
*/
static Type mergeFloatToInt(Type t)
{
switch (t.ty)
{
case Tfloat32:
case Timaginary32:
t = Type.tint32;
break;
case Tfloat64:
case Timaginary64:
case Tcomplex32:
t = Type.tint64;
break;
default:
debug
{
printf("mergeFloatToInt() %s\n", t.toChars());
}
assert(0);
}
return t;
}
/*************************************
* This merges two types into an 8byte type.
* Params:
* t1 = first type (can be null)
* t2 = second type (can be null)
* offset2 = offset of t2 from start of t1
* Returns:
* type that encompasses both t1 and t2, null if cannot be done
*/
static Type argtypemerge(Type t1, Type t2, uint offset2)
{
//printf("argtypemerge(%s, %s, %d)\n", t1 ? t1.toChars() : "", t2 ? t2.toChars() : "", offset2);
if (!t1)
{
assert(!t2 || offset2 == 0);
return t2;
}
if (!t2)
return t1;
const sz1 = t1.size(Loc());
const sz2 = t2.size(Loc());
assert(sz1 != SIZE_INVALID && sz2 != SIZE_INVALID);
if (t1.ty != t2.ty && (t1.ty == Tfloat80 || t2.ty == Tfloat80))
return null;
// [float,float] => [cfloat]
if (t1.ty == Tfloat32 && t2.ty == Tfloat32 && offset2 == 4)
return Type.tfloat64;
// Merging floating and non-floating types produces the non-floating type
if (t1.isfloating())
{
if (!t2.isfloating())
t1 = mergeFloatToInt(t1);
}
else if (t2.isfloating())
t2 = mergeFloatToInt(t2);
Type t;
// Pick type with larger size
if (sz1 < sz2)
t = t2;
else
t = t1;
// If t2 does not lie within t1, need to increase the size of t to enclose both
assert(sz2 < sz2.max - offset2.max);
if (offset2 && sz1 < offset2 + sz2)
{
switch (offset2 + sz2)
{
case 2:
t = Type.tint16;
break;
case 3:
case 4:
t = Type.tint32;
break;
default:
t = Type.tint64;
break;
}
}
return t;
}
override void visit(TypeDArray)
{
/* Should be done as if it were:
* struct S { size_t length; void* ptr; }
*/
if (global.params.is64bit && !global.params.isLP64)
{
// For AMD64 ILP32 ABI, D arrays fit into a single integer register.
uint offset = cast(uint)Type.tsize_t.size(Loc());
Type t = argtypemerge(Type.tsize_t, Type.tvoidptr, offset);
if (t)
{
result = new TypeTuple(t);
return;
}
}
result = new TypeTuple(Type.tsize_t, Type.tvoidptr);
}
override void visit(TypeDelegate)
{
/* Should be done as if it were:
* struct S { size_t length; void* ptr; }
*/
if (global.params.is64bit && !global.params.isLP64)
{
// For AMD64 ILP32 ABI, delegates fit into a single integer register.
uint offset = cast(uint)Type.tsize_t.size(Loc());
Type t = argtypemerge(Type.tsize_t, Type.tvoidptr, offset);
if (t)
{
result = new TypeTuple(t);
return;
}
}
result = new TypeTuple(Type.tvoidptr, Type.tvoidptr);
}
override void visit(TypeStruct t)
{
//printf("TypeStruct.toArgTypes() %s\n", t.toChars());
if (!t.sym.isPOD() || t.sym.fields.dim == 0)
{
Lmemory:
//printf("\ttoArgTypes() %s => [ ]\n", t.toChars());
result = new TypeTuple(); // pass on the stack
return;
}
Type t1 = null;
Type t2 = null;
const sz = t.size(Loc());
assert(sz < 0xFFFFFFFF);
switch (cast(uint)sz)
{
case 1:
t1 = Type.tint8;
break;
case 2:
t1 = Type.tint16;
break;
case 3:
if (!global.params.is64bit)
goto Lmemory;
goto case;
case 4:
t1 = Type.tint32;
break;
case 5:
case 6:
case 7:
if (!global.params.is64bit)
goto Lmemory;
goto case;
case 8:
t1 = Type.tint64;
break;
case 16:
t1 = null; // could be a TypeVector
break;
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
if (!global.params.is64bit)
goto Lmemory;
t1 = null;
break;
default:
goto Lmemory;
}
if (global.params.is64bit && t.sym.fields.dim)
{
version (all)
{
t1 = null;
for (size_t i = 0; i < t.sym.fields.dim; i++)
{
VarDeclaration f = t.sym.fields[i];
//printf(" [%d] %s f.type = %s\n", cast(int)i, f.toChars(), f.type.toChars());
TypeTuple tup = toArgTypes(f.type);
if (!tup)
goto Lmemory;
size_t dim = tup.arguments.dim;
Type ft1 = null;
Type ft2 = null;
switch (dim)
{
case 2:
ft1 = (*tup.arguments)[0].type;
ft2 = (*tup.arguments)[1].type;
break;
case 1:
if (f.offset < 8)
ft1 = (*tup.arguments)[0].type;
else
ft2 = (*tup.arguments)[0].type;
break;
default:
goto Lmemory;
}
if (f.offset & 7)
{
// Misaligned fields goto Lmemory
uint alignsz = f.type.alignsize();
if (f.offset & (alignsz - 1))
goto Lmemory;
// Fields that overlap the 8byte boundary goto Lmemory
const fieldsz = f.type.size(Loc());
assert(fieldsz != SIZE_INVALID && fieldsz < fieldsz.max - f.offset.max);
if (f.offset < 8 && (f.offset + fieldsz) > 8)
goto Lmemory;
}
// First field in 8byte must be at start of 8byte
assert(t1 || f.offset == 0);
//printf("ft1 = %s\n", ft1 ? ft1.toChars() : "null");
//printf("ft2 = %s\n", ft2 ? ft2.toChars() : "null");
if (ft1)
{
t1 = argtypemerge(t1, ft1, f.offset);
if (!t1)
goto Lmemory;
}
if (ft2)
{
uint off2 = f.offset;
if (ft1)
off2 = 8;
if (!t2 && off2 != 8)
goto Lmemory;
assert(t2 || off2 == 8);
t2 = argtypemerge(t2, ft2, off2 - 8);
if (!t2)
goto Lmemory;
}
}
if (t2)
{
if (t1.isfloating() && t2.isfloating())
{
if ((t1.ty == Tfloat32 || t1.ty == Tfloat64) && (t2.ty == Tfloat32 || t2.ty == Tfloat64))
{
}
else
goto Lmemory;
}
else if (t1.isfloating())
goto Lmemory;
else if (t2.isfloating())
goto Lmemory;
else
{
}
}
}
else
{
if (t.sym.fields.dim == 1)
{
VarDeclaration f = t.sym.fields[0];
//printf("f.type = %s\n", f.type.toChars());
TypeTuple tup = toArgTypes(f.type);
if (tup)
{
size_t dim = tup.arguments.dim;
if (dim == 1)
t1 = (*tup.arguments)[0].type;
}
}
}
}
else if (!global.params.is64bit && global.params.isFreeBSD && t.sym.fields.dim == 1 &&
(sz == 4 || sz == 8))
{
/* FreeBSD changed their 32 bit ABI at some point before 10.3 for the following:
* struct { float f; } => arg1type is float
* struct { double d; } => arg1type is double
* Cannot find any documentation on it.
*/
VarDeclaration f = t.sym.fields[0];
TypeTuple tup = toArgTypes(f.type);
if (tup && tup.arguments.dim == 1)
{
Type ft1 = (*tup.arguments)[0].type;
if (ft1.ty == Tfloat32 || ft1.ty == Tfloat64)
t1 = ft1;
}
}
//printf("\ttoArgTypes() %s => [%s,%s]\n", t.toChars(), t1 ? t1.toChars() : "", t2 ? t2.toChars() : "");
if (t1)
{
//if (t1) printf("test1: %s => %s\n", toChars(), t1.toChars());
if (t2)
result = new TypeTuple(t1, t2);
else
result = new TypeTuple(t1);
}
else
goto Lmemory;
}
override void visit(TypeEnum t)
{
t.toBasetype().accept(this);
}
override void visit(TypeClass)
{
result = new TypeTuple(Type.tvoidptr);
}
}
scope ToArgTypes v = new ToArgTypes();
t.accept(v);
return v.result;
}
|
D
|
module android.java.java.nio.file.spi.FileSystemProvider_d_interface;
import arsd.jni : IJavaObjectImplementation, JavaPackageId, JavaName, IJavaObject, ImportExportImpl, JavaInterfaceMembers;
static import arsd.jni;
import import16 = android.java.java.nio.file.CopyOption_d_interface;
import import17 = android.java.java.nio.file.FileStore_d_interface;
import import6 = android.java.java.nio.file.OpenOption_d_interface;
import import21 = android.java.java.nio.file.LinkOption_d_interface;
import import18 = android.java.java.nio.file.AccessMode_d_interface;
import import19 = android.java.java.nio.file.attribute.FileAttributeView_d_interface;
import import20 = android.java.java.lang.Class_d_interface;
import import7 = android.java.java.io.OutputStream_d_interface;
import import4 = android.java.java.nio.file.Path_d_interface;
import import5 = android.java.java.io.InputStream_d_interface;
import import8 = android.java.java.nio.channels.FileChannel_d_interface;
import import2 = android.java.java.net.URI_d_interface;
import import14 = android.java.java.nio.file.DirectoryStream_d_interface;
import import1 = android.java.java.nio.file.FileSystem_d_interface;
import import9 = android.java.java.util.Set_d_interface;
import import15 = android.java.java.nio.file.DirectoryStream_Filter_d_interface;
import import22 = android.java.java.nio.file.attribute.BasicFileAttributes_d_interface;
import import11 = android.java.java.nio.channels.AsynchronousFileChannel_d_interface;
import import3 = android.java.java.util.Map_d_interface;
import import12 = android.java.java.util.concurrent.ExecutorService_d_interface;
import import0 = android.java.java.util.List_d_interface;
import import10 = android.java.java.nio.file.attribute.FileAttribute_d_interface;
import import13 = android.java.java.nio.channels.SeekableByteChannel_d_interface;
final class FileSystemProvider : IJavaObject {
static immutable string[] _d_canCastTo = [
];
@Import static import0.List installedProviders();
@Import string getScheme();
@Import import1.FileSystem newFileSystem(import2.URI, import3.Map);
@Import import1.FileSystem getFileSystem(import2.URI);
@Import import4.Path getPath(import2.URI);
@Import import1.FileSystem newFileSystem(import4.Path, import3.Map);
@Import import5.InputStream newInputStream(import4.Path, import6.OpenOption[]);
@Import import7.OutputStream newOutputStream(import4.Path, import6.OpenOption[]);
@Import import8.FileChannel newFileChannel(import4.Path, import9.Set, import10.FileAttribute[]);
@Import import11.AsynchronousFileChannel newAsynchronousFileChannel(import4.Path, import9.Set, import12.ExecutorService, import10.FileAttribute[]);
@Import import13.SeekableByteChannel newByteChannel(import4.Path, import9.Set, import10.FileAttribute[]);
@Import import14.DirectoryStream newDirectoryStream(import4.Path, import15.DirectoryStream_Filter);
@Import void createDirectory(import4.Path, import10.FileAttribute[]);
@Import void createSymbolicLink(import4.Path, import4.Path, import10.FileAttribute[]);
@Import void createLink(import4.Path, import4.Path);
@Import @JavaName("delete") void delete_(import4.Path);
@Import bool deleteIfExists(import4.Path);
@Import import4.Path readSymbolicLink(import4.Path);
@Import void copy(import4.Path, import4.Path, import16.CopyOption[]);
@Import void move(import4.Path, import4.Path, import16.CopyOption[]);
@Import bool isSameFile(import4.Path, import4.Path);
@Import bool isHidden(import4.Path);
@Import import17.FileStore getFileStore(import4.Path);
@Import void checkAccess(import4.Path, import18.AccessMode[]);
@Import import19.FileAttributeView getFileAttributeView(import4.Path, import20.Class, import21.LinkOption[]);
@Import import22.BasicFileAttributes readAttributes(import4.Path, import20.Class, import21.LinkOption[]);
@Import import3.Map readAttributes(import4.Path, string, import21.LinkOption[]);
@Import void setAttribute(import4.Path, string, IJavaObject, import21.LinkOption[]);
@Import import20.Class getClass();
@Import int hashCode();
@Import bool equals(IJavaObject);
@Import @JavaName("toString") string toString_();
override string toString() { return arsd.jni.javaObjectToString(this); }
@Import void notify();
@Import void notifyAll();
@Import void wait(long);
@Import void wait(long, int);
@Import void wait();
mixin IJavaObjectImplementation!(false);
public static immutable string _javaParameterString = "Ljava/nio/file/spi/FileSystemProvider;";
}
|
D
|
(logic) a proposition that is accepted as true in order to provide a basis for logical reasoning
put (something somewhere) firmly
put before
take as a given
|
D
|
large northern deer with enormous flattened antlers in the male
|
D
|
/*
FIXME:
overloads can be done as an object representing the overload set
tat opCall does the dispatch. Then other overloads can actually
be added more sanely.
FIXME:
instantiate template members when reflection with certain
arguments if marked right...
FIXME:
pointer to member functions can give a way to wrap things
we'll pass it an opaque object as this and it will unpack and call the method
we can also auto-generate getters and setters for properties with this method
and constructors, so the script can create class objects too
*/
/++
jsvar provides a D type called [var] that works similarly to the same in Javascript.
It is weakly (even weaker than JS, frequently returning null rather than throwing on
an invalid operation) and dynamically typed, but interops pretty easily with D itself:
---
var a = 10;
a ~= "20";
assert(a == "1020");
var a = function(int b, int c) { return b+c; };
// note the second set of () is because of broken @property
assert(a()(10,20) == 30);
var a = var.emptyObject;
a.foo = 30;
assert(a["foo"] == 30);
var b = json!q{
"foo":12,
"bar":{"hey":[1,2,3,"lol"]}
};
assert(b.bar.hey[1] == 2);
---
You can also use [var.fromJson], a static method, to quickly and easily
read json or [var.toJson] to write it.
Also, if you combine this with my [arsd.script] module, you get pretty
easy interop with a little scripting language that resembles a cross between
D and Javascript - just like you can write in D itself using this type.
Please note that function default arguments are NOT likely to work in the script.
You'd have to use a helper thing that I haven't written yet. opAssign can never
do it because that information is lost when it becomes a pointer. ParamDefault
is thus commented out for now.
Properties:
$(LIST
* note that @property doesn't work right in D, so the opDispatch properties
will require double parenthesis to call as functions.
* Properties inside a var itself are set specially:
obj.propName._object = new PropertyPrototype(getter, setter);
)
D structs can be turned to vars, but it is a copy.
Wrapping D native objects is coming later, the current ways suck. I really needed
properties to do them sanely at all, and now I have it. A native wrapped object will
also need to be set with _object prolly.
Author: Adam D Ruppe
History: Started in July 2013.
+/
module arsd.jsvar;
version=new_std_json;
static import std.array;
import std.traits;
import std.conv;
import std.json;
version(jsvar_throw)
/++
Variable to decide if jsvar throws on certain invalid
operations or continues on propagating null vars.
+/
bool jsvar_throw = true;
else
/// ditto
bool jsvar_throw = false;
// uda for wrapping classes
enum scriptable = "arsd_jsvar_compatible";
/*
PrototypeObject FIXME:
make undefined variables reaction overloadable in PrototypeObject, not just a switch
script FIXME:
the Expression should keep scriptFilename and lineNumber around for error messages
it should consistently throw on missing semicolons
*) in operator
*) nesting comments, `` string literals
*) opDispatch overloading
*) properties???//
a.prop on the rhs => a.prop()
a.prop on the lhs => a.prop(rhs);
if opAssign, it can just do a.prop(a.prop().opBinary!op(rhs));
But, how do we mark properties in var? Can we make them work this way in D too?
0) add global functions to the object (or at least provide a convenience function to make a pre-populated global object)
1) ensure operator precedence is sane
2) a++ would prolly be nice, and def -a
4) switches?
10) __FILE__ and __LINE__ as default function arguments should work like in D
16) stack traces on script exceptions
17) an exception type that we can create in the script
14) import???????/ it could just attach a particular object to the local scope, and the module decl just giving the local scope a name
there could be a super-global object that is the prototype of the "global" used here
then you import, and it pulls moduleGlobal.prototype = superGlobal.modulename... or soemthing.
to get the vars out in D, you'd have to be aware of this, since you pass the superglobal
hmmm maybe not worth it
though maybe to export vars there could be an explicit export namespace or something.
6) gotos? labels? labeled break/continue?
18) what about something like ruby's blocks or macros? parsing foo(arg) { code } is easy enough, but how would we use it?
var FIXME:
user defined operator overloading on objects, including opCall, opApply, and more
flesh out prototype objects for Array, String, and Function
looserOpEquals
it would be nice if delegates on native types could work
*/
static if(__VERSION__ <= 2076) {
// compatibility shims with gdc
enum JSONType {
object = JSON_TYPE.OBJECT,
null_ = JSON_TYPE.NULL,
false_ = JSON_TYPE.FALSE,
true_ = JSON_TYPE.TRUE,
integer = JSON_TYPE.INTEGER,
float_ = JSON_TYPE.FLOAT,
array = JSON_TYPE.ARRAY,
string = JSON_TYPE.STRING,
uinteger = JSON_TYPE.UINTEGER
}
}
/*
Script notes:
the one type is var. It works just like the var type in D from arsd.jsvar.
(it might be fun to try to add other types, and match D a little better here! We could allow implicit conversion to and from var, but not on the other types, they could get static checking. But for now it is only var. BTW auto is an alias for var right now)
There is no comma operator, but you can use a scope as an expression: a++, b++; can be written as {a++;b++;}
*/
version(test_script)
struct Foop {
int a = 12;
string n = "hate";
void speak() { writeln(n, " ", a); n = "love"; writeln(n, " is what it is now"); }
void speak2() { writeln("speak2 ", n, " ", a); }
}
version(test_script)
void main() {
import arsd.script;
writeln(interpret("x*x + 3*x;", var(["x":3])));
{
var a = var.emptyObject;
a.qweq = 12;
}
// the WrappedNativeObject is disgusting
// but works. sort of.
/*
Foop foop2;
var foop;
foop._object = new WrappedNativeObject!Foop(foop2);
foop.speak()();
foop.a = 25;
writeln(foop.n);
foop.speak2()();
return;
*/
import arsd.script;
struct Test {
int a = 10;
string name = "ten";
}
auto globals = var.emptyObject;
globals.lol = 100;
globals.rofl = 23;
globals.arrtest = var.emptyArray;
globals.write._function = (var _this, var[] args) {
string s;
foreach(a; args)
s ~= a.get!string;
writeln("script said: ", s);
return var(null);
};
// call D defined functions in script
globals.func = (var a, var b) { writeln("Hello, world! You are : ", a, " and ", b); };
globals.ex = () { throw new ScriptRuntimeException("test", 1); };
globals.fun = { return var({ writeln("hello inside!"); }); };
import std.file;
writeln(interpret(readText("scripttest_code.d"), globals));
globals.ten = 10.0;
globals.five = 5.0;
writeln(interpret(q{
var a = json!q{ };
a.b = json!q{ };
a.b.c = 10;
a;
}, globals));
/*
globals.minigui = json!q{};
import arsd.minigui;
globals.minigui.createWindow = {
var v;
auto mw = new MainWindow();
v._object = new OpaqueNativeObject!(MainWindow)(mw);
v.loop = { mw.loop(); };
return v;
};
*/
repl(globals);
writeln("BACK IN D!");
globals.c()(10); // call script defined functions in D (note: this runs the interpreter)
//writeln(globals._getMember("lol", false));
return;
var k,l ;
var j = json!q{
"hello": {
"data":[1,2,"giggle",4]
},
"world":20
};
writeln(j.hello.data[2]);
Test t;
var rofl = t;
writeln(rofl.name);
writeln(rofl.a);
rofl.a = "20";
rofl.name = "twenty";
t = rofl.get!Test;
writeln(t);
var a1 = 10;
a1 -= "5";
a1 /= 2;
writeln(a1);
var a = 10;
var b = 20;
a = b;
b = 30;
a += 100.2;
writeln(a);
var c = var.emptyObject;
c.a = b;
var d = c;
d.b = 50;
writeln(c.b);
writeln(d.toJson());
var e = a + b;
writeln(a, " + ", b, " = ", e);
e = function(var lol) {
writeln("hello with ",lol,"!");
return lol + 10;
};
writeln(e("15"));
if(var("ass") > 100)
writeln(var("10") / "3");
}
template json(string s) {
// ctfe doesn't support the unions std.json uses :(
//enum json = var.fromJsonObject(s);
// FIXME we should at least validate string s at compile time
var json() {
return var.fromJson("{" ~ s ~ "}");
}
}
// literals
// var a = varArray(10, "cool", 2);
// assert(a[0] == 10); assert(a[1] == "cool"); assert(a[2] == 2);
var varArray(T...)(T t) {
var a = var.emptyArray;
foreach(arg; t)
a ~= var(arg);
return a;
}
// var a = varObject("cool", 10, "bar", "baz");
// assert(a.cool == 10 && a.bar == "baz");
var varObject(T...)(T t) {
var a = var.emptyObject;
string lastString;
foreach(idx, arg; t) {
static if(idx % 2 == 0) {
lastString = arg;
} else {
assert(lastString !is null);
a[lastString] = arg;
lastString = null;
}
}
return a;
}
private double stringToNumber(string s) {
double r;
try {
r = to!double(s);
} catch (Exception e) {
r = double.nan;
}
return r;
}
private bool doubleIsInteger(double r) {
return (r == cast(long) r);
}
// helper template for operator overloading
private var _op(alias _this, alias this2, string op, T)(T t) if(op == "~") {
static if(is(T == var)) {
if(t.payloadType() == var.Type.Array)
return _op!(_this, this2, op)(t._payload._array);
else if(t.payloadType() == var.Type.String)
return _op!(_this, this2, op)(t._payload._string);
//else
//return _op!(_this, this2, op)(t.get!string);
}
if(this2.payloadType() == var.Type.Array) {
auto l = this2._payload._array;
static if(isArray!T && !isSomeString!T)
foreach(item; t)
l ~= var(item);
else
l ~= var(t);
_this._type = var.Type.Array;
_this._payload._array = l;
return _this;
} else if(this2.payloadType() == var.Type.String) {
auto l = this2._payload._string;
l ~= var(t).get!string; // is this right?
_this._type = var.Type.String;
_this._payload._string = l;
return _this;
} else {
auto l = this2.get!string;
l ~= var(t).get!string;
_this._type = var.Type.String;
_this._payload._string = l;
return _this;
}
assert(0);
}
// FIXME: maybe the bitops should be moved out to another function like ~ is
private var _op(alias _this, alias this2, string op, T)(T t) if(op != "~") {
static if(is(T == var)) {
if(t.payloadType() == var.Type.Integral)
return _op!(_this, this2, op)(t._payload._integral);
if(t.payloadType() == var.Type.Floating)
return _op!(_this, this2, op)(t._payload._floating);
if(t.payloadType() == var.Type.String)
return _op!(_this, this2, op)(t._payload._string);
throw new Exception("Attempted invalid operator `" ~ op ~ "` on variable of type " ~ to!string(t.payloadType()));
} else {
if(this2.payloadType() == var.Type.Integral) {
auto l = this2._payload._integral;
static if(isIntegral!T) {
mixin("l "~op~"= t;");
_this._type = var.Type.Integral;
_this._payload._integral = l;
return _this;
} else static if(isFloatingPoint!T) {
static if(op == "&" || op == "|" || op == "^") {
this2._type = var.Type.Integral;
long f = l;
mixin("f "~op~"= cast(long) t;");
_this._type = var.Type.Integral;
_this._payload._integral = f;
} else {
this2._type = var.Type.Floating;
double f = l;
mixin("f "~op~"= t;");
_this._type = var.Type.Floating;
_this._payload._floating = f;
}
return _this;
} else static if(isSomeString!T) {
auto rhs = stringToNumber(t);
if(doubleIsInteger(rhs)) {
mixin("l "~op~"= cast(long) rhs;");
_this._type = var.Type.Integral;
_this._payload._integral = l;
} else{
static if(op == "&" || op == "|" || op == "^") {
long f = l;
mixin("f "~op~"= cast(long) rhs;");
_this._type = var.Type.Integral;
_this._payload._integral = f;
} else {
double f = l;
mixin("f "~op~"= rhs;");
_this._type = var.Type.Floating;
_this._payload._floating = f;
}
}
return _this;
}
} else if(this2.payloadType() == var.Type.Floating) {
auto f = this._payload._floating;
static if(isIntegral!T || isFloatingPoint!T) {
static if(op == "&" || op == "|" || op == "^") {
long argh = cast(long) f;
mixin("argh "~op~"= cast(long) t;");
_this._type = var.Type.Integral;
_this._payload._integral = argh;
} else {
mixin("f "~op~"= t;");
_this._type = var.Type.Floating;
_this._payload._floating = f;
}
return _this;
} else static if(isSomeString!T) {
auto rhs = stringToNumber(t);
static if(op == "&" || op == "|" || op == "^") {
long pain = cast(long) f;
mixin("pain "~op~"= cast(long) rhs;");
_this._type = var.Type.Integral;
_this._payload._floating = pain;
} else {
mixin("f "~op~"= rhs;");
_this._type = var.Type.Floating;
_this._payload._floating = f;
}
return _this;
} else static assert(0);
} else if(this2.payloadType() == var.Type.String) {
static if(op == "&" || op == "|" || op == "^") {
long r = cast(long) stringToNumber(this2._payload._string);
long rhs;
} else {
double r = stringToNumber(this2._payload._string);
double rhs;
}
static if(isSomeString!T) {
rhs = cast(typeof(rhs)) stringToNumber(t);
} else {
rhs = to!(typeof(rhs))(t);
}
mixin("r " ~ op ~ "= rhs;");
static if(is(typeof(r) == double)) {
_this._type = var.Type.Floating;
_this._payload._floating = r;
} else static if(is(typeof(r) == long)) {
_this._type = var.Type.Integral;
_this._payload._integral = r;
} else static assert(0);
return _this;
} else {
// the operation is nonsensical, we should throw or ignore it
var i = 0;
return i;
}
}
assert(0);
}
///
struct var {
public this(T)(T t) {
static if(is(T == var))
this = t;
else
this.opAssign(t);
}
// used by the script interpreter... does a .dup on array, new on class if possible, otherwise copies members.
public var _copy_new() {
if(payloadType() == Type.Object) {
var cp;
if(this._payload._object !is null) {
auto po = this._payload._object.new_(null);
cp._object = po;
}
return cp;
} else if(payloadType() == Type.Array) {
var cp;
cp = this._payload._array.dup;
return cp;
} else {
return this._copy();
}
}
public var _copy() {
final switch(payloadType()) {
case Type.Integral:
case Type.Boolean:
case Type.Floating:
case Type.Function:
case Type.String:
// since strings are immutable, we can pretend they are value types too
return this; // value types don't need anything special to be copied
case Type.Array:
var cp;
cp = this._payload._array[];
return cp;
case Type.Object:
var cp;
if(this._payload._object !is null)
cp._object = this._payload._object.copy;
return cp;
}
}
/// `if(some_var)` will call this and give behavior based on the dynamic type. Shouldn't be too surprising.
public bool opCast(T:bool)() {
final switch(this._type) {
case Type.Object:
return this._payload._object !is null;
case Type.Array:
return this._payload._array.length != 0;
case Type.String:
return this._payload._string.length != 0;
case Type.Integral:
return this._payload._integral != 0;
case Type.Floating:
return this._payload._floating != 0;
case Type.Boolean:
return this._payload._boolean;
case Type.Function:
return this._payload._function !is null;
}
}
/// You can foreach over a var.
public int opApply(scope int delegate(ref var) dg) {
foreach(i, item; this)
if(auto result = dg(item))
return result;
return 0;
}
/// ditto
public int opApply(scope int delegate(var, ref var) dg) {
if(this.payloadType() == Type.Array) {
foreach(i, ref v; this._payload._array)
if(auto result = dg(var(i), v))
return result;
} else if(this.payloadType() == Type.Object && this._payload._object !is null) {
// FIXME: if it offers input range primitives, we should use them
// FIXME: user defined opApply on the object
foreach(k, ref v; this._payload._object)
if(auto result = dg(var(k), v))
return result;
} else if(this.payloadType() == Type.String) {
// this is to prevent us from allocating a new string on each character, hopefully limiting that massively
static immutable string chars = makeAscii!();
foreach(i, dchar c; this._payload._string) {
var lol = "";
if(c < 128)
lol._payload._string = chars[c .. c + 1];
else
lol._payload._string = to!string(""d ~ c); // blargh, how slow can we go?
if(auto result = dg(var(i), lol))
return result;
}
}
// throw invalid foreach aggregate
return 0;
}
/// Alias for [get]. e.g. `string s = cast(string) v;`
public T opCast(T)() {
return this.get!T;
}
/// Calls [get] for a type automatically. `int a; var b; b.putInto(a);` will auto-convert to `int`.
public auto ref putInto(T)(ref T t) {
return t = this.get!T;
}
/++
Assigns a value to the var. It will do necessary implicit conversions
and wrapping.
You can make a method `toArsdJsvar` on your own objects to override this
default. It should return a [var].
History:
On April 20, 2020, I changed the default mode for class assignment
to [wrapNativeObject]. Previously it was [wrapOpaquely].
With the new [wrapNativeObject] behavior, you can mark methods
@[scriptable] to expose them to the script.
+/
public var opAssign(T)(T t) if(!is(T == var)) {
static if(__traits(compiles, this = t.toArsdJsvar())) {
static if(__traits(compiles, t is null)) {
if(t is null)
this = null;
else
this = t.toArsdJsvar();
} else
this = t.toArsdJsvar();
} else static if(is(T : PrototypeObject)) {
// support direct assignment of pre-made implementation objects
// so prewrapped stuff can be easily passed.
this._type = Type.Object;
this._payload._object = t;
} else static if(isFloatingPoint!T) {
this._type = Type.Floating;
this._payload._floating = t;
} else static if(isIntegral!T) {
this._type = Type.Integral;
this._payload._integral = t;
} else static if(isCallable!T) {
this._type = Type.Function;
static if(is(T == typeof(this._payload._function))) {
this._payload._function = t;
} else
this._payload._function = delegate var(var _this, var[] args) {
var ret;
ParameterTypeTuple!T fargs;
// default args? nope they can't work cuz it is assigning a function pointer by here. alas.
enum lol = static_foreach(fargs.length, 1, -1,
`t(`,``,` < args.length ? args[`,`].get!(typeof(fargs[`,`])) : typeof(fargs[`,`]).init,`,`)`);
//`t(`,``,` < args.length ? args[`,`].get!(typeof(fargs[`,`])) : ParamDefault!(T, `,`)(),`,`)`);
/+
foreach(idx, a; fargs) {
if(idx == args.length)
break;
cast(Unqual!(typeof(a))) fargs[idx] = args[idx].get!(typeof(a));
}
+/
static if(is(ReturnType!t == void)) {
//t(fargs);
mixin(lol ~ ";");
} else {
//ret = t(fargs);
ret = mixin(lol);
}
return ret;
};
} else static if(isSomeString!T) {
this._type = Type.String;
this._payload._string = to!string(t);
} else static if(is(T == class)) {
this._type = Type.Object;
this._payload._object = t is null ? null : wrapNativeObject(t);
} else static if(.isScriptableOpaque!T) {
// auto-wrap other classes with reference semantics
this._type = Type.Object;
this._payload._object = wrapOpaquely(t);
} else static if(is(T == struct) || isAssociativeArray!T) {
// copy structs and assoc arrays by value into a var object
this._type = Type.Object;
auto obj = new PrototypeObject();
this._payload._object = obj;
static if(is(T == struct))
foreach(member; __traits(allMembers, T)) {
static if(__traits(compiles, __traits(getMember, t, member))) {
static if(is(typeof(__traits(getMember, t, member)) == function)) {
// skipping these because the delegate we get isn't going to work anyway; the object may be dead and certainly won't be updated
//this[member] = &__traits(getMember, proxyObject, member);
// but for simple toString, I'll allow it by recreating the object on demand
// and then calling the original function. (I might be able to do that for more but
// idk, just doing simple thing first)
static if(member == "toString" && is(typeof(&__traits(getMember, t, member)) == string delegate())) {
this[member]._function = delegate(var _this, var[] args) {
auto val = _this.get!T;
return var(val.toString());
};
}
} else static if(is(typeof(__traits(getMember, t, member)))) {
this[member] = __traits(getMember, t, member);
}
}
} else {
// assoc array
foreach(l, v; t) {
this[var(l)] = var(v);
}
}
} else static if(isArray!T) {
this._type = Type.Array;
var[] arr;
arr.length = t.length;
static if(!is(T == void[])) // we can't append a void array but it is nice to support x = [];
foreach(i, item; t)
arr[i] = var(item);
this._payload._array = arr;
} else static if(is(T == bool)) {
this._type = Type.Boolean;
this._payload._boolean = t;
} else static if(isSomeChar!T) {
this._type = Type.String;
this._payload._string = "";
import std.utf;
char[4] ugh;
auto size = encode(ugh, t);
this._payload._string = ugh[0..size].idup;
}// else static assert(0, "unsupported type");
return this;
}
public size_t opDollar() {
return this.length().get!size_t;
}
public var opOpAssign(string op, T)(T t) {
if(payloadType() == Type.Object) {
if(this._payload._object !is null) {
var* operator = this._payload._object._peekMember("opOpAssign", true);
if(operator !is null && operator._type == Type.Function)
return operator.call(this, op, t);
}
}
return _op!(this, this, op, T)(t);
}
public var opUnary(string op : "-")() {
static assert(op == "-");
final switch(payloadType()) {
case Type.Object:
case Type.Array:
case Type.Boolean:
case Type.String:
case Type.Function:
assert(0); // FIXME
//break;
case Type.Integral:
return var(-this.get!long);
case Type.Floating:
return var(-this.get!double);
}
}
public var opBinary(string op, T)(T t) {
var n;
if(payloadType() == Type.Object) {
if(this._payload._object is null)
return var(null);
var* operator = this._payload._object._peekMember("opBinary", true);
if(operator !is null && operator._type == Type.Function) {
return operator.call(this, op, t);
}
}
return _op!(n, this, op, T)(t);
}
public var opBinaryRight(string op, T)(T s) {
return var(s).opBinary!op(this);
}
// this in foo
public var* opBinary(string op : "in", T)(T s) {
var rhs = var(s);
return rhs.opBinaryRight!"in"(this);
}
// foo in this
public var* opBinaryRight(string op : "in", T)(T s) {
// this needs to be an object
return var(s).get!string in this._object._properties;
}
public var apply(var _this, var[] args) {
if(this.payloadType() == Type.Function) {
if(this._payload._function is null) {
if(jsvar_throw)
throw new DynamicTypeException(this, Type.Function);
else
return var(null);
}
return this._payload._function(_this, args);
} else if(this.payloadType() == Type.Object) {
if(this._payload._object is null) {
if(jsvar_throw)
throw new DynamicTypeException(this, Type.Function);
else
return var(null);
}
var* operator = this._payload._object._peekMember("opCall", true);
if(operator !is null && operator._type == Type.Function)
return operator.apply(_this, args);
}
if(this.payloadType() == Type.Integral || this.payloadType() == Type.Floating) {
if(args.length)
return var(this.get!double * args[0].get!double);
else
return this;
} else if(jsvar_throw) {
throw new DynamicTypeException(this, Type.Function);
}
//return this;
return var(null);
}
public var call(T...)(var _this, T t) {
var[] args;
foreach(a; t) {
args ~= var(a);
}
return this.apply(_this, args);
}
public var opCall(T...)(T t) {
return this.call(this, t);
}
/*
public var applyWithMagicLocals(var _this, var[] args, var[string] magicLocals) {
}
*/
public string toString() {
return this.get!string;
}
public T getWno(T)() {
if(payloadType == Type.Object) {
if(auto wno = cast(WrappedNativeObject) this._payload._object) {
auto no = cast(T) wno.getObject();
if(no !is null)
return no;
}
}
return null;
}
/++
Gets the var converted to type `T` as best it can. `T` may be constructed
from `T.fromJsVar`, or through type conversions (coercing as needed). If
`T` happens to be a struct, it will automatically introspect to convert
the var object member-by-member.
History:
On April 21, 2020, I changed the behavior of
---
var a = null;
string b = a.get!string;
---
Previously, `b == "null"`, which would print the word
when writeln'd. Now, `b is null`, which prints the empty string,
which is a bit less user-friendly, but more consistent with
converting to/from D strings in general.
If you are printing, you can check `a.get!string is null` and print
null at that point if you like.
I also wrote the first draft of this documentation at that time,
even though the function has been public since the beginning.
On January 1, 2021, I changed `get!some_struct` to call properties
on the var, if a member looks like a function or object, to try to
get plain-old-data out. Since the functions are only ever put there
by you or by you allowing script, I don't feel too bad about it, but
it still might not be ideal for all circumstances, so idk if I'll leave
it this way or not.
One thing it helps for though is taking scripted subclasses back into D
structs, since the parent class thing is likely to be virtual properties.
And having that just work in argument lists is really cool...
Search function for the comment "property getter support" to see the impl.
+/
public T get(T)() if(!is(T == void)) {
static if(is(T == var)) {
return this;
} else static if(__traits(compiles, T.fromJsVar(var.init))) {
return T.fromJsVar(this);
} else static if(__traits(compiles, T(this))) {
return T(this);
} else static if(__traits(compiles, new T(this))) {
return new T(this);
} else
final switch(payloadType) {
case Type.Boolean:
static if(is(T == bool))
return this._payload._boolean;
else static if(isFloatingPoint!T || isIntegral!T)
return cast(T) (this._payload._boolean ? 1 : 0); // the cast is for enums, I don't like this so FIXME
else static if(isSomeString!T)
return this._payload._boolean ? "true" : "false";
else
return T.init;
case Type.Object:
static if(isAssociativeArray!T) {
T ret;
if(this._payload._object !is null)
foreach(k, v; this._payload._object._properties)
ret[to!(KeyType!T)(k)] = v.get!(ValueType!T);
return ret;
} else static if(is(T : PrototypeObject)) {
// they are requesting an implementation object, just give it to them
return cast(T) this._payload._object;
} else static if(isScriptableOpaque!(Unqual!T)) {
if(auto wno = cast(WrappedOpaque!(Unqual!T)) this._payload._object) {
return wno.wrapping();
}
static if(is(T == R*, R))
if(auto wno = cast(WrappedOpaque!(Unqual!(R))) this._payload._object) {
return wno.wrapping();
}
throw new DynamicTypeException(this, Type.Object); // FIXME: could be better
} else static if(is(T == struct) || is(T == class) || is(T == interface)) {
// first, we'll try to give them back the native object we have, if we have one
static if(is(T : Object) || is(T == interface)) {
auto t = this;
// need to walk up the prototype chain to
while(t != null) {
if(auto wno = cast(WrappedNativeObject) t._payload._object) {
auto no = cast(T) wno.getObject();
if(no !is null) {
auto sc = cast(ScriptableSubclass) no;
if(sc !is null)
sc.setScriptVar(this);
return no;
}
}
t = t.prototype;
}
// FIXME: this is kinda weird.
return null;
} else {
// failing that, generic struct or class getting: try to fill in the fields by name
T t;
bool initialized = true;
static if(is(T == class)) {
static if(__traits(compiles, new T())) {
t = new T();
} else {
initialized = false;
}
}
if(initialized)
foreach(i, a; t.tupleof) {
var possibility = this[t.tupleof[i].stringof[2..$]];
// FIXME: so there is the possibility of getting some data getting all caught
// up in a script function doing weird things. If I can prevent that, I'd like to...
// but it is also really useful for this to work for some scenarios...
static if(!is(typeof(a) == return)) // if it is callable, just assign the func ref
if(possibility.payloadType == Type.Function || possibility.payloadType == Type.Object)
possibility = possibility.apply(this, null); // crude approximation of property getter support
cast(Unqual!(typeof((a)))) t.tupleof[i] = possibility.get!(typeof(a));
}
return t;
}
} else static if(isSomeString!T) {
if(this._object !is null)
return this._object.toString();
return null;// "null";
} else
return T.init;
case Type.Integral:
static if(isFloatingPoint!T || isIntegral!T)
return to!T(this._payload._integral);
else static if(isSomeString!T)
return to!string(this._payload._integral);
else
return T.init;
case Type.Floating:
static if(isFloatingPoint!T || isIntegral!T)
return to!T(this._payload._floating);
else static if(isSomeString!T)
return to!string(this._payload._floating);
else
return T.init;
case Type.String:
static if(__traits(compiles, to!T(this._payload._string))) {
try {
return to!T(this._payload._string);
} catch (Exception e) { return T.init; }
} else
return T.init;
case Type.Array:
import std.range;
auto pl = this._payload._array;
static if(isSomeString!T) {
return to!string(pl);
} else static if(is(T == E[N], E, size_t N)) {
T ret;
foreach(i; 0 .. N) {
if(i >= pl.length)
break;
ret[i] = pl[i].get!E;
}
return ret;
} else static if(is(T == E[], E)) {
T ret;
static if(is(ElementType!T == void)) {
static assert(0, "try wrapping the function to get rid of void[] args");
//alias getType = ubyte;
} else
alias getType = ElementType!T;
foreach(item; pl)
ret ~= item.get!(getType);
return ret;
} else
return T.init;
// is it sane to translate anything else?
case Type.Function:
static if(isSomeString!T) {
return "<function>";
} else static if(isDelegate!T) {
// making a local copy because otherwise the delegate might refer to a struct on the stack and get corrupted later or something
auto func = this._payload._function;
// the static helper lets me pass specific variables to the closure
static T helper(typeof(func) func) {
return delegate ReturnType!T (ParameterTypeTuple!T args) {
var[] arr;
foreach(arg; args)
arr ~= var(arg);
var ret = func(var(null), arr);
static if(is(ReturnType!T == void))
return;
else
return ret.get!(ReturnType!T);
};
}
return helper(func);
} else
return T.init;
// FIXME: we just might be able to do better for both of these
//break;
}
}
public T get(T)() if(is(T == void)) {}
public T nullCoalesce(T)(T t) {
if(_type == Type.Object && _payload._object is null)
return t;
return this.get!T;
}
public double opCmp(T)(T t) {
auto f = this.get!double;
static if(is(T == var))
auto r = t.get!double;
else
auto r = t;
return f - r;
}
public bool opEquals(T)(T t) {
return this.opEquals(var(t));
}
public bool opEquals(T:var)(T t) const {
// int and float can implicitly convert
if(this._type == Type.Integral && t._type == Type.Floating)
return _payload._integral == t._payload._floating;
if(t._type == Type.Integral && this._type == Type.Floating)
return t._payload._integral == this._payload._floating;
// but the others are kinda strict
// FIXME: should this be == or === ?
if(this._type != t._type)
return false;
final switch(this._type) {
case Type.Object:
return _payload._object is t._payload._object;
case Type.Integral:
return _payload._integral == t._payload._integral;
case Type.Boolean:
return _payload._boolean == t._payload._boolean;
case Type.Floating:
return _payload._floating == t._payload._floating; // FIXME: approxEquals?
case Type.String:
return _payload._string == t._payload._string;
case Type.Function:
return _payload._function is t._payload._function;
case Type.Array:
return _payload._array == t._payload._array;
}
assert(0);
}
public enum Type {
Object, Array, Integral, Floating, String, Function, Boolean
}
public Type payloadType() {
return _type;
}
private Type _type;
private union Payload {
PrototypeObject _object;
var[] _array;
long _integral;
double _floating;
string _string;
bool _boolean;
var delegate(var _this, var[] args) _function;
}
package VarMetadata _metadata;
public void _function(var delegate(var, var[]) f) {
this._payload._function = f;
this._type = Type.Function;
}
/*
public void _function(var function(var, var[]) f) {
var delegate(var, var[]) dg;
dg.ptr = null;
dg.funcptr = f;
this._function = dg;
}
*/
public void _object(PrototypeObject obj) {
this._type = Type.Object;
this._payload._object = obj;
}
public PrototypeObject _object() {
if(this._type == Type.Object)
return this._payload._object;
return null;
}
package Payload _payload;
private void _requireType(Type t, string file = __FILE__, size_t line = __LINE__){
if(this.payloadType() != t)
throw new DynamicTypeException(this, t, file, line);
}
public var opSlice(var e1, var e2) {
return this.opSlice(e1.get!ptrdiff_t, e2.get!ptrdiff_t);
}
public var opSlice(ptrdiff_t e1, ptrdiff_t e2) {
if(this.payloadType() == Type.Array) {
if(e1 > _payload._array.length)
e1 = _payload._array.length;
if(e2 > _payload._array.length)
e2 = _payload._array.length;
return var(_payload._array[e1 .. e2]);
}
if(this.payloadType() == Type.String) {
if(e1 > _payload._string.length)
e1 = _payload._string.length;
if(e2 > _payload._string.length)
e2 = _payload._string.length;
return var(_payload._string[e1 .. e2]);
}
if(this.payloadType() == Type.Object) {
var operator = this["opSlice"];
if(operator._type == Type.Function) {
return operator.call(this, e1, e2);
}
}
// might be worth throwing here too
return var(null);
}
/// Forwards to [opIndex]
public @property ref var opDispatch(string name, string file = __FILE__, size_t line = __LINE__)() {
return this[name];
}
/// Forwards to [opIndexAssign]
public @property ref var opDispatch(string name, string file = __FILE__, size_t line = __LINE__, T)(T r) {
return this.opIndexAssign!T(r, name);
}
/// Looks up a sub-property of the object
public ref var opIndex(var name, string file = __FILE__, size_t line = __LINE__) {
return opIndex(name.get!string, file, line);
}
/// Sets a sub-property of the object
public ref var opIndexAssign(T)(T t, var name, string file = __FILE__, size_t line = __LINE__) {
return opIndexAssign(t, name.get!string, file, line);
}
public ref var opIndex(string name, string file = __FILE__, size_t line = __LINE__) {
// if name is numeric, we should convert to int for arrays
if(name.length && name[0] >= '0' && name[0] <= '9' && this.payloadType() == Type.Array)
return opIndex(to!size_t(name), file, line);
if(this.payloadType() != Type.Object && name == "prototype")
return prototype();
if(name == "typeof") {
var* tmp = new var;
*tmp = to!string(this.payloadType());
return *tmp;
}
if(name == "toJson") {
var* tmp = new var;
*tmp = to!string(this.toJson());
return *tmp;
}
if(name == "length" && this.payloadType() == Type.String) {
var* tmp = new var;
*tmp = _payload._string.length;
return *tmp;
}
if(name == "length" && this.payloadType() == Type.Array) {
var* tmp = new var;
*tmp = _payload._array.length;
return *tmp;
}
if(name == "__prop" && this.payloadType() == Type.Object) {
var* tmp = new var;
(*tmp)._function = delegate var(var _this, var[] args) {
if(args.length == 0)
return var(null);
if(args.length == 1) {
auto peek = this._payload._object._peekMember(args[0].get!string, false);
if(peek is null)
return var(null);
else
return *peek;
}
if(args.length == 2) {
auto peek = this._payload._object._peekMember(args[0].get!string, false);
if(peek is null) {
this._payload._object._properties[args[0].get!string] = args[1];
return var(null);
} else {
*peek = args[1];
return *peek;
}
}
throw new Exception("too many args");
};
return *tmp;
}
PrototypeObject from;
if(this.payloadType() == Type.Object)
from = _payload._object;
else {
var pt = this.prototype();
assert(pt.payloadType() == Type.Object);
from = pt._payload._object;
}
if(from is null) {
if(jsvar_throw)
throw new DynamicTypeException(var(null), Type.Object, file, line);
else
return *(new var);
}
return from._getMember(name, true, false, file, line);
}
public ref var opIndexAssign(T)(T t, string name, string file = __FILE__, size_t line = __LINE__) {
if(this.payloadType == Type.Array && name.appearsNumeric()) {
try {
auto i = to!size_t(name);
return opIndexAssign(t, i, file, line);
} catch(Exception)
{} // ignore bad index, use it as a string instead lol
}
_requireType(Type.Object); // FIXME?
if(_payload._object is null)
throw new DynamicTypeException(var(null), Type.Object, file, line);
return this._payload._object._setMember(name, var(t), false, false, false, file, line);
}
public ref var opIndexAssignNoOverload(T)(T t, string name, string file = __FILE__, size_t line = __LINE__) {
if(name.length && name[0] >= '0' && name[0] <= '9')
return opIndexAssign(t, to!size_t(name), file, line);
_requireType(Type.Object); // FIXME?
if(_payload._object is null)
throw new DynamicTypeException(var(null), Type.Object, file, line);
return this._payload._object._setMember(name, var(t), false, false, true, file, line);
}
public ref var opIndex(size_t idx, string file = __FILE__, size_t line = __LINE__) {
if(_type == Type.Array) {
auto arr = this._payload._array;
if(idx < arr.length)
return arr[idx];
} else if(_type == Type.Object) {
// objects might overload opIndex
var* n = new var();
if("opIndex" in this)
*n = this["opIndex"](idx);
return *n;
}
if(jsvar_throw) {
throw new DynamicTypeException(this, Type.Array, file, line);
} else {
var* n = new var();
return *n;
}
}
public ref var opIndexAssign(T)(T t, size_t idx, string file = __FILE__, size_t line = __LINE__) {
if(_type == Type.Array) {
if(idx >= this._payload._array.length)
this._payload._array.length = idx + 1;
this._payload._array[idx] = t;
return this._payload._array[idx];
} else if(_type == Type.Object) {
return opIndexAssign(t, to!string(idx), file, line);
}
if(jsvar_throw) {
throw new DynamicTypeException(this, Type.Array, file, line);
} else {
var* n = new var();
return *n;
}
}
ref var _getOwnProperty(string name, string file = __FILE__, size_t line = __LINE__) {
if(_type == Type.Object) {
if(_payload._object !is null) {
auto peek = this._payload._object._peekMember(name, false);
if(peek !is null)
return *peek;
}
}
//if(jsvar_throw)
//throw new DynamicTypeException(this, Type.Object, file, line);
var* n = new var();
return *n;
}
@property static var emptyObject(PrototypeObject prototype = null) {
var v;
v._type = Type.Object;
v._payload._object = new PrototypeObject();
v._payload._object.prototype = prototype;
return v;
}
///
@property static var emptyObject(var prototype) {
if(prototype._type == Type.Object)
return var.emptyObject(prototype._payload._object);
return var.emptyObject();
}
@property PrototypeObject prototypeObject() {
var v = prototype();
if(v._type == Type.Object)
return v._payload._object;
return null;
}
// what I call prototype is more like what Mozilla calls __proto__, but tbh I think this is better so meh
@property ref var prototype() {
static var _arrayPrototype;
static var _functionPrototype;
static var _stringPrototype;
final switch(payloadType()) {
case Type.Array:
assert(_arrayPrototype._type == Type.Object);
if(_arrayPrototype._payload._object is null) {
_arrayPrototype._object = new PrototypeObject();
}
return _arrayPrototype;
case Type.Function:
assert(_functionPrototype._type == Type.Object);
if(_functionPrototype._payload._object is null) {
_functionPrototype._object = new PrototypeObject();
}
return _functionPrototype;
case Type.String:
assert(_stringPrototype._type == Type.Object);
if(_stringPrototype._payload._object is null) {
auto p = new PrototypeObject();
_stringPrototype._object = p;
var replaceFunction;
replaceFunction._type = Type.Function;
replaceFunction._function = (var _this, var[] args) {
string s = _this.toString();
import std.array : replace;
return var(std.array.replace(s,
args[0].toString(),
args[1].toString()));
};
p._properties["replace"] = replaceFunction;
}
return _stringPrototype;
case Type.Object:
if(_payload._object)
return _payload._object._prototype;
// FIXME: should we do a generic object prototype?
break;
case Type.Integral:
case Type.Floating:
case Type.Boolean:
// these types don't have prototypes
}
var* v = new var(null);
return *v;
}
///
@property static var emptyArray() {
var v;
v._type = Type.Array;
return v;
}
///
static var fromJson(string json) {
auto decoded = parseJSON(json);
return var.fromJsonValue(decoded);
}
///
static var fromJsonFile(string filename) {
import std.file;
return var.fromJson(readText(filename));
}
///
static var fromJsonValue(JSONValue v) {
var ret;
final switch(v.type) {
case JSONType.string:
ret = v.str;
break;
case JSONType.uinteger:
ret = v.uinteger;
break;
case JSONType.integer:
ret = v.integer;
break;
case JSONType.float_:
ret = v.floating;
break;
case JSONType.object:
ret = var.emptyObject;
foreach(k, val; v.object) {
ret[k] = var.fromJsonValue(val);
}
break;
case JSONType.array:
ret = var.emptyArray;
ret._payload._array.length = v.array.length;
foreach(idx, item; v.array) {
ret._payload._array[idx] = var.fromJsonValue(item);
}
break;
case JSONType.true_:
ret = true;
break;
case JSONType.false_:
ret = false;
break;
case JSONType.null_:
ret = null;
break;
}
return ret;
}
///
string toJson() {
auto v = toJsonValue();
return toJSON(v);
}
///
JSONValue toJsonValue() {
JSONValue val;
final switch(payloadType()) {
case Type.Boolean:
version(new_std_json)
val = this._payload._boolean;
else {
if(this._payload._boolean)
val.type = JSONType.true_;
else
val.type = JSONType.false_;
}
break;
case Type.Object:
version(new_std_json) {
if(_payload._object is null) {
val = null;
} else {
val = _payload._object.toJsonValue();
}
} else {
if(_payload._object is null) {
val.type = JSONType.null_;
} else {
val.type = JSONType.object;
foreach(k, v; _payload._object._properties) {
val.object[k] = v.toJsonValue();
}
}
}
break;
case Type.String:
version(new_std_json) { } else {
val.type = JSONType.string;
}
val.str = _payload._string;
break;
case Type.Integral:
version(new_std_json) { } else {
val.type = JSONType.integer;
}
val.integer = _payload._integral;
break;
case Type.Floating:
version(new_std_json) { } else {
val.type = JSONType.float_;
}
val.floating = _payload._floating;
break;
case Type.Array:
auto a = _payload._array;
JSONValue[] tmp;
tmp.length = a.length;
foreach(i, v; a) {
tmp[i] = v.toJsonValue();
}
version(new_std_json) {
val = tmp;
} else {
val.type = JSONType.array;
val.array = tmp;
}
break;
case Type.Function:
version(new_std_json)
val = null;
else
val.type = JSONType.null_; // ideally we would just skip it entirely...
break;
}
return val;
}
}
class PrototypeObject {
string name;
var _prototype;
package PrototypeObject _secondary; // HACK don't use this
PrototypeObject prototype() {
if(_prototype.payloadType() == var.Type.Object)
return _prototype._payload._object;
return null;
}
PrototypeObject prototype(PrototypeObject set) {
this._prototype._object = set;
return set;
}
override string toString() {
var* ts = _peekMember("toString", true);
if(ts) {
var _this;
_this._object = this;
return (*ts).call(_this).get!string;
}
JSONValue val;
version(new_std_json) {
JSONValue[string] tmp;
foreach(k, v; this._properties)
tmp[k] = v.toJsonValue();
val.object = tmp;
} else {
val.type = JSONType.object;
foreach(k, v; this._properties)
val.object[k] = v.toJsonValue();
}
return toJSON(val);
}
var[string] _properties;
PrototypeObject copy() {
auto n = new PrototypeObject();
n.prototype = this.prototype;
n.name = this.name;
foreach(k, v; _properties) {
n._properties[k] = v._copy;
}
return n;
}
bool isSpecial() { return false; }
PrototypeObject new_(PrototypeObject newThis) {
// if any of the prototypes are D objects, we need to try to copy them.
auto p = prototype;
PrototypeObject[32] stack;
PrototypeObject[] fullStack = stack[];
int stackPos;
while(p !is null) {
if(p.isSpecial()) {
auto n = new PrototypeObject();
auto proto = p.new_(n);
while(stackPos) {
stackPos--;
auto pr = fullStack[stackPos].copy();
pr.prototype = proto;
proto = pr;
}
n.prototype = proto;
n.name = this.name;
foreach(k, v; _properties) {
n._properties[k] = v._copy;
}
return n;
}
if(stackPos >= fullStack.length)
fullStack ~= p;
else
fullStack[stackPos] = p;
stackPos++;
p = p.prototype;
}
return copy();
}
PrototypeObject copyPropertiesFrom(PrototypeObject p) {
foreach(k, v; p._properties) {
this._properties[k] = v._copy;
}
return this;
}
var* _peekMember(string name, bool recurse) {
if(name == "prototype")
return &_prototype;
auto curr = this;
// for the secondary hack
bool triedOne = false;
// for the secondary hack
PrototypeObject possibleSecondary;
tryAgain:
do {
auto prop = name in curr._properties;
if(prop is null) {
// the secondary hack is to do more scoping in the script, it is really hackish
if(possibleSecondary is null)
possibleSecondary = curr._secondary;
if(!recurse)
break;
else
curr = curr.prototype;
} else
return prop;
} while(curr);
if(possibleSecondary !is null) {
curr = possibleSecondary;
if(!triedOne) {
triedOne = true;
goto tryAgain;
}
}
return null;
}
// FIXME: maybe throw something else
/*package*/ ref var _getMember(string name, bool recurse, bool throwOnFailure, string file = __FILE__, size_t line = __LINE__) {
var* mem = _peekMember(name, recurse);
if(mem !is null) {
// If it is a property, we need to call the getter on it
if((*mem).payloadType == var.Type.Object && cast(PropertyPrototype) (*mem)._payload._object) {
auto prop = cast(PropertyPrototype) (*mem)._payload._object;
return prop.get;
}
return *mem;
}
mem = _peekMember("opIndex", recurse);
if(mem !is null) {
auto n = new var;
*n = ((*mem)(name));
return *n;
}
// if we're here, the property was not found, so let's implicitly create it
if(throwOnFailure)
throw new DynamicTypeException("no such property " ~ name, file, line);
var n;
this._properties[name] = n;
return this._properties[name];
}
// FIXME: maybe throw something else
/*package*/ ref var _setMember(string name, var t, bool recurse, bool throwOnFailure, bool suppressOverloading, string file = __FILE__, size_t line = __LINE__) {
var* mem = _peekMember(name, recurse);
if(mem !is null) {
// Property check - the setter should be proxied over to it
if((*mem).payloadType == var.Type.Object && cast(PropertyPrototype) (*mem)._payload._object) {
auto prop = cast(PropertyPrototype) (*mem)._payload._object;
return prop.set(t);
}
*mem = t;
return *mem;
}
if(!suppressOverloading) {
mem = _peekMember("opIndexAssign", true);
if(mem !is null) {
auto n = new var;
*n = ((*mem)(t, name));
return *n;
}
}
// if we're here, the property was not found, so let's implicitly create it
if(throwOnFailure)
throw new DynamicTypeException("no such property " ~ name, file, line);
this._properties[name] = t;
return this._properties[name];
}
JSONValue toJsonValue() {
JSONValue val;
JSONValue[string] tmp;
foreach(k, v; this._properties) {
// if it is an overload set and/or a function, just skip it.
// or really if it is a wrapped native object it should prolly just be skipped anyway
// unless it actually defines a toJson.
if(v.payloadType == var.Type.Function)
continue;
if(v.payloadType == var.Type.Object) {
// I'd love to get the json value out but idk. FIXME
if(v._payload._object is null) continue;
if(auto wno = cast(WrappedNativeObject) v._payload._object) {
auto obj = wno.getObject();
if(obj is null)
tmp[k] = null;
else
tmp[k] = obj.toString();
continue;
} else if(typeid(PrototypeObject) !is typeid(v._payload._object))
continue;
}
tmp[k] = v.toJsonValue();
}
val = tmp;
return val;
}
public int opApply(scope int delegate(var, ref var) dg) {
foreach(k, v; this._properties) {
if(v.payloadType == var.Type.Object && cast(PropertyPrototype) v._payload._object)
v = (cast(PropertyPrototype) v._payload._object).get;
if(auto result = dg(var(k), v))
return result;
}
return 0;
}
}
// A property is a special type of object that can only be set by assigning
// one of these instances to foo.child._object. When foo.child is accessed and it
// is an instance of PropertyPrototype, it will return the getter. When foo.child is
// set (excluding direct assignments through _type), it will call the setter.
class PropertyPrototype : PrototypeObject {
var delegate() getter;
void delegate(var) setter;
this(var delegate() getter, void delegate(var) setter) {
this.getter = getter;
this.setter = setter;
}
override string toString() {
return get.toString();
}
ref var get() {
var* g = new var();
*g = getter();
return *g;
}
ref var set(var t) {
setter(t);
return get;
}
override JSONValue toJsonValue() {
return get.toJsonValue();
}
}
///
struct ScriptLocation {
string scriptFilename; ///
int lineNumber; ///
}
class DynamicTypeException : Exception {
this(string msg, string file = __FILE__, size_t line = __LINE__) {
super(msg, file, line);
}
this(var v, var.Type required, string file = __FILE__, size_t line = __LINE__) {
import std.string;
if(v.payloadType() == required)
super(format("Tried to use null as a %s", required), file, line);
else {
super(format("Tried to use %s%s as a %s", v == null ? "null ": "", v.payloadType(), required), file, line);
}
}
override void toString(scope void delegate(in char[]) sink) const {
import std.format;
if(varName.length)
sink(varName);
if(callStack.length) {
sink("arsd.jsvar.DynamicTypeException@");
sink(file);
sink("(");
sink(to!string(line));
sink("): ");
sink(msg);
foreach(cs; callStack)
sink(format("\n\t%s:%s", cs.scriptFilename, cs.lineNumber));
bool found;
void hiddenSink(in char[] str) {
// I just want to hide the call stack until the interpret call...
// since the script stack above is more meaningful to users.
//
// but then I will go back to the D functions once on the outside.
import std.string;
if(found)
sink(str);
else if(str.indexOf("arsd.script.interpret(") != -1)
found = true;
}
sink("\n--------");
super.toString(&hiddenSink);
} else {
super.toString(sink);
}
}
ScriptLocation[] callStack;
string varName;
}
template makeAscii() {
string helper() {
string s;
foreach(i; 0 .. 128)
s ~= cast(char) i;
return s;
}
enum makeAscii = helper();
}
package interface VarMetadata { }
interface ScriptableSubclass {
void setScriptVar(var);
var getScriptVar();
final bool methodOverriddenByScript(string name) {
PrototypeObject t = getScriptVar().get!PrototypeObject;
// the top one is the native object from subclassable so we don't want to go all the way there to avoid endless recursion
//import std.stdio; writeln("checking ", name , " ...", "wtf");
if(t !is null)
while(!t.isSpecial) {
if(t._peekMember(name, false) !is null)
return true;
t = t.prototype;
}
return false;
}
}
/++
EXPERIMENTAL
Allows you to make a class available to the script rather than just class objects.
You can subclass it in script and then call the methods again through the original
D interface. With caveats...
Assumes ALL $(I virtual) methods and constructors are scriptable, but requires
`@scriptable` to be present on final or static methods. This may change in the future.
Note that it has zero support for `@safe`, `pure`, `nothrow`, and other attributes
at this time and will skip that use those. I may be able to loosen this in the
future as well but I have no concrete plan to at this time. You can still mark
them as `@scriptable` to call them from the script, but they can never be overridden
by script code because it cannot verify those guarantees hold true.
Ditto on `const` and `immutable`.
Its behavior on overloads is currently undefined - it may keep only any random
overload as the only one and do dynamic type conversions to cram data into it.
This is likely to change in the future but for now try not to use this on classes
with overloaded methods.
It also does not wrap member variables unless explicitly marked `@scriptable`; it
is meant to communicate via methods.
History:
Added April 25, 2020
+/
static if(__traits(compiles, mixin(q{ () { static foreach(i; [1,2]) {} } }) ))
mixin(q{
var subclassable(T)() if(is(T == class) || is(T == interface)) {
import std.traits;
static final class ScriptableT : T, ScriptableSubclass {
var _this;
void setScriptVar(var v) { _this = v; }
var getScriptVar() { return _this; }
bool _next_devirtualized;
// @scriptable size_t _nativeHandle_() { return cast(size_t) cast(void*) this;}
static if(__traits(compiles, __traits(getOverloads, T, "__ctor")))
static foreach(ctor; __traits(getOverloads, T, "__ctor"))
@scriptable this(Parameters!ctor p) { super(p); }
static foreach(memberName; __traits(allMembers, T)) {
static if(memberName != "toHash")
static foreach(overload; __traits(getOverloads, T, memberName))
static if(__traits(isVirtualMethod, overload))
// note: overload behavior undefined
static if(!(functionAttributes!(overload) & (FunctionAttribute.pure_ | FunctionAttribute.safe | FunctionAttribute.trusted | FunctionAttribute.nothrow_)))
mixin(q{
@scriptable
override ReturnType!(overload)
}~memberName~q{
(Parameters!(overload) p)
{
//import std.stdio; writeln("calling ", T.stringof, ".", memberName, " - ", methodOverriddenByScript(memberName), "/", _next_devirtualized, " on ", cast(size_t) cast(void*) this);
if(_next_devirtualized || !methodOverriddenByScript(memberName))
return __traits(getMember, super, memberName)(p);
return _this[memberName].call(_this, p).get!(typeof(return));
}
});
}
// I don't want to necessarily call a constructor but I need an object t use as the prototype
// hence this faked one. hopefully the new operator will see void[] and assume it can have GC ptrs...
static ScriptableT _allocate_(PrototypeObject newThis) {
void[] store = new void[](__traits(classInstanceSize, ScriptableT));
store[] = typeid(ScriptableT).initializer[];
ScriptableT dummy = cast(ScriptableT) store.ptr;
dummy._this = var(newThis);
//import std.stdio; writeln("Allocating new ", cast(ulong) store.ptr);
return dummy;
}
}
ScriptableT dummy = ScriptableT._allocate_(null);
var proto = wrapNativeObject!(ScriptableT, true)(dummy);
var f = var.emptyObject;
f.prototype = proto;
return f;
}
});
/// Demonstrates tested capabilities of [subclassable]
version(with_arsd_script)
unittest {
interface IFoo {
string method();
int method2();
int args(int, int);
}
// note the static is just here because this
// is written in a unittest; it shouldn't actually
// be necessary under normal circumstances.
static class Foo : IFoo {
ulong handle() { return cast(ulong) cast(void*) this; }
string method() { return "Foo"; }
int method2() { return 10; }
int args(int a, int b) {
//import std.stdio; writeln(a, " + ", b, " + ", member_, " on ", cast(ulong) cast(void*) this);
return member_+a+b; }
int member_;
@property int member(int i) { return member_ = i; }
@property int member() { return member_; }
@scriptable final int fm() { return 56; }
}
static class Bar : Foo {
override string method() { return "Bar"; }
}
static class Baz : Bar {
override int method2() { return 20; }
}
static class WithCtor {
// constructors work but are iffy with overloads....
this(int arg) { this.arg = arg; }
@scriptable int arg; // this is accessible cuz it is @scriptable
int getValue() { return arg; }
}
var globals = var.emptyObject;
globals.Foo = subclassable!Foo;
globals.Bar = subclassable!Bar;
globals.Baz = subclassable!Baz;
globals.WithCtor = subclassable!WithCtor;
import arsd.script;
interpret(q{
// can instantiate D classes added via subclassable
var foo = new Foo();
// and call its methods...
assert(foo.method() == "Foo");
assert(foo.method2() == 10);
foo.member(55);
// proves the new operator actually creates new D
// objects as well to avoid sharing instance state.
var foo2 = new Foo();
assert(foo2.handle() != foo.handle());
// passing arguments works
assert(foo.args(2, 4) == 6 + 55); // (and sanity checks operator precedence)
var bar = new Bar();
assert(bar.method() == "Bar");
assert(bar.method2() == 10);
// this final member is accessible because it was marked @scriptable
assert(bar.fm() == 56);
// the script can even subclass D classes!
class Amazing : Bar {
// and override its methods
var inst = 99;
function method() {
return "Amazing";
}
// note: to access instance members or virtual call lookup you MUST use the `this` keyword
// otherwise the function will be called with scope limited to this class itself (similar to javascript)
function other() {
// this.inst is needed to get the instance variable (otherwise it would only look for a static var)
// and this.method triggers dynamic lookup there, so it will get children's overridden methods if there is one
return this.inst ~ this.method();
}
function args(a, b) {
// calling parent class method still possible
return super.args(a*2, b*2);
}
}
var amazing = new Amazing();
assert(amazing.method() == "Amazing");
assert(amazing.method2() == 10); // calls back to the parent class
amazing.member(5);
// this line I can paste down to interactively debug the test btw.
//}, globals); repl!true(globals); interpret(q{
assert(amazing.args(2, 4) == 12+5);
var wc = new WithCtor(5); // argument passed to constructor
assert(wc.getValue() == 5);
// confirm the property read works too
assert(wc.arg == 5);
// but property WRITING is currently not working though.
class DoubleChild : Amazing {
function method() {
return "DoubleChild";
}
}
// can also do a child of a child class
var dc = new DoubleChild();
assert(dc.method() == "DoubleChild");
assert(dc.other() == "99DoubleChild"); // the `this.method` means it uses the replacement now
assert(dc.method2() == 10); // back to the D grandparent
assert(dc.args(2, 4) == 12); // but the args impl from above
}, globals);
Foo foo = globals.foo.get!Foo; // get the native object back out
assert(foo.member == 55); // and see mutation via properties proving object mutability
assert(globals.foo.get!Bar is null); // cannot get the wrong class out of it
assert(globals.foo.get!Object !is null); // but can do parent classes / interfaces
assert(globals.foo.get!IFoo !is null);
assert(globals.bar.get!Foo !is null); // the Bar can also be a Foo
Bar amazing = globals.amazing.get!Bar; // instance of the script's class is still accessible through parent D class or interface
assert(amazing !is null); // object exists
assert(amazing.method() == "Amazing"); // calls the override from the script
assert(amazing.method2() == 10); // non-overridden function works as expected
IFoo iamazing = globals.amazing.get!IFoo; // and through just the interface works the same way
assert(iamazing !is null);
assert(iamazing.method() == "Amazing");
assert(iamazing.method2() == 10);
}
// just a base class we can reference when looking for native objects
class WrappedNativeObject : PrototypeObject {
TypeInfo wrappedType;
abstract Object getObject();
}
template helper(alias T) { alias helper = T; }
/++
Wraps a class. If you are manually managing the memory, remember the jsvar may keep a reference to the object; don't free it!
To use this: `var a = wrapNativeObject(your_d_object);` OR `var a = your_d_object`;
By default, it will wrap all methods and members with a public or greater protection level. The second template parameter can filter things differently. FIXME implement this
History:
This became the default after April 24, 2020. Previously, [var.opAssign] would [wrapOpaquely] instead.
+/
WrappedNativeObject wrapNativeObject(Class, bool special = false)(Class obj) if(is(Class == class)) {
import std.meta;
static class WrappedNativeObjectImpl : WrappedNativeObject {
override Object getObject() {
return obj;
}
override bool isSpecial() { return special; }
static if(special)
override WrappedNativeObject new_(PrototypeObject newThis) {
return new WrappedNativeObjectImpl(obj._allocate_(newThis));
}
Class obj;
this(Class objIn) {
this.obj = objIn;
wrappedType = typeid(obj);
// wrap the other methods
// and wrap members as scriptable properties
foreach(memberName; __traits(allMembers, Class)) static if(is(typeof(__traits(getMember, obj, memberName)) type)) {
static if(is(type == function)) {
auto os = new OverloadSet();
foreach(idx, overload; AliasSeq!(__traits(getOverloads, obj, memberName))) static if(.isScriptable!(__traits(getAttributes, overload))()) {
var gen;
gen._function = delegate (var vthis_, var[] vargs) {
Parameters!(__traits(getOverloads, Class, memberName)[idx]) fargs;
enum lol = static_foreach(fargs.length, 1, -1,
`__traits(getOverloads, obj, memberName)[idx](`,``,` < vargs.length ? vargs[`,`].get!(typeof(fargs[`,`])) : ParamDefault!(__traits(getOverloads, Class, memberName)[idx], `,`)(),`,`)`);
/*
enum lol = static_foreach(fargs.length, 1, -1,
`__traits(getOverloads, obj, memberName)[idx](`,``,` < vargs.length ? vargs[`,`].get!(typeof(fargs[`,`])) :
typeof(fargs[`,`]).init,`,`)`);
*/
// FIXME: what if there are multiple @scriptable overloads?!
// FIXME: what about @properties?
static if(special) {
Class obj;
//if(vthis_.payloadType() != var.Type.Object) { import std.stdio; writeln("getwno on ", vthis_); }
// the native object might be a step or two up the prototype
// chain due to script subclasses, need to find it...
while(vthis_ != null) {
obj = vthis_.getWno!Class;
if(obj !is null)
break;
vthis_ = vthis_.prototype;
}
if(obj is null) throw new Exception("null native object");
}
static if(special) {
obj._next_devirtualized = true;
scope(exit) obj._next_devirtualized = false;
}
var ret;
static if(!is(typeof(__traits(getOverloads, obj, memberName)[idx](fargs)) == void))
ret = mixin(lol);
else
mixin(lol ~ ";");
return ret;
};
Parameters!(overload) fargs;
// FIXME: if an argument type is a class, we need to actually look it up in the script context somehow
var[] definition;
foreach(arg; fargs) {
definition ~= var(arg);
}
//import std.stdio; writeln(Class.stringof, ".", memberName, " ", definition);
os.addOverload(OverloadSet.Overload(definition, gen));
}
_properties[memberName] = var(os);
} else {
static if(.isScriptable!(__traits(getAttributes, __traits(getMember, Class, memberName)))())
// if it has a type but is not a function, it is prolly a member
_properties[memberName] = new PropertyPrototype(
() => var(__traits(getMember, obj, memberName)),
(var v) {
// read-only property hack
static if(__traits(compiles, __traits(getMember, obj, memberName) = v.get!(type)))
__traits(getMember, obj, memberName) = v.get!(type);
});
}
}
}
}
return new WrappedNativeObjectImpl(obj);
}
import std.traits;
class WrappedOpaque(T) : PrototypeObject if(isPointer!T || is(T == class)) {
T wrapped;
this(T t) {
wrapped = t;
}
T wrapping() {
return wrapped;
}
}
class WrappedOpaque(T) : PrototypeObject if(!isPointer!T && !is(T == class)) {
T* wrapped;
this(T t) {
wrapped = new T;
(cast() *wrapped) = t;
}
this(T* t) {
wrapped = t;
}
T* wrapping() {
return wrapped;
}
}
WrappedOpaque!Obj wrapOpaquely(Obj)(Obj obj) {
static if(is(Obj == class)) {
if(obj is null)
return null;
}
return new WrappedOpaque!Obj(obj);
}
/**
Wraps an opaque struct pointer in a module with ufcs functions
*/
WrappedNativeObject wrapUfcs(alias Module, Type)(Type obj) {
import std.meta;
return new class WrappedNativeObject {
override Object getObject() {
return null; // not actually an object! but close to
}
this() {
wrappedType = typeid(Type);
// wrap the other methods
// and wrap members as scriptable properties
foreach(memberName; __traits(allMembers, Module)) static if(is(typeof(__traits(getMember, Module, memberName)) type)) {
static if(is(type == function)) {
foreach(idx, overload; AliasSeq!(__traits(getOverloads, Module, memberName))) static if(.isScriptable!(__traits(getAttributes, overload))()) {
auto helper = &__traits(getOverloads, Module, memberName)[idx];
static if(Parameters!helper.length >= 1 && is(Parameters!helper[0] == Type)) {
// this staticMap is a bit of a hack so it can handle `in float`... liable to break with others, i'm sure
_properties[memberName] = (staticMap!(Unqual, Parameters!helper[1 .. $]) args) {
return __traits(getOverloads, Module, memberName)[idx](obj, args);
};
}
}
}
}
}
};
}
bool isScriptable(attributes...)() {
bool nonConstConditionForWorkingAroundASpuriousDmdWarning = true;
foreach(attribute; attributes) {
static if(is(typeof(attribute) == string)) {
static if(attribute == scriptable) {
if(nonConstConditionForWorkingAroundASpuriousDmdWarning)
return true;
}
}
}
return false;
}
bool isScriptableOpaque(T)() {
static if(is(typeof(T.isOpaqueStruct) == bool))
return T.isOpaqueStruct == true;
else
return false;
}
int typeCompatibilityScore(var arg, var type) {
int thisScore = 0;
if(type.payloadType == var.Type.Object && type._payload._object is null) {
thisScore += 1; // generic match
return thisScore;
}
if(arg.payloadType == var.Type.Integral && type.payloadType == var.Type.Floating) {
thisScore += 2; // match with implicit conversion
// FIXME: want to support implicit from whatever to bool?
} else if(arg.payloadType != type.payloadType) {
thisScore = 0;
return thisScore;
} else {
// exact type category match
if(type.payloadType == var.Type.Array) {
// arrays not really supported here....
// so just like if both are arrays i'll take
// it as a bare minimum but i don't love it otherwise
if(arg.payloadType == var.Type.Array)
thisScore = 1;
else
thisScore = 0;
return thisScore;
} else if(type.payloadType == var.Type.Object) {
// objects are the interesting one...
// want to see if it matches by seeing if the
// given type is identical or its prototype is one of the given type's prototype chain
int depth = 0;
PrototypeObject pt = type._payload._object;
while(pt !is null) {
depth++;
pt = pt.prototype;
}
if(type._payload._object is arg._payload._object)
thisScore += 2 + depth;
else {
if(arg._payload._object is null)
return 0; // null sucks.
auto test = type._payload._object.prototype;
// generic object compared against generic object matches
if(test is null && type._payload._object.prototype is null)
thisScore += 1;
else {
pt = arg._payload._object;
while(pt !is null) {
if(pt is test) {
thisScore += 1 + depth;
break;
}
pt = pt.prototype;
}
}
}
} else {
thisScore += 3; // exact match without implicit conversion
}
}
return thisScore;
}
/++
Does dynamic dispatch to overloads in a jsvar function set.
History:
Added September 1, 2020.
+/
class OverloadSet : PrototypeObject {
this() {
_properties["opCall"] = &opCall;
_properties["apply"] = &apply;
}
///
void addIndividualOverload(alias f)() {
var func = &f;
var[] argTypes;
static if(is(typeof(f) Params == __parameters))
foreach(param; Params)
argTypes ~= var(param.init);
//import std.stdio; writeln("registered ", argTypes);
overloads ~= Overload(argTypes, func);
}
///
static if(__traits(compiles, mixin(q{ () { static foreach(i; [1,2]) {} } }) ))
mixin(q{
void addOverloadsOf(alias what)() {
foreach(alias f; __traits(getOverloads, __traits(parent, what), __traits(identifier, what)))
addIndividualOverload!f;
}
});
static struct Overload {
// I don't even store the arity of a function object
// so argTypes is the nest best thing.
var[] argTypes;
var func;
}
Overload[] overloads;
private bool exactMatch(var[] a, var[] b) {
if(a.length != b.length)
return false;
foreach(i; 0 .. a.length) {
if(a[i] !is b[i])
return false;
}
return true;
}
void addOverload(Overload o) {
foreach(ref ov; overloads)
if(exactMatch(ov.argTypes, o.argTypes)) {
ov.func = o.func;
return;
}
overloads ~= o;
}
/*
I might have to add Object, Exception, and others to jsvar to represent types.
maybe even int and such.
An object should probably have a secret property that gives its name...
*/
var apply(var this_, var[] arguments) {
return opCall(arguments[0], arguments[1].get!(var[]));
}
var opCall(var this_, var[] arguments) {
// remember script.d supports default args too.
int bestScore = int.min;
Overload bestMatch;
if(overloads.length == 0) {
return var(null);
}
foreach(overload; overloads) {
if(overload.argTypes.length == 0) {
if(arguments.length == 0) {
bestScore = 0;
bestMatch = overload;
break;
}
if(bestScore < 0) {
bestScore = 0;
bestMatch = overload;
continue;
}
}
int thisScore = 0;
foreach(idx, arg; arguments) {
if(idx >= overload.argTypes.length) {
thisScore = 0;
break;
}
// now if it is an object, if we can match, add score based on how derived the specified type is.
// if it is the very same object, that's the best match possible. (prototype chain length + 1. and the one base point for matching at all.)
// then if not, if the arg given can implicitly convert to the arg specified, give points based on how many prototypes the arg specified has. (plus one base point for matching at all)
// otherwise just give one point.
auto s = typeCompatibilityScore(arg, overload.argTypes[idx]);
if(s == 0) {
thisScore = 0;
break;
}
thisScore += s;
}
if(thisScore > 0 && thisScore > bestScore) {
bestScore = thisScore;
bestMatch = overload;
}
}
if(bestScore < 0)
throw new Exception("no matching overload found " ~ to!string(arguments) ~ " " ~ to!string(overloads));
return bestMatch.func.apply(this_, arguments);
}
}
unittest {
struct A {
static:
string foo(var arg) { return "generic"; }
string foo(string s) { return "string"; }
string foo(int i) { return "int"; }
string foo(float i) { return "float"; }
}
auto os = new OverloadSet();
os.addOverloadsOf!(A.foo);
var g = var.emptyObject;
g.foo = os;
//g.foo()();
assert(g.foo()("for me") == "string");
//g.foo()("for me", "lol");
assert(g.foo()(1) == "int");
assert(g.foo()(5.4) == "float");
assert(g.foo()(new Object) == "generic");
}
bool appearsNumeric(string n) {
if(n.length == 0)
return false;
foreach(c; n) {
if(c < '0' || c > '9')
return false;
}
return true;
}
/// Wraps a struct by reference. The pointer is stored - be sure the struct doesn't get freed or go out of scope!
///
/// BTW: structs by value can be put in vars with var.opAssign and var.get. It will generate an object with the same fields. The difference is changes to the jsvar won't be reflected in the original struct and native methods won't work if you do it that way.
WrappedNativeObject wrapNativeObject(Struct)(Struct* obj) if(is(Struct == struct)) {
return null; // FIXME
}
/+
_IDX_
static_foreach(T.length, q{
mixin(q{
void
} ~ __traits(identifier, T[_IDX_]) ~ q{
}
});
+/
private
string static_foreach(size_t length, int t_start_idx, int t_end_idx, string[] t...) pure {
assert(__ctfe);
int slen;
int tlen;
foreach(idx, i; t[0 .. t_start_idx])
slen += i.length;
foreach(idx, i; t[t_start_idx .. $ + t_end_idx]) {
if(idx)
tlen += 5;
tlen += i.length;
}
foreach(idx, i; t[$ + t_end_idx .. $])
slen += i.length;
char[] a = new char[](tlen * length + slen);
int loc;
char[5] stringCounter;
stringCounter[] = "00000"[];
foreach(part; t[0 .. t_start_idx]) {
a[loc .. loc + part.length] = part[];
loc += part.length;
}
foreach(i; 0 .. length) {
foreach(idx, part; t[t_start_idx .. $ + t_end_idx]) {
if(idx) {
a[loc .. loc + stringCounter.length] = stringCounter[];
loc += stringCounter.length;
}
a[loc .. loc + part.length] = part[];
loc += part.length;
}
auto pos = stringCounter.length;
while(pos) {
pos--;
if(stringCounter[pos] == '9') {
stringCounter[pos] = '0';
} else {
stringCounter[pos] ++;
break;
}
}
while(pos)
stringCounter[--pos] = ' ';
}
foreach(part; t[$ + t_end_idx .. $]) {
a[loc .. loc + part.length] = part[];
loc += part.length;
}
return a;
}
// LOL this can't work because function pointers drop the default :(
private
auto ParamDefault(alias T, size_t idx)() {
static if(is(typeof(T) Params == __parameters)) {
auto fn(Params[idx .. idx + 1] _args__) { // if i used plain `args` and one of the args in the list was also called `args`, this fails to compile and that error will be dropped by opDispatch. LOL.
return _args__[0];
}
static if(__traits(compiles, fn())) {
return fn();
} else {
return Params[idx].init;
}
} else static assert(0);
}
|
D
|
module org.serviio.library.entities.Image;
import java.lang;
import java.util.Date;
import org.serviio.dlna.ImageContainer;
import org.serviio.dlna.SamplingMode;
import org.serviio.library.metadata.MediaFileType;
import org.serviio.library.entities.MediaItem;
public class Image : MediaItem
{
private Integer width;
private Integer height;
private Integer colorDepth;
private ImageContainer container;
private Integer rotation;
private SamplingMode chromaSubsampling;
public this(String title, ImageContainer container, String fileName, String filePath, Long fileSize, Long folderId, Long repositoryId, Date date)
{
super(title, fileName, filePath, fileSize, folderId, repositoryId, date, MediaFileType.IMAGE);
this.container = container;
this.chromaSubsampling = SamplingMode.INVALID;
}
public Integer getWidth()
{
return this.width;
}
public void setWidth(Integer width)
{
this.width = width;
}
public Integer getHeight()
{
return this.height;
}
public void setHeight(Integer height)
{
this.height = height;
}
public Integer getColorDepth()
{
return this.colorDepth;
}
public void setColorDepth(Integer colorDepth)
{
this.colorDepth = colorDepth;
}
public ImageContainer getContainer()
{
return this.container;
}
public void setContainer(ImageContainer container)
{
this.container = container;
}
public Integer getRotation()
{
return this.rotation;
}
public void setRotation(Integer rotation)
{
this.rotation = rotation;
}
public SamplingMode getChromaSubsampling()
{
return this.chromaSubsampling;
}
public void setChromaSubsampling(SamplingMode chromaSubsampling)
{
this.chromaSubsampling = chromaSubsampling;
}
}
/* Location: C:\Users\Main\Downloads\serviio.jar
* Qualified Name: org.serviio.library.entities.Image
* JD-Core Version: 0.7.0.1
*/
|
D
|
module disassembler.parse.parse_prefix;
import disassembler.all;
/**
* Up to 4 prefix bytes are possible.
*/
void parsePrefix(Parser p) {
p.prefix = Prefix.init;
while(true) {
auto b = p.peekByte();
switch(b) {
/* Segment overrides - ignored in 64 bit mode */
case 0x26 : p.prefix.segreg = Reg.ES; break;
case 0x2E : p.prefix.segreg = Reg.CS; p.prefix.branch = Prefix.Branch.DONTTAKE; break;
case 0x36 : p.prefix.segreg = Reg.SS; break;
case 0x3E : p.prefix.segreg = Reg.DS; p.prefix.branch = Prefix.Branch.TAKE; break;
/* REX */
case 0x40:..case 0x4F:
p.prefix.hasRexBits = true;
p.prefix.rexBits = b-0x40;
break;
case 0x64:
p.prefix.segreg = Reg.FS;
break;
case 0x65:
p.prefix.segreg = Reg.GS;
break;
case 0x66:
// switch to 16 bit mode
p.prefix.opSize = true;
break;
case 0x67:
// switch to 32 bit addressing in x64 mode
p.prefix.addrSize = true;
break;
/* XOP */
case 0x8E:
p.prefix.hasXopBits = true;
break;
/* VEX */
case 0xC4: // 3 byte vex escape prefix
case 0xC5: // 2 byte vex escape prefix
p.prefix.hasVexBits = true;
p.prefix.vexBits = b-0xc4;
break;
case 0xF0:
p.prefix.lock = true;
break;
case 0xF2:
p.prefix.repne = true;
break;
case 0xF3:
p.prefix.rep = true;
break;
default:
return;
}
/* Consume the byte */
p.prefix.bytes ~= p.readByte();
/* Stop after we find a VEX prefix */
if(p.prefix.hasVexBits) return;
}
assert(false);
}
|
D
|
/home/lee/Robotics/hyperion/cargo/target/debug/build/typenum-9aa9da3e423b661a/build_script_main-9aa9da3e423b661a: /home/lee/.cargo/registry/src/github.com-1ecc6299db9ec823/typenum-1.11.2/build/main.rs /home/lee/.cargo/registry/src/github.com-1ecc6299db9ec823/typenum-1.11.2/build/op.rs
/home/lee/Robotics/hyperion/cargo/target/debug/build/typenum-9aa9da3e423b661a/build_script_main-9aa9da3e423b661a.d: /home/lee/.cargo/registry/src/github.com-1ecc6299db9ec823/typenum-1.11.2/build/main.rs /home/lee/.cargo/registry/src/github.com-1ecc6299db9ec823/typenum-1.11.2/build/op.rs
/home/lee/.cargo/registry/src/github.com-1ecc6299db9ec823/typenum-1.11.2/build/main.rs:
/home/lee/.cargo/registry/src/github.com-1ecc6299db9ec823/typenum-1.11.2/build/op.rs:
|
D
|
module vindinium.game_objs;
import stdx.data.json;
import std.conv;
import std.bitmanip;
struct Pos {
uint x, y;
void update_from_json(JSONValue json) {
auto pos = json.get!(JSONValue[string]);
this.x = pos["x"].get!double.to!uint;
this.y = pos["y"].get!double.to!uint;
}
}
struct Hero {
int id;
string name;
string user_id;
uint elo;
Pos pos;
uint life;
uint gold;
uint mine_count;
Pos spawn;
bool crashed;
void update_from_json(JSONValue json) {
auto hero = json.get!(JSONValue[string]);
this.id = hero["id"].get!double.to!int;
this.name = hero["name"].get!string;
this.pos.update_from_json(hero["pos"]);
this.life = hero["life"].get!double.to!uint;
this.gold = hero["gold"].get!double.to!uint;
this.mine_count = hero["mineCount"].get!double.to!uint;
this.spawn.update_from_json(hero["spawnPos"]);
this.crashed = hero["crashed"].get!bool;
// might not be in the JSON response, as they're training dummies
if("elo" in hero) this.elo = hero["elo"].get!double.to!uint;
if("userId" in hero) this.user_id = hero["userId"].get!string;
}
}
struct Board {
struct Tile {
enum Type : ubyte {
Empty,
Wood,
Hero,
Tavern,
Mine
}
private:
mixin(bitfields!(
// type of the item
Type, "_type", 3,
// is the tavern neutral?
bool, "_neutral", 1,
// hero ID
uint, "_id", 4));
public:
Type type() { return _type; }
bool neutral() {
assert(type == Type.Mine);
return _neutral;
}
uint id() {
assert(type == Type.Hero || type == Type.Mine);
return _id;
}
this(Type type, uint id) {
assert(type == Type.Hero || type == Type.Mine);
this._type = type;
this._id = id;
this._neutral = false;
}
this(Type type) {
this._type = type;
this._neutral = true;
}
}
// board dimentions
uint size;
// [x][y]
Tile[][] tiles;
void update_from_json(JSONValue json) {
auto board = json.get!(JSONValue[string]);
immutable size = board["size"].get!double.to!uint;
auto tiles_str = board["tiles"].get!string;
assert((size * size) == (tiles_str.length/2),
"Size vs actual tile string length mismatch!");
if(this.size != size) {
// reallocate tiles
this.tiles = new Tile[][](size, size);
}
this.size = size;
uint idx = 0;
foreach(y; 0..size) {
foreach(x; 0..size) {
Tile t;
string tile = tiles_str[idx .. idx + 2];
if(tile == " ") {
t = Tile(Tile.Type.Empty);
}
else if(tile == "##") {
t = Tile(Tile.Type.Wood);
}
else if(tile[0] == '@') {
t = Tile(Tile.Type.Hero, tile[1 .. 2].to!uint);
}
else if(tile == "[]") {
t = Tile(Tile.Type.Tavern);
}
else if(tile[0] == '$') {
if(tile[1] == '-') {
t = Tile(Tile.Type.Mine);
}
else {
t = Tile(Tile.Type.Mine, tile[1 .. 2].to!uint);
}
}
else {
assert(false, "Invalid tile on board: `" ~ tile ~ "`");
}
this.tiles[x][y] = t;
idx += 2;
}
}
}
}
struct Game {
string id;
uint turn;
uint max_turns;
Hero[] heros;
Board board;
bool finished;
void update_from_json(JSONValue json) {
auto game = json.get!(JSONValue[string]);
this.id = game["id"].get!string;
this.turn = game["turn"].get!double.to!uint;
this.max_turns = game["maxTurns"].get!double.to!uint;
auto heroes_json = game["heroes"].get!(JSONValue[]);
if(!this.heros.length) {
this.heros = new Hero[](heroes_json.length);
}
foreach(i, hero_json; heroes_json) {
this.heros[i].update_from_json(hero_json);
}
this.board.update_from_json(game["board"]);
this.finished = game["finished"].get!bool;
}
}
struct GameResponse {
Game game; /// initial game state
Hero hero; /// the player's hero
string token;
string view_url;
string play_url;
void update_from_json(JSONValue json) {
auto gr = json.get!(JSONValue[string]);
this.game.update_from_json(gr["game"]);
this.hero.update_from_json(gr["hero"]);
this.token = gr["token"].get!string;
this.view_url = gr["viewUrl"].get!string;
this.play_url = gr["playUrl"].get!string;
}
}
|
D
|
module wx.Choice;
public import wx.common;
public import wx.Control;
public import wx.ClientData;
public import wx.IControlWithItems;
public import wx.ArrayString;
//! \cond EXTERN
static extern (C) IntPtr wxChoice_ctor();
static extern (C) bool wxChoice_Create(IntPtr self, IntPtr parent, int id, inout Point pos, inout Size size, int n, string* choices, int style, IntPtr validator, string name);
static extern (C) void wxChoice_dtor(IntPtr self);
static extern (C) void wxChoice_SetSelection(IntPtr self, int n);
static extern (C) bool wxChoice_SetStringSelection(IntPtr self, string s);
static extern (C) IntPtr wxChoice_GetStringSelection(IntPtr self);
static extern (C) void wxChoice_SetColumns(IntPtr self, int n);
static extern (C) int wxChoice_GetColumns(IntPtr self);
static extern (C) void wxChoice_Command(IntPtr self, IntPtr evt);
static extern (C) int wxChoice_GetCount(IntPtr self);
static extern (C) IntPtr wxChoice_GetString(IntPtr self, int n);
static extern (C) int wxChoice_GetSelection(IntPtr self);
static extern (C) IntPtr wxChoice_GetClientData(IntPtr self, int n);
static extern (C) void wxChoice_SetClientData(IntPtr self, int n, IntPtr data);
static extern (C) int wxChoice_FindString(IntPtr self, string str);
static extern (C) void wxChoice_Delete(IntPtr self, int n);
static extern (C) void wxChoice_Clear(IntPtr self);
static extern (C) int wxChoice_Append(IntPtr self, string item);
static extern (C) int wxChoice_AppendData(IntPtr self, string item, IntPtr data);
static extern (C) void wxChoice_AppendString(IntPtr self, string item);
static extern (C) void wxChoice_AppendArrayString(IntPtr self, int n, string* strings);
static extern (C) int wxChoice_Insert(IntPtr self, string item, int pos);
static extern (C) int wxChoice_InsertClientData(IntPtr self, string item, int pos, IntPtr clientData);
static extern (C) IntPtr wxChoice_GetStrings(IntPtr self);
static extern (C) void wxChoice_SetClientObject(IntPtr self, int n, IntPtr clientData);
static extern (C) IntPtr wxChoice_GetClientObject(IntPtr self, int n);
static extern (C) bool wxChoice_HasClientObjectData(IntPtr self);
static extern (C) bool wxChoice_HasClientUntypedData(IntPtr self);
static extern (C) void wxChoice_SetString(IntPtr self, int n, string text);
static extern (C) void wxChoice_Select(IntPtr self, int n);
static extern (C) bool wxChoice_ShouldInheritColours(IntPtr self);
static extern (C) bool wxChoice_IsEmpty(IntPtr self);
//! \endcond
//---------------------------------------------------------------------
alias Choice wxChoice;
public class Choice : Control, IControlWithItems
{
public const string wxChoiceNameStr = "choice";
public this(IntPtr wxobj) ;
public this();
public this(Window parent, int id, Point pos, Size size, string[] choices = null, int style = 0, Validator val = null,string name = wxChoiceNameStr);
public static wxObject New(IntPtr wxobj);
public this(Window parent, Point pos, Size size, string[] choices = null, int style = 0, Validator val = null,string name = wxChoiceNameStr);
public bool Create(Window parent, int id, inout Point pos, inout Size size,
string[] choices, int style, Validator validator,
string name);
public int Append(string item);
public int Append(string item, ClientData clientData);
public void AppendString(string item);
public void Append(string[] strings);
public int Insert(string item, int pos);
public int Insert(string item, int pos, ClientData clientData);
public string[] GetStrings();
public void SetClientObject(int n, ClientData clientData);
public ClientData GetClientObject(int n);
public bool HasClientObjectData();
public bool HasClientUntypedData();
public int Selection()
{
return wxChoice_GetSelection(wxobj);
}
public void Selection(int value);
public int GetSelection();
public string StringSelection();
public void StringSelection(string value) ;
public int Columns() ;
public void Columns(int value) ;
public void Command(Event evt);
public int Count();
public string GetString(int n);
public ClientData GetClientData(int n);
public void SetClientData(int n, ClientData data);
public int FindString(string str);
public void Delete(int n);
public void Clear();
public void SetString(int n, string str);
public void Select(int n);
public override bool ShouldInheritColours();
public bool Empty() ;
public void Selected_Add(EventListener value) ;
public void Selected_Remove(EventListener value) ;
}
|
D
|
/***********************************************************************\
* imm.d *
* *
* Windows API header module *
* *
* Translated from MinGW Windows headers *
* *
* Placed into public domain *
\***********************************************************************/
module win32.imm;
version(Windows):
version = Unicode;
pragma(lib, "imm32");
import win32.windef, win32.wingdi;
import win32.winuser; // for the MFS_xxx enums.
private import win32.w32api;
const WM_CONVERTREQUESTEX = 0x108;
const WM_IME_STARTCOMPOSITION = 0x10D;
const WM_IME_ENDCOMPOSITION = 0x10E;
const WM_IME_COMPOSITION = 0x10F;
const WM_IME_KEYLAST = 0x10F;
const WM_IME_SETCONTEXT = 0x281;
const WM_IME_NOTIFY = 0x282;
const WM_IME_CONTROL = 0x283;
const WM_IME_COMPOSITIONFULL = 0x284;
const WM_IME_SELECT = 0x285;
const WM_IME_CHAR = 0x286;
static if (_WIN32_WINNT >= 0x500) {
const WM_IME_REQUEST = 0x288;
}
const WM_IME_KEYDOWN = 0x290;
const WM_IME_KEYUP = 0x291;
const IMC_GETCANDIDATEPOS=7;
const IMC_SETCANDIDATEPOS=8;
const IMC_GETCOMPOSITIONFONT=9;
const IMC_SETCOMPOSITIONFONT=10;
const IMC_GETCOMPOSITIONWINDOW=11;
const IMC_SETCOMPOSITIONWINDOW=12;
const IMC_GETSTATUSWINDOWPOS=15;
const IMC_SETSTATUSWINDOWPOS=16;
const IMC_CLOSESTATUSWINDOW=0x21;
const IMC_OPENSTATUSWINDOW=0x22;
const IMN_CLOSESTATUSWINDOW=1;
const IMN_OPENSTATUSWINDOW=2;
const IMN_CHANGECANDIDATE=3;
const IMN_CLOSECANDIDATE=4;
const IMN_OPENCANDIDATE=5;
const IMN_SETCONVERSIONMODE=6;
const IMN_SETSENTENCEMODE=7;
const IMN_SETOPENSTATUS=8;
const IMN_SETCANDIDATEPOS=9;
const IMN_SETCOMPOSITIONFONT=10;
const IMN_SETCOMPOSITIONWINDOW=11;
const IMN_SETSTATUSWINDOWPOS=12;
const IMN_GUIDELINE=13;
const IMN_PRIVATE=14;
const NI_OPENCANDIDATE=16;
const NI_CLOSECANDIDATE=17;
const NI_SELECTCANDIDATESTR=18;
const NI_CHANGECANDIDATELIST=19;
const NI_FINALIZECONVERSIONRESULT=20;
const NI_COMPOSITIONSTR=21;
const NI_SETCANDIDATE_PAGESTART=22;
const NI_SETCANDIDATE_PAGESIZE=23;
const NI_IMEMENUSELECTED=24;
const ISC_SHOWUICANDIDATEWINDOW=1;
const ISC_SHOWUICOMPOSITIONWINDOW=0x80000000;
const ISC_SHOWUIGUIDELINE=0x40000000;
const ISC_SHOWUIALLCANDIDATEWINDOW=15;
const ISC_SHOWUIALL=0xC000000F;
const CPS_COMPLETE=1;
const CPS_CONVERT=2;
const CPS_REVERT=3;
const CPS_CANCEL=4;
const IME_CHOTKEY_IME_NONIME_TOGGLE=16;
const IME_CHOTKEY_SHAPE_TOGGLE=17;
const IME_CHOTKEY_SYMBOL_TOGGLE=18;
const IME_JHOTKEY_CLOSE_OPEN=0x30;
const IME_KHOTKEY_SHAPE_TOGGLE=0x50;
const IME_KHOTKEY_HANJACONVERT=0x51;
const IME_KHOTKEY_ENGLISH=0x52;
const IME_THOTKEY_IME_NONIME_TOGGLE=0x70;
const IME_THOTKEY_SHAPE_TOGGLE=0x71;
const IME_THOTKEY_SYMBOL_TOGGLE=0x72;
const IME_HOTKEY_DSWITCH_FIRST=256;
const IME_HOTKEY_DSWITCH_LAST=0x11F;
const IME_ITHOTKEY_RESEND_RESULTSTR=512;
const IME_ITHOTKEY_PREVIOUS_COMPOSITION=513;
const IME_ITHOTKEY_UISTYLE_TOGGLE=514;
const GCS_COMPREADSTR=1;
const GCS_COMPREADATTR=2;
const GCS_COMPREADCLAUSE=4;
const GCS_COMPSTR=8;
const GCS_COMPATTR=16;
const GCS_COMPCLAUSE=32;
const GCS_CURSORPOS=128;
const GCS_DELTASTART=256;
const GCS_RESULTREADSTR=512;
const GCS_RESULTREADCLAUSE=1024;
const GCS_RESULTSTR=2048;
const GCS_RESULTCLAUSE=4096;
const CS_INSERTCHAR=0x2000;
const CS_NOMOVECARET=0x4000;
const IMEVER_0310=0x3000A;
const IMEVER_0400=0x40000;
const IME_PROP_AT_CARET=0x10000;
const IME_PROP_SPECIAL_UI=0x20000;
const IME_PROP_CANDLIST_START_FROM_1=0x40000;
const IME_PROP_UNICODE=0x80000;
const UI_CAP_2700=1;
const UI_CAP_ROT90=2;
const UI_CAP_ROTANY=4;
const SCS_CAP_COMPSTR=1;
const SCS_CAP_MAKEREAD=2;
const SELECT_CAP_CONVERSION=1;
const SELECT_CAP_SENTENCE=2;
const GGL_LEVEL=1;
const GGL_INDEX=2;
const GGL_STRING=3;
const GGL_PRIVATE=4;
const GL_LEVEL_NOGUIDELINE=0;
const GL_LEVEL_FATAL=1;
const GL_LEVEL_ERROR=2;
const GL_LEVEL_WARNING=3;
const GL_LEVEL_INFORMATION=4;
const GL_ID_UNKNOWN=0;
const GL_ID_NOMODULE=1;
const GL_ID_NODICTIONARY=16;
const GL_ID_CANNOTSAVE=17;
const GL_ID_NOCONVERT=32;
const GL_ID_TYPINGERROR=33;
const GL_ID_TOOMANYSTROKE=34;
const GL_ID_READINGCONFLICT=35;
const GL_ID_INPUTREADING=36;
const GL_ID_INPUTRADICAL=37;
const GL_ID_INPUTCODE=38;
const GL_ID_INPUTSYMBOL=39;
const GL_ID_CHOOSECANDIDATE=40;
const GL_ID_REVERSECONVERSION=41;
const GL_ID_PRIVATE_FIRST=0x8000;
const GL_ID_PRIVATE_LAST=0xFFFF;
const DWORD IGP_GETIMEVERSION = -4;
const IGP_PROPERTY=4;
const IGP_CONVERSION=8;
const IGP_SENTENCE=12;
const IGP_UI=16;
const IGP_SETCOMPSTR=0x14;
const IGP_SELECT=0x18;
const SCS_SETSTR = GCS_COMPREADSTR|GCS_COMPSTR;
const SCS_CHANGEATTR = GCS_COMPREADATTR|GCS_COMPATTR;
const SCS_CHANGECLAUSE = GCS_COMPREADCLAUSE|GCS_COMPCLAUSE;
const ATTR_INPUT=0;
const ATTR_TARGET_CONVERTED=1;
const ATTR_CONVERTED=2;
const ATTR_TARGET_NOTCONVERTED=3;
const ATTR_INPUT_ERROR=4;
const ATTR_FIXEDCONVERTED=5;
const CFS_DEFAULT=0;
const CFS_RECT=1;
const CFS_POINT=2;
const CFS_SCREEN=4;
const CFS_FORCE_POSITION=32;
const CFS_CANDIDATEPOS=64;
const CFS_EXCLUDE=128;
const GCL_CONVERSION=1;
const GCL_REVERSECONVERSION=2;
const GCL_REVERSE_LENGTH=3;
const IME_CMODE_ALPHANUMERIC=0;
const IME_CMODE_NATIVE=1;
const IME_CMODE_CHINESE=IME_CMODE_NATIVE;
const IME_CMODE_HANGEUL=IME_CMODE_NATIVE;
const IME_CMODE_HANGUL=IME_CMODE_NATIVE;
const IME_CMODE_JAPANESE=IME_CMODE_NATIVE;
const IME_CMODE_KATAKANA=2;
const IME_CMODE_LANGUAGE=3;
const IME_CMODE_FULLSHAPE=8;
const IME_CMODE_ROMAN=16;
const IME_CMODE_CHARCODE=32;
const IME_CMODE_HANJACONVERT=64;
const IME_CMODE_SOFTKBD=128;
const IME_CMODE_NOCONVERSION=256;
const IME_CMODE_EUDC=512;
const IME_CMODE_SYMBOL=1024;
const IME_CMODE_FIXED=2048;
const IME_SMODE_NONE=0;
const IME_SMODE_PLAURALCLAUSE=1;
const IME_SMODE_SINGLECONVERT=2;
const IME_SMODE_AUTOMATIC=4;
const IME_SMODE_PHRASEPREDICT=8;
const IME_CAND_UNKNOWN=0;
const IME_CAND_READ=1;
const IME_CAND_CODE=2;
const IME_CAND_MEANING=3;
const IME_CAND_RADICAL=4;
const IME_CAND_STROKE=5;
const IMM_ERROR_NODATA=(-1);
const IMM_ERROR_GENERAL=(-2);
const IME_CONFIG_GENERAL=1;
const IME_CONFIG_REGISTERWORD=2;
const IME_CONFIG_SELECTDICTIONARY=3;
const IME_ESC_QUERY_SUPPORT=3;
const IME_ESC_RESERVED_FIRST=4;
const IME_ESC_RESERVED_LAST=0x7FF;
const IME_ESC_PRIVATE_FIRST=0x800;
const IME_ESC_PRIVATE_LAST=0xFFF;
const IME_ESC_SEQUENCE_TO_INTERNAL=0x1001;
const IME_ESC_GET_EUDC_DICTIONARY=0x1003;
const IME_ESC_SET_EUDC_DICTIONARY=0x1004;
const IME_ESC_MAX_KEY=0x1005;
const IME_ESC_IME_NAME=0x1006;
const IME_ESC_SYNC_HOTKEY=0x1007;
const IME_ESC_HANJA_MODE=0x1008;
const IME_ESC_AUTOMATA=0x1009;
const IME_REGWORD_STYLE_EUDC=1;
const IME_REGWORD_STYLE_USER_FIRST=0x80000000;
const IME_REGWORD_STYLE_USER_LAST=0xFFFFFFFF;
const SOFTKEYBOARD_TYPE_T1=1;
const SOFTKEYBOARD_TYPE_C1=2;
const IMEMENUITEM_STRING_SIZE=80;
const MOD_ALT=1;
const MOD_CONTROL=2;
const MOD_SHIFT=4;
const MOD_WIN=8;
const MOD_IGNORE_ALL_MODIFIER=1024;
const MOD_ON_KEYUP=2048;
const MOD_RIGHT=16384;
const MOD_LEFT=32768;
const IACE_CHILDREN=1;
const IACE_DEFAULT=16;
const IACE_IGNORENOCONTEXT=32;
const IGIMIF_RIGHTMENU=1;
const IGIMII_CMODE=1;
const IGIMII_SMODE=2;
const IGIMII_CONFIGURE=4;
const IGIMII_TOOLS=8;
const IGIMII_HELP=16;
const IGIMII_OTHER=32;
const IGIMII_INPUTTOOLS=64;
const IMFT_RADIOCHECK=1;
const IMFT_SEPARATOR=2;
const IMFT_SUBMENU=4;
const IMFS_GRAYED=MFS_GRAYED;
const IMFS_DISABLED=MFS_DISABLED;
const IMFS_CHECKED=MFS_CHECKED;
const IMFS_HILITE=MFS_HILITE;
const IMFS_ENABLED=MFS_ENABLED;
const IMFS_UNCHECKED=MFS_UNCHECKED;
const IMFS_UNHILITE=MFS_UNHILITE;
const IMFS_DEFAULT=MFS_DEFAULT;
const STYLE_DESCRIPTION_SIZE=32;
alias DWORD HIMC;
alias DWORD HIMCC;
alias HKL* LPHKL;
struct COMPOSITIONFORM{
DWORD dwStyle;
POINT ptCurrentPos;
RECT rcArea;
}
alias COMPOSITIONFORM* PCOMPOSITIONFORM, LPCOMPOSITIONFORM;
struct CANDIDATEFORM{
DWORD dwIndex;
DWORD dwStyle;
POINT ptCurrentPos;
RECT rcArea;
}
alias CANDIDATEFORM* PCANDIDATEFORM, LPCANDIDATEFORM;
struct CANDIDATELIST{
DWORD dwSize;
DWORD dwStyle;
DWORD dwCount;
DWORD dwSelection;
DWORD dwPageStart;
DWORD dwPageSize;
DWORD[1] dwOffset;
}
alias CANDIDATELIST* PCANDIDATELIST, LPCANDIDATELIST;
struct REGISTERWORDA{
LPSTR lpReading;
LPSTR lpWord;
}
alias REGISTERWORDA* PREGISTERWORDA, LPREGISTERWORDA;
struct REGISTERWORDW{
LPWSTR lpReading;
LPWSTR lpWord;
}
alias REGISTERWORDW* PREGISTERWORDW, LPREGISTERWORDW;
struct STYLEBUFA{
DWORD dwStyle;
CHAR[STYLE_DESCRIPTION_SIZE] szDescription;
}
alias STYLEBUFA* PSTYLEBUFA, LPSTYLEBUFA;
struct STYLEBUFW{
DWORD dwStyle;
WCHAR[STYLE_DESCRIPTION_SIZE] szDescription;
}
alias STYLEBUFW* PSTYLEBUFW, LPSTYLEBUFW;
struct IMEMENUITEMINFOA{
UINT cbSize = this.sizeof;
UINT fType;
UINT fState;
UINT wID;
HBITMAP hbmpChecked;
HBITMAP hbmpUnchecked;
DWORD dwItemData;
CHAR[IMEMENUITEM_STRING_SIZE] szString;
HBITMAP hbmpItem;
}
alias IMEMENUITEMINFOA* PIMEMENUITEMINFOA, LPIMEMENUITEMINFOA;
struct IMEMENUITEMINFOW{
UINT cbSize = this.sizeof;
UINT fType;
UINT fState;
UINT wID;
HBITMAP hbmpChecked;
HBITMAP hbmpUnchecked;
DWORD dwItemData;
WCHAR[IMEMENUITEM_STRING_SIZE] szString;
HBITMAP hbmpItem;
}
alias IMEMENUITEMINFOW* PIMEMENUITEMINFOW, LPIMEMENUITEMINFOW;
alias int function (LPCSTR, DWORD, LPCSTR, LPVOID) REGISTERWORDENUMPROCA;
alias int function (LPCWSTR, DWORD, LPCWSTR, LPVOID) REGISTERWORDENUMPROCW;
version(Unicode) {
alias REGISTERWORDENUMPROCW REGISTERWORDENUMPROC;
alias REGISTERWORDW REGISTERWORD;
alias IMEMENUITEMINFOW IMEMENUITEMINFO;
alias STYLEBUFW STYLEBUF;
} else {
alias REGISTERWORDENUMPROCA REGISTERWORDENUMPROC;
alias REGISTERWORDA REGISTERWORD;
alias IMEMENUITEMINFOA IMEMENUITEMINFO;
alias STYLEBUFA STYLEBUF;
}
alias STYLEBUF* PSTYLEBUF, LPSTYLEBUF;
alias REGISTERWORD* PREGISTERWORD, LPREGISTERWORD;
alias IMEMENUITEMINFO* PIMEMENUITEMINFO, LPIMEMENUITEMINFO;
extern (Windows):
HKL ImmInstallIMEA(LPCSTR, LPCSTR);
HKL ImmInstallIMEW(LPCWSTR, LPCWSTR);
HWND ImmGetDefaultIMEWnd(HWND);
UINT ImmGetDescriptionA(HKL, LPSTR, UINT);
UINT ImmGetDescriptionW(HKL, LPWSTR, UINT);
UINT ImmGetIMEFileNameA(HKL, LPSTR, UINT);
UINT ImmGetIMEFileNameW(HKL, LPWSTR, UINT);
DWORD ImmGetProperty(HKL, DWORD);
BOOL ImmIsIME(HKL);
BOOL ImmSimulateHotKey(HWND, DWORD);
HIMC ImmCreateContext();
BOOL ImmDestroyContext(HIMC);
HIMC ImmGetContext(HWND);
BOOL ImmReleaseContext(HWND, HIMC);
HIMC ImmAssociateContext(HWND, HIMC);
LONG ImmGetCompositionStringA(HIMC, DWORD, PVOID, DWORD);
LONG ImmGetCompositionStringW(HIMC, DWORD, PVOID, DWORD);
BOOL ImmSetCompositionStringA(HIMC, DWORD, PCVOID, DWORD, PCVOID, DWORD);
BOOL ImmSetCompositionStringW(HIMC, DWORD, PCVOID, DWORD, PCVOID, DWORD);
DWORD ImmGetCandidateListCountA(HIMC, PDWORD);
DWORD ImmGetCandidateListCountW(HIMC, PDWORD);
DWORD ImmGetCandidateListA(HIMC, DWORD, PCANDIDATELIST, DWORD);
DWORD ImmGetCandidateListW(HIMC, DWORD, PCANDIDATELIST, DWORD);
DWORD ImmGetGuideLineA(HIMC, DWORD, LPSTR, DWORD);
DWORD ImmGetGuideLineW(HIMC, DWORD, LPWSTR, DWORD);
BOOL ImmGetConversionStatus(HIMC, LPDWORD, PDWORD);
BOOL ImmSetConversionStatus(HIMC, DWORD, DWORD);
BOOL ImmGetOpenStatus(HIMC);
BOOL ImmSetOpenStatus(HIMC, BOOL);
BOOL ImmGetCompositionFontA(HIMC, LPLOGFONTA);
BOOL ImmGetCompositionFontW(HIMC, LPLOGFONTW);
BOOL ImmSetCompositionFontA(HIMC, LPLOGFONTA);
BOOL ImmSetCompositionFontW(HIMC, LPLOGFONTW);
BOOL ImmConfigureIMEA(HKL, HWND, DWORD, PVOID);
BOOL ImmConfigureIMEW(HKL, HWND, DWORD, PVOID);
LRESULT ImmEscapeA(HKL, HIMC, UINT, PVOID);
LRESULT ImmEscapeW(HKL, HIMC, UINT, PVOID);
DWORD ImmGetConversionListA(HKL, HIMC, LPCSTR, PCANDIDATELIST, DWORD, UINT);
DWORD ImmGetConversionListW(HKL, HIMC, LPCWSTR, PCANDIDATELIST, DWORD, UINT);
BOOL ImmNotifyIME(HIMC, DWORD, DWORD, DWORD);
BOOL ImmGetStatusWindowPos(HIMC, LPPOINT);
BOOL ImmSetStatusWindowPos(HIMC, LPPOINT);
BOOL ImmGetCompositionWindow(HIMC, PCOMPOSITIONFORM);
BOOL ImmSetCompositionWindow(HIMC, PCOMPOSITIONFORM);
BOOL ImmGetCandidateWindow(HIMC, DWORD, PCANDIDATEFORM);
BOOL ImmSetCandidateWindow(HIMC, PCANDIDATEFORM);
BOOL ImmIsUIMessageA(HWND, UINT, WPARAM, LPARAM);
BOOL ImmIsUIMessageW(HWND, UINT, WPARAM, LPARAM);
UINT ImmGetVirtualKey(HWND);
BOOL ImmRegisterWordA(HKL, LPCSTR, DWORD, LPCSTR);
BOOL ImmRegisterWordW(HKL, LPCWSTR, DWORD, LPCWSTR);
BOOL ImmUnregisterWordA(HKL, LPCSTR, DWORD, LPCSTR);
BOOL ImmUnregisterWordW(HKL, LPCWSTR, DWORD, LPCWSTR);
UINT ImmGetRegisterWordStyleA(HKL, UINT, PSTYLEBUFA);
UINT ImmGetRegisterWordStyleW(HKL, UINT, PSTYLEBUFW);
UINT ImmEnumRegisterWordA(HKL, REGISTERWORDENUMPROCA, LPCSTR, DWORD, LPCSTR, PVOID);
UINT ImmEnumRegisterWordW(HKL, REGISTERWORDENUMPROCW, LPCWSTR, DWORD, LPCWSTR, PVOID);
BOOL EnableEUDC(BOOL);
BOOL ImmDisableIME(DWORD);
DWORD ImmGetImeMenuItemsA(HIMC, DWORD, DWORD, LPIMEMENUITEMINFOA, LPIMEMENUITEMINFOA, DWORD);
DWORD ImmGetImeMenuItemsW(HIMC, DWORD, DWORD, LPIMEMENUITEMINFOW, LPIMEMENUITEMINFOW, DWORD);
version(Unicode) {
alias ImmEnumRegisterWordW ImmEnumRegisterWord;
alias ImmGetRegisterWordStyleW ImmGetRegisterWordStyle;
alias ImmUnregisterWordW ImmUnregisterWord;
alias ImmRegisterWordW ImmRegisterWord;
alias ImmInstallIMEW ImmInstallIME;
alias ImmIsUIMessageW ImmIsUIMessage;
alias ImmGetConversionListW ImmGetConversionList;
alias ImmEscapeW ImmEscape;
alias ImmConfigureIMEW ImmConfigureIME;
alias ImmSetCompositionFontW ImmSetCompositionFont;
alias ImmGetCompositionFontW ImmGetCompositionFont;
alias ImmGetGuideLineW ImmGetGuideLine;
alias ImmGetCandidateListW ImmGetCandidateList;
alias ImmGetCandidateListCountW ImmGetCandidateListCount;
alias ImmSetCompositionStringW ImmSetCompositionString;
alias ImmGetCompositionStringW ImmGetCompositionString;
alias ImmGetDescriptionW ImmGetDescription;
alias ImmGetIMEFileNameW ImmGetIMEFileName;
alias ImmGetImeMenuItemsW ImmGetImeMenuItems;
} else {
alias ImmEnumRegisterWordA ImmEnumRegisterWord;
alias ImmGetRegisterWordStyleA ImmGetRegisterWordStyle;
alias ImmUnregisterWordA ImmUnregisterWord;
alias ImmRegisterWordA ImmRegisterWord;
alias ImmInstallIMEA ImmInstallIME;
alias ImmIsUIMessageA ImmIsUIMessage;
alias ImmGetConversionListA ImmGetConversionList;
alias ImmEscapeA ImmEscape;
alias ImmConfigureIMEA ImmConfigureIME;
alias ImmSetCompositionFontA ImmSetCompositionFont;
alias ImmGetCompositionFontA ImmGetCompositionFont;
alias ImmGetGuideLineA ImmGetGuideLine;
alias ImmGetCandidateListA ImmGetCandidateList;
alias ImmGetCandidateListCountA ImmGetCandidateListCount;
alias ImmSetCompositionStringA ImmSetCompositionString;
alias ImmGetCompositionStringA ImmGetCompositionString;
alias ImmGetDescriptionA ImmGetDescription;
alias ImmGetIMEFileNameA ImmGetIMEFileName;
alias ImmGetImeMenuItemsW ImmGetImeMenuItems;
}
|
D
|
/// Type definitions for reactor related types
module mecca.reactor.types;
// Licensed under the Boost license. Full copyright information in the AUTHORS file
import mecca.lib.exception;
import mecca.lib.typedid;
/// Fibers' ID type
alias FiberId = TypedIdentifier!("FiberId", ushort, ushort.max, ushort.max);
/// Exception thrown when a fiber is suspended for too long.
class TimeoutExpired : Exception {
this(string file = __FILE__, size_t line = __LINE__, Throwable next = null) @safe pure nothrow @nogc {
super("Reactor timed out on a timed suspend", file, line, next);
}
}
/**
Base class for interrupting a fiber operation.
This is the base class for exceptions that need to interrupt the operation of a fiber. This is the only type of
exception allowed to escape the fiber code (any other type will be rethrown out of the reactor itself).
It is discouraged to catch `FiberInterrupt` directly. If you do, please be sure to rethrow it.
Catching custom classes that derive from `FiberInterrupt` is permitted.
*/
class FiberInterrupt : Throwable {
mixin ExceptionBody;
}
class FiberKilled : FiberInterrupt {
mixin ExceptionBody!"Fiber was killed by another fiber";
}
class ReactorExit : FiberInterrupt {
mixin ExceptionBody!("Reactor is quitting");
}
|
D
|
/Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/Build/Intermediates/iTunesClient2.build/Debug-iphoneos/iTunesClient2.build/Objects-normal/arm64/ItunesAPIClient.o : /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Endpoint/ItunesMedia.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Stub.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Data\ Sources/AlbumDetailDataSource.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Data\ Sources/SearchResultsDataSource.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Data\ Sources/AlbumListDataSource.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Genre.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/AppDelegate.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Endpoint/ItunesAttribute.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Song.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/View\ Models/SongViewModel.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/View\ Models/AlbumDetailViewModel.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/View\ Models/AlbumCellViewModel.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Views/SongCell.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Views/AlbumCell.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Album.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Networking/JSONDownloader.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Networking/ArtworkDownloader.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Endpoint/QueryItemProvider.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Controllers/AlbumDetailController.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Controllers/SearchResultsController.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Controllers/AlbumListController.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Controllers/ViewController.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Networking/ItunesError.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Networking/PendingOperations.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Networking/ItunesAPIClient.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Endpoint/Endpoint.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Artist.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Endpoint/ItunesEntity.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 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
/Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/Build/Intermediates/iTunesClient2.build/Debug-iphoneos/iTunesClient2.build/Objects-normal/arm64/ItunesAPIClient~partial.swiftmodule : /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Endpoint/ItunesMedia.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Stub.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Data\ Sources/AlbumDetailDataSource.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Data\ Sources/SearchResultsDataSource.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Data\ Sources/AlbumListDataSource.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Genre.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/AppDelegate.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Endpoint/ItunesAttribute.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Song.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/View\ Models/SongViewModel.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/View\ Models/AlbumDetailViewModel.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/View\ Models/AlbumCellViewModel.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Views/SongCell.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Views/AlbumCell.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Album.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Networking/JSONDownloader.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Networking/ArtworkDownloader.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Endpoint/QueryItemProvider.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Controllers/AlbumDetailController.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Controllers/SearchResultsController.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Controllers/AlbumListController.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Controllers/ViewController.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Networking/ItunesError.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Networking/PendingOperations.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Networking/ItunesAPIClient.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Endpoint/Endpoint.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Artist.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Endpoint/ItunesEntity.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 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
/Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/Build/Intermediates/iTunesClient2.build/Debug-iphoneos/iTunesClient2.build/Objects-normal/arm64/ItunesAPIClient~partial.swiftdoc : /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Endpoint/ItunesMedia.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Stub.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Data\ Sources/AlbumDetailDataSource.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Data\ Sources/SearchResultsDataSource.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Data\ Sources/AlbumListDataSource.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Genre.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/AppDelegate.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Endpoint/ItunesAttribute.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Song.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/View\ Models/SongViewModel.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/View\ Models/AlbumDetailViewModel.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/View\ Models/AlbumCellViewModel.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Views/SongCell.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Views/AlbumCell.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Album.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Networking/JSONDownloader.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Networking/ArtworkDownloader.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Endpoint/QueryItemProvider.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Controllers/AlbumDetailController.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Controllers/SearchResultsController.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Controllers/AlbumListController.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Controllers/ViewController.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Networking/ItunesError.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Networking/PendingOperations.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Networking/ItunesAPIClient.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Endpoint/Endpoint.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Artist.swift /Users/davalcato/Library/Mobile\ Documents/com~apple~CloudDocs/Desktop/iOS/iTunesClient2/iTunesClient2/Models/Endpoint/ItunesEntity.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 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
|
D
|
module dub.packagesuppliers.registry;
import dub.packagesuppliers.packagesupplier;
package enum PackagesPath = "packages";
/**
Online registry based package supplier.
This package supplier connects to an online registry (e.g.
$(LINK https://code.dlang.org/)) to search for available packages.
*/
class RegistryPackageSupplier : PackageSupplier {
import dub.internal.utils : download, retryDownload, HTTPStatusException;
import dub.internal.vibecompat.core.log;
import dub.internal.vibecompat.data.json : parseJson, parseJsonString, serializeToJson;
import dub.internal.vibecompat.inet.url : URL;
import std.uri : encodeComponent;
import std.datetime : Clock, Duration, hours, SysTime, UTC;
private {
URL m_registryUrl;
struct CacheEntry { Json data; SysTime cacheTime; }
CacheEntry[string] m_metadataCache;
Duration m_maxCacheTime;
}
this(URL registry)
{
m_registryUrl = registry;
m_maxCacheTime = 24.hours();
}
override @property string description() { return "registry at "~m_registryUrl.toString(); }
Version[] getVersions(string package_id)
{
import std.algorithm.sorting : sort;
auto md = getMetadata(package_id);
if (md.type == Json.Type.null_)
return null;
Version[] ret;
foreach (json; md["versions"]) {
auto cur = Version(cast(string)json["version"]);
ret ~= cur;
}
ret.sort();
return ret;
}
auto genPackageDownloadUrl(string packageId, Dependency dep, bool pre_release)
{
import std.array : replace;
import std.format : format;
import std.typecons : Nullable;
auto md = getMetadata(packageId);
Json best = getBestPackage(md, packageId, dep, pre_release);
Nullable!URL ret;
if (best.type != Json.Type.null_)
{
auto vers = best["version"].get!string;
ret = m_registryUrl ~ NativePath(PackagesPath~"/"~packageId~"/"~vers~".zip");
}
return ret;
}
void fetchPackage(NativePath path, string packageId, Dependency dep, bool pre_release)
{
import std.format : format;
auto url = genPackageDownloadUrl(packageId, dep, pre_release);
if(url.isNull)
return;
try {
retryDownload(url.get, path);
return;
}
catch(HTTPStatusException e) {
if (e.status == 404) throw e;
else logDebug("Failed to download package %s from %s", packageId, url);
}
catch(Exception e) {
logDebug("Failed to download package %s from %s", packageId, url);
}
throw new Exception("Failed to download package %s from %s".format(packageId, url));
}
Json fetchPackageRecipe(string packageId, Dependency dep, bool pre_release)
{
auto md = getMetadata(packageId);
return getBestPackage(md, packageId, dep, pre_release);
}
private Json getMetadata(string packageId)
{
auto now = Clock.currTime(UTC());
if (auto pentry = packageId in m_metadataCache) {
if (pentry.cacheTime + m_maxCacheTime > now)
return pentry.data;
m_metadataCache.remove(packageId);
}
auto url = m_registryUrl ~ NativePath("api/packages/infos");
url.queryString = "packages=" ~
encodeComponent(`["` ~ packageId ~ `"]`) ~ "&include_dependencies=true&minimize=true";
logDebug("Downloading metadata for %s", packageId);
string jsonData;
jsonData = cast(string)retryDownload(url);
Json json = parseJsonString(jsonData, url.toString());
foreach (pkg, info; json.get!(Json[string]))
{
logDebug("adding %s to metadata cache", pkg);
m_metadataCache[pkg] = CacheEntry(info, now);
}
return json[packageId];
}
SearchResult[] searchPackages(string query) {
import std.array : array;
import std.algorithm.iteration : map;
import std.uri : encodeComponent;
auto url = m_registryUrl;
url.localURI = "/api/packages/search?q="~encodeComponent(query);
string data;
data = cast(string)retryDownload(url);
return data.parseJson.opt!(Json[])
.map!(j => SearchResult(j["name"].opt!string, j["description"].opt!string, j["version"].opt!string))
.array;
}
}
|
D
|
module textrenderer.transform;
import std.algorithm;
import std.array;
import std.range;
import std.string;
import inmath.linalg;
import glamour.texture;
import renderer.baseshapes;
import renderer.graphicsdata;
import textrenderer.textrenderer;
GraphicsData getGraphicsData(TextRenderer textRenderer, string text, vec4 color)
{
auto data = new GraphicsData();
data.vertices = textRenderer.getVerticesForText(text).dup;
data.texCoords = textRenderer.getTexCoordsForText(text).dup;
data.colors = color.repeat(data.vertices.length).array;
return data;
}
vec3[] getVerticesForText(TextRenderer textRenderer, string text) //@nogc
{
static vec3[65536] buffer;
size_t index = 0;
auto cursor = vec2(0.0, 0.0);
auto vertices = textSquare.dup;
auto lines = text.splitter("\n");
foreach (line; lines)
{
foreach (letter; line)
{
auto glyph = textRenderer.getGlyphForLetter(letter);
foreach (vertex; vertices)
{
buffer[index] = vertex + vec3((glyph.offset * 0.5 + cursor), 0.0);
index++;
}
cursor += glyph.advance * 0.5;
}
cursor = vec2(0.0, cursor.y - 1.0);
}
return buffer[0..index];
}
vec2[] getTexCoordsForText(TextRenderer textRenderer, string text) @nogc
{
auto lines = text.splitter("\n");
auto letterCount = lines.map!(line => line.count).sum;
static vec2[65536] buffer;
assert(letterCount*6 < buffer.length);
size_t index = 0;
foreach (line; lines)
{
foreach (letter; line)
{
buffer[index*6 .. (index+1)*6] = textRenderer.getTexCoordsForLetter(letter);
index++;
}
}
return buffer[0..letterCount*6];
}
|
D
|
/**
* FreeBSD implementation of glibc's $(LINK2 http://www.gnu.org/software/libc/manual/html_node/Backtraces.html backtrace) facility.
*
* Copyright: Copyright Martin Nowak 2012.
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
* Authors: Martin Nowak
* Source: $(DRUNTIMESRC core/sys/freebsd/_execinfo.d)
*/
module core.sys.freebsd.execinfo;
version (FreeBSD):
extern (C):
nothrow:
import core.sys.freebsd.dlfcn;
// Use extern (D) so that these functions don't collide with libexecinfo.
extern (D) int backtrace(void** buffer, int size)
{
import core.thread : thread_stackBottom;
void** p, pend=cast(void**)thread_stackBottom();
version (D_InlineAsm_X86)
asm nothrow @trusted { mov p[EBP], EBP; }
else version (D_InlineAsm_X86_64)
asm nothrow @trusted { mov p[RBP], RBP; }
else
static assert(false, "Architecture not supported.");
int i;
for (; i < size && p < pend; ++i)
{
buffer[i] = *(p + 1);
auto pnext = cast(void**)*p;
if (pnext <= p) break;
p = pnext;
}
return i;
}
extern (D) char** backtrace_symbols(const(void*)* buffer, int size)
{
static void* realloc(void* p, size_t len) nothrow
{
static import cstdlib=core.stdc.stdlib;
auto res = cstdlib.realloc(p, len);
if (res is null) cstdlib.free(p);
return res;
}
if (size <= 0) return null;
size_t pos = size * (char*).sizeof;
char** p = cast(char**)realloc(null, pos);
if (p is null) return null;
Dl_info info;
foreach (i, addr; buffer[0 .. size])
{
if (dladdr(addr, &info) == 0)
(cast(ubyte*)&info)[0 .. info.sizeof] = 0;
fixupDLInfo(addr, info);
immutable len = formatStackFrame(null, 0, addr, info);
assert(len > 0);
p = cast(char**)realloc(p, pos + len);
if (p is null) return null;
formatStackFrame(cast(char*)p + pos, len, addr, info) == len || assert(0);
p[i] = cast(char*)pos;
pos += len;
}
foreach (i; 0 .. size)
{
pos = cast(size_t)p[i];
p[i] = cast(char*)p + pos;
}
return p;
}
extern (D) void backtrace_symbols_fd(const(void*)* buffer, int size, int fd)
{
import core.sys.posix.unistd : write;
import core.stdc.stdlib : alloca;
if (size <= 0) return;
Dl_info info;
foreach (i, addr; buffer[0 .. size])
{
if (dladdr(addr, &info) == 0)
(cast(ubyte*)&info)[0 .. info.sizeof] = 0;
fixupDLInfo(addr, info);
enum maxAlloca = 1024;
enum min = (size_t a, size_t b) => a <= b ? a : b;
immutable len = min(formatStackFrame(null, 0, addr, info), maxAlloca);
assert(len > 0);
auto p = cast(char*)alloca(len);
if (p is null) return;
formatStackFrame(p, len, addr, info) >= len || assert(0);
p[len - 1] = '\n';
write(fd, p, len);
}
}
private void fixupDLInfo(const(void)* addr, ref Dl_info info)
{
if (info.dli_fname is null) info.dli_fname = "???";
if (info.dli_fbase is null) info.dli_fbase = null;
if (info.dli_sname is null) info.dli_sname = "???";
if (info.dli_saddr is null) info.dli_saddr = cast(void*)addr;
}
private size_t formatStackFrame(char* p, size_t plen, const(void)* addr, const ref Dl_info info)
{
import core.stdc.stdio : snprintf;
immutable off = addr - info.dli_saddr;
immutable len = snprintf(p, plen, "%p <%s+%zd> at %s",
addr, info.dli_sname, off, info.dli_fname);
assert(len > 0);
return cast(size_t)len + 1; // + '\0'
}
|
D
|
/Users/haruna/Documents/iOSdev/Tumblr_1/Build/Intermediates/Pods.build/Debug-iphonesimulator/AlamofireImage.build/Objects-normal/x86_64/Request+AlamofireImage.o : /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/Image.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/UIImage+AlamofireImage.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/UIButton+AlamofireImage.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/Request+AlamofireImage.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/UIImageView+AlamofireImage.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/ImageCache.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/ImageDownloader.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/ImageFilter.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/AFIError.swift /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Metal.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/UIKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/haruna/Documents/iOSdev/Tumblr_1/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/Target\ Support\ Files/AlamofireImage/AlamofireImage-umbrella.h /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/haruna/Documents/iOSdev/Tumblr_1/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/haruna/Documents/iOSdev/Tumblr_1/Build/Intermediates/Pods.build/Debug-iphonesimulator/AlamofireImage.build/unextended-module.modulemap /Users/haruna/Documents/iOSdev/Tumblr_1/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.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.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/haruna/Documents/iOSdev/Tumblr_1/Build/Intermediates/Pods.build/Debug-iphonesimulator/AlamofireImage.build/Objects-normal/x86_64/Request+AlamofireImage~partial.swiftmodule : /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/Image.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/UIImage+AlamofireImage.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/UIButton+AlamofireImage.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/Request+AlamofireImage.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/UIImageView+AlamofireImage.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/ImageCache.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/ImageDownloader.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/ImageFilter.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/AFIError.swift /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Metal.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/UIKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/haruna/Documents/iOSdev/Tumblr_1/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/Target\ Support\ Files/AlamofireImage/AlamofireImage-umbrella.h /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/haruna/Documents/iOSdev/Tumblr_1/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/haruna/Documents/iOSdev/Tumblr_1/Build/Intermediates/Pods.build/Debug-iphonesimulator/AlamofireImage.build/unextended-module.modulemap /Users/haruna/Documents/iOSdev/Tumblr_1/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.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.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/haruna/Documents/iOSdev/Tumblr_1/Build/Intermediates/Pods.build/Debug-iphonesimulator/AlamofireImage.build/Objects-normal/x86_64/Request+AlamofireImage~partial.swiftdoc : /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/Image.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/UIImage+AlamofireImage.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/UIButton+AlamofireImage.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/Request+AlamofireImage.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/UIImageView+AlamofireImage.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/ImageCache.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/ImageDownloader.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/ImageFilter.swift /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/AlamofireImage/Source/AFIError.swift /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Metal.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/UIKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/haruna/Documents/iOSdev/Tumblr_1/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/Target\ Support\ Files/AlamofireImage/AlamofireImage-umbrella.h /Users/haruna/Documents/iOSdev/Tumblr_1/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/haruna/Documents/iOSdev/Tumblr_1/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/haruna/Documents/iOSdev/Tumblr_1/Build/Intermediates/Pods.build/Debug-iphonesimulator/AlamofireImage.build/unextended-module.modulemap /Users/haruna/Documents/iOSdev/Tumblr_1/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.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.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
import std.stdio, std.path;
import bin.gff3_benchmark,
bin.gff3_count_features,
bin.gff3_ffetch,
bin.gff3_filter,
bin.gff3_select,
bin.gff3_sort,
bin.gff3_to_gtf,
bin.gff3_to_json,
bin.gff3_validate,
bin.gtf_to_gff3;
int main(string[] args) {
string exec_filename = baseName(args[0]);
args[0] = exec_filename;
switch(exec_filename) {
case "gff3-benchmark":
case "gtf-benchmark":
return gff3_benchmark(args);
break;
case "gff3-count-features":
return gff3_count_features(args);
break;
case "gff3-ffetch":
return gff3_ffetch(args);
break;
case "gff3-filter":
case "gtf-filter":
return gff3_filter(args);
break;
case "gff3-select":
case "gtf-select":
return gff3_select(args);
break;
case "gff3-sort":
return gff3_sort(args);
break;
case "gff3-to-gtf":
return gff3_to_gtf(args);
break;
case "gff3-to-json":
case "gtf-to-json":
return gff3_to_json(args);
break;
case "gff3-validate":
return gff3_validate(args);
break;
case "gtf-to-gff3":
return gtf_to_gff3(args);
break;
default:
return gff3_validate(args);
break;
}
return -1;
}
|
D
|
/*******************************************************************************
copyright: Copyright (c) 2004 Kris Bell. All rights reserved
license: BSD style: $(LICENSE)
version: Initial release: June 2004
author: Kris
*******************************************************************************/
module tango.net.SocketListener;
private import tango.core.Thread;
private import tango.io.model.IBuffer,
tango.io.model.IConduit;
/******************************************************************************
Abstract class to asynchronously listen for incoming data on a
socket. This can be used with DatagramSocket & MulticastSocket,
and might possibly be useful with a basic SocketConduit also.
Note that DatagramSocket must first be bound to a local network
address via bind(), and MulticastSocket should first be made a
member of a multicast group via its join() method. Note also
that the underlying thread is not started by the constructor;
you should do that manually via the start() method.
******************************************************************************/
class SocketListener
{
private bool quit;
private Thread thread;
private IBuffer buffer;
private IConduit conduit;
private int limit = 3;
/**********************************************************************
Construct a listener with the requisite arguments. The
specified buffer is populated via the provided instance
of ISocketReader before being passed to the notify()
method. All arguments are required.
**********************************************************************/
this (IBuffer buffer)
{
assert (buffer);
this (buffer.input, buffer);
}
/**********************************************************************
Construct a listener with the requisite arguments. The
specified buffer is populated via the provided instance
of ISocketReader before being passed to the notify()
method. All arguments are required.
**********************************************************************/
this (InputStream stream, IBuffer buffer)
{
assert (stream);
this.buffer = buffer;
this.conduit = stream.conduit;
thread = new Thread (&run);
thread.isDaemon = true;
}
/***********************************************************************
Notification callback invoked whenever the listener has
anything to report. The buffer will have whatever content
was available from the read() operation
***********************************************************************/
abstract void notify (IBuffer buffer);
/***********************************************************************
Handle error conditions from the listener thread.
***********************************************************************/
abstract void exception (char[] msg);
/**********************************************************************
Start this listener
**********************************************************************/
void execute ()
{
thread.start;
}
/**********************************************************************
Cancel this listener. The thread will quit only after the
current read() request responds, or is interrrupted.
**********************************************************************/
void cancel ()
{
quit = true;
}
/**********************************************************************
Set the maximum contiguous number of exceptions this
listener will survive. Setting a limit of zero will
not survive any errors at all, whereas a limit of two
will survive as long as two consecutive errors don't
arrive back to back.
**********************************************************************/
void setErrorLimit (ushort limit)
{
this.limit = limit + 1;
}
/**********************************************************************
Execution of this thread is typically stalled on the
read() method belonging to the conduit specified
during construction. You can invoke cancel() to indicate
execution should not proceed further, but that will not
actually interrupt a blocked read() operation.
Note that exceptions are all directed towards the handler
implemented by the class instance.
**********************************************************************/
private void run ()
{
int lives = limit;
while (lives > 0)
try {
// start with a clean slate
buffer.compress;
// wait for incoming content
auto result = buffer.writer (&conduit.input.read);
// time to quit? Note that a v0.95 compiler bug
// prohibits 'break' from exiting the try{} block
if (quit ||
(result is conduit.Eof && !conduit.isAlive))
lives = 0;
else
{
// invoke callback
notify (buffer);
lives = limit;
}
} catch (Object x)
// time to quit?
if (quit || !conduit.isAlive)
break;
else
{
exception (x.toString);
if (--lives is 0)
exception ("listener thread aborting");
}
}
}
|
D
|
/Users/parkingsq1/Documents/project/PushPill/DerivedData/PushPill/Build/Intermediates/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/LayoutConstraint.o : /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/Constraint.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/ConstraintDescription.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/ConstraintItem.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/ConstraintMaker.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/ConstraintRelation.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/Debugging.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/EdgeInsets.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/LayoutConstraint.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/SnapKit.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/View+SnapKit.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/ViewController+SnapKit.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/parkingsq1/Documents/project/PushPill/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Users/parkingsq1/Documents/project/PushPill/DerivedData/PushPill/Build/Intermediates/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule
/Users/parkingsq1/Documents/project/PushPill/DerivedData/PushPill/Build/Intermediates/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/LayoutConstraint~partial.swiftmodule : /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/Constraint.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/ConstraintDescription.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/ConstraintItem.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/ConstraintMaker.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/ConstraintRelation.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/Debugging.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/EdgeInsets.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/LayoutConstraint.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/SnapKit.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/View+SnapKit.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/ViewController+SnapKit.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/parkingsq1/Documents/project/PushPill/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Users/parkingsq1/Documents/project/PushPill/DerivedData/PushPill/Build/Intermediates/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule
/Users/parkingsq1/Documents/project/PushPill/DerivedData/PushPill/Build/Intermediates/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/LayoutConstraint~partial.swiftdoc : /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/Constraint.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/ConstraintDescription.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/ConstraintItem.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/ConstraintMaker.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/ConstraintRelation.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/Debugging.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/EdgeInsets.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/LayoutConstraint.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/SnapKit.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/View+SnapKit.swift /Users/parkingsq1/Documents/project/PushPill/Pods/SnapKit/Source/ViewController+SnapKit.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/parkingsq1/Documents/project/PushPill/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Users/parkingsq1/Documents/project/PushPill/DerivedData/PushPill/Build/Intermediates/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule
|
D
|
module systems.collisionhandler;
import std;
import inmath.aabb;
import inmath.linalg;
import collision.responsehandler;
import components.collider;
import entity;
import spatialindex.rtree;
import system;
import systems.collisionhandlerdebughelper;
class CollisionHandler : System!Collider
{
Entity[] collisionEffectParticles;
bool canAddEntity(Entity entity)
{
return entity.has("collider") && entity.has("position");
}
Collider makeComponent(Entity entity)
{
vec3[] verts = entity.get!(vec3[])("collider.vertices", [vec3(0.0, 0.0, 0.0)]);
auto component = new Collider(verts, entity.get!ColliderType("collider"), entity.id);
if (entity.has("collisionfilter"))
{
auto collisionFilter = entity.get!string("collisionfilter");
component.colliderIdsToIgnore =
entityForIndex.byValue.filter!(checkEntity => checkEntity.get!string("fullName")
.matchFirst(collisionFilter))
.map!(checkEntity => checkEntity.id).array.dup;
}
entityForIndex.byValue
.filter!(checkEntity => checkEntity.has("collisionfilter"))
.filter!(checkEntity => entity.get!string("fullName")
.matchFirst(checkEntity.get!string("collisionfilter")))
.each!(checkEntity => getComponent(checkEntity).colliderIdsToIgnore ~= entity.id);
component.updateFromEntity(entity);
return component;
}
AABB[][int] boxes;
void updateValues()
{
auto index = new RTree!Collider;
import std.datetime.stopwatch;
auto broadPhaseTimer = StopWatch(AutoStart.yes);
components.each!(component => index.insert(component));
auto candidates = index.overlappingElements();
index.populateLeveledBoxes(boxes = null);
broadPhaseTimer.stop();
auto filterCandidates = function bool (Collider left, Collider right) => (left.id < right.id &&
!left.colliderIdsToIgnore.canFind(right.id) && !right.colliderIdsToIgnore.canFind(left.id) &&
left.isOverlapping(right));
auto narrowPhaseTimer = StopWatch(AutoStart.yes);
auto collisions = candidates.filter!(pair => filterCandidates(pair[0], pair[1]))
.map!(pair => Collision(pair[0], pair[1])).array;
narrowPhaseTimer.stop();
debugText = getDebugText(broadPhaseTimer, narrowPhaseTimer,
candidates.length, collisions.length);
components.each!(component => component.overlappingColliders.length = 0);
foreach (collision; collisions)
{
collision.first.isColliding = collision.other.isColliding = true;
collision.first.overlappingColliders ~= collision.other;
collision.other.overlappingColliders ~= collision.first;
}
collisionEffectParticles ~= collisions.handleCollisions(this);
}
// collision responders deal with updating entity values
void updateEntities() {}
void updateFromEntities()
{
foreach (index, entity; entityForIndex)
components[index].updateFromEntity(entity);
}
}
|
D
|
/**
* Copyright: Copyright Auburn Sounds 2016.
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
* Authors: Guillaume Piolat
*/
module inteli.emmintrin;
version(LDC):
public import inteli.xmmintrin; // SSE2 includes SSE1
public import inteli.types;
import core.simd;
import inteli.ldc_compat;
import ldc.gccbuiltins_x86;
nothrow @nogc:
// SSE2 instructions
// https://software.intel.com/sites/landingpage/IntrinsicsGuide/#techs=SSE2
__m128i _mm_add_epi16 (__m128i a, __m128i b) pure @safe
{
return cast(__m128i)(cast(short8)a + cast(short8)b);
}
__m128i _mm_add_epi32 (__m128i a, __m128i b) pure @safe
{
return cast(__m128i)(cast(int4)a + cast(int4)b);
}
__m128i _mm_add_epi64 (__m128i a, __m128i b) pure @safe
{
return cast(__m128i)(cast(long2)a + cast(long2)b);
}
__m128i _mm_add_epi8 (__m128i a, __m128i b) pure @safe
{
return cast(__m128i)(cast(byte16)a + cast(byte16)b);
}
pragma(LDC_intrinsic, "llvm.x86.sse2.add.sd")
double2 __builtin_ia32_addsd(double2, double2) pure @safe;
alias _mm_add_sd = __builtin_ia32_addsd;
__m128d _mm_add_pd (__m128d a, __m128d b) pure @safe
{
return a + b;
}
// MMXREG: _mm_add_si64
alias _mm_adds_epi16 = __builtin_ia32_paddsw128;
alias _mm_adds_epi8 = __builtin_ia32_paddsb128;
alias _mm_adds_epu8 = __builtin_ia32_paddusb128;
alias _mm_adds_epu16 = __builtin_ia32_paddusw128;
__m128d _mm_and_pd (__m128d a, __m128d b) pure @safe
{
return cast(__m128d)( cast(__m128i)a & cast(__m128i)b );
}
__m128i _mm_and_si128 (__m128i a, __m128i b) pure @safe
{
return a & b;
}
__m128d _mm_andnot_pd (__m128d a, __m128d b) pure @safe
{
return cast(__m128d)( (~cast(__m128i)a) & cast(__m128i)b );
}
__m128i _mm_andnot_si128 (__m128i a, __m128i b) pure @safe
{
return (~a) & b;
}
alias _mm_avg_epu16 = __builtin_ia32_pavgw128;
alias _mm_avg_epu8 = __builtin_ia32_pavgb128;
// TODO: __m128i _mm_bslli_si128 (__m128i a, int imm8)
// TODO: __m128i _mm_bsrli_si128 (__m128i a, int imm8)
__m128 _mm_castpd_ps (__m128d a) pure @safe
{
return cast(__m128)a;
}
__m128i _mm_castpd_si128 (__m128d a) pure @safe
{
return cast(__m128i)a;
}
__m128d _mm_castps_pd (__m128 a) pure @safe
{
return cast(__m128d)a;
}
__m128i _mm_castps_si128 (__m128 a) pure @safe
{
return cast(__m128i)a;
}
__m128d _mm_castsi128_pd (__m128i a) pure @safe
{
return cast(__m128d)a;
}
__m128 _mm_castsi128_ps (__m128i a) pure @safe
{
return cast(__m128)a;
}
alias _mm_clflush = __builtin_ia32_clflush;
pragma(LDC_intrinsic, "llvm.x86.sse2.cmp.pd")
double2 __builtin_ia32_cmppd(double2, double2, byte) pure @safe;
// TODO
/+
__m128i _mm_cmpeq_epi16 (__m128i a, __m128i b) pure @safe
{
return cast(__m128i)( cast(short8)a == cast(short8)b );
}
__m128i _mm_cmpeq_epi32 (__m128i a, __m128i b) pure @safe
{
return cast(__m128i)( cast(int4)a == cast(int4)b );
}
__m128i _mm_cmpeq_epi8 (__m128i a, __m128i b) pure @safe
{
return cast(__m128i)( cast(byte16)a == cast(byte16)b );
}
+/
__m128d _mm_cmpeq_pd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmppd(a, b, 0);
}
__m128d _mm_cmpeq_sd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmpsd(a, b, 0);
}
__m128d _mm_cmpge_pd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmppd(b, a, 2);
}
__m128d _mm_cmpge_sd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmpsd(b, a, 2);
}
// TODO
/+__m128i _mm_cmpgt_epi16 (__m128i a, __m128i b) pure @safe
{
return cast(__m128i)( cast(short8)a > cast(short8)b );
}
__m128i _mm_cmpgt_epi32 (__m128i a, __m128i b) pure @safe
{
return cast(__m128i)( cast(int4)a > cast(int4)b );
}
__m128i _mm_cmpgt_epi8 (__m128i a, __m128i b) pure @safe
{
return cast(__m128i)( cast(byte16)a > cast(byte16)b );
}+/
__m128d _mm_cmpgt_pd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmppd(b, a, 1);
}
__m128d _mm_cmpgt_sd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmpsd(b, a, 1);
}
__m128d _mm_cmple_pd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmppd(a, b, 2);
}
__m128d _mm_cmple_sd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmpsd(a, b, 2);
}
// TODO
/+__m128i _mm_cmplt_epi16 (__m128i a, __m128i b) pure @safe
{
return cast(__m128i)( cast(short8)a < cast(short8)b );
}
__m128i _mm_cmplt_epi32 (__m128i a, __m128i b) pure @safe
{
return cast(__m128i)( cast(int4)a < cast(int4)b );
}
__m128i _mm_cmplt_epi8 (__m128i a, __m128i b) pure @safe
{
return cast(__m128i)( cast(byte8)a < cast(byte8)b );
}+/
__m128d _mm_cmplt_pd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmppd(a, b, 1);
}
__m128d _mm_cmplt_sd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmpsd(a, b, 1);
}
__m128d _mm_cmpneq_pd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmppd(a, b, 4);
}
__m128d _mm_cmpneq_sd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmpsd(a, b, 4);
}
__m128d _mm_cmpnge_pd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmppd(b, a, 6);
}
__m128d _mm_cmpnge_sd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmpsd(b, a, 6);
}
__m128d _mm_cmpngt_pd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmppd(b, a, 5);
}
__m128d _mm_cmpngt_sd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmpsd(b, a, 5);
}
__m128d _mm_cmpnle_pd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmppd(a, b, 6);
}
__m128d _mm_cmpnle_sd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmpsd(a, b, 6);
}
__m128d _mm_cmpnlt_pd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmppd(a, b, 5);
}
__m128d _mm_cmpnlt_sd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmpsd(a, b, 5);
}
__m128d _mm_cmpord_pd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmppd(a, b, 7);
}
__m128d _mm_cmpord_sd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmpsd(a, b, 7);
}
__m128d _mm_cmpunord_pd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmppd(a, b, 3);
}
__m128d _mm_cmpunord_sd (__m128d a, __m128d b) pure @safe
{
return __builtin_ia32_cmpsd(a, b, 3);
}
alias _mm_comieq_sd = __builtin_ia32_comisdeq;
alias _mm_comige_sd = __builtin_ia32_comisdge;
alias _mm_comigt_sd = __builtin_ia32_comisdgt;
alias _mm_comile_sd = __builtin_ia32_comisdle;
alias _mm_comilt_sd = __builtin_ia32_comisdlt;
alias _mm_comineq_sd = __builtin_ia32_comisdneq;
// TODO: alias _mm_cvtepi32_pd = __builtin_ia32_cvtdq2pd;
alias _mm_cvtepi32_ps = __builtin_ia32_cvtdq2ps;
alias _mm_cvtpd_epi32 = __builtin_ia32_cvtpd2dq;
// MMXREG: _mm_cvtpd_pi32
alias _mm_cvtpd_ps = __builtin_ia32_cvtpd2ps;
// MMXREG: _mm_cvtpi32_pd
alias _mm_cvtps_epi32 = __builtin_ia32_cvtps2dq;
// TODO: alias _mm_cvtps_pd = __builtin_ia32_cvtps2pd;
double _mm_cvtsd_f64 (__m128d a) pure @safe
{
return extractelement!(double2, 0)(a);
}
alias _mm_cvtsd_si32 = __builtin_ia32_cvtsd2si;
alias _mm_cvtsd_si64 = __builtin_ia32_cvtsd2si64;
alias _mm_cvtsd_si64x = _mm_cvtsd_si64;
alias _mm_cvtsd_ss = __builtin_ia32_cvtsd2ss;
int _mm_cvtsi128_si32 (__m128i a) pure @safe
{
return extractelement!(int4, 0)(a);
}
long _mm_cvtsi128_si64 (__m128i a) pure @safe
{
return extractelement!(long2, 0)(a);
}
alias _mm_cvtsi128_si64x = _mm_cvtsi128_si64;
alias _mm_cvtsi32_sd = __builtin_ia32_cvtsi2sd;
__m128i _mm_cvtsi32_si128 (int a) pure @safe
{
int4 r = [a, 0, 0, 0];
return r;
}
alias _mm_cvtsi64_sd = __builtin_ia32_cvtsi642sd;
__m128i _mm_cvtsi64_si128 (long a) pure @safe
{
long2 r = [a, 0];
return r;
}
alias _mm_cvtsi64x_sd = _mm_cvtsi64_sd;
alias _mm_cvtsi64x_si128 = _mm_cvtsi64_si128;
alias _mm_cvtss_sd = __builtin_ia32_cvtss2sd;
alias _mm_cvttpd_epi32 = __builtin_ia32_cvttpd2dq;
//MMXREG: _mm_cvttpd_pi32
alias _mm_cvttps_epi32 = __builtin_ia32_cvttps2dq;
alias _mm_cvttsd_si32 = __builtin_ia32_cvttsd2si;
alias _mm_cvttsd_si64 = __builtin_ia32_cvttsd2si64;
alias _mm_cvttsd_si64x = _mm_cvttsd_si64;
pragma(LDC_intrinsic, "llvm.x86.sse2.div.sd")
double2 __builtin_ia32_divsd(double2, double2) pure @safe;
__m128d _mm_div_ps(__m128d a, __m128d b)
{
return a / b;
}
alias _mm_div_sd = __builtin_ia32_divsd;
int _mm_extract_epi16(int imm8)(__m128i a) pure @safe
{
return shufflevector!(short8, imm8)(a);
}
__m128i _mm_insert_epi16(int imm8)(__m128i a, int i) pure @safe
{
return insertelement!(short8, imm8)(a, i);
}
alias _mm_lfence = __builtin_ia32_lfence;
__m128d _mm_load_pd (const(double) * mem_addr) pure
{
__m128d* aligned = cast(__m128d*)mem_addr;
return *aligned;
}
__m128d _mm_load_pd1 (const(double)* mem_addr) pure @safe
{
return [*mem_addr, *mem_addr];
}
__m128d _mm_load_sd (const(double)* mem_addr) pure @safe
{
return [*mem_addr, 0];
}
__m128i _mm_load_si128 (const(__m128i)* mem_addr) pure
{
return *mem_addr;
}
alias _mm_load1_pd = _mm_load_pd1;
__m128d _mm_loadh_pd (__m128d a, const(double)* mem_addr) pure @safe
{
return insertelement!(__m128d, 1)(a, *mem_addr);
}
// Note: strange signature since the memory doesn't have to aligned
__m128i _mm_loadl_epi64 (const(__m128i)* mem_addr) pure @safe
{
auto pLong = cast(const(long)*)mem_addr;
long2 res = [*pLong, 0];
return cast(__m128i)res;
}
__m128d _mm_loadl_pd (__m128d a, const(double)* mem_addr) pure @safe
{
return insertelement!(__m128d, 0)(a, *mem_addr);
}
__m128d _mm_loadr_pd (const(double)* mem_addr) pure
{
__m128d a = _mm_load_pd(mem_addr);
return shufflevector!(__m128d, 1, 0)(a, a);
}
__m128d _mm_loadu_pd (const(double)* mem_addr) pure @safe
{
return loadUnaligned!(double2)(mem_addr);
}
__m128i _mm_loadu_si128 (const(__m128i)* mem_addr) pure
{
return loadUnaligned!(__m128i)(cast(int*)mem_addr);
}
alias _mm_madd_epi16 = __builtin_ia32_pmaddwd128;
alias _mm_maskmoveu_si128 = __builtin_ia32_maskmovdqu;
pragma(LDC_intrinsic, "llvm.x86.sse2.pmaxs.w")
short8 __builtin_ia32_pmaxsw128(short8, short8) pure @safe;
alias _mm_max_epi16 = __builtin_ia32_pmaxsw128;
pragma(LDC_intrinsic, "llvm.x86.sse2.pmaxu.b")
byte16 __builtin_ia32_pmaxub128(byte16, byte16) pure @safe;
alias _mm_max_epu8 = __builtin_ia32_pmaxub128;
alias _mm_max_pd = __builtin_ia32_maxpd;
alias _mm_max_sd = __builtin_ia32_maxsd;
alias _mm_mfence = __builtin_ia32_mfence;
pragma(LDC_intrinsic, "llvm.x86.sse2.pmins.w")
short8 __builtin_ia32_pminsw128(short8, short8) pure @safe;
alias _mm_min_epi16 = __builtin_ia32_pminsw128;
pragma(LDC_intrinsic, "llvm.x86.sse2.pminu.b")
byte16 __builtin_ia32_pminub128(byte16, byte16) pure @safe;
alias _mm_min_epu8 = __builtin_ia32_pminub128;
alias _mm_min_pd = __builtin_ia32_minpd;
alias _mm_min_sd = __builtin_ia32_minsd;
__m128i _mm_move_epi64 (__m128i a) pure @safe
{
long2 result = [ extractelement!(long2, 0)(a), 0 ];
return result;
}
__m128d _mm_move_sd (__m128d a, __m128d b) pure @safe
{
return shufflevector!(double2, 2, 1)(a, b);
}
alias _mm_movemask_epi8 = __builtin_ia32_pmovmskb128;
alias _mm_movemask_pd = __builtin_ia32_movmskpd;
// MMXREG: _mm_movepi64_pi64
// MMXREG: __m128i _mm_movpi64_epi64 (__m64 a)
alias _mm_mul_epu32 = __builtin_ia32_pmuludq128;
__m128d _mm_mul_pd(__m128d a, __m128d b) pure @safe
{
return a * b;
}
pragma(LDC_intrinsic, "llvm.x86.sse2.mul.sd")
double2 __builtin_ia32_mulsd(double2, double2) pure @safe;
alias _mm_mul_sd = __builtin_ia32_mulsd;
// MMXREG: _mm_mul_su32
alias _mm_mulhi_epi16 = __builtin_ia32_pmulhw128;
alias _mm_mulhi_epu16 = __builtin_ia32_pmulhuw128;
__m128i _mm_mullo_epi16 (__m128i a, __m128i b)
{
return cast(__m128i)(cast(short8)a * cast(short8)b);
}
__m128d _mm_or_pd (__m128d a, __m128d b) pure @safe
{
return cast(__m128d)( cast(__m128i)a | cast(__m128i)b );
}
__m128i _mm_or_si128 (__m128i a, __m128i b) pure @safe
{
return a | b;
}
alias _mm_packs_epi32 = __builtin_ia32_packssdw128;
alias _mm_packs_epi16 = __builtin_ia32_packsswb128;
alias _mm_packus_epi16 = __builtin_ia32_packuswb128;
alias _mm_pause = __builtin_ia32_pause;
alias _mm_sad_epu8 = __builtin_ia32_psadbw128;
__m128i _mm_set_epi16 (short e7, short e6, short e5, short e4, short e3, short e2, short e1, short e0) pure @safe
{
short8 result = [e0, e1, e2, e3, e4, e5, e6, e7];
return cast(__m128i) result;
}
__m128i _mm_set_epi32 (int e3, int e2, int e1, int e0) pure @safe
{
int4 result = [e0, e1, e2, e3];
return cast(__m128i) result;
}
__m128i _mm_set_epi64x (long e1, long e0) pure @safe
{
long2 result = [e0, e1];
return cast(__m128i) result;
}
__m128i _mm_set_epi8 (byte e15, byte e14, byte e13, byte e12,
byte e11, byte e10, byte e9, byte e8,
byte e7, byte e6, byte e5, byte e4,
byte e3, byte e2, byte e1, byte e0) pure @safe
{
byte16 result = [e0, e1, e2, e3, e4, e5, e6, e7,
e8, e9, e10, e11, e12, e13, e14, e15];
return cast(__m128i)result;
}
__m128d _mm_set_pd (double e1, double e0) pure @safe
{
return [e0, e1];
}
__m128d _mm_set_pd1 (double a) pure @safe
{
return [a, a];
}
__m128d _mm_set_sd (double a) pure @safe
{
return [a, 0];
}
__m128i _mm_set1_epi16 (short a) pure @safe
{
short8 result = [a, a, a, a, a, a, a, a];
return cast(__m128i) result;
}
__m128i _mm_set1_epi32 (int a) pure @safe
{
int4 result = [a, a, a, a];
return cast(__m128i) result;
}
__m128i _mm_set1_epi64x (long a) pure @safe
{
long2 result = [a, a];
return cast(__m128i) result;
}
__m128i _mm_set1_epi8 (char a) pure @safe
{
byte16 result = [a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a];
return cast(__m128i) result;
}
alias _mm_set1_pd = _mm_set_pd1;
__m128i _mm_setr_epi16 (short e7, short e6, short e5, short e4, short e3, short e2, short e1, short e0) pure @safe
{
short8 result = [e7, e6, e5, e4, e3, e2, e1, e0];
return cast(__m128i) result;
}
__m128i _mm_setr_epi32 (int e3, int e2, int e1, int e0) pure @safe
{
int4 result = [e3, e2, e1, e0];
return cast(__m128i) result;
}
__m128i _mm_setr_epi64 (long e1, long e0) pure @safe
{
long2 result = [e1, e0];
return cast(__m128i) result;
}
__m128i _mm_setr_epi8 (char e15, char e14, char e13, char e12,
char e11, char e10, char e9, char e8,
char e7, char e6, char e5, char e4,
char e3, char e2, char e1, char e0) pure @safe
{
byte16 result = [e15, e14, e13, e12, e11, e10, e9, e8,
e7, e6, e5, e4, e3, e2, e1, e0];
return cast(__m128i) result;
}
__m128d _mm_setr_pd (double e1, double e0) pure @safe
{
return [e1, e0];
}
__m128d _mm_setzero_pd () pure @safe
{
return [0.0, 0.0];
}
__m128i _mm_setzero_si128() pure @safe
{
return [0, 0, 0, 0];
}
__m128i _mm_shuffle_epi32(int imm8)(__m128i a) pure @safe
{
return shufflevector!(int4, (imm8 >> 0) & 3,
(imm8 >> 2) & 3,
(imm8 >> 4) & 3,
(imm8 >> 6) & 3)(a, a);
}
__m128d _mm_shuffle_pd (int imm8)(__m128d a, __m128d b) pure @safe
{
return shufflevector!(double, 0 + ( (imm8 >> 0) & 1 ),
2 + ( (imm8 >> 1) & 1 ))(a, b);
}
__m128i _mm_shufflehi_epi16(int imm8)(__m128i a) pure @safe
{
return shufflevector!(int4, 4 + ( (imm8 >> 0) & 3 ),
4 + ( (imm8 >> 2) & 3 ),
4 + ( (imm8 >> 4) & 3 ),
4 + ( (imm8 >> 6) & 3 ))(a, a);
}
__m128i _mm_shufflelo_epi16(int imm8)(__m128i a) pure @safe
{
return shufflevector!(int4, ( (imm8 >> 0) & 3 ),
( (imm8 >> 2) & 3 ),
( (imm8 >> 4) & 3 ),
( (imm8 >> 6) & 3 ))(a, a);
}
alias _mm_sll_epi32 = __builtin_ia32_pslld128;
alias _mm_sll_epi64 = __builtin_ia32_psllq128;
alias _mm_sll_epi16 = __builtin_ia32_psllw128;
alias _mm_slli_epi32 = __builtin_ia32_pslldi128;
alias _mm_slli_epi64 = __builtin_ia32_psllqi128;
alias _mm_slli_epi16 = __builtin_ia32_psllwi128;
__m128i _mm_slli_si128(ubyte imm8)(__m128i op) pure @safe
{
static if (imm8 & 0xF0)
return _mm_setzero_si128();
else
return shufflevector!(byte16,
16 - imm8, 17 - imm8, 18 - imm8, 19 - imm8, 20 - imm8, 21 - imm8, 22 - imm8, 23 - imm8,
24 - imm8, 25 - imm8, 26 - imm8, 27 - imm8, 28 - imm8, 29 - imm8, 30 - imm8, 31 - imm8)
(_mm_setzero_si128(), op);
}
__m128d _mm_sqrt_pd (__m128d a) pure @safe
{
return __builtin_ia32_sqrtpd(a);
}
__m128d _mm_sqrt_sd (__m128d a) pure @safe
{
return __builtin_ia32_sqrtsd(a);
}
alias _mm_sra_epi16 = __builtin_ia32_psraw128;
alias _mm_sra_epi32 = __builtin_ia32_psrad128;
alias _mm_srai_epi16 = __builtin_ia32_psrawi128;
alias _mm_srai_epi32 = __builtin_ia32_psradi128;
alias _mm_srl_epi16 = __builtin_ia32_psrlw128;
alias _mm_srl_epi32 = __builtin_ia32_psrld128;
alias _mm_srl_epi64 = __builtin_ia32_psrlq128;
alias _mm_srli_epi16 = __builtin_ia32_psrlwi128;
alias _mm_srli_epi32 = __builtin_ia32_psrldi128;
alias _mm_srli_epi64 = __builtin_ia32_psrlqi128;
__m128i _mm_srli_si128(ubyte imm8)(__m128i op) pure @safe
{
static if (imm8 & 0xF0)
return _mm_setzero_si128();
else
return shufflevector!(byte16,
imm8+0, imm8+1, imm8+2, imm8+3, imm8+4, imm8+5, imm8+6, imm8+7,
imm8+8, imm8+9, imm8+10, imm8+11, imm8+12, imm8+13, imm8+14, imm8+15)(op, _mm_setzero_si128());
}
void _mm_store_pd (double* mem_addr, __m128d a) pure
{
__m128d* aligned = cast(__m128d*)mem_addr;
*aligned = a;
}
void _mm_store_pd1 (double* mem_addr, __m128d a) pure
{
__m128d* aligned = cast(__m128d*)mem_addr;
*aligned = shufflevector!(double2, 0, 0)(a, a);
}
void _mm_store_sd (double* mem_addr, __m128d a) pure @safe
{
*mem_addr = extractelement!(double2, 0)(a);
}
void _mm_store_si128 (__m128i* mem_addr, __m128i a) pure @safe
{
*mem_addr = a;
}
alias _mm_store1_pd = _mm_store_pd1;
void _mm_storeh_pd (double* mem_addr, __m128d a) pure @safe
{
*mem_addr = extractelement!(double2, 1)(a);
}
void _mm_storel_epi64 (__m128i* mem_addr, __m128i a) pure @safe
{
long* dest = cast(long*)mem_addr;
*dest = extractelement!(long2, 0)(cast(long2)a);
}
void _mm_storel_pd (double* mem_addr, __m128d a) pure @safe
{
*mem_addr = extractelement!(double2, 0)(a);
}
void _mm_storer_pd (double* mem_addr, __m128d a) pure
{
__m128d* aligned = cast(__m128d*)mem_addr;
*aligned = shufflevector!(double2, 1, 0)(a, a);
}
void _mm_storeu_pd (double* mem_addr, __m128d a) pure @safe
{
storeUnaligned!double2(a, mem_addr);
}
void _mm_storeu_si128 (__m128i* mem_addr, __m128i a) pure @safe
{
storeUnaligned!__m128i(a, cast(int*)mem_addr);
}
// TODO: _mm_stream_pd
// TODO: _mm_stream_si128
// TODO: _mm_stream_si32
// TODO: _mm_stream_si64
__m128i _mm_sub_epi16(__m128i a, __m128i b) pure @safe
{
return cast(__m128i)(cast(short8)a - cast(short8)b);
}
__m128i _mm_sub_epi32(__m128i a, __m128i b) pure @safe
{
return cast(__m128i)(cast(int4)a - cast(int4)b);
}
__m128i _mm_sub_epi64(__m128i a, __m128i b) pure @safe
{
return cast(__m128i)(cast(long2)a - cast(long2)b);
}
__m128i _mm_sub_epi8(__m128i a, __m128i b) pure @safe
{
return cast(__m128i)(cast(byte16)a - cast(byte16)b);
}
__m128d _mm_sub_pd(__m128d a, __m128d b) pure @safe
{
return a - b;
}
pragma(LDC_intrinsic, "llvm.x86.sse2.sub.sd")
double2 __builtin_ia32_subsd(double2, double2) pure @safe;
alias _mm_sub_sd = __builtin_ia32_subsd;
// MMXREG: _mm_sub_si64
alias _mm_subs_epi16 = __builtin_ia32_psubsw128;
alias _mm_subs_epi8 = __builtin_ia32_psubsb128;
alias _mm_subs_epu16 = __builtin_ia32_psubusw128;
alias _mm_subs_epu8 = __builtin_ia32_psubusb128;
alias _mm_ucomieq_sd = __builtin_ia32_ucomisdeq;
alias _mm_ucomige_sd = __builtin_ia32_ucomisdge;
alias _mm_ucomigt_sd = __builtin_ia32_ucomisdgt;
alias _mm_ucomile_sd = __builtin_ia32_ucomisdle;
alias _mm_ucomilt_sd = __builtin_ia32_ucomisdlt;
alias _mm_ucomineq_sd = __builtin_ia32_ucomisdneq;
__m128d _mm_undefined_pd() pure @safe
{
__m128d result = void;
return result;
}
__m128i _mm_undefined_si128() pure @safe
{
__m128i result = void;
return result;
}
__m128i _mm_unpackhi_epi16 (__m128i a, __m128i b) pure @safe
{
return shufflevector!(short8, 4, 12, 5, 13, 6, 14, 7, 15)
(cast(short8)a, cast(short8)b);
}
__m128i _mm_unpackhi_epi32 (__m128i a, __m128i b) pure @safe
{
return shufflevector!(int4, 2, 6, 3, 7)
(cast(int4)a, cast(int4)b);
}
__m128i _mm_unpackhi_epi64 (__m128i a, __m128i b) pure @safe
{
return shufflevector!(long2, 1, 3)
(cast(long2)a, cast(long2)b);
}
__m128i _mm_unpackhi_epi8 (__m128i a, __m128i b) pure @safe
{
return shufflevector!(byte16, 8, 24, 9, 25, 10, 26, 11, 27,
12, 28, 13, 29, 14, 30, 15, 31)
(cast(byte16)a, cast(byte16)b);
}
__m128d _mm_unpackhi_pd (__m128d a, __m128d b) pure @safe
{
return shufflevector!(__m128d, 1, 3)(a, b);
}
__m128i _mm_unpacklo_epi16 (__m128i a, __m128i b) pure @safe
{
return shufflevector!(short8, 0, 8, 1, 9, 2, 10, 3, 11)
(cast(short8)a, cast(short8)b);
}
__m128i _mm_unpacklo_epi32 (__m128i a, __m128i b) pure @safe
{
return shufflevector!(int4, 0, 4, 1, 6)
(cast(int4)a, cast(int4)b);
}
__m128i _mm_unpacklo_epi64 (__m128i a, __m128i b) pure @safe
{
return shufflevector!(long2, 0, 2)
(cast(long2)a, cast(long2)b);
}
__m128i _mm_unpacklo_epi8 (__m128i a, __m128i b) pure @safe
{
return shufflevector!(byte16, 0, 16, 1, 17, 2, 18, 3, 19,
4, 20, 5, 21, 6, 22, 7, 23)
(cast(byte16)a, cast(byte16)b);
}
__m128d _mm_unpacklo_pd (__m128d a, __m128d b) pure @safe
{
return shufflevector!(__m128d, 0, 2)(a, b);
}
__m128d _mm_xor_pd (__m128d a, __m128d b) pure @safe
{
return cast(__m128d)(cast(__m128i)a, cast(__m128i)b);
}
__m128i _mm_xor_si128 (__m128i a, __m128i b) pure @safe
{
return a ^ b;
}
unittest
{
// distance between two points in 4D
float distance(float[4] a, float[4] b) nothrow @nogc
{
__m128 va = _mm_loadu_ps(a.ptr);
__m128 vb = _mm_loadu_ps(b.ptr);
__m128 diffSquared = _mm_sub_ps(va, vb);
diffSquared = _mm_mul_ps(diffSquared, diffSquared);
__m128 sum = _mm_add_ps(diffSquared, _mm_srli_si128!8(diffSquared));
sum = _mm_add_ps(sum, _mm_srli_si128!4(sum));
return _mm_cvtss_f32(_mm_sqrt_ss(sum));
}
assert(distance([0, 2, 0, 0], [0, 0, 0, 0]) == 2);
}
|
D
|
/*******************************************************************************
copyright: Copyright (c) 2006 Dinrus. все rights reserved
license: BSD стиль: see doc/license.txt for details
version: Initial release: Feb 2006
author: Regan Heath, Oskar Linde
This module реализует the SHA-512 Algorithm described by Secure
Хэш Standard, FИПS PUB 180-2
*******************************************************************************/
module util.digest.Sha512;
private import stdrus;
private import util.digest.MerkleDamgard;
public import util.digest.Digest;
/*******************************************************************************
*******************************************************************************/
final class Sha512 : MerkleDamgard
{
private бдол[8] контекст;
private const бцел padChar = 0x80;
/***********************************************************************
Construct a Sha512 хэш algorithm контекст
***********************************************************************/
this() { }
/***********************************************************************
***********************************************************************/
protected override проц создайДайджест(ббайт[] буф)
{
version (ЛитлЭндиан)
ПерестановкаБайт.своп64(контекст.ptr, контекст.length * бдол.sizeof);
буф[] = cast(ббайт[]) контекст[];
}
/***********************************************************************
The дайджест размер of Sha-512 is 64 байты
***********************************************************************/
override бцел размерДайджеста()
{
return 64;
}
/***********************************************************************
Initialize the cipher
Remarks:
Returns the cipher состояние в_ it's начальное значение
***********************************************************************/
protected override проц сбрось()
{
super.сбрось();
контекст[] = начальное[];
}
/***********************************************************************
Шифр блок размер
Возвращает:
the блок размер
Remarks:
Specifies the размер (in байты) of the блок of данные в_ пароль в_
each вызов в_ трансформируй(). For SHA512 the размерБлока is 128.
***********************************************************************/
protected override бцел размерБлока()
{
return 128;
}
/***********************************************************************
Length паддинг размер
Возвращает:
the length паддинг размер
Remarks:
Specifies the размер (in байты) of the паддинг which uses the
length of the данные which имеется been ciphered, this паддинг is
carried out by the padLength метод. For SHA512 the добавьРазмер is 16.
***********************************************************************/
protected override бцел добавьРазмер()
{
return 16;
}
/***********************************************************************
Pads the cipher данные
Параметры:
данные = a срез of the cipher буфер в_ заполни with паддинг
Remarks:
Fills the passed буфер срез with the appropriate паддинг for
the final вызов в_ трансформируй(). This паддинг will заполни the cipher
буфер up в_ размерБлока()-добавьРазмер().
***********************************************************************/
protected override проц padMessage(ббайт[] данные)
{
данные[0] = padChar;
данные[1..$] = 0;
}
/***********************************************************************
Performs the length паддинг
Параметры:
данные = the срез of the cipher буфер в_ заполни with паддинг
length = the length of the данные which имеется been ciphered
Remarks:
Fills the passed буфер срез with добавьРазмер() байты of паддинг
based on the length in байты of the ввод данные which имеется been
ciphered.
***********************************************************************/
protected override проц padLength(ббайт[] данные, бдол length)
{
length <<= 3;
for(цел j = данные.length-1; j >= 0; j--)
{
данные[данные.length-j-1] = cast(ббайт) (length >> j*8);
}
данные[0..8] = 0;
}
/***********************************************************************
Performs the cipher on a блок of данные
Параметры:
данные = the блок of данные в_ cipher
Remarks:
The actual cipher algorithm is carried out by this метод on
the passed блок of данные. This метод is called for every
размерБлока() байты of ввод данные и once ещё with the остаток
данные псеп_в_конце в_ размерБлока().
***********************************************************************/
protected override проц трансформируй(ббайт[] ввод)
{
бдол[80] W;
бдол a,b,c,d,e,f,g,h;
бдол t1,t2;
бцел j;
a = контекст[0];
b = контекст[1];
c = контекст[2];
d = контекст[3];
e = контекст[4];
f = контекст[5];
g = контекст[6];
h = контекст[7];
bigEndian64(ввод,W[0..16]);
for(j = 16; j < 80; j++)
{
W[j] = mix1(W[j-2]) + W[j-7] + mix0(W[j-15]) + W[j-16];
}
for(j = 0; j < 80; j++)
{
t1 = h + sum1(e) + Ch(e,f,g) + K[j] + W[j];
t2 = sum0(a) + Maj(a,b,c);
h = g;
g = f;
f = e;
e = d + t1;
d = c;
c = b;
b = a;
a = t1 + t2;
}
контекст[0] += a;
контекст[1] += b;
контекст[2] += c;
контекст[3] += d;
контекст[4] += e;
контекст[5] += f;
контекст[6] += g;
контекст[7] += h;
}
/***********************************************************************
***********************************************************************/
private static бдол Ch(бдол x, бдол y, бдол z)
{
return (x&y)^(~x&z);
}
/***********************************************************************
***********************************************************************/
private static бдол Maj(бдол x, бдол y, бдол z)
{
return (x&y)^(x&z)^(y&z);
}
/***********************************************************************
***********************************************************************/
private static бдол sum0(бдол x)
{
return вращайВправо(x,28)^вращайВправо(x,34)^вращайВправо(x,39);
}
/***********************************************************************
***********************************************************************/
private static бдол sum1(бдол x)
{
return вращайВправо(x,14)^вращайВправо(x,18)^вращайВправо(x,41);
}
/***********************************************************************
***********************************************************************/
private static бдол mix0(бдол x)
{
return вращайВправо(x,1)^вращайВправо(x,8)^shiftRight(x,7);
}
/***********************************************************************
***********************************************************************/
private static бдол mix1(бдол x)
{
return вращайВправо(x,19)^вращайВправо(x,61)^shiftRight(x,6);
}
/***********************************************************************
***********************************************************************/
private static бдол вращайВправо(бдол x, бцел n)
{
return (x >> n) | (x << (64-n));
}
/***********************************************************************
***********************************************************************/
private static бдол shiftRight(бдол x, бцел n)
{
return x >> n;
}
}
/*******************************************************************************
*******************************************************************************/
private static const бдол[] K =
[
0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc,
0x3956c25bf348b538, 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118,
0xd807aa98a3030242, 0x12835b0145706fbe, 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2,
0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235, 0xc19bf174cf692694,
0xe49b69c19ef14ad2, 0xefbe4786384f25e3, 0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65,
0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4, 0x76f988da831153b5,
0x983e5152ee66dfab, 0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4,
0xc6e00bf33da88fc2, 0xd5a79147930aa725, 0x06ca6351e003826f, 0x142929670a0e6e70,
0x27b70a8546d22ffc, 0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed, 0x53380d139d95b3df,
0x650a73548baf63de, 0x766a0abb3c77b2a8, 0x81c2c92e47edaee6, 0x92722c851482353b,
0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791, 0xc76c51a30654be30,
0xd192e819d6ef5218, 0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8,
0x19a4c116b8d2d0c8, 0x1e376c085141ab53, 0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8,
0x391c0cb3c5c95a63, 0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373, 0x682e6ff3d6b2b8a3,
0x748f82ee5defb2fc, 0x78a5636f43172f60, 0x84c87814a1f0ab72, 0x8cc702081a6439ec,
0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915, 0xc67178f2e372532b,
0xca273eceea26619c, 0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178,
0x06f067aa72176fba, 0x0a637dc5a2c898a6, 0x113f9804bef90dae, 0x1b710b35131c471b,
0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, 0x431d67c49c100d4c,
0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817
];
/*******************************************************************************
*******************************************************************************/
private static const бдол[8] начальное =
[
0x6a09e667f3bcc908,
0xbb67ae8584caa73b,
0x3c6ef372fe94f82b,
0xa54ff53a5f1d36f1,
0x510e527fade682d1,
0x9b05688c2b3e6c1f,
0x1f83d9abfb41bd6b,
0x5be0cd19137e2179
];
/*******************************************************************************
*******************************************************************************/
debug(UnitTest)
{
unittest
{
static ткст[] strings =
[
"",
"abc",
"abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"
];
static ткст[] results =
[
"cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e",
"ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f",
"8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909"
];
Sha512 h = new Sha512;
foreach (цел i, ткст s; strings)
{
h.обнови(cast(ббайт[])s);
ткст d = h.гексДайджест();
assert(d == results[i],"DigestTransform:("~s~")("~d~")!=("~results[i]~")");
}
}
}
|
D
|
module tinyredis.collections.set;
import tinyredis : Redis, Response;
/**
Set
A class that represents a SET structure in redis.
Allows you to query and manipulate the set using methods.
Implements OutputRange.
NOTE: Operations are done on the server side as much as possible, to reflect the true state of
the collection.
*/
class Set
{
private :
string name;
Redis conn;
public :
this(Redis conn, string name)
{
this.conn = conn;
this.name = name;
}
Response smembers()
{
return conn.send("SMEMBERS", name);
}
int scard()
{
return conn.send!(int)("SCARD", name);
}
alias count = scard;
bool srem(const(char[]) value)
{
return conn.send!(bool)("SREM", name, value);
}
void del()
{
conn.send("DEL", name);
}
// OutputRange
void put(const(char[]) value)
{
conn.send("SADD", name, value);
}
void put(const(char[])[] values)
{
foreach(value; values)
conn.send("SADD", name, value);
}
void opAssign(const(char[]) value)
{
del();
put(value);
}
void opAssign(const(char[])[] values)
{
del();
put(values);
}
void opOpAssign(string op)(const(char[]) value)
{
static if (op == "~")
put(value);
else static if (op == "-")
srem(value);
else
static assert(0, "Operator "~op~" not implemented");
}
void opOpAssign(string op)(const(char[])[] values)
{
static if (op == "~")
foreach(value; values)
put(value);
else static if (op == "-")
foreach(value; values)
srem(value);
else
static assert(0, "Operator "~op~" not implemented");
}
}
unittest {
import std.range.primitives : isOutputRange;
assert(isOutputRange!(Set, string));
// Start a redis server on 127.0.0.1:6379
auto conn = new Redis("localhost", 6379);
auto set = new Set(conn, "tinyRedisUnitTestSet");
set = ["banana", "apple", "orange"]; // data can be assigned using opAssign
set.put("grapes"); //the put() function appends a value
assert(set.scard() == 4); // runs the SCARD command, presents a proper count of the set on the server
assert(set.count() == 4); // count is an alias for SCARD command
//opAssign resets the data
set = ["guava", "pear"];
assert(set.scard() == 2);
set ~= "banana"; // implements opOpAssign so ~= appends data
set ~= "apple";
set ~= ["orange", "mango"];
set ~= "apple"; //DUPLICATE!
assert(set.count() == 6);
set -= "mango"; //Not mango season!
assert(set.count() == 5);
import std.algorithm.searching : canFind;
foreach(fruit; set.smembers())
assert(["guava", "pear", "banana", "apple", "orange"].canFind(fruit.toString));
}
|
D
|
/Users/kidnapper/Documents/25sprout/practice/DerivedData2/practice/Build/Intermediates/IBDesignables/Intermediates/practice.build/Debug-iphonesimulator/practice.build/Objects-normal/x86_64/ArticleContentViewController.o : /Users/kidnapper/Documents/25sprout/practice/practice/Search_TPVC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Article_TVC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Search_TVC.swift /Users/kidnapper/Documents/25sprout/practice/practice/TabPage2_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/TabPage_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/CongressUpdate_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Search_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Bookmark_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Main_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/TrailFactSheet_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Event_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/ExpertCommentary_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/ThumbnailHeader_CRV.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/PHCheckableTextfield.swift /Users/kidnapper/Documents/25sprout/practice/practice/AppDelegate.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ReferenceLabel.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/BulletPointLabel.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/PHMustLabel.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchTab_CVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/Reference_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/MayLike_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/ThumbnailHeader_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchResultHeader_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/TrailFactSheet_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchResult_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/Content_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/Quiz_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/TableViewCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SquareCollectionViewCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/BannerCollectionViewCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SquareCategoryCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/BannerCategoryCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/TVC_extension.swift /Users/kidnapper/Documents/25sprout/practice/practice/NavigationBar.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/NetworkManager.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/RequestDidSendViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/LoginInvitationCodeViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/RequestInvitationCodeViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ConfirmUserDetailViewController.swift /Users/kidnapper/Documents/25sprout/practice/practice/SeeAllViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/EmailLoginViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/FirstMeetViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleContentViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/AppUtilities.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/Extensions.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchBarVIew.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleQuoteView.swift /Users/kidnapper/Documents/25sprout/practice/practice/selectionView.swift /Users/kidnapper/Documents/25sprout/practice/practice/SquareCategoryCollectionView.swift /Users/kidnapper/Documents/25sprout/practice/practice/BannerCategoryCollectionView.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleIntroView.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchTabBarView.swift /Users/kidnapper/Documents/25sprout/practice/practice/pickerView.swift /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreText.apinotesc /Users/kidnapper/Documents/25sprout/practice/DerivedData2/practice/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/TabPageViewController.framework/Modules/TabPageViewController.swiftmodule/x86_64.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FirebaseCore.h /Users/kidnapper/Documents/25sprout/practice/Pods/Firebase/Core/Sources/Firebase.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRLoggerLevel.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRApp.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRApp.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRParameterNames.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIROptions.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIROptions.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRCoreSwiftNameSupport.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsSwiftNameSupport.h /Users/kidnapper/Documents/25sprout/practice/Pods/Firebase/Core/Sources/module.modulemap /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Modules/module.modulemap /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Modules/module.modulemap /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Modules/module.modulemap
/Users/kidnapper/Documents/25sprout/practice/DerivedData2/practice/Build/Intermediates/IBDesignables/Intermediates/practice.build/Debug-iphonesimulator/practice.build/Objects-normal/x86_64/ArticleContentViewController~partial.swiftmodule : /Users/kidnapper/Documents/25sprout/practice/practice/Search_TPVC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Article_TVC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Search_TVC.swift /Users/kidnapper/Documents/25sprout/practice/practice/TabPage2_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/TabPage_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/CongressUpdate_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Search_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Bookmark_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Main_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/TrailFactSheet_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Event_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/ExpertCommentary_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/ThumbnailHeader_CRV.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/PHCheckableTextfield.swift /Users/kidnapper/Documents/25sprout/practice/practice/AppDelegate.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ReferenceLabel.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/BulletPointLabel.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/PHMustLabel.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchTab_CVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/Reference_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/MayLike_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/ThumbnailHeader_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchResultHeader_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/TrailFactSheet_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchResult_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/Content_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/Quiz_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/TableViewCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SquareCollectionViewCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/BannerCollectionViewCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SquareCategoryCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/BannerCategoryCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/TVC_extension.swift /Users/kidnapper/Documents/25sprout/practice/practice/NavigationBar.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/NetworkManager.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/RequestDidSendViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/LoginInvitationCodeViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/RequestInvitationCodeViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ConfirmUserDetailViewController.swift /Users/kidnapper/Documents/25sprout/practice/practice/SeeAllViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/EmailLoginViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/FirstMeetViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleContentViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/AppUtilities.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/Extensions.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchBarVIew.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleQuoteView.swift /Users/kidnapper/Documents/25sprout/practice/practice/selectionView.swift /Users/kidnapper/Documents/25sprout/practice/practice/SquareCategoryCollectionView.swift /Users/kidnapper/Documents/25sprout/practice/practice/BannerCategoryCollectionView.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleIntroView.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchTabBarView.swift /Users/kidnapper/Documents/25sprout/practice/practice/pickerView.swift /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreText.apinotesc /Users/kidnapper/Documents/25sprout/practice/DerivedData2/practice/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/TabPageViewController.framework/Modules/TabPageViewController.swiftmodule/x86_64.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FirebaseCore.h /Users/kidnapper/Documents/25sprout/practice/Pods/Firebase/Core/Sources/Firebase.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRLoggerLevel.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRApp.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRApp.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRParameterNames.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIROptions.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIROptions.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRCoreSwiftNameSupport.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsSwiftNameSupport.h /Users/kidnapper/Documents/25sprout/practice/Pods/Firebase/Core/Sources/module.modulemap /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Modules/module.modulemap /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Modules/module.modulemap /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Modules/module.modulemap
/Users/kidnapper/Documents/25sprout/practice/DerivedData2/practice/Build/Intermediates/IBDesignables/Intermediates/practice.build/Debug-iphonesimulator/practice.build/Objects-normal/x86_64/ArticleContentViewController~partial.swiftdoc : /Users/kidnapper/Documents/25sprout/practice/practice/Search_TPVC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Article_TVC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Search_TVC.swift /Users/kidnapper/Documents/25sprout/practice/practice/TabPage2_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/TabPage_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/CongressUpdate_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Search_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Bookmark_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Main_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/TrailFactSheet_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Event_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/ExpertCommentary_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/ThumbnailHeader_CRV.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/PHCheckableTextfield.swift /Users/kidnapper/Documents/25sprout/practice/practice/AppDelegate.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ReferenceLabel.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/BulletPointLabel.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/PHMustLabel.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchTab_CVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/Reference_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/MayLike_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/ThumbnailHeader_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchResultHeader_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/TrailFactSheet_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchResult_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/Content_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/Quiz_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/TableViewCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SquareCollectionViewCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/BannerCollectionViewCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SquareCategoryCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/BannerCategoryCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/TVC_extension.swift /Users/kidnapper/Documents/25sprout/practice/practice/NavigationBar.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/NetworkManager.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/RequestDidSendViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/LoginInvitationCodeViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/RequestInvitationCodeViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ConfirmUserDetailViewController.swift /Users/kidnapper/Documents/25sprout/practice/practice/SeeAllViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/EmailLoginViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/FirstMeetViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleContentViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/AppUtilities.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/Extensions.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchBarVIew.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleQuoteView.swift /Users/kidnapper/Documents/25sprout/practice/practice/selectionView.swift /Users/kidnapper/Documents/25sprout/practice/practice/SquareCategoryCollectionView.swift /Users/kidnapper/Documents/25sprout/practice/practice/BannerCategoryCollectionView.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleIntroView.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchTabBarView.swift /Users/kidnapper/Documents/25sprout/practice/practice/pickerView.swift /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreText.apinotesc /Users/kidnapper/Documents/25sprout/practice/DerivedData2/practice/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/TabPageViewController.framework/Modules/TabPageViewController.swiftmodule/x86_64.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FirebaseCore.h /Users/kidnapper/Documents/25sprout/practice/Pods/Firebase/Core/Sources/Firebase.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRLoggerLevel.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRApp.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRApp.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRParameterNames.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIROptions.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIROptions.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRCoreSwiftNameSupport.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsSwiftNameSupport.h /Users/kidnapper/Documents/25sprout/practice/Pods/Firebase/Core/Sources/module.modulemap /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Modules/module.modulemap /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Modules/module.modulemap /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Modules/module.modulemap
|
D
|
/Users/mu/Hello/.build/x86_64-apple-macosx/debug/TemplateKit.build/Data/TemplateDataEncoder.swift.o : /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateData.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateEmbed.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Deprecated.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSource.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataStorage.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/ASTCache.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataRepresentable.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/HTMLEscape.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntaxType.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Uppercase.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Lowercase.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Capitalize.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateTag.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConditional.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateCustom.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateExpression.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Var.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataEncoder.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIdentifier.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateByteScanner.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateRenderer.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagRenderer.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/PlaintextRenderer.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/ViewRenderer.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateParser.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateSerializer.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/TemplateError.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIterator.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Contains.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/Exports.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/DateFormat.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConstant.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Comment.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Print.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Count.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateDataContext.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagContext.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Raw.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateRaw.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/View.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntax.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/mu/Hello/.build/checkouts/swift-nio-zlib-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/mu/Hello/.build/x86_64-apple-macosx/debug/TemplateKit.build/Data/TemplateDataEncoder~partial.swiftmodule : /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateData.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateEmbed.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Deprecated.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSource.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataStorage.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/ASTCache.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataRepresentable.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/HTMLEscape.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntaxType.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Uppercase.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Lowercase.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Capitalize.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateTag.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConditional.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateCustom.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateExpression.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Var.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataEncoder.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIdentifier.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateByteScanner.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateRenderer.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagRenderer.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/PlaintextRenderer.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/ViewRenderer.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateParser.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateSerializer.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/TemplateError.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIterator.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Contains.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/Exports.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/DateFormat.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConstant.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Comment.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Print.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Count.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateDataContext.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagContext.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Raw.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateRaw.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/View.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntax.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/mu/Hello/.build/checkouts/swift-nio-zlib-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/mu/Hello/.build/x86_64-apple-macosx/debug/TemplateKit.build/Data/TemplateDataEncoder~partial.swiftdoc : /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateData.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateEmbed.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Deprecated.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSource.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataStorage.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/ASTCache.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataRepresentable.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/HTMLEscape.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntaxType.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Uppercase.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Lowercase.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Capitalize.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateTag.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConditional.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateCustom.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateExpression.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Var.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataEncoder.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIdentifier.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateByteScanner.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateRenderer.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagRenderer.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/PlaintextRenderer.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/ViewRenderer.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateParser.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateSerializer.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/TemplateError.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIterator.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Contains.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/Exports.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/DateFormat.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConstant.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Comment.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Print.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Count.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateDataContext.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagContext.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Raw.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateRaw.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/View.swift /Users/mu/Hello/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntax.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/mu/Hello/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/mu/Hello/.build/checkouts/swift-nio-zlib-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
// Written in the D programming language.
/** This module contains the $(LREF Complex) type, which is used to represent
_complex numbers, along with related mathematical operations and functions.
$(LREF Complex) will eventually $(LINK2 ../deprecate.html, replace)
the built-in types $(D cfloat), $(D cdouble), $(D creal), $(D ifloat),
$(D idouble), and $(D ireal).
Authors: Lars Tandle Kyllingstad, Don Clugston
Copyright: Copyright (c) 2010, Lars T. Kyllingstad.
License: $(WEB boost.org/LICENSE_1_0.txt, Boost License 1.0)
Source: $(PHOBOSSRC std/_complex.d)
*/
module std.complex;
import std.traits;
/** Helper function that returns a _complex number with the specified
real and imaginary parts.
Params:
R = (template parameter) type of real part of complex number
I = (template parameter) type of imaginary part of complex number
re = real part of complex number to be constructed
im = (optional) imaginary part of complex number
Returns:
$(D Complex) instance with real and imaginary parts set
to the values provided as input. If neither $(D re) nor
$(D im) are floating-point numbers, the return type will
be $(D Complex!double). Otherwise, the return type is
deduced using $(D std.traits.CommonType!(R, I)).
*/
auto complex(R)(R re) @safe pure nothrow @nogc if (is(R : double))
{
static if (isFloatingPoint!R)
return Complex!R(re, 0);
else
return Complex!double(re, 0);
}
/// ditto
auto complex(R, I)(R re, I im) @safe pure nothrow @nogc
if (is(R : double) && is(I : double))
{
static if (isFloatingPoint!R || isFloatingPoint!I)
return Complex!(CommonType!(R, I))(re, im);
else
return Complex!double(re, im);
}
///
unittest
{
auto a = complex(1.0);
static assert (is(typeof(a) == Complex!double));
assert (a.re == 1.0);
assert (a.im == 0.0);
auto b = complex(2.0L);
static assert (is(typeof(b) == Complex!real));
assert (b.re == 2.0L);
assert (b.im == 0.0L);
auto c = complex(1.0, 2.0);
static assert (is(typeof(c) == Complex!double));
assert (c.re == 1.0);
assert (c.im == 2.0);
auto d = complex(3.0, 4.0L);
static assert (is(typeof(d) == Complex!real));
assert (d.re == 3.0);
assert (d.im == 4.0L);
auto e = complex(1);
static assert (is(typeof(e) == Complex!double));
assert (e.re == 1);
assert (e.im == 0);
auto f = complex(1L, 2);
static assert (is(typeof(f) == Complex!double));
assert (f.re == 1L);
assert (f.im == 2);
auto g = complex(3, 4.0L);
static assert (is(typeof(g) == Complex!real));
assert (g.re == 3);
assert (g.im == 4.0L);
}
/** A complex number parametrised by a type $(D T), which must be either
$(D float), $(D double) or $(D real).
*/
struct Complex(T) if (isFloatingPoint!T)
{
import std.format : FormatSpec;
/** The real part of the number. */
T re;
/** The imaginary part of the number. */
T im;
/** Converts the complex number to a string representation.
The second form of this function is usually not called directly;
instead, it is used via $(XREF string,format), as shown in the examples
below. Supported format characters are 'e', 'f', 'g', 'a', and 's'.
See the $(LINK2 std_format.html, std.format) and $(XREF string, format)
documentation for more information.
*/
string toString() const /* TODO: @safe pure nothrow */
{
import std.exception : assumeUnique;
char[] buf;
buf.reserve(100);
auto fmt = FormatSpec!char("%s");
toString((const(char)[] s) { buf ~= s; }, fmt);
return assumeUnique(buf);
}
static if (is(T == double))
///
unittest
{
auto c = complex(1.2, 3.4);
// Vanilla toString formatting:
assert(c.toString() == "1.2+3.4i");
// Formatting with std.string.format specs: the precision and width
// specifiers apply to both the real and imaginary parts of the
// complex number.
import std.format : format;
assert(format("%.2f", c) == "1.20+3.40i");
assert(format("%4.1f", c) == " 1.2+ 3.4i");
}
/// ditto
void toString(Char)(scope void delegate(const(Char)[]) sink,
FormatSpec!Char formatSpec) const
{
import std.math : signbit;
import std.format : formatValue;
formatValue(sink, re, formatSpec);
if (signbit(im) == 0) sink("+");
formatValue(sink, im, formatSpec);
sink("i");
}
@safe pure nothrow @nogc:
this(R : T)(Complex!R z)
{
re = z.re;
im = z.im;
}
this(Rx : T, Ry : T)(Rx x, Ry y)
{
re = x;
im = y;
}
this(R : T)(R r)
{
re = r;
im = 0;
}
// ASSIGNMENT OPERATORS
// this = complex
ref Complex opAssign(R : T)(Complex!R z)
{
re = z.re;
im = z.im;
return this;
}
// this = numeric
ref Complex opAssign(R : T)(R r)
{
re = r;
im = 0;
return this;
}
// COMPARISON OPERATORS
// this == complex
bool opEquals(R : T)(Complex!R z) const
{
return re == z.re && im == z.im;
}
// this == numeric
bool opEquals(R : T)(R r) const
{
return re == r && im == 0;
}
// UNARY OPERATORS
// +complex
Complex opUnary(string op)() const
if (op == "+")
{
return this;
}
// -complex
Complex opUnary(string op)() const
if (op == "-")
{
return Complex(-re, -im);
}
// BINARY OPERATORS
// complex op complex
Complex!(CommonType!(T,R)) opBinary(string op, R)(Complex!R z) const
{
alias C = typeof(return);
auto w = C(this.re, this.im);
return w.opOpAssign!(op)(z);
}
// complex op numeric
Complex!(CommonType!(T,R)) opBinary(string op, R)(R r) const
if (isNumeric!R)
{
alias C = typeof(return);
auto w = C(this.re, this.im);
return w.opOpAssign!(op)(r);
}
// numeric + complex, numeric * complex
Complex!(CommonType!(T, R)) opBinaryRight(string op, R)(R r) const
if ((op == "+" || op == "*") && (isNumeric!R))
{
return opBinary!(op)(r);
}
// numeric - complex
Complex!(CommonType!(T, R)) opBinaryRight(string op, R)(R r) const
if (op == "-" && isNumeric!R)
{
return Complex(r - re, -im);
}
// numeric / complex
Complex!(CommonType!(T, R)) opBinaryRight(string op, R)(R r) const
if (op == "/" && isNumeric!R)
{
import std.math : fabs;
typeof(return) w = void;
if (fabs(re) < fabs(im))
{
immutable ratio = re/im;
immutable rdivd = r/(re*ratio + im);
w.re = rdivd*ratio;
w.im = -rdivd;
}
else
{
immutable ratio = im/re;
immutable rdivd = r/(re + im*ratio);
w.re = rdivd;
w.im = -rdivd*ratio;
}
return w;
}
// numeric ^^ complex
Complex!(CommonType!(T, R)) opBinaryRight(string op, R)(R lhs) const
if (op == "^^" && isNumeric!R)
{
import std.math : log, exp, PI;
Unqual!(CommonType!(T, R)) ab = void, ar = void;
if (lhs >= 0)
{
// r = lhs
// theta = 0
ab = lhs ^^ this.re;
ar = log(lhs) * this.im;
}
else
{
// r = -lhs
// theta = PI
ab = (-lhs) ^^ this.re * exp(-PI * this.im);
ar = PI * this.re + log(-lhs) * this.im;
}
return typeof(return)(ab * std.math.cos(ar), ab * std.math.sin(ar));
}
// OP-ASSIGN OPERATORS
// complex += complex, complex -= complex
ref Complex opOpAssign(string op, C)(C z)
if ((op == "+" || op == "-") && is(C R == Complex!R))
{
mixin ("re "~op~"= z.re;");
mixin ("im "~op~"= z.im;");
return this;
}
// complex *= complex
ref Complex opOpAssign(string op, C)(C z)
if (op == "*" && is(C R == Complex!R))
{
auto temp = re*z.re - im*z.im;
im = im*z.re + re*z.im;
re = temp;
return this;
}
// complex /= complex
ref Complex opOpAssign(string op, C)(C z)
if (op == "/" && is(C R == Complex!R))
{
import std.math : fabs;
if (fabs(z.re) < fabs(z.im))
{
immutable ratio = z.re/z.im;
immutable denom = z.re*ratio + z.im;
immutable temp = (re*ratio + im)/denom;
im = (im*ratio - re)/denom;
re = temp;
}
else
{
immutable ratio = z.im/z.re;
immutable denom = z.re + z.im*ratio;
immutable temp = (re + im*ratio)/denom;
im = (im - re*ratio)/denom;
re = temp;
}
return this;
}
// complex ^^= complex
ref Complex opOpAssign(string op, C)(C z)
if (op == "^^" && is(C R == Complex!R))
{
import std.math : exp, log;
immutable r = abs(this);
immutable t = arg(this);
immutable ab = r^^z.re * exp(-t*z.im);
immutable ar = t*z.re + log(r)*z.im;
re = ab*std.math.cos(ar);
im = ab*std.math.sin(ar);
return this;
}
// complex += numeric, complex -= numeric
ref Complex opOpAssign(string op, U : T)(U a)
if (op == "+" || op == "-")
{
mixin ("re "~op~"= a;");
return this;
}
// complex *= numeric, complex /= numeric
ref Complex opOpAssign(string op, U : T)(U a)
if (op == "*" || op == "/")
{
mixin ("re "~op~"= a;");
mixin ("im "~op~"= a;");
return this;
}
// complex ^^= real
ref Complex opOpAssign(string op, R)(R r)
if (op == "^^" && isFloatingPoint!R)
{
immutable ab = abs(this)^^r;
immutable ar = arg(this)*r;
re = ab*std.math.cos(ar);
im = ab*std.math.sin(ar);
return this;
}
// complex ^^= int
ref Complex opOpAssign(string op, U)(U i)
if (op == "^^" && isIntegral!U)
{
switch (i)
{
case 0:
re = 1.0;
im = 0.0;
break;
case 1:
// identity; do nothing
break;
case 2:
this *= this;
break;
case 3:
auto z = this;
this *= z;
this *= z;
break;
default:
this ^^= cast(real) i;
}
return this;
}
}
unittest
{
import std.math;
import std.complex;
enum EPS = double.epsilon;
auto c1 = complex(1.0, 1.0);
// Check unary operations.
auto c2 = Complex!double(0.5, 2.0);
assert (c2 == +c2);
assert ((-c2).re == -(c2.re));
assert ((-c2).im == -(c2.im));
assert (c2 == -(-c2));
// Check complex-complex operations.
auto cpc = c1 + c2;
assert (cpc.re == c1.re + c2.re);
assert (cpc.im == c1.im + c2.im);
auto cmc = c1 - c2;
assert (cmc.re == c1.re - c2.re);
assert (cmc.im == c1.im - c2.im);
auto ctc = c1 * c2;
assert (approxEqual(abs(ctc), abs(c1)*abs(c2), EPS));
assert (approxEqual(arg(ctc), arg(c1)+arg(c2), EPS));
auto cdc = c1 / c2;
assert (approxEqual(abs(cdc), abs(c1)/abs(c2), EPS));
assert (approxEqual(arg(cdc), arg(c1)-arg(c2), EPS));
auto cec = c1^^c2;
assert (approxEqual(cec.re, 0.11524131979943839881, EPS));
assert (approxEqual(cec.im, 0.21870790452746026696, EPS));
// Check complex-real operations.
double a = 123.456;
auto cpr = c1 + a;
assert (cpr.re == c1.re + a);
assert (cpr.im == c1.im);
auto cmr = c1 - a;
assert (cmr.re == c1.re - a);
assert (cmr.im == c1.im);
auto ctr = c1 * a;
assert (ctr.re == c1.re*a);
assert (ctr.im == c1.im*a);
auto cdr = c1 / a;
assert (approxEqual(abs(cdr), abs(c1)/a, EPS));
assert (approxEqual(arg(cdr), arg(c1), EPS));
auto cer = c1^^3.0;
assert (approxEqual(abs(cer), abs(c1)^^3, EPS));
assert (approxEqual(arg(cer), arg(c1)*3, EPS));
auto rpc = a + c1;
assert (rpc == cpr);
auto rmc = a - c1;
assert (rmc.re == a-c1.re);
assert (rmc.im == -c1.im);
auto rtc = a * c1;
assert (rtc == ctr);
auto rdc = a / c1;
assert (approxEqual(abs(rdc), a/abs(c1), EPS));
assert (approxEqual(arg(rdc), -arg(c1), EPS));
auto rec1a = 1.0 ^^ c1;
assert(rec1a.re == 1.0);
assert(rec1a.im == 0.0);
auto rec2a = 1.0 ^^ c2;
assert(rec2a.re == 1.0);
assert(rec2a.im == 0.0);
auto rec1b = (-1.0) ^^ c1;
assert(approxEqual(abs(rec1b), std.math.exp(-PI * c1.im), EPS));
auto arg1b = arg(rec1b);
/* The argument _should_ be PI, but floating-point rounding error
* means that in fact the imaginary part is very slightly negative.
*/
assert(approxEqual(arg1b, PI, EPS) || approxEqual(arg1b, -PI, EPS));
auto rec2b = (-1.0) ^^ c2;
assert(approxEqual(abs(rec2b), std.math.exp(-2 * PI), EPS));
assert(approxEqual(arg(rec2b), PI_2, EPS));
auto rec3a = 0.79 ^^ complex(6.8, 5.7);
auto rec3b = complex(0.79, 0.0) ^^ complex(6.8, 5.7);
assert(approxEqual(rec3a.re, rec3b.re, EPS));
assert(approxEqual(rec3a.im, rec3b.im, EPS));
auto rec4a = (-0.79) ^^ complex(6.8, 5.7);
auto rec4b = complex(-0.79, 0.0) ^^ complex(6.8, 5.7);
assert(approxEqual(rec4a.re, rec4b.re, EPS));
assert(approxEqual(rec4a.im, rec4b.im, EPS));
auto rer = a ^^ complex(2.0, 0.0);
auto rcheck = a ^^ 2.0;
static assert(is(typeof(rcheck) == double));
assert(feqrel(rer.re, rcheck) == double.mant_dig);
assert(isIdentical(rer.re, rcheck));
assert(rer.im == 0.0);
auto rer2 = (-a) ^^ complex(2.0, 0.0);
rcheck = (-a) ^^ 2.0;
assert(feqrel(rer2.re, rcheck) == double.mant_dig);
assert(isIdentical(rer2.re, rcheck));
assert(approxEqual(rer2.im, 0.0, EPS));
auto rer3 = (-a) ^^ complex(-2.0, 0.0);
rcheck = (-a) ^^ (-2.0);
assert(feqrel(rer3.re, rcheck) == double.mant_dig);
assert(isIdentical(rer3.re, rcheck));
assert(approxEqual(rer3.im, 0.0, EPS));
auto rer4 = a ^^ complex(-2.0, 0.0);
rcheck = a ^^ (-2.0);
assert(feqrel(rer4.re, rcheck) == double.mant_dig);
assert(isIdentical(rer4.re, rcheck));
assert(rer4.im == 0.0);
// Check Complex-int operations.
foreach (i; 0..6)
{
auto cei = c1^^i;
assert (approxEqual(abs(cei), abs(c1)^^i, EPS));
// Use cos() here to deal with arguments that go outside
// the (-pi,pi] interval (only an issue for i>3).
assert (approxEqual(std.math.cos(arg(cei)), std.math.cos(arg(c1)*i), EPS));
}
// Check operations between different complex types.
auto cf = Complex!float(1.0, 1.0);
auto cr = Complex!real(1.0, 1.0);
auto c1pcf = c1 + cf;
auto c1pcr = c1 + cr;
static assert (is(typeof(c1pcf) == Complex!double));
static assert (is(typeof(c1pcr) == Complex!real));
assert (c1pcf.re == c1pcr.re);
assert (c1pcf.im == c1pcr.im);
}
unittest
{
// Initialization
Complex!double a = 1;
assert (a.re == 1 && a.im == 0);
Complex!double b = 1.0;
assert (b.re == 1.0 && b.im == 0);
Complex!double c = Complex!real(1.0, 2);
assert (c.re == 1.0 && c.im == 2);
}
unittest
{
// Assignments and comparisons
Complex!double z;
z = 1;
assert (z == 1);
assert (z.re == 1.0 && z.im == 0.0);
z = 2.0;
assert (z == 2.0);
assert (z.re == 2.0 && z.im == 0.0);
z = 1.0L;
assert (z == 1.0L);
assert (z.re == 1.0 && z.im == 0.0);
auto w = Complex!real(1.0, 1.0);
z = w;
assert (z == w);
assert (z.re == 1.0 && z.im == 1.0);
auto c = Complex!float(2.0, 2.0);
z = c;
assert (z == c);
assert (z.re == 2.0 && z.im == 2.0);
}
/* Makes Complex!(Complex!T) fold to Complex!T.
The rationale for this is that just like the real line is a
subspace of the complex plane, the complex plane is a subspace
of itself. Example of usage:
---
Complex!T addI(T)(T x)
{
return x + Complex!T(0.0, 1.0);
}
---
The above will work if T is both real and complex.
*/
template Complex(T) if (is(T R == Complex!R))
{
alias Complex = T;
}
unittest
{
static assert (is(Complex!(Complex!real) == Complex!real));
Complex!T addI(T)(T x)
{
return x + Complex!T(0.0, 1.0);
}
auto z1 = addI(1.0);
assert (z1.re == 1.0 && z1.im == 1.0);
enum one = Complex!double(1.0, 0.0);
auto z2 = addI(one);
assert (z1 == z2);
}
/** Calculates the absolute value (or modulus) of a complex number. */
T abs(T)(Complex!T z) @safe pure nothrow @nogc
{
import std.math : hypot;
return hypot(z.re, z.im);
}
unittest
{
assert (abs(complex(1.0)) == 1.0);
assert (abs(complex(0.0, 1.0)) == 1.0);
assert (abs(complex(1.0L, -2.0L)) == std.math.sqrt(5.0L));
}
/++
Calculates the squared modulus of a complex number.
For genericity, if called on a real number, $(D sqAbs) returns its square.
+/
T sqAbs(T)(Complex!T z) @safe pure nothrow @nogc
{
return z.re*z.re + z.im*z.im;
}
unittest
{
import std.math;
assert (sqAbs(complex(0.0)) == 0.0);
assert (sqAbs(complex(1.0)) == 1.0);
assert (sqAbs(complex(0.0, 1.0)) == 1.0);
assert (approxEqual(sqAbs(complex(1.0L, -2.0L)), 5.0L));
assert (approxEqual(sqAbs(complex(-3.0L, 1.0L)), 10.0L));
assert (approxEqual(sqAbs(complex(1.0f,-1.0f)), 2.0f));
}
/// ditto
T sqAbs(T)(T x) @safe pure nothrow @nogc
if (isFloatingPoint!T)
{
return x*x;
}
unittest
{
import std.math;
assert (sqAbs(0.0) == 0.0);
assert (sqAbs(-1.0) == 1.0);
assert (approxEqual(sqAbs(-3.0L), 9.0L));
assert (approxEqual(sqAbs(-5.0f), 25.0f));
}
/** Calculates the argument (or phase) of a complex number. */
T arg(T)(Complex!T z) @safe pure nothrow @nogc
{
import std.math : atan2;
return atan2(z.im, z.re);
}
unittest
{
import std.math;
assert (arg(complex(1.0)) == 0.0);
assert (arg(complex(0.0L, 1.0L)) == PI_2);
assert (arg(complex(1.0L, 1.0L)) == PI_4);
}
/** Returns the complex conjugate of a complex number. */
Complex!T conj(T)(Complex!T z) @safe pure nothrow @nogc
{
return Complex!T(z.re, -z.im);
}
unittest
{
assert (conj(complex(1.0)) == complex(1.0));
assert (conj(complex(1.0, 2.0)) == complex(1.0, -2.0));
}
/** Constructs a complex number given its absolute value and argument. */
Complex!(CommonType!(T, U)) fromPolar(T, U)(T modulus, U argument)
@safe pure nothrow @nogc
{
return Complex!(CommonType!(T,U))
(modulus*std.math.cos(argument), modulus*std.math.sin(argument));
}
unittest
{
import std.math;
auto z = fromPolar(std.math.sqrt(2.0), PI_4);
assert (approxEqual(z.re, 1.0L, real.epsilon));
assert (approxEqual(z.im, 1.0L, real.epsilon));
}
/** Trigonometric functions. */
Complex!T sin(T)(Complex!T z) @safe pure nothrow @nogc
{
import std.math : expi, coshisinh;
auto cs = expi(z.re);
auto csh = coshisinh(z.im);
return typeof(return)(cs.im * csh.re, cs.re * csh.im);
}
unittest
{
assert(sin(complex(0.0)) == 0.0);
assert(sin(complex(2.0L, 0)) == std.math.sin(2.0L));
}
/// ditto
Complex!T cos(T)(Complex!T z) @safe pure nothrow @nogc
{
import std.math : expi, coshisinh;
auto cs = expi(z.re);
auto csh = coshisinh(z.im);
return typeof(return)(cs.re * csh.re, - cs.im * csh.im);
}
unittest{
import std.math;
import std.complex;
assert(cos(complex(0.0)) == 1.0);
assert(cos(complex(1.3L)) == std.math.cos(1.3L));
assert(cos(complex(0, 5.2L)) == cosh(5.2L));
}
/** Calculates cos(y) + i sin(y).
Note:
$(D expi) is included here for convenience and for easy migration of code
that uses $(XREF math,_expi). Unlike $(XREF math,_expi), which uses the
x87 $(I fsincos) instruction when possible, this function is no faster
than calculating cos(y) and sin(y) separately.
*/
Complex!real expi(real y) @trusted pure nothrow @nogc
{
import std.math : cos, sin;
return Complex!real(cos(y), sin(y));
}
unittest
{
assert(expi(1.3e5L) == complex(std.math.cos(1.3e5L), std.math.sin(1.3e5L)));
assert(expi(0.0L) == 1.0L);
auto z1 = expi(1.234);
auto z2 = std.math.expi(1.234);
assert(z1.re == z2.re && z1.im == z2.im);
}
/** Square root. */
Complex!T sqrt(T)(Complex!T z) @safe pure nothrow @nogc
{
import std.math : fabs;
typeof(return) c;
real x,y,w,r;
if (z == 0)
{
c = typeof(return)(0, 0);
}
else
{
real z_re = z.re;
real z_im = z.im;
x = fabs(z_re);
y = fabs(z_im);
if (x >= y)
{
r = y / x;
w = std.math.sqrt(x)
* std.math.sqrt(0.5 * (1 + std.math.sqrt(1 + r * r)));
}
else
{
r = x / y;
w = std.math.sqrt(y)
* std.math.sqrt(0.5 * (r + std.math.sqrt(1 + r * r)));
}
if (z_re >= 0)
{
c = typeof(return)(w, z_im / (w + w));
}
else
{
if (z_im < 0)
w = -w;
c = typeof(return)(z_im / (w + w), w);
}
}
return c;
}
unittest
{
assert (sqrt(complex(0.0)) == 0.0);
assert (sqrt(complex(1.0L, 0)) == std.math.sqrt(1.0L));
assert (sqrt(complex(-1.0L, 0)) == complex(0, 1.0L));
}
// Issue 10881: support %f formatting of complex numbers
unittest
{
import std.format : format;
auto x = complex(1.2, 3.4);
assert(format("%.2f", x) == "1.20+3.40i");
auto y = complex(1.2, -3.4);
assert(format("%.2f", y) == "1.20-3.40i");
}
unittest
{
// Test wide string formatting
import std.format;
wstring wformat(T)(string format, Complex!T c)
{
import std.array : appender;
auto w = appender!wstring();
auto n = formattedWrite(w, format, c);
return w.data;
}
auto x = complex(1.2, 3.4);
assert(wformat("%.2f", x) == "1.20+3.40i"w);
}
unittest
{
// Test ease of use (vanilla toString() should be supported)
assert(complex(1.2, 3.4).toString() == "1.2+3.4i");
}
|
D
|
instance Mod_548_NONE_Canthar_NW (Npc_Default)
{
// ------ NSC ------
name = "Canthar";
guild = GIL_DMT;
id = 548;
voice = 0;
flags = 2;
npctype = NPCTYPE_MAIN;
// ------ AIVARS ------
aivar[AIV_ToughGuy] = TRUE;
aivar[AIV_ToughGuyNewsOverride] = TRUE;
aivar[AIV_IGNORE_Murder] = TRUE;
aivar[AIV_IGNORE_Theft] = TRUE;
aivar[AIV_IGNORE_Sheepkiller] = TRUE;
// ------ Attribute ------
B_SetAttributesToChapter (self, 3);
// ------ Kampf-Taktik ------
fight_tactic = FAI_HUMAN_STRONG;
// ------ Equippte Waffen ------
EquipItem (self, ItMw_2H_Eminem_Goldschwert_01);
// ------ Inventory ------
CreateInvItems (self, ItMi_Gold, 50);
CreateInvItems (self, ItKe_Canthar, 1);
// ------ visuals ------
B_SetNpcVisual (self, MALE, "Hum_Head_Bald", Face_N_Weak_Orry, BodyTex_N, ITAR_Vlk_M);
Mdl_SetModelFatness (self,1.8);
Mdl_ApplyOverlayMds (self, "Humans_Arrogance.mds");
// ------ NSC-relevante Talente vergeben ------
B_GiveNpcTalents (self);
// ------ Kampf-Talente ------
B_SetFightSkills (self, 50);
// ------ TA anmelden ------
daily_routine = Rtn_Start_548;
};
FUNC VOID Rtn_Start_548()
{
TA_Sit_Bench (07,45,19,45,"NW_CITY_MERCHANT_PATH_30");
TA_Sleep (19,45,07,45,"NW_CITY_HOTEL_BED_01");
};
FUNC VOID Rtn_WaitForPlayer_548()
{
TA_Smoke_Joint (07,45,19,45,"NW_CITY_MERCHANT_PATH_30");
TA_Sleep (19,45,07,45,"NW_CITY_HOTEL_BED_01");
};
FUNC VOID Rtn_Fleeing_548()
{
TA_FleeToWP (07,00,23,00,"BIGFARM");
TA_FleeToWP (23,00,07,00,"BIGFARM");
};
FUNC VOID Rtn_Tot_548()
{
TA_Stand_ArmsCrossed (07,00,23,00,"NW_CANTHARINSEL_27");
TA_Stand_ArmsCrossed (23,00,07,00,"NW_CANTHARINSEL_27");
};
|
D
|
/home/lqschool/git/x86OS/target/x86_64-blog_os/debug/libx86OS.a: /home/lqschool/git/x86OS/src/memory/paging/mod.rs /home/lqschool/git/x86OS/src/memory/init.rs /home/lqschool/git/x86OS/src/memory/mod.rs /home/lqschool/git/x86OS/src/memory/paging/temporary_page.rs /home/lqschool/git/x86OS/src/memory/paging/mapper.rs /home/lqschool/git/x86OS/src/vga_buffer.rs /home/lqschool/git/x86OS/src/memory/area_frame_allocator.rs /home/lqschool/git/x86OS/src/memory/paging/entry.rs /home/lqschool/git/x86OS/src/memory/paging/table.rs /home/lqschool/git/x86OS/src/memory/heap_allocator.rs /home/lqschool/git/x86OS/src/lib.rs
|
D
|
/*****************************************************************************
*
* Higgs JavaScript Virtual Machine
*
* This file is part of the Higgs project. The project is distributed at:
* https://github.com/maximecb/Higgs
*
* Copyright (c) 2012-2013, Maxime Chevalier-Boisvert. All rights reserved.
*
* This software is licensed under the following license (Modified BSD
* License):
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
module jit.util;
import std.stdio;
import std.string;
import std.array;
import std.stdint;
import std.conv;
import std.typecons;
import options;
import ir.ir;
import runtime.vm;
import runtime.object;
import jit.codeblock;
import jit.x86;
import jit.jit;
/**
Create a relative 32-bit jump to a code fragment
*/
void writeJcc32Ref(string mnem, opcode...)(
CodeBlock as,
VM vm,
CodeFragment frag,
size_t targetIdx = size_t.max
)
{
// Write an ASM comment
if (opts.jit_genasm)
as.writeASM(mnem, frag.getName);
as.writeBytes(opcode);
vm.addFragRef(as.getWritePos(), 32, frag, targetIdx);
as.writeInt(0, 32);
}
/// 32-bit relative jumps with fragment references
alias writeJcc32Ref!("ja" , 0x0F, 0x87) ja32Ref;
alias writeJcc32Ref!("jae" , 0x0F, 0x83) jae32Ref;
alias writeJcc32Ref!("jb" , 0x0F, 0x82) jb32Ref;
alias writeJcc32Ref!("jbe" , 0x0F, 0x86) jbe32Ref;
alias writeJcc32Ref!("jc" , 0x0F, 0x82) jc32Ref;
alias writeJcc32Ref!("je" , 0x0F, 0x84) je32Ref;
alias writeJcc32Ref!("jg" , 0x0F, 0x8F) jg32Ref;
alias writeJcc32Ref!("jge" , 0x0F, 0x8D) jge32Ref;
alias writeJcc32Ref!("jl" , 0x0F, 0x8C) jl32Ref;
alias writeJcc32Ref!("jle" , 0x0F, 0x8E) jle32Ref;
alias writeJcc32Ref!("jna" , 0x0F, 0x86) jna32Ref;
alias writeJcc32Ref!("jnae", 0x0F, 0x82) jnae32Ref;
alias writeJcc32Ref!("jnb" , 0x0F, 0x83) jnb32Ref;
alias writeJcc32Ref!("jnbe", 0x0F, 0x87) jnbe32Ref;
alias writeJcc32Ref!("jnc" , 0x0F, 0x83) jnc32Ref;
alias writeJcc32Ref!("jne" , 0x0F, 0x85) jne32Ref;
alias writeJcc32Ref!("jng" , 0x0F, 0x8E) jng32Ref;
alias writeJcc32Ref!("jnge", 0x0F, 0x8C) jnge32Ref;
alias writeJcc32Ref!("jnl" , 0x0F, 0x8D) jnl32Ref;
alias writeJcc32Ref!("jnle", 0x0F, 0x8F) jnle32Ref;
alias writeJcc32Ref!("jno" , 0x0F, 0x81) jno32Ref;
alias writeJcc32Ref!("jnp" , 0x0F, 0x8b) jnp32Ref;
alias writeJcc32Ref!("jns" , 0x0F, 0x89) jns32Ref;
alias writeJcc32Ref!("jnz" , 0x0F, 0x85) jnz32Ref;
alias writeJcc32Ref!("jo" , 0x0F, 0x80) jo32Ref;
alias writeJcc32Ref!("jp" , 0x0F, 0x8A) jp32Ref;
alias writeJcc32Ref!("jpe" , 0x0F, 0x8A) jpe32Ref;
alias writeJcc32Ref!("jpo" , 0x0F, 0x8B) jpo32Ref;
alias writeJcc32Ref!("js" , 0x0F, 0x88) js32Ref;
alias writeJcc32Ref!("jz" , 0x0F, 0x84) jz32Ref;
alias writeJcc32Ref!("jmp" , 0xE9) jmp32Ref;
/**
Move an absolute reference to a fragment's address into a register
*/
void movAbsRef(
CodeBlock as,
VM vm,
X86Reg dstReg,
CodeFragment frag,
size_t targetIdx = size_t.max
)
{
if (opts.jit_genasm)
as.writeASM("mov", dstReg, frag.getName);
as.mov(dstReg.opnd(64), X86Opnd(uint64_t.max));
vm.addFragRef(as.getWritePos() - 8, 64, frag, targetIdx);
}
/// Load a pointer constant into a register
void ptr(TPtr)(CodeBlock as, X86Reg dstReg, TPtr ptr)
{
as.mov(X86Opnd(dstReg), X86Opnd(X86Imm(cast(void*)ptr)));
}
/// Increment a global JIT stat counter variable
void incStatCnt(CodeBlock as, ulong* pCntVar, X86Reg scrReg)
{
if (!opts.stats)
return;
as.ptr(scrReg, pCntVar);
as.inc(X86Opnd(8 * ulong.sizeof, RAX));
}
void getField(CodeBlock as, X86Reg dstReg, X86Reg baseReg, size_t fOffset)
{
assert (dstReg.type is X86Reg.GP);
as.mov(X86Opnd(dstReg), X86Opnd(dstReg.size, baseReg, cast(int32_t)fOffset));
}
void setField(CodeBlock as, X86Reg baseReg, size_t fOffset, X86Reg srcReg)
{
assert (srcReg.type is X86Reg.GP);
as.mov(X86Opnd(srcReg.size, baseReg, cast(int32_t)fOffset), X86Opnd(srcReg));
}
X86Opnd memberOpnd(string fName)(X86Reg baseReg)
{
const auto elems = split(fName, ".");
size_t fOffset;
static if (elems.length is 3)
{
mixin(format(
"const e1Type = typeof(%s.%s).stringof;", elems[0], elems[1]
));
mixin(format(
"fOffset = %s.%s.offsetof + %s.%s.offsetof;",
elems[0], elems[1],
e1Type, elems[2]
));
}
else if (elems.length is 2)
{
mixin(format(
"fOffset = %s.%s.offsetof;",
elems[0], elems[1]
));
}
else
{
assert (false);
}
mixin("auto fSize = " ~ fName ~ ".sizeof;");
return X86Opnd(fSize * 8, baseReg, cast(int32_t)fOffset);
}
void getMember(string fName)(CodeBlock as, X86Reg dstReg, X86Reg baseReg)
{
as.mov(X86Opnd(dstReg), memberOpnd!fName(baseReg));
}
void setMember(string fName)(CodeBlock as, X86Reg baseReg, X86Reg srcReg)
{
as.mov(memberOpnd!fName(baseReg), X86Opnd(srcReg));
}
/// Read from the word stack
void getWord(CodeBlock as, X86Reg dstReg, int32_t idx)
{
if (dstReg.type is X86Reg.GP)
as.mov(X86Opnd(dstReg), X86Opnd(dstReg.size, wspReg, 8 * idx));
else if (dstReg.type is X86Reg.XMM)
as.movsd(X86Opnd(dstReg), X86Opnd(64, wspReg, 8 * idx));
else
assert (false, "unsupported register type");
}
/// Read from the type stack
void getType(CodeBlock as, X86Reg dstReg, int32_t idx)
{
as.mov(X86Opnd(dstReg), X86Opnd(8, tspReg, idx));
}
/// Write to the word stack
void setWord(CodeBlock as, int32_t idx, X86Opnd src)
{
auto memOpnd = X86Opnd(64, wspReg, 8 * idx);
if (src.isGPR)
as.mov(memOpnd, src);
else if (src.isXMM)
as.movsd(memOpnd, src);
else if (src.isImm)
as.mov(memOpnd, src);
else
assert (false, "unsupported src operand type");
}
// Write a constant to the word type
void setWord(CodeBlock as, int32_t idx, int32_t imm)
{
as.mov(X86Opnd(64, wspReg, 8 * idx), X86Opnd(imm));
}
/// Write to the type stack
void setType(CodeBlock as, int32_t idx, X86Opnd srcOpnd)
{
as.mov(X86Opnd(8, tspReg, idx), srcOpnd);
}
/// Write a constant to the type stack
void setType(CodeBlock as, int32_t idx, Type type)
{
as.mov(X86Opnd(8, tspReg, idx), X86Opnd(type));
}
/// Store/save the JIT state register
void pushJITRegs(CodeBlock as)
{
// Save word and type stack pointers on the VM object
as.setMember!("VM.wsp")(vmReg, wspReg);
as.setMember!("VM.tsp")(vmReg, tspReg);
// Push the VM register on the stack
as.push(vmReg);
as.push(vmReg);
}
// Load/restore the JIT state registers
void popJITRegs(CodeBlock as)
{
// Pop the VM register from the stack
as.pop(vmReg);
as.pop(vmReg);
// Load the word and type stack pointers from the VM object
as.getMember!("VM.wsp")(wspReg, vmReg);
as.getMember!("VM.tsp")(tspReg, vmReg);
}
/// Save caller-save registers on the stack before a C call
void pushRegs(CodeBlock as)
{
as.push(RAX);
as.push(RCX);
as.push(RDX);
as.push(RSI);
as.push(RDI);
as.push(R8);
as.push(R9);
as.push(R10);
as.push(R11);
as.pushfq();
}
/// Restore caller-save registers from the after before a C call
void popRegs(CodeBlock as)
{
as.popfq();
as.pop(R11);
as.pop(R10);
as.pop(R9);
as.pop(R8);
as.pop(RDI);
as.pop(RSI);
as.pop(RDX);
as.pop(RCX);
as.pop(RAX);
}
void printUint(CodeBlock as, X86Opnd opnd)
{
extern (C) void printUintFn(uint64_t v)
{
writefln("%s", v);
}
size_t opndSz;
if (opnd.isImm)
opndSz = 64;
else if (opnd.isGPR)
opndSz = opnd.reg.size;
else if (opnd.isMem)
opndSz = opnd.mem.size;
else
assert (false, "invalid opnd in printUint: " ~ opnd.toString);
as.pushRegs();
if (opndSz is 32)
as.mov(cargRegs[0].opnd(32), opnd);
else if (opndSz < 32)
as.movzx(cargRegs[0].opnd(64), opnd);
else
as.mov(cargRegs[0].opnd(opndSz), opnd);
// Call the print function
as.ptr(scrRegs[0], &printUintFn);
as.call(scrRegs[0]);
as.popRegs();
}
void printInt(CodeBlock as, X86Opnd opnd)
{
extern (C) void printIntFn(int64_t v)
{
writefln("%s", v);
}
size_t opndSz;
if (opnd.isImm)
opndSz = 64;
else if (opnd.isGPR)
opndSz = opnd.reg.size;
else if (opnd.isMem)
opndSz = opnd.mem.size;
else
assert (false);
as.pushRegs();
if (opndSz < 64)
as.movsx(cargRegs[0].opnd(64), opnd);
else
as.mov(cargRegs[0].opnd(64), opnd);
// Call the print function
as.ptr(scrRegs[0], &printIntFn);
as.call(scrRegs[0]);
as.popRegs();
}
void printStr(CodeBlock as, string str)
{
extern (C) static void printStrFn(char* pStr)
{
printf("%s\n", pStr);
}
as.comment("printStr(\"" ~ str ~ "\")");
as.pushRegs();
// Load the string address and jump over the string data
as.lea(cargRegs[0], X86Mem(8, RIP, 5));
as.jmp32(cast(int32_t)str.length + 1);
// Write the string chars and a null terminator
foreach (ch; str)
as.writeInt(cast(uint)ch, 8);
as.writeInt(0, 8);
as.ptr(scrRegs[0], &printStrFn);
as.call(scrRegs[0].opnd(64));
as.popRegs();
}
void printStack(CodeBlock as, CallCtx ctx)
{
extern (C) static void printStackFn(CallCtx ctx)
{
auto vm = ctx.vm;
vm.setCallCtx(ctx);
vm.visitStack(
delegate void(
IRFunction fun,
Word* wsp,
Type* tsp,
size_t depth,
size_t frameSize,
IRInstr callInstr
)
{
writeln(fun.getName);
}
);
vm.setCallCtx(null);
}
as.comment("printStack()");
as.pushRegs();
as.pushJITRegs();
as.ptr(cargRegs[0], ctx);
as.ptr(scrRegs[0], &printStackFn);
as.call(scrRegs[0].opnd(64));
as.popJITRegs();
as.popRegs();
}
|
D
|
/Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Build/Intermediates.noindex/IBDesignables/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FTPopOverMenu_Swift.build/Objects-normal/x86_64/FTConfiguration.o : /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/UIScreen+Frame.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTPopOverMenuCell.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FT+Extension.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTConfiguration.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTCellConfiguration.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTConstants.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/UIControl+Point.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTPopOverMenu.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.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/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/Target\ Support\ Files/FTPopOverMenu_Swift/FTPopOverMenu_Swift-umbrella.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/dyld.modulemap /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Build/Intermediates.noindex/IBDesignables/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FTPopOverMenu_Swift.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Build/Intermediates.noindex/IBDesignables/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FTPopOverMenu_Swift.build/Objects-normal/x86_64/FTConfiguration~partial.swiftmodule : /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/UIScreen+Frame.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTPopOverMenuCell.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FT+Extension.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTConfiguration.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTCellConfiguration.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTConstants.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/UIControl+Point.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTPopOverMenu.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.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/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/Target\ Support\ Files/FTPopOverMenu_Swift/FTPopOverMenu_Swift-umbrella.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/dyld.modulemap /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Build/Intermediates.noindex/IBDesignables/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FTPopOverMenu_Swift.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Build/Intermediates.noindex/IBDesignables/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FTPopOverMenu_Swift.build/Objects-normal/x86_64/FTConfiguration~partial.swiftdoc : /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/UIScreen+Frame.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTPopOverMenuCell.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FT+Extension.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTConfiguration.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTCellConfiguration.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTConstants.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/UIControl+Point.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTPopOverMenu.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.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/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/Target\ Support\ Files/FTPopOverMenu_Swift/FTPopOverMenu_Swift-umbrella.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/dyld.modulemap /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Build/Intermediates.noindex/IBDesignables/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FTPopOverMenu_Swift.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Build/Intermediates.noindex/IBDesignables/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FTPopOverMenu_Swift.build/Objects-normal/x86_64/FTConfiguration~partial.swiftsourceinfo : /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/UIScreen+Frame.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTPopOverMenuCell.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FT+Extension.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTConfiguration.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTCellConfiguration.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTConstants.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/UIControl+Point.swift /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/FTPopOverMenu_Swift/FTPopOverMenu_Swift/FTPopOverMenu.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.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/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Pods/Target\ Support\ Files/FTPopOverMenu_Swift/FTPopOverMenu_Swift-umbrella.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/dyld.modulemap /Users/anusoft/Downloads/caddiecards_Xcode12-master-2/Build/Intermediates.noindex/IBDesignables/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FTPopOverMenu_Swift.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
/// This module has been automatically generated.
module tcod.c.functions;
import core.runtime : Runtime;
import std.algorithm.iteration : map;
import std.path : dirName, dirSeparator;
import std.range : array;
import std.string: join, toStringz;
import derelict.util.loader;
import derelict.util.system;
import tcod.c.all;
import tcod.c.types;
extern(C) @nogc nothrow {
alias da_TCOD_bsp_contains = bool function(TCOD_bsp_t*, int, int);
alias da_TCOD_bsp_delete = void function(TCOD_bsp_t*);
alias da_TCOD_bsp_father = TCOD_bsp_t* function(TCOD_bsp_t*);
alias da_TCOD_bsp_find_node = TCOD_bsp_t* function(TCOD_bsp_t*, int, int);
alias da_TCOD_bsp_is_leaf = bool function(TCOD_bsp_t*);
alias da_TCOD_bsp_left = TCOD_bsp_t* function(TCOD_bsp_t*);
alias da_TCOD_bsp_new = TCOD_bsp_t* function();
alias da_TCOD_bsp_new_with_size = TCOD_bsp_t* function(int, int, int, int);
alias da_TCOD_bsp_remove_sons = void function(TCOD_bsp_t*);
alias da_TCOD_bsp_resize = void function(TCOD_bsp_t*, int, int, int, int);
alias da_TCOD_bsp_right = TCOD_bsp_t* function(TCOD_bsp_t*);
alias da_TCOD_bsp_split_once = void function(TCOD_bsp_t*, bool, int);
alias da_TCOD_bsp_split_recursive = void function(TCOD_bsp_t*, TCOD_random_t, int, int, int, float, float);
alias da_TCOD_bsp_traverse_in_order = bool function(TCOD_bsp_t*, TCOD_bsp_callback_t, void*);
alias da_TCOD_bsp_traverse_inverted_level_order = bool function(TCOD_bsp_t*, TCOD_bsp_callback_t, void*);
alias da_TCOD_bsp_traverse_level_order = bool function(TCOD_bsp_t*, TCOD_bsp_callback_t, void*);
alias da_TCOD_bsp_traverse_post_order = bool function(TCOD_bsp_t*, TCOD_bsp_callback_t, void*);
alias da_TCOD_bsp_traverse_pre_order = bool function(TCOD_bsp_t*, TCOD_bsp_callback_t, void*);
alias da_TCOD_close_library = void function(TCOD_library_t);
alias da_TCOD_color_HSV = TCOD_color_t function(float, float, float);
alias da_TCOD_color_RGB = TCOD_color_t function(uint8, uint8, uint8);
alias da_TCOD_color_add = TCOD_color_t function(TCOD_color_t, TCOD_color_t);
alias da_TCOD_color_equals = bool function(TCOD_color_t, TCOD_color_t);
alias da_TCOD_color_gen_map = void function(TCOD_color_t*, int, const TCOD_color_t*, const int*);
alias da_TCOD_color_get_HSV = void function(TCOD_color_t, float*, float*, float*);
alias da_TCOD_color_get_hue = float function(TCOD_color_t);
alias da_TCOD_color_get_saturation = float function(TCOD_color_t);
alias da_TCOD_color_get_value = float function(TCOD_color_t);
alias da_TCOD_color_lerp = TCOD_color_t function(TCOD_color_t, TCOD_color_t, float);
alias da_TCOD_color_multiply = TCOD_color_t function(TCOD_color_t, TCOD_color_t);
alias da_TCOD_color_multiply_scalar = TCOD_color_t function(TCOD_color_t, TCOD_color_t, float);
alias da_TCOD_color_scale_HSV = void function(TCOD_color_t*, float, float);
alias da_TCOD_color_set_HSV = void function(TCOD_color_t*, float, float, float);
alias da_TCOD_color_set_hue = void function(TCOD_color_t*, float);
alias da_TCOD_color_set_saturation = void function(TCOD_color_t*, float);
alias da_TCOD_color_set_value = void function(TCOD_color_t*, float);
alias da_TCOD_color_shift_hue = void function(TCOD_color_t*, float);
alias da_TCOD_color_subtract = TCOD_color_t function(TCOD_color_t, TCOD_color_t);
alias da_TCOD_condition_broadcast = void function(TCOD_cond_t);
alias da_TCOD_condition_delete = void function(TCOD_cond_t);
alias da_TCOD_condition_new = TCOD_cond_t function();
alias da_TCOD_condition_signal = void function(TCOD_cond_t);
alias da_TCOD_condition_wait = void function(TCOD_cond_t, TCOD_mutex_t);
alias da_TCOD_console_blit = void function(TCOD_console_t, int, int, int, int, TCOD_console_t, int, int, float, float);
alias da_TCOD_console_check_for_keypress = TCOD_key_t function(int);
alias da_TCOD_console_clear = void function(TCOD_console_t);
alias da_TCOD_console_credits = void function();
alias da_TCOD_console_credits_render = bool function(int, int, bool);
alias da_TCOD_console_credits_reset = void function();
alias da_TCOD_console_delete = void function(TCOD_console_t);
alias da_TCOD_console_disable_keyboard_repeat = void function();
alias da_TCOD_console_flush = void function();
alias da_TCOD_console_from_file = TCOD_console_t function(charptr);
alias da_TCOD_console_get_alignment = TCOD_alignment_t function(TCOD_console_t);
alias da_TCOD_console_get_background_flag = TCOD_bkgnd_flag_t function(TCOD_console_t);
alias da_TCOD_console_get_char = int function(TCOD_console_t, int, int);
alias da_TCOD_console_get_char_background = TCOD_color_t function(TCOD_console_t, int, int);
alias da_TCOD_console_get_char_foreground = TCOD_color_t function(TCOD_console_t, int, int);
alias da_TCOD_console_get_default_background = TCOD_color_t function(TCOD_console_t);
alias da_TCOD_console_get_default_foreground = TCOD_color_t function(TCOD_console_t);
alias da_TCOD_console_get_fade = ubyte function();
alias da_TCOD_console_get_fading_color = TCOD_color_t function();
alias da_TCOD_console_get_height = int function(TCOD_console_t);
alias da_TCOD_console_get_height_rect = int function(TCOD_console_t, int, int, int, int, charptr, ...);
alias da_TCOD_console_get_height_rect_utf = int function(TCOD_console_t,int, int, int, int, wchar_tptr, ...);
alias da_TCOD_console_get_width = int function(TCOD_console_t);
alias da_TCOD_console_hline = void function(TCOD_console_t, int, int, int, TCOD_bkgnd_flag_t);
alias da_TCOD_console_init_root = void function(int, int, charptr, bool, TCOD_renderer_t);
alias da_TCOD_console_is_fullscreen = bool function();
alias da_TCOD_console_is_key_pressed = bool function(TCOD_keycode_t);
alias da_TCOD_console_is_window_closed = bool function();
alias da_TCOD_console_load_apf = bool function(TCOD_console_t, charptr);
alias da_TCOD_console_load_asc = bool function(TCOD_console_t, charptr);
alias da_TCOD_console_map_ascii_code_to_font = void function(int, int, int);
alias da_TCOD_console_map_ascii_codes_to_font = void function(int, int, int, int);
alias da_TCOD_console_map_string_to_font = void function(charptr, int, int);
alias da_TCOD_console_map_string_to_font_utf = void function(wchar_tptr, int, int);
alias da_TCOD_console_new = TCOD_console_t function(int, int);
alias da_TCOD_console_print = void function(TCOD_console_t, int, int, charptr, ...);
alias da_TCOD_console_print_ex = void function(TCOD_console_t, int, int, TCOD_bkgnd_flag_t, TCOD_alignment_t, charptr, ...);
alias da_TCOD_console_print_ex_utf = void function(TCOD_console_t, int, int, TCOD_bkgnd_flag_t, TCOD_alignment_t, wchar_tptr, ...);
alias da_TCOD_console_print_frame = void function(TCOD_console_t, int, int, int, int, bool, TCOD_bkgnd_flag_t, charptr, ...);
alias da_TCOD_console_print_rect = int function(TCOD_console_t, int, int, int, int, charptr, ...);
alias da_TCOD_console_print_rect_ex = int function(TCOD_console_t, int, int, int, int, TCOD_bkgnd_flag_t, TCOD_alignment_t, charptr, ...);
alias da_TCOD_console_print_rect_ex_utf = int function(TCOD_console_t, int, int, int, int, TCOD_bkgnd_flag_t, TCOD_alignment_t, wchar_tptr, ...);
alias da_TCOD_console_print_rect_utf = int function(TCOD_console_t,int, int, int, int, wchar_tptr, ...);
alias da_TCOD_console_print_utf = void function(TCOD_console_t, int, int, wchar_tptr, ...);
alias da_TCOD_console_put_char = void function(TCOD_console_t, int, int, int, TCOD_bkgnd_flag_t);
alias da_TCOD_console_put_char_ex = void function(TCOD_console_t, int, int, int, TCOD_color_t, TCOD_color_t);
alias da_TCOD_console_rect = void function(TCOD_console_t, int, int, int, int, bool, TCOD_bkgnd_flag_t);
alias da_TCOD_console_save_apf = bool function(TCOD_console_t, charptr);
alias da_TCOD_console_save_asc = bool function(TCOD_console_t, charptr);
alias da_TCOD_console_set_alignment = void function(TCOD_console_t, TCOD_alignment_t);
alias da_TCOD_console_set_background_flag = void function(TCOD_console_t, TCOD_bkgnd_flag_t);
alias da_TCOD_console_set_char = void function(TCOD_console_t, int, int, int);
alias da_TCOD_console_set_char_background = void function(TCOD_console_t, int, int, TCOD_color_t, TCOD_bkgnd_flag_t);
alias da_TCOD_console_set_char_foreground = void function(TCOD_console_t, int, int, TCOD_color_t);
alias da_TCOD_console_set_color_control = void function(TCOD_colctrl_t, TCOD_color_t, TCOD_color_t);
alias da_TCOD_console_set_custom_font = void function(charptr, int, int, int);
alias da_TCOD_console_set_default_background = void function(TCOD_console_t, TCOD_color_t);
alias da_TCOD_console_set_default_foreground = void function(TCOD_console_t, TCOD_color_t);
alias da_TCOD_console_set_dirty = void function(int, int, int, int);
alias da_TCOD_console_set_fade = void function(ubyte, TCOD_color_t);
alias da_TCOD_console_set_fullscreen = void function(bool);
alias da_TCOD_console_set_key_color = void function(TCOD_console_t, TCOD_color_t);
alias da_TCOD_console_set_keyboard_repeat = void function(int, int);
alias da_TCOD_console_set_window_title = void function(charptr);
alias da_TCOD_console_vline = void function(TCOD_console_t, int, int, int, TCOD_bkgnd_flag_t);
alias da_TCOD_console_wait_for_keypress = TCOD_key_t function(bool);
alias da_TCOD_dijkstra_compute = void function(TCOD_dijkstra_t, int, int);
alias da_TCOD_dijkstra_delete = void function(TCOD_dijkstra_t);
alias da_TCOD_dijkstra_get = void function(TCOD_dijkstra_t, int, int*, int*);
alias da_TCOD_dijkstra_get_distance = float function(TCOD_dijkstra_t, int, int);
alias da_TCOD_dijkstra_is_empty = bool function(TCOD_dijkstra_t);
alias da_TCOD_dijkstra_new = TCOD_dijkstra_t function(TCOD_map_t, float);
alias da_TCOD_dijkstra_new_using_function = TCOD_dijkstra_t function(int, int, TCOD_path_func_t, void*, float);
alias da_TCOD_dijkstra_path_set = bool function(TCOD_dijkstra_t, int, int);
alias da_TCOD_dijkstra_path_walk = bool function(TCOD_dijkstra_t, int*, int*);
alias da_TCOD_dijkstra_reverse = void function(TCOD_dijkstra_t);
alias da_TCOD_dijkstra_size = int function(TCOD_dijkstra_t);
alias da_TCOD_get_function_address = void* function(TCOD_library_t, charptr);
alias da_TCOD_heightmap_add = void function(TCOD_heightmap_t*, float);
alias da_TCOD_heightmap_add_fbm = void function(TCOD_heightmap_t*, TCOD_noise_t, float, float, float, float, float, float, float);
alias da_TCOD_heightmap_add_hill = void function(TCOD_heightmap_t*, float, float, float, float);
alias da_TCOD_heightmap_add_hm = void function(const TCOD_heightmap_t*, const TCOD_heightmap_t*, TCOD_heightmap_t*);
alias da_TCOD_heightmap_add_voronoi = void function(TCOD_heightmap_t*, int, int, const float*, TCOD_random_t);
alias da_TCOD_heightmap_clamp = void function(TCOD_heightmap_t*, float, float);
alias da_TCOD_heightmap_clear = void function(TCOD_heightmap_t*);
alias da_TCOD_heightmap_copy = void function(const TCOD_heightmap_t*, TCOD_heightmap_t*);
alias da_TCOD_heightmap_count_cells = int function(const TCOD_heightmap_t*, float, float);
alias da_TCOD_heightmap_delete = void function(TCOD_heightmap_t*);
alias da_TCOD_heightmap_dig_bezier = void function(TCOD_heightmap_t*, int[4], int[4], float, float, float, float);
alias da_TCOD_heightmap_dig_hill = void function(TCOD_heightmap_t*, float, float, float, float);
alias da_TCOD_heightmap_get_interpolated_value = float function(const TCOD_heightmap_t*, float, float);
alias da_TCOD_heightmap_get_minmax = void function(const TCOD_heightmap_t*, float*, float*);
alias da_TCOD_heightmap_get_normal = void function(const TCOD_heightmap_t*, float, float, float[3], float);
alias da_TCOD_heightmap_get_slope = float function(const TCOD_heightmap_t*, int, int);
alias da_TCOD_heightmap_get_value = float function(const TCOD_heightmap_t*, int, int);
alias da_TCOD_heightmap_has_land_on_border = bool function(const TCOD_heightmap_t*, float);
alias da_TCOD_heightmap_islandify = void function(TCOD_heightmap_t*, float, TCOD_random_t);
alias da_TCOD_heightmap_kernel_transform = void function(TCOD_heightmap_t*, int, const int*, const int*, const float*, float, float);
alias da_TCOD_heightmap_lerp_hm = void function(const TCOD_heightmap_t*, const TCOD_heightmap_t*, TCOD_heightmap_t*, float);
alias da_TCOD_heightmap_multiply_hm = void function(const TCOD_heightmap_t*, const TCOD_heightmap_t*, TCOD_heightmap_t*);
alias da_TCOD_heightmap_new = TCOD_heightmap_t* function(int, int);
alias da_TCOD_heightmap_normalize = void function(TCOD_heightmap_t*, float, float);
alias da_TCOD_heightmap_rain_erosion = void function(TCOD_heightmap_t*, int, float, float, TCOD_random_t);
alias da_TCOD_heightmap_scale = void function(TCOD_heightmap_t*, float);
alias da_TCOD_heightmap_scale_fbm = void function(TCOD_heightmap_t*, TCOD_noise_t, float, float, float, float, float, float, float);
alias da_TCOD_heightmap_set_value = void function(TCOD_heightmap_t*, int, int, float);
alias da_TCOD_image_blit = void function(TCOD_image_t, TCOD_console_t, float, float, TCOD_bkgnd_flag_t, float, float, float);
alias da_TCOD_image_blit_2x = void function(TCOD_image_t, TCOD_console_t, int, int, int, int, int, int);
alias da_TCOD_image_blit_rect = void function(TCOD_image_t, TCOD_console_t, int, int, int, int, TCOD_bkgnd_flag_t);
alias da_TCOD_image_clear = void function(TCOD_image_t, TCOD_color_t);
alias da_TCOD_image_delete = void function(TCOD_image_t);
alias da_TCOD_image_from_console = TCOD_image_t function(TCOD_console_t);
alias da_TCOD_image_get_alpha = int function(TCOD_image_t, int, int);
alias da_TCOD_image_get_mipmap_pixel = TCOD_color_t function(TCOD_image_t, float, float, float, float);
alias da_TCOD_image_get_pixel = TCOD_color_t function(TCOD_image_t, int, int);
alias da_TCOD_image_get_size = void function(TCOD_image_t, int*, int*);
alias da_TCOD_image_hflip = void function(TCOD_image_t);
alias da_TCOD_image_invert = void function(TCOD_image_t);
alias da_TCOD_image_is_pixel_transparent = bool function(TCOD_image_t, int, int);
alias da_TCOD_image_load = TCOD_image_t function(charptr);
alias da_TCOD_image_new = TCOD_image_t function(int, int);
alias da_TCOD_image_put_pixel = void function(TCOD_image_t, int, int, TCOD_color_t);
alias da_TCOD_image_refresh_console = void function(TCOD_image_t, TCOD_console_t);
alias da_TCOD_image_rotate90 = void function(TCOD_image_t, int);
alias da_TCOD_image_save = void function(TCOD_image_t, charptr);
alias da_TCOD_image_scale = void function(TCOD_image_t, int, int);
alias da_TCOD_image_set_key_color = void function(TCOD_image_t, TCOD_color_t);
alias da_TCOD_image_vflip = void function(TCOD_image_t);
alias da_TCOD_lex_delete = void function(TCOD_lex_t*);
alias da_TCOD_lex_expect_token_type = bool function(TCOD_lex_t*, int);
alias da_TCOD_lex_expect_token_value = bool function(TCOD_lex_t*, int, charptr);
alias da_TCOD_lex_get_last_error = char* function();
alias da_TCOD_lex_get_last_javadoc = char* function(TCOD_lex_t*);
alias da_TCOD_lex_get_token_name = charptr function(int);
alias da_TCOD_lex_hextoint = int function(char);
alias da_TCOD_lex_new = TCOD_lex_t* function(charptr*, charptr*, charptr, charptr, charptr, charptr, charptr, int);
alias da_TCOD_lex_new_intern = TCOD_lex_t* function();
alias da_TCOD_lex_parse = int function(TCOD_lex_t*);
alias da_TCOD_lex_parse_until_token_type = int function(TCOD_lex_t*, int);
alias da_TCOD_lex_parse_until_token_value = int function(TCOD_lex_t*, charptr);
alias da_TCOD_lex_restore = void function(TCOD_lex_t*, TCOD_lex_t*);
alias da_TCOD_lex_savepoint = void function(TCOD_lex_t*, TCOD_lex_t*);
alias da_TCOD_lex_set_data_buffer = void function(TCOD_lex_t*, char* dat);
alias da_TCOD_lex_set_data_file = bool function(TCOD_lex_t*, charptr);
alias da_TCOD_line = bool function(int, int, int, int, TCOD_line_listener_t);
alias da_TCOD_line_init = void function(int, int, int, int);
alias da_TCOD_line_init_mt = void function(int, int, int, int, TCOD_bresenham_data_t*);
alias da_TCOD_line_mt = bool function(int, int, int, int, TCOD_line_listener_t, TCOD_bresenham_data_t*);
alias da_TCOD_line_step = bool function(int*, int*);
alias da_TCOD_line_step_mt = bool function(int*, int*, TCOD_bresenham_data_t*);
alias da_TCOD_list_add_all = void function(TCOD_list_t, TCOD_list_t);
alias da_TCOD_list_allocate = TCOD_list_t function(int);
alias da_TCOD_list_begin = void** function(TCOD_list_t);
alias da_TCOD_list_clear = void function(TCOD_list_t);
alias da_TCOD_list_clear_and_delete = void function(TCOD_list_t);
alias da_TCOD_list_contains = bool function(TCOD_list_t, void*);
alias da_TCOD_list_delete = void function(TCOD_list_t);
alias da_TCOD_list_duplicate = TCOD_list_t function(TCOD_list_t);
alias da_TCOD_list_end = void** function(TCOD_list_t);
alias da_TCOD_list_get = void* function(TCOD_list_t, int);
alias da_TCOD_list_insert_before = void** function(TCOD_list_t, void*, int);
alias da_TCOD_list_is_empty = bool function(TCOD_list_t);
alias da_TCOD_list_new = TCOD_list_t function();
alias da_TCOD_list_peek = void* function(TCOD_list_t);
alias da_TCOD_list_pop = void* function(TCOD_list_t);
alias da_TCOD_list_push = void function(TCOD_list_t, void*);
alias da_TCOD_list_remove = void function(TCOD_list_t, void*);
alias da_TCOD_list_remove_iterator = void** function(TCOD_list_t, void*);
alias da_TCOD_list_remove_iterator_fast = void** function(TCOD_list_t, void*);
alias da_TCOD_list_reverse = void function(TCOD_list_t);
alias da_TCOD_list_set = void function(TCOD_list_t, void*, int);
alias da_TCOD_list_size = int function(TCOD_list_t);
alias da_TCOD_load_library = TCOD_library_t function(charptr);
alias da_TCOD_map_clear = void function(TCOD_map_t, bool, bool);
alias da_TCOD_map_compute_fov = void function(TCOD_map_t, int, int, int, bool, TCOD_fov_algorithm_t);
alias da_TCOD_map_copy = void function(TCOD_map_t, TCOD_map_t);
alias da_TCOD_map_delete = void function(TCOD_map_t);
alias da_TCOD_map_get_height = int function(TCOD_map_t);
alias da_TCOD_map_get_nb_cells = int function(TCOD_map_t);
alias da_TCOD_map_get_width = int function(TCOD_map_t);
alias da_TCOD_map_is_in_fov = bool function(TCOD_map_t, int, int);
alias da_TCOD_map_is_transparent = bool function(TCOD_map_t, int, int);
alias da_TCOD_map_is_walkable = bool function(TCOD_map_t, int, int);
alias da_TCOD_map_new = TCOD_map_t function(int, int);
alias da_TCOD_map_set_in_fov = void function(TCOD_map_t, int, int, bool);
alias da_TCOD_map_set_properties = void function(TCOD_map_t, int, int, bool, bool);
alias da_TCOD_mouse_get_status = TCOD_mouse_t function();
alias da_TCOD_mouse_includes_touch = void function(bool);
alias da_TCOD_mouse_is_cursor_visible = bool function();
alias da_TCOD_mouse_move = void function(int, int);
alias da_TCOD_mouse_show_cursor = void function(bool);
alias da_TCOD_mutex_delete = void function(TCOD_mutex_t);
alias da_TCOD_mutex_in = void function(TCOD_mutex_t);
alias da_TCOD_mutex_new = TCOD_mutex_t function();
alias da_TCOD_mutex_out = void function(TCOD_mutex_t);
alias da_TCOD_namegen_destroy = void function();
alias da_TCOD_namegen_generate = charptr function(charptr, bool);
alias da_TCOD_namegen_generate_custom = charptr function(charptr, charptr, bool);
alias da_TCOD_namegen_get_sets = TCOD_list_t function();
alias da_TCOD_namegen_parse = void function(charptr, TCOD_random_t);
alias da_TCOD_noise_delete = void function(TCOD_noise_t);
alias da_TCOD_noise_get = float function(TCOD_noise_t, float*);
alias da_TCOD_noise_get_ex = float function(TCOD_noise_t, float*, TCOD_noise_type_t);
alias da_TCOD_noise_get_fbm = float function(TCOD_noise_t, float*, float);
alias da_TCOD_noise_get_fbm_ex = float function(TCOD_noise_t, float*, float, TCOD_noise_type_t);
alias da_TCOD_noise_get_turbulence = float function(TCOD_noise_t, float*, float);
alias da_TCOD_noise_get_turbulence_ex = float function(TCOD_noise_t, float*, float, TCOD_noise_type_t);
alias da_TCOD_noise_new = TCOD_noise_t function(int, float, float, TCOD_random_t);
alias da_TCOD_noise_set_type = void function(TCOD_noise_t, TCOD_noise_type_t);
alias da_TCOD_parse_bool_value = TCOD_value_t function();
alias da_TCOD_parse_char_value = TCOD_value_t function();
alias da_TCOD_parse_color_value = TCOD_value_t function();
alias da_TCOD_parse_dice_value = TCOD_value_t function();
alias da_TCOD_parse_float_value = TCOD_value_t function();
alias da_TCOD_parse_integer_value = TCOD_value_t function();
alias da_TCOD_parse_property_value = TCOD_value_t function(TCOD_parser_int_t*, TCOD_parser_struct_t, charptr, bool);
alias da_TCOD_parse_string_value = TCOD_value_t function();
alias da_TCOD_parse_value_list_value = TCOD_value_t function(TCOD_struct_int_t*, int);
alias da_TCOD_parser_delete = void function(TCOD_parser_t);
alias da_TCOD_parser_error = void function(charptr, ...);
alias da_TCOD_parser_get_bool_property = bool function(TCOD_parser_t, charptr);
alias da_TCOD_parser_get_char_property = int function(TCOD_parser_t, charptr);
alias da_TCOD_parser_get_color_property = TCOD_color_t function(TCOD_parser_t, charptr);
alias da_TCOD_parser_get_custom_property = void* function(TCOD_parser_t, charptr);
alias da_TCOD_parser_get_dice_property = TCOD_dice_t function(TCOD_parser_t, charptr);
alias da_TCOD_parser_get_dice_property_py = void function(TCOD_parser_t, charptr, TCOD_dice_t*);
alias da_TCOD_parser_get_float_property = float function(TCOD_parser_t, charptr);
alias da_TCOD_parser_get_int_property = int function(TCOD_parser_t, charptr);
alias da_TCOD_parser_get_list_property = TCOD_list_t function(TCOD_parser_t, charptr, TCOD_value_type_t);
alias da_TCOD_parser_get_string_property = charptr function(TCOD_parser_t, charptr);
alias da_TCOD_parser_new = TCOD_parser_t function();
alias da_TCOD_parser_new_custom_type = TCOD_parser_struct_t function(TCOD_parser_t, TCOD_parser_custom_t);
alias da_TCOD_parser_new_struct = TCOD_parser_struct_t function(TCOD_parser_t, charptr);
alias da_TCOD_parser_run = void function(TCOD_parser_t, charptr, TCOD_parser_listener_t*);
alias da_TCOD_path_compute = bool function(TCOD_path_t, int, int, int, int);
alias da_TCOD_path_delete = void function(TCOD_path_t);
alias da_TCOD_path_get = void function(TCOD_path_t, int, int*, int*);
alias da_TCOD_path_get_destination = void function(TCOD_path_t, int*, int*);
alias da_TCOD_path_get_origin = void function(TCOD_path_t, int*, int*);
alias da_TCOD_path_is_empty = bool function(TCOD_path_t);
alias da_TCOD_path_new_using_function = TCOD_path_t function(int, int, TCOD_path_func_t, void*, float);
alias da_TCOD_path_new_using_map = TCOD_path_t function(TCOD_map_t, float);
alias da_TCOD_path_reverse = void function(TCOD_path_t);
alias da_TCOD_path_size = int function(TCOD_path_t);
alias da_TCOD_path_walk = bool function(TCOD_path_t, int*, int*, bool);
alias da_TCOD_random_delete = void function(TCOD_random_t);
alias da_TCOD_random_dice_new = TCOD_dice_t function(charptr);
alias da_TCOD_random_dice_roll = int function(TCOD_random_t, TCOD_dice_t);
alias da_TCOD_random_dice_roll_s = int function(TCOD_random_t, charptr);
alias da_TCOD_random_get_double = double function(TCOD_random_t, double, double);
alias da_TCOD_random_get_double_mean = double function(TCOD_random_t, double, double, double);
alias da_TCOD_random_get_float = float function(TCOD_random_t, float, float);
alias da_TCOD_random_get_float_mean = float function(TCOD_random_t, float, float, float);
alias da_TCOD_random_get_instance = TCOD_random_t function();
alias da_TCOD_random_get_int = int function(TCOD_random_t, int, int);
alias da_TCOD_random_get_int_mean = int function(TCOD_random_t, int, int, int);
alias da_TCOD_random_new = TCOD_random_t function(TCOD_random_algo_t);
alias da_TCOD_random_new_from_seed = TCOD_random_t function(TCOD_random_algo_t, uint);
alias da_TCOD_random_restore = void function(TCOD_random_t, TCOD_random_t);
alias da_TCOD_random_save = TCOD_random_t function(TCOD_random_t);
alias da_TCOD_random_set_distribution = void function(TCOD_random_t, TCOD_distribution_t);
alias da_TCOD_semaphore_delete = void function(TCOD_semaphore_t);
alias da_TCOD_semaphore_lock = void function(TCOD_semaphore_t);
alias da_TCOD_semaphore_new = TCOD_semaphore_t function(int);
alias da_TCOD_semaphore_unlock = void function(TCOD_semaphore_t);
alias da_TCOD_struct_add_flag = void function(TCOD_parser_struct_t, charptr);
alias da_TCOD_struct_add_list_property = void function(TCOD_parser_struct_t, charptr, TCOD_value_type_t, bool);
alias da_TCOD_struct_add_property = void function(TCOD_parser_struct_t, charptr, TCOD_value_type_t, bool);
alias da_TCOD_struct_add_structure = void function(TCOD_parser_struct_t, TCOD_parser_struct_t);
alias da_TCOD_struct_add_value_list = void function(TCOD_parser_struct_t, charptr, charptr*, bool);
alias da_TCOD_struct_add_value_list_sized = void function(TCOD_parser_struct_t, charptr, charptr*, int, bool);
alias da_TCOD_struct_get_name = charptr function(TCOD_parser_struct_t);
alias da_TCOD_struct_get_type = TCOD_value_type_t function(TCOD_parser_struct_t, charptr);
alias da_TCOD_struct_is_mandatory = bool function(TCOD_parser_struct_t, charptr);
alias da_TCOD_sys_check_for_event = TCOD_event_t function(int, TCOD_key_t*, TCOD_mouse_t*);
alias da_TCOD_sys_clipboard_get = charptr function();
alias da_TCOD_sys_clipboard_set = void function(charptr);
alias da_TCOD_sys_create_directory = bool function(charptr);
alias da_TCOD_sys_delete_directory = bool function(charptr);
alias da_TCOD_sys_delete_file = bool function(charptr);
alias da_TCOD_sys_elapsed_milli = uint function();
alias da_TCOD_sys_elapsed_seconds = float function();
alias da_TCOD_sys_file_exists = bool function(charptr, ...);
alias da_TCOD_sys_force_fullscreen_resolution = void function(int, int);
alias da_TCOD_sys_get_char_size = void function(int*, int*);
alias da_TCOD_sys_get_current_resolution = void function(int*, int*);
alias da_TCOD_sys_get_directory_content = TCOD_list_t function(charptr, charptr);
alias da_TCOD_sys_get_fps = int function();
alias da_TCOD_sys_get_fullscreen_offsets = void function(int*, int*);
alias da_TCOD_sys_get_last_frame_length = float function();
alias da_TCOD_sys_get_num_cores = int function();
alias da_TCOD_sys_get_renderer = TCOD_renderer_t function();
alias da_TCOD_sys_get_sdl_window = void* function();
alias da_TCOD_sys_is_directory = bool function(charptr);
alias da_TCOD_sys_read_file = bool function(charptr, charptr*, uint32*);
alias da_TCOD_sys_register_SDL_renderer = void function(SDL_renderer_t);
alias da_TCOD_sys_save_screenshot = void function(charptr);
alias da_TCOD_sys_set_fps = void function(int);
alias da_TCOD_sys_set_renderer = void function(TCOD_renderer_t);
alias da_TCOD_sys_sleep_milli = void function(uint);
alias da_TCOD_sys_update_char = void function(int, int, int, TCOD_image_t, int, int);
alias da_TCOD_sys_wait_for_event = TCOD_event_t function(int, TCOD_key_t*, TCOD_mouse_t*, bool);
alias da_TCOD_sys_write_file = bool function(charptr, charptr, uint32);
alias da_TCOD_text_delete = void function(TCOD_text_t);
alias da_TCOD_text_get = charptr function(TCOD_text_t);
alias da_TCOD_text_init = TCOD_text_t function(int, int, int, int, int);
alias da_TCOD_text_render = void function(TCOD_text_t, TCOD_console_t);
alias da_TCOD_text_reset = void function(TCOD_text_t);
alias da_TCOD_text_set_colors = void function(TCOD_text_t, TCOD_color_t, TCOD_color_t, float);
alias da_TCOD_text_set_properties = void function(TCOD_text_t, int, int, charptr, int);
alias da_TCOD_text_update = bool function(TCOD_text_t, TCOD_key_t);
alias da_TCOD_thread_delete = void function(TCOD_thread_t);
alias da_TCOD_thread_new = TCOD_thread_t function(int function(void*)*, void*);
alias da_TCOD_thread_wait = void function(TCOD_thread_t);
alias da_TCOD_tree_add_son = void function(TCOD_tree_t*, TCOD_tree_t*);
alias da_TCOD_tree_new = TCOD_tree_t* function();
alias da_TCOD_zip_delete = void function(TCOD_zip_t);
alias da_TCOD_zip_get_char = char function(TCOD_zip_t);
alias da_TCOD_zip_get_color = TCOD_color_t function(TCOD_zip_t);
alias da_TCOD_zip_get_console = TCOD_console_t function(TCOD_zip_t);
alias da_TCOD_zip_get_current_bytes = uint32 function(TCOD_zip_t);
alias da_TCOD_zip_get_data = int function(TCOD_zip_t, int, void*);
alias da_TCOD_zip_get_float = float function(TCOD_zip_t);
alias da_TCOD_zip_get_image = TCOD_image_t function(TCOD_zip_t);
alias da_TCOD_zip_get_int = int function(TCOD_zip_t);
alias da_TCOD_zip_get_remaining_bytes = uint32 function(TCOD_zip_t);
alias da_TCOD_zip_get_string = char* function(TCOD_zip_t);
alias da_TCOD_zip_load_from_file = int function(TCOD_zip_t, charptr);
alias da_TCOD_zip_new = TCOD_zip_t function();
alias da_TCOD_zip_put_char = void function(TCOD_zip_t, char);
alias da_TCOD_zip_put_color = void function(TCOD_zip_t, const TCOD_color_t);
alias da_TCOD_zip_put_console = void function(TCOD_zip_t, const TCOD_console_t);
alias da_TCOD_zip_put_data = void function(TCOD_zip_t, int, const void*);
alias da_TCOD_zip_put_float = void function(TCOD_zip_t, float);
alias da_TCOD_zip_put_image = void function(TCOD_zip_t, const TCOD_image_t);
alias da_TCOD_zip_put_int = void function(TCOD_zip_t, int);
alias da_TCOD_zip_put_string = void function(TCOD_zip_t, charptr);
alias da_TCOD_zip_save_to_file = int function(TCOD_zip_t, charptr);
alias da_TCOD_zip_skip_bytes = void function(TCOD_zip_t, uint32);
}
__gshared {
da_TCOD_bsp_contains TCOD_bsp_contains;
da_TCOD_bsp_delete TCOD_bsp_delete;
da_TCOD_bsp_father TCOD_bsp_father;
da_TCOD_bsp_find_node TCOD_bsp_find_node;
da_TCOD_bsp_is_leaf TCOD_bsp_is_leaf;
da_TCOD_bsp_left TCOD_bsp_left;
da_TCOD_bsp_new TCOD_bsp_new;
da_TCOD_bsp_new_with_size TCOD_bsp_new_with_size;
da_TCOD_bsp_remove_sons TCOD_bsp_remove_sons;
da_TCOD_bsp_resize TCOD_bsp_resize;
da_TCOD_bsp_right TCOD_bsp_right;
da_TCOD_bsp_split_once TCOD_bsp_split_once;
da_TCOD_bsp_split_recursive TCOD_bsp_split_recursive;
da_TCOD_bsp_traverse_in_order TCOD_bsp_traverse_in_order;
da_TCOD_bsp_traverse_inverted_level_order TCOD_bsp_traverse_inverted_level_order;
da_TCOD_bsp_traverse_level_order TCOD_bsp_traverse_level_order;
da_TCOD_bsp_traverse_post_order TCOD_bsp_traverse_post_order;
da_TCOD_bsp_traverse_pre_order TCOD_bsp_traverse_pre_order;
da_TCOD_close_library TCOD_close_library;
da_TCOD_color_HSV TCOD_color_HSV;
da_TCOD_color_RGB TCOD_color_RGB;
da_TCOD_color_add TCOD_color_add;
da_TCOD_color_equals TCOD_color_equals;
da_TCOD_color_gen_map TCOD_color_gen_map;
da_TCOD_color_get_HSV TCOD_color_get_HSV;
da_TCOD_color_get_hue TCOD_color_get_hue;
da_TCOD_color_get_saturation TCOD_color_get_saturation;
da_TCOD_color_get_value TCOD_color_get_value;
da_TCOD_color_lerp TCOD_color_lerp;
da_TCOD_color_multiply TCOD_color_multiply;
da_TCOD_color_multiply_scalar TCOD_color_multiply_scalar;
da_TCOD_color_scale_HSV TCOD_color_scale_HSV;
da_TCOD_color_set_HSV TCOD_color_set_HSV;
da_TCOD_color_set_hue TCOD_color_set_hue;
da_TCOD_color_set_saturation TCOD_color_set_saturation;
da_TCOD_color_set_value TCOD_color_set_value;
da_TCOD_color_shift_hue TCOD_color_shift_hue;
da_TCOD_color_subtract TCOD_color_subtract;
da_TCOD_condition_broadcast TCOD_condition_broadcast;
da_TCOD_condition_delete TCOD_condition_delete;
da_TCOD_condition_new TCOD_condition_new;
da_TCOD_condition_signal TCOD_condition_signal;
da_TCOD_condition_wait TCOD_condition_wait;
da_TCOD_console_blit TCOD_console_blit;
da_TCOD_console_check_for_keypress TCOD_console_check_for_keypress;
da_TCOD_console_clear TCOD_console_clear;
da_TCOD_console_credits TCOD_console_credits;
da_TCOD_console_credits_render TCOD_console_credits_render;
da_TCOD_console_credits_reset TCOD_console_credits_reset;
da_TCOD_console_delete TCOD_console_delete;
da_TCOD_console_disable_keyboard_repeat TCOD_console_disable_keyboard_repeat;
da_TCOD_console_flush TCOD_console_flush;
da_TCOD_console_from_file TCOD_console_from_file;
da_TCOD_console_get_alignment TCOD_console_get_alignment;
da_TCOD_console_get_background_flag TCOD_console_get_background_flag;
da_TCOD_console_get_char TCOD_console_get_char;
da_TCOD_console_get_char_background TCOD_console_get_char_background;
da_TCOD_console_get_char_foreground TCOD_console_get_char_foreground;
da_TCOD_console_get_default_background TCOD_console_get_default_background;
da_TCOD_console_get_default_foreground TCOD_console_get_default_foreground;
da_TCOD_console_get_fade TCOD_console_get_fade;
da_TCOD_console_get_fading_color TCOD_console_get_fading_color;
da_TCOD_console_get_height TCOD_console_get_height;
da_TCOD_console_get_height_rect TCOD_console_get_height_rect;
da_TCOD_console_get_height_rect_utf TCOD_console_get_height_rect_utf;
da_TCOD_console_get_width TCOD_console_get_width;
da_TCOD_console_hline TCOD_console_hline;
da_TCOD_console_init_root TCOD_console_init_root;
da_TCOD_console_is_fullscreen TCOD_console_is_fullscreen;
da_TCOD_console_is_key_pressed TCOD_console_is_key_pressed;
da_TCOD_console_is_window_closed TCOD_console_is_window_closed;
da_TCOD_console_load_apf TCOD_console_load_apf;
da_TCOD_console_load_asc TCOD_console_load_asc;
da_TCOD_console_map_ascii_code_to_font TCOD_console_map_ascii_code_to_font;
da_TCOD_console_map_ascii_codes_to_font TCOD_console_map_ascii_codes_to_font;
da_TCOD_console_map_string_to_font TCOD_console_map_string_to_font;
da_TCOD_console_map_string_to_font_utf TCOD_console_map_string_to_font_utf;
da_TCOD_console_new TCOD_console_new;
da_TCOD_console_print TCOD_console_print;
da_TCOD_console_print_ex TCOD_console_print_ex;
da_TCOD_console_print_ex_utf TCOD_console_print_ex_utf;
da_TCOD_console_print_frame TCOD_console_print_frame;
da_TCOD_console_print_rect TCOD_console_print_rect;
da_TCOD_console_print_rect_ex TCOD_console_print_rect_ex;
da_TCOD_console_print_rect_ex_utf TCOD_console_print_rect_ex_utf;
da_TCOD_console_print_rect_utf TCOD_console_print_rect_utf;
da_TCOD_console_print_utf TCOD_console_print_utf;
da_TCOD_console_put_char TCOD_console_put_char;
da_TCOD_console_put_char_ex TCOD_console_put_char_ex;
da_TCOD_console_rect TCOD_console_rect;
da_TCOD_console_save_apf TCOD_console_save_apf;
da_TCOD_console_save_asc TCOD_console_save_asc;
da_TCOD_console_set_alignment TCOD_console_set_alignment;
da_TCOD_console_set_background_flag TCOD_console_set_background_flag;
da_TCOD_console_set_char TCOD_console_set_char;
da_TCOD_console_set_char_background TCOD_console_set_char_background;
da_TCOD_console_set_char_foreground TCOD_console_set_char_foreground;
da_TCOD_console_set_color_control TCOD_console_set_color_control;
da_TCOD_console_set_custom_font TCOD_console_set_custom_font;
da_TCOD_console_set_default_background TCOD_console_set_default_background;
da_TCOD_console_set_default_foreground TCOD_console_set_default_foreground;
da_TCOD_console_set_dirty TCOD_console_set_dirty;
da_TCOD_console_set_fade TCOD_console_set_fade;
da_TCOD_console_set_fullscreen TCOD_console_set_fullscreen;
da_TCOD_console_set_key_color TCOD_console_set_key_color;
da_TCOD_console_set_keyboard_repeat TCOD_console_set_keyboard_repeat;
da_TCOD_console_set_window_title TCOD_console_set_window_title;
da_TCOD_console_vline TCOD_console_vline;
da_TCOD_console_wait_for_keypress TCOD_console_wait_for_keypress;
da_TCOD_dijkstra_compute TCOD_dijkstra_compute;
da_TCOD_dijkstra_delete TCOD_dijkstra_delete;
da_TCOD_dijkstra_get TCOD_dijkstra_get;
da_TCOD_dijkstra_get_distance TCOD_dijkstra_get_distance;
da_TCOD_dijkstra_is_empty TCOD_dijkstra_is_empty;
da_TCOD_dijkstra_new TCOD_dijkstra_new;
da_TCOD_dijkstra_new_using_function TCOD_dijkstra_new_using_function;
da_TCOD_dijkstra_path_set TCOD_dijkstra_path_set;
da_TCOD_dijkstra_path_walk TCOD_dijkstra_path_walk;
da_TCOD_dijkstra_reverse TCOD_dijkstra_reverse;
da_TCOD_dijkstra_size TCOD_dijkstra_size;
da_TCOD_get_function_address TCOD_get_function_address;
da_TCOD_heightmap_add TCOD_heightmap_add;
da_TCOD_heightmap_add_fbm TCOD_heightmap_add_fbm;
da_TCOD_heightmap_add_hill TCOD_heightmap_add_hill;
da_TCOD_heightmap_add_hm TCOD_heightmap_add_hm;
da_TCOD_heightmap_add_voronoi TCOD_heightmap_add_voronoi;
da_TCOD_heightmap_clamp TCOD_heightmap_clamp;
da_TCOD_heightmap_clear TCOD_heightmap_clear;
da_TCOD_heightmap_copy TCOD_heightmap_copy;
da_TCOD_heightmap_count_cells TCOD_heightmap_count_cells;
da_TCOD_heightmap_delete TCOD_heightmap_delete;
da_TCOD_heightmap_dig_bezier TCOD_heightmap_dig_bezier;
da_TCOD_heightmap_dig_hill TCOD_heightmap_dig_hill;
da_TCOD_heightmap_get_interpolated_value TCOD_heightmap_get_interpolated_value;
da_TCOD_heightmap_get_minmax TCOD_heightmap_get_minmax;
da_TCOD_heightmap_get_normal TCOD_heightmap_get_normal;
da_TCOD_heightmap_get_slope TCOD_heightmap_get_slope;
da_TCOD_heightmap_get_value TCOD_heightmap_get_value;
da_TCOD_heightmap_has_land_on_border TCOD_heightmap_has_land_on_border;
da_TCOD_heightmap_islandify TCOD_heightmap_islandify;
da_TCOD_heightmap_kernel_transform TCOD_heightmap_kernel_transform;
da_TCOD_heightmap_lerp_hm TCOD_heightmap_lerp_hm;
da_TCOD_heightmap_multiply_hm TCOD_heightmap_multiply_hm;
da_TCOD_heightmap_new TCOD_heightmap_new;
da_TCOD_heightmap_normalize TCOD_heightmap_normalize;
da_TCOD_heightmap_rain_erosion TCOD_heightmap_rain_erosion;
da_TCOD_heightmap_scale TCOD_heightmap_scale;
da_TCOD_heightmap_scale_fbm TCOD_heightmap_scale_fbm;
da_TCOD_heightmap_set_value TCOD_heightmap_set_value;
da_TCOD_image_blit TCOD_image_blit;
da_TCOD_image_blit_2x TCOD_image_blit_2x;
da_TCOD_image_blit_rect TCOD_image_blit_rect;
da_TCOD_image_clear TCOD_image_clear;
da_TCOD_image_delete TCOD_image_delete;
da_TCOD_image_from_console TCOD_image_from_console;
da_TCOD_image_get_alpha TCOD_image_get_alpha;
da_TCOD_image_get_mipmap_pixel TCOD_image_get_mipmap_pixel;
da_TCOD_image_get_pixel TCOD_image_get_pixel;
da_TCOD_image_get_size TCOD_image_get_size;
da_TCOD_image_hflip TCOD_image_hflip;
da_TCOD_image_invert TCOD_image_invert;
da_TCOD_image_is_pixel_transparent TCOD_image_is_pixel_transparent;
da_TCOD_image_load TCOD_image_load;
da_TCOD_image_new TCOD_image_new;
da_TCOD_image_put_pixel TCOD_image_put_pixel;
da_TCOD_image_refresh_console TCOD_image_refresh_console;
da_TCOD_image_rotate90 TCOD_image_rotate90;
da_TCOD_image_save TCOD_image_save;
da_TCOD_image_scale TCOD_image_scale;
da_TCOD_image_set_key_color TCOD_image_set_key_color;
da_TCOD_image_vflip TCOD_image_vflip;
da_TCOD_lex_delete TCOD_lex_delete;
da_TCOD_lex_expect_token_type TCOD_lex_expect_token_type;
da_TCOD_lex_expect_token_value TCOD_lex_expect_token_value;
da_TCOD_lex_get_last_error TCOD_lex_get_last_error;
da_TCOD_lex_get_last_javadoc TCOD_lex_get_last_javadoc;
da_TCOD_lex_get_token_name TCOD_lex_get_token_name;
da_TCOD_lex_hextoint TCOD_lex_hextoint;
da_TCOD_lex_new TCOD_lex_new;
da_TCOD_lex_new_intern TCOD_lex_new_intern;
da_TCOD_lex_parse TCOD_lex_parse;
da_TCOD_lex_parse_until_token_type TCOD_lex_parse_until_token_type;
da_TCOD_lex_parse_until_token_value TCOD_lex_parse_until_token_value;
da_TCOD_lex_restore TCOD_lex_restore;
da_TCOD_lex_savepoint TCOD_lex_savepoint;
da_TCOD_lex_set_data_buffer TCOD_lex_set_data_buffer;
da_TCOD_lex_set_data_file TCOD_lex_set_data_file;
da_TCOD_line TCOD_line;
da_TCOD_line_init TCOD_line_init;
da_TCOD_line_init_mt TCOD_line_init_mt;
da_TCOD_line_mt TCOD_line_mt;
da_TCOD_line_step TCOD_line_step;
da_TCOD_line_step_mt TCOD_line_step_mt;
da_TCOD_list_add_all TCOD_list_add_all;
da_TCOD_list_allocate TCOD_list_allocate;
da_TCOD_list_begin TCOD_list_begin;
da_TCOD_list_clear TCOD_list_clear;
da_TCOD_list_clear_and_delete TCOD_list_clear_and_delete;
da_TCOD_list_contains TCOD_list_contains;
da_TCOD_list_delete TCOD_list_delete;
da_TCOD_list_duplicate TCOD_list_duplicate;
da_TCOD_list_end TCOD_list_end;
da_TCOD_list_get TCOD_list_get;
da_TCOD_list_insert_before TCOD_list_insert_before;
da_TCOD_list_is_empty TCOD_list_is_empty;
da_TCOD_list_new TCOD_list_new;
da_TCOD_list_peek TCOD_list_peek;
da_TCOD_list_pop TCOD_list_pop;
da_TCOD_list_push TCOD_list_push;
da_TCOD_list_remove TCOD_list_remove;
da_TCOD_list_remove_iterator TCOD_list_remove_iterator;
da_TCOD_list_remove_iterator_fast TCOD_list_remove_iterator_fast;
da_TCOD_list_reverse TCOD_list_reverse;
da_TCOD_list_set TCOD_list_set;
da_TCOD_list_size TCOD_list_size;
da_TCOD_load_library TCOD_load_library;
da_TCOD_map_clear TCOD_map_clear;
da_TCOD_map_compute_fov TCOD_map_compute_fov;
da_TCOD_map_copy TCOD_map_copy;
da_TCOD_map_delete TCOD_map_delete;
da_TCOD_map_get_height TCOD_map_get_height;
da_TCOD_map_get_nb_cells TCOD_map_get_nb_cells;
da_TCOD_map_get_width TCOD_map_get_width;
da_TCOD_map_is_in_fov TCOD_map_is_in_fov;
da_TCOD_map_is_transparent TCOD_map_is_transparent;
da_TCOD_map_is_walkable TCOD_map_is_walkable;
da_TCOD_map_new TCOD_map_new;
da_TCOD_map_set_in_fov TCOD_map_set_in_fov;
da_TCOD_map_set_properties TCOD_map_set_properties;
da_TCOD_mouse_get_status TCOD_mouse_get_status;
da_TCOD_mouse_includes_touch TCOD_mouse_includes_touch;
da_TCOD_mouse_is_cursor_visible TCOD_mouse_is_cursor_visible;
da_TCOD_mouse_move TCOD_mouse_move;
da_TCOD_mouse_show_cursor TCOD_mouse_show_cursor;
da_TCOD_mutex_delete TCOD_mutex_delete;
da_TCOD_mutex_in TCOD_mutex_in;
da_TCOD_mutex_new TCOD_mutex_new;
da_TCOD_mutex_out TCOD_mutex_out;
da_TCOD_namegen_destroy TCOD_namegen_destroy;
da_TCOD_namegen_generate TCOD_namegen_generate;
da_TCOD_namegen_generate_custom TCOD_namegen_generate_custom;
da_TCOD_namegen_get_sets TCOD_namegen_get_sets;
da_TCOD_namegen_parse TCOD_namegen_parse;
da_TCOD_noise_delete TCOD_noise_delete;
da_TCOD_noise_get TCOD_noise_get;
da_TCOD_noise_get_ex TCOD_noise_get_ex;
da_TCOD_noise_get_fbm TCOD_noise_get_fbm;
da_TCOD_noise_get_fbm_ex TCOD_noise_get_fbm_ex;
da_TCOD_noise_get_turbulence TCOD_noise_get_turbulence;
da_TCOD_noise_get_turbulence_ex TCOD_noise_get_turbulence_ex;
da_TCOD_noise_new TCOD_noise_new;
da_TCOD_noise_set_type TCOD_noise_set_type;
da_TCOD_parse_bool_value TCOD_parse_bool_value;
da_TCOD_parse_char_value TCOD_parse_char_value;
da_TCOD_parse_color_value TCOD_parse_color_value;
da_TCOD_parse_dice_value TCOD_parse_dice_value;
da_TCOD_parse_float_value TCOD_parse_float_value;
da_TCOD_parse_integer_value TCOD_parse_integer_value;
da_TCOD_parse_property_value TCOD_parse_property_value;
da_TCOD_parse_string_value TCOD_parse_string_value;
da_TCOD_parse_value_list_value TCOD_parse_value_list_value;
da_TCOD_parser_delete TCOD_parser_delete;
da_TCOD_parser_error TCOD_parser_error;
da_TCOD_parser_get_bool_property TCOD_parser_get_bool_property;
da_TCOD_parser_get_char_property TCOD_parser_get_char_property;
da_TCOD_parser_get_color_property TCOD_parser_get_color_property;
da_TCOD_parser_get_custom_property TCOD_parser_get_custom_property;
da_TCOD_parser_get_dice_property TCOD_parser_get_dice_property;
da_TCOD_parser_get_dice_property_py TCOD_parser_get_dice_property_py;
da_TCOD_parser_get_float_property TCOD_parser_get_float_property;
da_TCOD_parser_get_int_property TCOD_parser_get_int_property;
da_TCOD_parser_get_list_property TCOD_parser_get_list_property;
da_TCOD_parser_get_string_property TCOD_parser_get_string_property;
da_TCOD_parser_new TCOD_parser_new;
da_TCOD_parser_new_custom_type TCOD_parser_new_custom_type;
da_TCOD_parser_new_struct TCOD_parser_new_struct;
da_TCOD_parser_run TCOD_parser_run;
da_TCOD_path_compute TCOD_path_compute;
da_TCOD_path_delete TCOD_path_delete;
da_TCOD_path_get TCOD_path_get;
da_TCOD_path_get_destination TCOD_path_get_destination;
da_TCOD_path_get_origin TCOD_path_get_origin;
da_TCOD_path_is_empty TCOD_path_is_empty;
da_TCOD_path_new_using_function TCOD_path_new_using_function;
da_TCOD_path_new_using_map TCOD_path_new_using_map;
da_TCOD_path_reverse TCOD_path_reverse;
da_TCOD_path_size TCOD_path_size;
da_TCOD_path_walk TCOD_path_walk;
da_TCOD_random_delete TCOD_random_delete;
da_TCOD_random_dice_new TCOD_random_dice_new;
da_TCOD_random_dice_roll TCOD_random_dice_roll;
da_TCOD_random_dice_roll_s TCOD_random_dice_roll_s;
da_TCOD_random_get_double TCOD_random_get_double;
da_TCOD_random_get_double_mean TCOD_random_get_double_mean;
da_TCOD_random_get_float TCOD_random_get_float;
da_TCOD_random_get_float_mean TCOD_random_get_float_mean;
da_TCOD_random_get_instance TCOD_random_get_instance;
da_TCOD_random_get_int TCOD_random_get_int;
da_TCOD_random_get_int_mean TCOD_random_get_int_mean;
da_TCOD_random_new TCOD_random_new;
da_TCOD_random_new_from_seed TCOD_random_new_from_seed;
da_TCOD_random_restore TCOD_random_restore;
da_TCOD_random_save TCOD_random_save;
da_TCOD_random_set_distribution TCOD_random_set_distribution;
da_TCOD_semaphore_delete TCOD_semaphore_delete;
da_TCOD_semaphore_lock TCOD_semaphore_lock;
da_TCOD_semaphore_new TCOD_semaphore_new;
da_TCOD_semaphore_unlock TCOD_semaphore_unlock;
da_TCOD_struct_add_flag TCOD_struct_add_flag;
da_TCOD_struct_add_list_property TCOD_struct_add_list_property;
da_TCOD_struct_add_property TCOD_struct_add_property;
da_TCOD_struct_add_structure TCOD_struct_add_structure;
da_TCOD_struct_add_value_list TCOD_struct_add_value_list;
da_TCOD_struct_add_value_list_sized TCOD_struct_add_value_list_sized;
da_TCOD_struct_get_name TCOD_struct_get_name;
da_TCOD_struct_get_type TCOD_struct_get_type;
da_TCOD_struct_is_mandatory TCOD_struct_is_mandatory;
da_TCOD_sys_check_for_event TCOD_sys_check_for_event;
da_TCOD_sys_clipboard_get TCOD_sys_clipboard_get;
da_TCOD_sys_clipboard_set TCOD_sys_clipboard_set;
da_TCOD_sys_create_directory TCOD_sys_create_directory;
da_TCOD_sys_delete_directory TCOD_sys_delete_directory;
da_TCOD_sys_delete_file TCOD_sys_delete_file;
da_TCOD_sys_elapsed_milli TCOD_sys_elapsed_milli;
da_TCOD_sys_elapsed_seconds TCOD_sys_elapsed_seconds;
da_TCOD_sys_file_exists TCOD_sys_file_exists;
da_TCOD_sys_force_fullscreen_resolution TCOD_sys_force_fullscreen_resolution;
da_TCOD_sys_get_char_size TCOD_sys_get_char_size;
da_TCOD_sys_get_current_resolution TCOD_sys_get_current_resolution;
da_TCOD_sys_get_directory_content TCOD_sys_get_directory_content;
da_TCOD_sys_get_fps TCOD_sys_get_fps;
da_TCOD_sys_get_fullscreen_offsets TCOD_sys_get_fullscreen_offsets;
da_TCOD_sys_get_last_frame_length TCOD_sys_get_last_frame_length;
da_TCOD_sys_get_num_cores TCOD_sys_get_num_cores;
da_TCOD_sys_get_renderer TCOD_sys_get_renderer;
da_TCOD_sys_get_sdl_window TCOD_sys_get_sdl_window;
da_TCOD_sys_is_directory TCOD_sys_is_directory;
da_TCOD_sys_read_file TCOD_sys_read_file;
da_TCOD_sys_register_SDL_renderer TCOD_sys_register_SDL_renderer;
da_TCOD_sys_save_screenshot TCOD_sys_save_screenshot;
da_TCOD_sys_set_fps TCOD_sys_set_fps;
da_TCOD_sys_set_renderer TCOD_sys_set_renderer;
da_TCOD_sys_sleep_milli TCOD_sys_sleep_milli;
da_TCOD_sys_update_char TCOD_sys_update_char;
da_TCOD_sys_wait_for_event TCOD_sys_wait_for_event;
da_TCOD_sys_write_file TCOD_sys_write_file;
da_TCOD_text_delete TCOD_text_delete;
da_TCOD_text_get TCOD_text_get;
da_TCOD_text_init TCOD_text_init;
da_TCOD_text_render TCOD_text_render;
da_TCOD_text_reset TCOD_text_reset;
da_TCOD_text_set_colors TCOD_text_set_colors;
da_TCOD_text_set_properties TCOD_text_set_properties;
da_TCOD_text_update TCOD_text_update;
da_TCOD_thread_delete TCOD_thread_delete;
da_TCOD_thread_new TCOD_thread_new;
da_TCOD_thread_wait TCOD_thread_wait;
da_TCOD_tree_add_son TCOD_tree_add_son;
da_TCOD_tree_new TCOD_tree_new;
da_TCOD_zip_delete TCOD_zip_delete;
da_TCOD_zip_get_char TCOD_zip_get_char;
da_TCOD_zip_get_color TCOD_zip_get_color;
da_TCOD_zip_get_console TCOD_zip_get_console;
da_TCOD_zip_get_current_bytes TCOD_zip_get_current_bytes;
da_TCOD_zip_get_data TCOD_zip_get_data;
da_TCOD_zip_get_float TCOD_zip_get_float;
da_TCOD_zip_get_image TCOD_zip_get_image;
da_TCOD_zip_get_int TCOD_zip_get_int;
da_TCOD_zip_get_remaining_bytes TCOD_zip_get_remaining_bytes;
da_TCOD_zip_get_string TCOD_zip_get_string;
da_TCOD_zip_load_from_file TCOD_zip_load_from_file;
da_TCOD_zip_new TCOD_zip_new;
da_TCOD_zip_put_char TCOD_zip_put_char;
da_TCOD_zip_put_color TCOD_zip_put_color;
da_TCOD_zip_put_console TCOD_zip_put_console;
da_TCOD_zip_put_data TCOD_zip_put_data;
da_TCOD_zip_put_float TCOD_zip_put_float;
da_TCOD_zip_put_image TCOD_zip_put_image;
da_TCOD_zip_put_int TCOD_zip_put_int;
da_TCOD_zip_put_string TCOD_zip_put_string;
da_TCOD_zip_save_to_file TCOD_zip_save_to_file;
da_TCOD_zip_skip_bytes TCOD_zip_skip_bytes;
}
class DerelictTCODLoader : SharedLibLoader {
this(string libNames) {
super(libNames);
}
~this() {
unload();
}
override void loadSymbols()
{
bindFunc(cast(void**)&TCOD_bsp_contains, "TCOD_bsp_contains");
bindFunc(cast(void**)&TCOD_bsp_delete, "TCOD_bsp_delete");
bindFunc(cast(void**)&TCOD_bsp_father, "TCOD_bsp_father");
bindFunc(cast(void**)&TCOD_bsp_find_node, "TCOD_bsp_find_node");
bindFunc(cast(void**)&TCOD_bsp_is_leaf, "TCOD_bsp_is_leaf");
bindFunc(cast(void**)&TCOD_bsp_left, "TCOD_bsp_left");
bindFunc(cast(void**)&TCOD_bsp_new, "TCOD_bsp_new");
bindFunc(cast(void**)&TCOD_bsp_new_with_size, "TCOD_bsp_new_with_size");
bindFunc(cast(void**)&TCOD_bsp_remove_sons, "TCOD_bsp_remove_sons");
bindFunc(cast(void**)&TCOD_bsp_resize, "TCOD_bsp_resize");
bindFunc(cast(void**)&TCOD_bsp_right, "TCOD_bsp_right");
bindFunc(cast(void**)&TCOD_bsp_split_once, "TCOD_bsp_split_once");
bindFunc(cast(void**)&TCOD_bsp_split_recursive, "TCOD_bsp_split_recursive");
bindFunc(cast(void**)&TCOD_bsp_traverse_in_order, "TCOD_bsp_traverse_in_order");
bindFunc(cast(void**)&TCOD_bsp_traverse_inverted_level_order, "TCOD_bsp_traverse_inverted_level_order");
bindFunc(cast(void**)&TCOD_bsp_traverse_level_order, "TCOD_bsp_traverse_level_order");
bindFunc(cast(void**)&TCOD_bsp_traverse_post_order, "TCOD_bsp_traverse_post_order");
bindFunc(cast(void**)&TCOD_bsp_traverse_pre_order, "TCOD_bsp_traverse_pre_order");
bindFunc(cast(void**)&TCOD_close_library, "TCOD_close_library");
bindFunc(cast(void**)&TCOD_color_HSV, "TCOD_color_HSV");
bindFunc(cast(void**)&TCOD_color_RGB, "TCOD_color_RGB");
bindFunc(cast(void**)&TCOD_color_add, "TCOD_color_add");
bindFunc(cast(void**)&TCOD_color_equals, "TCOD_color_equals");
bindFunc(cast(void**)&TCOD_color_gen_map, "TCOD_color_gen_map");
bindFunc(cast(void**)&TCOD_color_get_HSV, "TCOD_color_get_HSV");
bindFunc(cast(void**)&TCOD_color_get_hue, "TCOD_color_get_hue");
bindFunc(cast(void**)&TCOD_color_get_saturation, "TCOD_color_get_saturation");
bindFunc(cast(void**)&TCOD_color_get_value, "TCOD_color_get_value");
bindFunc(cast(void**)&TCOD_color_lerp, "TCOD_color_lerp");
bindFunc(cast(void**)&TCOD_color_multiply, "TCOD_color_multiply");
bindFunc(cast(void**)&TCOD_color_multiply_scalar, "TCOD_color_multiply_scalar");
bindFunc(cast(void**)&TCOD_color_scale_HSV, "TCOD_color_scale_HSV");
bindFunc(cast(void**)&TCOD_color_set_HSV, "TCOD_color_set_HSV");
bindFunc(cast(void**)&TCOD_color_set_hue, "TCOD_color_set_hue");
bindFunc(cast(void**)&TCOD_color_set_saturation, "TCOD_color_set_saturation");
bindFunc(cast(void**)&TCOD_color_set_value, "TCOD_color_set_value");
bindFunc(cast(void**)&TCOD_color_shift_hue, "TCOD_color_shift_hue");
bindFunc(cast(void**)&TCOD_color_subtract, "TCOD_color_subtract");
bindFunc(cast(void**)&TCOD_condition_broadcast, "TCOD_condition_broadcast");
bindFunc(cast(void**)&TCOD_condition_delete, "TCOD_condition_delete");
bindFunc(cast(void**)&TCOD_condition_new, "TCOD_condition_new");
bindFunc(cast(void**)&TCOD_condition_signal, "TCOD_condition_signal");
bindFunc(cast(void**)&TCOD_condition_wait, "TCOD_condition_wait");
bindFunc(cast(void**)&TCOD_console_blit, "TCOD_console_blit");
bindFunc(cast(void**)&TCOD_console_check_for_keypress, "TCOD_console_check_for_keypress");
bindFunc(cast(void**)&TCOD_console_clear, "TCOD_console_clear");
bindFunc(cast(void**)&TCOD_console_credits, "TCOD_console_credits");
bindFunc(cast(void**)&TCOD_console_credits_render, "TCOD_console_credits_render");
bindFunc(cast(void**)&TCOD_console_credits_reset, "TCOD_console_credits_reset");
bindFunc(cast(void**)&TCOD_console_delete, "TCOD_console_delete");
bindFunc(cast(void**)&TCOD_console_disable_keyboard_repeat, "TCOD_console_disable_keyboard_repeat");
bindFunc(cast(void**)&TCOD_console_flush, "TCOD_console_flush");
bindFunc(cast(void**)&TCOD_console_from_file, "TCOD_console_from_file");
bindFunc(cast(void**)&TCOD_console_get_alignment, "TCOD_console_get_alignment");
bindFunc(cast(void**)&TCOD_console_get_background_flag, "TCOD_console_get_background_flag");
bindFunc(cast(void**)&TCOD_console_get_char, "TCOD_console_get_char");
bindFunc(cast(void**)&TCOD_console_get_char_background, "TCOD_console_get_char_background");
bindFunc(cast(void**)&TCOD_console_get_char_foreground, "TCOD_console_get_char_foreground");
bindFunc(cast(void**)&TCOD_console_get_default_background, "TCOD_console_get_default_background");
bindFunc(cast(void**)&TCOD_console_get_default_foreground, "TCOD_console_get_default_foreground");
bindFunc(cast(void**)&TCOD_console_get_fade, "TCOD_console_get_fade");
bindFunc(cast(void**)&TCOD_console_get_fading_color, "TCOD_console_get_fading_color");
bindFunc(cast(void**)&TCOD_console_get_height, "TCOD_console_get_height");
bindFunc(cast(void**)&TCOD_console_get_height_rect, "TCOD_console_get_height_rect");
bindFunc(cast(void**)&TCOD_console_get_height_rect_utf, "TCOD_console_get_height_rect_utf");
bindFunc(cast(void**)&TCOD_console_get_width, "TCOD_console_get_width");
bindFunc(cast(void**)&TCOD_console_hline, "TCOD_console_hline");
bindFunc(cast(void**)&TCOD_console_init_root, "TCOD_console_init_root");
bindFunc(cast(void**)&TCOD_console_is_fullscreen, "TCOD_console_is_fullscreen");
bindFunc(cast(void**)&TCOD_console_is_key_pressed, "TCOD_console_is_key_pressed");
bindFunc(cast(void**)&TCOD_console_is_window_closed, "TCOD_console_is_window_closed");
bindFunc(cast(void**)&TCOD_console_load_apf, "TCOD_console_load_apf");
bindFunc(cast(void**)&TCOD_console_load_asc, "TCOD_console_load_asc");
bindFunc(cast(void**)&TCOD_console_map_ascii_code_to_font, "TCOD_console_map_ascii_code_to_font");
bindFunc(cast(void**)&TCOD_console_map_ascii_codes_to_font, "TCOD_console_map_ascii_codes_to_font");
bindFunc(cast(void**)&TCOD_console_map_string_to_font, "TCOD_console_map_string_to_font");
bindFunc(cast(void**)&TCOD_console_map_string_to_font_utf, "TCOD_console_map_string_to_font_utf");
bindFunc(cast(void**)&TCOD_console_new, "TCOD_console_new");
bindFunc(cast(void**)&TCOD_console_print, "TCOD_console_print");
bindFunc(cast(void**)&TCOD_console_print_ex, "TCOD_console_print_ex");
bindFunc(cast(void**)&TCOD_console_print_ex_utf, "TCOD_console_print_ex_utf");
bindFunc(cast(void**)&TCOD_console_print_frame, "TCOD_console_print_frame");
bindFunc(cast(void**)&TCOD_console_print_rect, "TCOD_console_print_rect");
bindFunc(cast(void**)&TCOD_console_print_rect_ex, "TCOD_console_print_rect_ex");
bindFunc(cast(void**)&TCOD_console_print_rect_ex_utf, "TCOD_console_print_rect_ex_utf");
bindFunc(cast(void**)&TCOD_console_print_rect_utf, "TCOD_console_print_rect_utf");
bindFunc(cast(void**)&TCOD_console_print_utf, "TCOD_console_print_utf");
bindFunc(cast(void**)&TCOD_console_put_char, "TCOD_console_put_char");
bindFunc(cast(void**)&TCOD_console_put_char_ex, "TCOD_console_put_char_ex");
bindFunc(cast(void**)&TCOD_console_rect, "TCOD_console_rect");
bindFunc(cast(void**)&TCOD_console_save_apf, "TCOD_console_save_apf");
bindFunc(cast(void**)&TCOD_console_save_asc, "TCOD_console_save_asc");
bindFunc(cast(void**)&TCOD_console_set_alignment, "TCOD_console_set_alignment");
bindFunc(cast(void**)&TCOD_console_set_background_flag, "TCOD_console_set_background_flag");
bindFunc(cast(void**)&TCOD_console_set_char, "TCOD_console_set_char");
bindFunc(cast(void**)&TCOD_console_set_char_background, "TCOD_console_set_char_background");
bindFunc(cast(void**)&TCOD_console_set_char_foreground, "TCOD_console_set_char_foreground");
bindFunc(cast(void**)&TCOD_console_set_color_control, "TCOD_console_set_color_control");
bindFunc(cast(void**)&TCOD_console_set_custom_font, "TCOD_console_set_custom_font");
bindFunc(cast(void**)&TCOD_console_set_default_background, "TCOD_console_set_default_background");
bindFunc(cast(void**)&TCOD_console_set_default_foreground, "TCOD_console_set_default_foreground");
bindFunc(cast(void**)&TCOD_console_set_dirty, "TCOD_console_set_dirty");
bindFunc(cast(void**)&TCOD_console_set_fade, "TCOD_console_set_fade");
bindFunc(cast(void**)&TCOD_console_set_fullscreen, "TCOD_console_set_fullscreen");
bindFunc(cast(void**)&TCOD_console_set_key_color, "TCOD_console_set_key_color");
bindFunc(cast(void**)&TCOD_console_set_keyboard_repeat, "TCOD_console_set_keyboard_repeat");
bindFunc(cast(void**)&TCOD_console_set_window_title, "TCOD_console_set_window_title");
bindFunc(cast(void**)&TCOD_console_vline, "TCOD_console_vline");
bindFunc(cast(void**)&TCOD_console_wait_for_keypress, "TCOD_console_wait_for_keypress");
bindFunc(cast(void**)&TCOD_dijkstra_compute, "TCOD_dijkstra_compute");
bindFunc(cast(void**)&TCOD_dijkstra_delete, "TCOD_dijkstra_delete");
bindFunc(cast(void**)&TCOD_dijkstra_get, "TCOD_dijkstra_get");
bindFunc(cast(void**)&TCOD_dijkstra_get_distance, "TCOD_dijkstra_get_distance");
bindFunc(cast(void**)&TCOD_dijkstra_is_empty, "TCOD_dijkstra_is_empty");
bindFunc(cast(void**)&TCOD_dijkstra_new, "TCOD_dijkstra_new");
bindFunc(cast(void**)&TCOD_dijkstra_new_using_function, "TCOD_dijkstra_new_using_function");
bindFunc(cast(void**)&TCOD_dijkstra_path_set, "TCOD_dijkstra_path_set");
bindFunc(cast(void**)&TCOD_dijkstra_path_walk, "TCOD_dijkstra_path_walk");
bindFunc(cast(void**)&TCOD_dijkstra_reverse, "TCOD_dijkstra_reverse");
bindFunc(cast(void**)&TCOD_dijkstra_size, "TCOD_dijkstra_size");
bindFunc(cast(void**)&TCOD_get_function_address, "TCOD_get_function_address");
bindFunc(cast(void**)&TCOD_heightmap_add, "TCOD_heightmap_add");
bindFunc(cast(void**)&TCOD_heightmap_add_fbm, "TCOD_heightmap_add_fbm");
bindFunc(cast(void**)&TCOD_heightmap_add_hill, "TCOD_heightmap_add_hill");
bindFunc(cast(void**)&TCOD_heightmap_add_hm, "TCOD_heightmap_add_hm");
bindFunc(cast(void**)&TCOD_heightmap_add_voronoi, "TCOD_heightmap_add_voronoi");
bindFunc(cast(void**)&TCOD_heightmap_clamp, "TCOD_heightmap_clamp");
bindFunc(cast(void**)&TCOD_heightmap_clear, "TCOD_heightmap_clear");
bindFunc(cast(void**)&TCOD_heightmap_copy, "TCOD_heightmap_copy");
bindFunc(cast(void**)&TCOD_heightmap_count_cells, "TCOD_heightmap_count_cells");
bindFunc(cast(void**)&TCOD_heightmap_delete, "TCOD_heightmap_delete");
bindFunc(cast(void**)&TCOD_heightmap_dig_bezier, "TCOD_heightmap_dig_bezier");
bindFunc(cast(void**)&TCOD_heightmap_dig_hill, "TCOD_heightmap_dig_hill");
bindFunc(cast(void**)&TCOD_heightmap_get_interpolated_value, "TCOD_heightmap_get_interpolated_value");
bindFunc(cast(void**)&TCOD_heightmap_get_minmax, "TCOD_heightmap_get_minmax");
bindFunc(cast(void**)&TCOD_heightmap_get_normal, "TCOD_heightmap_get_normal");
bindFunc(cast(void**)&TCOD_heightmap_get_slope, "TCOD_heightmap_get_slope");
bindFunc(cast(void**)&TCOD_heightmap_get_value, "TCOD_heightmap_get_value");
bindFunc(cast(void**)&TCOD_heightmap_has_land_on_border, "TCOD_heightmap_has_land_on_border");
bindFunc(cast(void**)&TCOD_heightmap_islandify, "TCOD_heightmap_islandify");
bindFunc(cast(void**)&TCOD_heightmap_kernel_transform, "TCOD_heightmap_kernel_transform");
bindFunc(cast(void**)&TCOD_heightmap_lerp_hm, "TCOD_heightmap_lerp_hm");
bindFunc(cast(void**)&TCOD_heightmap_multiply_hm, "TCOD_heightmap_multiply_hm");
bindFunc(cast(void**)&TCOD_heightmap_new, "TCOD_heightmap_new");
bindFunc(cast(void**)&TCOD_heightmap_normalize, "TCOD_heightmap_normalize");
bindFunc(cast(void**)&TCOD_heightmap_rain_erosion, "TCOD_heightmap_rain_erosion");
bindFunc(cast(void**)&TCOD_heightmap_scale, "TCOD_heightmap_scale");
bindFunc(cast(void**)&TCOD_heightmap_scale_fbm, "TCOD_heightmap_scale_fbm");
bindFunc(cast(void**)&TCOD_heightmap_set_value, "TCOD_heightmap_set_value");
bindFunc(cast(void**)&TCOD_image_blit, "TCOD_image_blit");
bindFunc(cast(void**)&TCOD_image_blit_2x, "TCOD_image_blit_2x");
bindFunc(cast(void**)&TCOD_image_blit_rect, "TCOD_image_blit_rect");
bindFunc(cast(void**)&TCOD_image_clear, "TCOD_image_clear");
bindFunc(cast(void**)&TCOD_image_delete, "TCOD_image_delete");
bindFunc(cast(void**)&TCOD_image_from_console, "TCOD_image_from_console");
bindFunc(cast(void**)&TCOD_image_get_alpha, "TCOD_image_get_alpha");
bindFunc(cast(void**)&TCOD_image_get_mipmap_pixel, "TCOD_image_get_mipmap_pixel");
bindFunc(cast(void**)&TCOD_image_get_pixel, "TCOD_image_get_pixel");
bindFunc(cast(void**)&TCOD_image_get_size, "TCOD_image_get_size");
bindFunc(cast(void**)&TCOD_image_hflip, "TCOD_image_hflip");
bindFunc(cast(void**)&TCOD_image_invert, "TCOD_image_invert");
bindFunc(cast(void**)&TCOD_image_is_pixel_transparent, "TCOD_image_is_pixel_transparent");
bindFunc(cast(void**)&TCOD_image_load, "TCOD_image_load");
bindFunc(cast(void**)&TCOD_image_new, "TCOD_image_new");
bindFunc(cast(void**)&TCOD_image_put_pixel, "TCOD_image_put_pixel");
bindFunc(cast(void**)&TCOD_image_refresh_console, "TCOD_image_refresh_console");
bindFunc(cast(void**)&TCOD_image_rotate90, "TCOD_image_rotate90");
bindFunc(cast(void**)&TCOD_image_save, "TCOD_image_save");
bindFunc(cast(void**)&TCOD_image_scale, "TCOD_image_scale");
bindFunc(cast(void**)&TCOD_image_set_key_color, "TCOD_image_set_key_color");
bindFunc(cast(void**)&TCOD_image_vflip, "TCOD_image_vflip");
bindFunc(cast(void**)&TCOD_lex_delete, "TCOD_lex_delete");
bindFunc(cast(void**)&TCOD_lex_expect_token_type, "TCOD_lex_expect_token_type");
bindFunc(cast(void**)&TCOD_lex_expect_token_value, "TCOD_lex_expect_token_value");
bindFunc(cast(void**)&TCOD_lex_get_last_error, "TCOD_lex_get_last_error");
bindFunc(cast(void**)&TCOD_lex_get_last_javadoc, "TCOD_lex_get_last_javadoc");
bindFunc(cast(void**)&TCOD_lex_get_token_name, "TCOD_lex_get_token_name");
bindFunc(cast(void**)&TCOD_lex_hextoint, "TCOD_lex_hextoint");
bindFunc(cast(void**)&TCOD_lex_new, "TCOD_lex_new");
bindFunc(cast(void**)&TCOD_lex_new_intern, "TCOD_lex_new_intern");
bindFunc(cast(void**)&TCOD_lex_parse, "TCOD_lex_parse");
bindFunc(cast(void**)&TCOD_lex_parse_until_token_type, "TCOD_lex_parse_until_token_type");
bindFunc(cast(void**)&TCOD_lex_parse_until_token_value, "TCOD_lex_parse_until_token_value");
bindFunc(cast(void**)&TCOD_lex_restore, "TCOD_lex_restore");
bindFunc(cast(void**)&TCOD_lex_savepoint, "TCOD_lex_savepoint");
bindFunc(cast(void**)&TCOD_lex_set_data_buffer, "TCOD_lex_set_data_buffer");
bindFunc(cast(void**)&TCOD_lex_set_data_file, "TCOD_lex_set_data_file");
bindFunc(cast(void**)&TCOD_line, "TCOD_line");
bindFunc(cast(void**)&TCOD_line_init, "TCOD_line_init");
bindFunc(cast(void**)&TCOD_line_init_mt, "TCOD_line_init_mt");
bindFunc(cast(void**)&TCOD_line_mt, "TCOD_line_mt");
bindFunc(cast(void**)&TCOD_line_step, "TCOD_line_step");
bindFunc(cast(void**)&TCOD_line_step_mt, "TCOD_line_step_mt");
bindFunc(cast(void**)&TCOD_list_add_all, "TCOD_list_add_all");
bindFunc(cast(void**)&TCOD_list_allocate, "TCOD_list_allocate");
bindFunc(cast(void**)&TCOD_list_begin, "TCOD_list_begin");
bindFunc(cast(void**)&TCOD_list_clear, "TCOD_list_clear");
bindFunc(cast(void**)&TCOD_list_clear_and_delete, "TCOD_list_clear_and_delete");
bindFunc(cast(void**)&TCOD_list_contains, "TCOD_list_contains");
bindFunc(cast(void**)&TCOD_list_delete, "TCOD_list_delete");
bindFunc(cast(void**)&TCOD_list_duplicate, "TCOD_list_duplicate");
bindFunc(cast(void**)&TCOD_list_end, "TCOD_list_end");
bindFunc(cast(void**)&TCOD_list_get, "TCOD_list_get");
bindFunc(cast(void**)&TCOD_list_insert_before, "TCOD_list_insert_before");
bindFunc(cast(void**)&TCOD_list_is_empty, "TCOD_list_is_empty");
bindFunc(cast(void**)&TCOD_list_new, "TCOD_list_new");
bindFunc(cast(void**)&TCOD_list_peek, "TCOD_list_peek");
bindFunc(cast(void**)&TCOD_list_pop, "TCOD_list_pop");
bindFunc(cast(void**)&TCOD_list_push, "TCOD_list_push");
bindFunc(cast(void**)&TCOD_list_remove, "TCOD_list_remove");
bindFunc(cast(void**)&TCOD_list_remove_iterator, "TCOD_list_remove_iterator");
bindFunc(cast(void**)&TCOD_list_remove_iterator_fast, "TCOD_list_remove_iterator_fast");
bindFunc(cast(void**)&TCOD_list_reverse, "TCOD_list_reverse");
bindFunc(cast(void**)&TCOD_list_set, "TCOD_list_set");
bindFunc(cast(void**)&TCOD_list_size, "TCOD_list_size");
bindFunc(cast(void**)&TCOD_load_library, "TCOD_load_library");
bindFunc(cast(void**)&TCOD_map_clear, "TCOD_map_clear");
bindFunc(cast(void**)&TCOD_map_compute_fov, "TCOD_map_compute_fov");
bindFunc(cast(void**)&TCOD_map_copy, "TCOD_map_copy");
bindFunc(cast(void**)&TCOD_map_delete, "TCOD_map_delete");
bindFunc(cast(void**)&TCOD_map_get_height, "TCOD_map_get_height");
bindFunc(cast(void**)&TCOD_map_get_nb_cells, "TCOD_map_get_nb_cells");
bindFunc(cast(void**)&TCOD_map_get_width, "TCOD_map_get_width");
bindFunc(cast(void**)&TCOD_map_is_in_fov, "TCOD_map_is_in_fov");
bindFunc(cast(void**)&TCOD_map_is_transparent, "TCOD_map_is_transparent");
bindFunc(cast(void**)&TCOD_map_is_walkable, "TCOD_map_is_walkable");
bindFunc(cast(void**)&TCOD_map_new, "TCOD_map_new");
bindFunc(cast(void**)&TCOD_map_set_in_fov, "TCOD_map_set_in_fov");
bindFunc(cast(void**)&TCOD_map_set_properties, "TCOD_map_set_properties");
bindFunc(cast(void**)&TCOD_mouse_get_status, "TCOD_mouse_get_status");
//bindFunc(cast(void**)&TCOD_mouse_includes_touch, "TCOD_mouse_includes_touch");
bindFunc(cast(void**)&TCOD_mouse_is_cursor_visible, "TCOD_mouse_is_cursor_visible");
bindFunc(cast(void**)&TCOD_mouse_move, "TCOD_mouse_move");
bindFunc(cast(void**)&TCOD_mouse_show_cursor, "TCOD_mouse_show_cursor");
bindFunc(cast(void**)&TCOD_mutex_delete, "TCOD_mutex_delete");
bindFunc(cast(void**)&TCOD_mutex_in, "TCOD_mutex_in");
bindFunc(cast(void**)&TCOD_mutex_new, "TCOD_mutex_new");
bindFunc(cast(void**)&TCOD_mutex_out, "TCOD_mutex_out");
bindFunc(cast(void**)&TCOD_namegen_destroy, "TCOD_namegen_destroy");
bindFunc(cast(void**)&TCOD_namegen_generate, "TCOD_namegen_generate");
bindFunc(cast(void**)&TCOD_namegen_generate_custom, "TCOD_namegen_generate_custom");
bindFunc(cast(void**)&TCOD_namegen_get_sets, "TCOD_namegen_get_sets");
bindFunc(cast(void**)&TCOD_namegen_parse, "TCOD_namegen_parse");
bindFunc(cast(void**)&TCOD_noise_delete, "TCOD_noise_delete");
bindFunc(cast(void**)&TCOD_noise_get, "TCOD_noise_get");
bindFunc(cast(void**)&TCOD_noise_get_ex, "TCOD_noise_get_ex");
bindFunc(cast(void**)&TCOD_noise_get_fbm, "TCOD_noise_get_fbm");
bindFunc(cast(void**)&TCOD_noise_get_fbm_ex, "TCOD_noise_get_fbm_ex");
bindFunc(cast(void**)&TCOD_noise_get_turbulence, "TCOD_noise_get_turbulence");
bindFunc(cast(void**)&TCOD_noise_get_turbulence_ex, "TCOD_noise_get_turbulence_ex");
bindFunc(cast(void**)&TCOD_noise_new, "TCOD_noise_new");
bindFunc(cast(void**)&TCOD_noise_set_type, "TCOD_noise_set_type");
bindFunc(cast(void**)&TCOD_parse_bool_value, "TCOD_parse_bool_value");
bindFunc(cast(void**)&TCOD_parse_char_value, "TCOD_parse_char_value");
bindFunc(cast(void**)&TCOD_parse_color_value, "TCOD_parse_color_value");
bindFunc(cast(void**)&TCOD_parse_dice_value, "TCOD_parse_dice_value");
bindFunc(cast(void**)&TCOD_parse_float_value, "TCOD_parse_float_value");
bindFunc(cast(void**)&TCOD_parse_integer_value, "TCOD_parse_integer_value");
bindFunc(cast(void**)&TCOD_parse_property_value, "TCOD_parse_property_value");
bindFunc(cast(void**)&TCOD_parse_string_value, "TCOD_parse_string_value");
bindFunc(cast(void**)&TCOD_parse_value_list_value, "TCOD_parse_value_list_value");
bindFunc(cast(void**)&TCOD_parser_delete, "TCOD_parser_delete");
bindFunc(cast(void**)&TCOD_parser_error, "TCOD_parser_error");
bindFunc(cast(void**)&TCOD_parser_get_bool_property, "TCOD_parser_get_bool_property");
bindFunc(cast(void**)&TCOD_parser_get_char_property, "TCOD_parser_get_char_property");
bindFunc(cast(void**)&TCOD_parser_get_color_property, "TCOD_parser_get_color_property");
bindFunc(cast(void**)&TCOD_parser_get_custom_property, "TCOD_parser_get_custom_property");
bindFunc(cast(void**)&TCOD_parser_get_dice_property, "TCOD_parser_get_dice_property");
bindFunc(cast(void**)&TCOD_parser_get_dice_property_py, "TCOD_parser_get_dice_property_py");
bindFunc(cast(void**)&TCOD_parser_get_float_property, "TCOD_parser_get_float_property");
bindFunc(cast(void**)&TCOD_parser_get_int_property, "TCOD_parser_get_int_property");
bindFunc(cast(void**)&TCOD_parser_get_list_property, "TCOD_parser_get_list_property");
bindFunc(cast(void**)&TCOD_parser_get_string_property, "TCOD_parser_get_string_property");
bindFunc(cast(void**)&TCOD_parser_new, "TCOD_parser_new");
bindFunc(cast(void**)&TCOD_parser_new_custom_type, "TCOD_parser_new_custom_type");
bindFunc(cast(void**)&TCOD_parser_new_struct, "TCOD_parser_new_struct");
bindFunc(cast(void**)&TCOD_parser_run, "TCOD_parser_run");
bindFunc(cast(void**)&TCOD_path_compute, "TCOD_path_compute");
bindFunc(cast(void**)&TCOD_path_delete, "TCOD_path_delete");
bindFunc(cast(void**)&TCOD_path_get, "TCOD_path_get");
bindFunc(cast(void**)&TCOD_path_get_destination, "TCOD_path_get_destination");
bindFunc(cast(void**)&TCOD_path_get_origin, "TCOD_path_get_origin");
bindFunc(cast(void**)&TCOD_path_is_empty, "TCOD_path_is_empty");
bindFunc(cast(void**)&TCOD_path_new_using_function, "TCOD_path_new_using_function");
bindFunc(cast(void**)&TCOD_path_new_using_map, "TCOD_path_new_using_map");
bindFunc(cast(void**)&TCOD_path_reverse, "TCOD_path_reverse");
bindFunc(cast(void**)&TCOD_path_size, "TCOD_path_size");
bindFunc(cast(void**)&TCOD_path_walk, "TCOD_path_walk");
bindFunc(cast(void**)&TCOD_random_delete, "TCOD_random_delete");
bindFunc(cast(void**)&TCOD_random_dice_new, "TCOD_random_dice_new");
bindFunc(cast(void**)&TCOD_random_dice_roll, "TCOD_random_dice_roll");
bindFunc(cast(void**)&TCOD_random_dice_roll_s, "TCOD_random_dice_roll_s");
bindFunc(cast(void**)&TCOD_random_get_double, "TCOD_random_get_double");
bindFunc(cast(void**)&TCOD_random_get_double_mean, "TCOD_random_get_double_mean");
bindFunc(cast(void**)&TCOD_random_get_float, "TCOD_random_get_float");
bindFunc(cast(void**)&TCOD_random_get_float_mean, "TCOD_random_get_float_mean");
bindFunc(cast(void**)&TCOD_random_get_instance, "TCOD_random_get_instance");
bindFunc(cast(void**)&TCOD_random_get_int, "TCOD_random_get_int");
bindFunc(cast(void**)&TCOD_random_get_int_mean, "TCOD_random_get_int_mean");
bindFunc(cast(void**)&TCOD_random_new, "TCOD_random_new");
bindFunc(cast(void**)&TCOD_random_new_from_seed, "TCOD_random_new_from_seed");
bindFunc(cast(void**)&TCOD_random_restore, "TCOD_random_restore");
bindFunc(cast(void**)&TCOD_random_save, "TCOD_random_save");
bindFunc(cast(void**)&TCOD_random_set_distribution, "TCOD_random_set_distribution");
bindFunc(cast(void**)&TCOD_semaphore_delete, "TCOD_semaphore_delete");
bindFunc(cast(void**)&TCOD_semaphore_lock, "TCOD_semaphore_lock");
bindFunc(cast(void**)&TCOD_semaphore_new, "TCOD_semaphore_new");
bindFunc(cast(void**)&TCOD_semaphore_unlock, "TCOD_semaphore_unlock");
bindFunc(cast(void**)&TCOD_struct_add_flag, "TCOD_struct_add_flag");
bindFunc(cast(void**)&TCOD_struct_add_list_property, "TCOD_struct_add_list_property");
bindFunc(cast(void**)&TCOD_struct_add_property, "TCOD_struct_add_property");
bindFunc(cast(void**)&TCOD_struct_add_structure, "TCOD_struct_add_structure");
bindFunc(cast(void**)&TCOD_struct_add_value_list, "TCOD_struct_add_value_list");
bindFunc(cast(void**)&TCOD_struct_add_value_list_sized, "TCOD_struct_add_value_list_sized");
bindFunc(cast(void**)&TCOD_struct_get_name, "TCOD_struct_get_name");
bindFunc(cast(void**)&TCOD_struct_get_type, "TCOD_struct_get_type");
bindFunc(cast(void**)&TCOD_struct_is_mandatory, "TCOD_struct_is_mandatory");
bindFunc(cast(void**)&TCOD_sys_check_for_event, "TCOD_sys_check_for_event");
bindFunc(cast(void**)&TCOD_sys_clipboard_get, "TCOD_sys_clipboard_get");
bindFunc(cast(void**)&TCOD_sys_clipboard_set, "TCOD_sys_clipboard_set");
bindFunc(cast(void**)&TCOD_sys_create_directory, "TCOD_sys_create_directory");
bindFunc(cast(void**)&TCOD_sys_delete_directory, "TCOD_sys_delete_directory");
bindFunc(cast(void**)&TCOD_sys_delete_file, "TCOD_sys_delete_file");
bindFunc(cast(void**)&TCOD_sys_elapsed_milli, "TCOD_sys_elapsed_milli");
bindFunc(cast(void**)&TCOD_sys_elapsed_seconds, "TCOD_sys_elapsed_seconds");
bindFunc(cast(void**)&TCOD_sys_file_exists, "TCOD_sys_file_exists");
bindFunc(cast(void**)&TCOD_sys_force_fullscreen_resolution, "TCOD_sys_force_fullscreen_resolution");
bindFunc(cast(void**)&TCOD_sys_get_char_size, "TCOD_sys_get_char_size");
bindFunc(cast(void**)&TCOD_sys_get_current_resolution, "TCOD_sys_get_current_resolution");
bindFunc(cast(void**)&TCOD_sys_get_directory_content, "TCOD_sys_get_directory_content");
bindFunc(cast(void**)&TCOD_sys_get_fps, "TCOD_sys_get_fps");
bindFunc(cast(void**)&TCOD_sys_get_fullscreen_offsets, "TCOD_sys_get_fullscreen_offsets");
bindFunc(cast(void**)&TCOD_sys_get_last_frame_length, "TCOD_sys_get_last_frame_length");
bindFunc(cast(void**)&TCOD_sys_get_num_cores, "TCOD_sys_get_num_cores");
bindFunc(cast(void**)&TCOD_sys_get_renderer, "TCOD_sys_get_renderer");
//bindFunc(cast(void**)&TCOD_sys_get_sdl_window, "TCOD_sys_get_sdl_window");
bindFunc(cast(void**)&TCOD_sys_is_directory, "TCOD_sys_is_directory");
bindFunc(cast(void**)&TCOD_sys_read_file, "TCOD_sys_read_file");
bindFunc(cast(void**)&TCOD_sys_register_SDL_renderer, "TCOD_sys_register_SDL_renderer");
bindFunc(cast(void**)&TCOD_sys_save_screenshot, "TCOD_sys_save_screenshot");
bindFunc(cast(void**)&TCOD_sys_set_fps, "TCOD_sys_set_fps");
bindFunc(cast(void**)&TCOD_sys_set_renderer, "TCOD_sys_set_renderer");
bindFunc(cast(void**)&TCOD_sys_sleep_milli, "TCOD_sys_sleep_milli");
bindFunc(cast(void**)&TCOD_sys_update_char, "TCOD_sys_update_char");
bindFunc(cast(void**)&TCOD_sys_wait_for_event, "TCOD_sys_wait_for_event");
bindFunc(cast(void**)&TCOD_sys_write_file, "TCOD_sys_write_file");
bindFunc(cast(void**)&TCOD_text_delete, "TCOD_text_delete");
bindFunc(cast(void**)&TCOD_text_get, "TCOD_text_get");
bindFunc(cast(void**)&TCOD_text_init, "TCOD_text_init");
bindFunc(cast(void**)&TCOD_text_render, "TCOD_text_render");
bindFunc(cast(void**)&TCOD_text_reset, "TCOD_text_reset");
bindFunc(cast(void**)&TCOD_text_set_colors, "TCOD_text_set_colors");
bindFunc(cast(void**)&TCOD_text_set_properties, "TCOD_text_set_properties");
bindFunc(cast(void**)&TCOD_text_update, "TCOD_text_update");
bindFunc(cast(void**)&TCOD_thread_delete, "TCOD_thread_delete");
bindFunc(cast(void**)&TCOD_thread_new, "TCOD_thread_new");
bindFunc(cast(void**)&TCOD_thread_wait, "TCOD_thread_wait");
bindFunc(cast(void**)&TCOD_tree_add_son, "TCOD_tree_add_son");
bindFunc(cast(void**)&TCOD_tree_new, "TCOD_tree_new");
bindFunc(cast(void**)&TCOD_zip_delete, "TCOD_zip_delete");
bindFunc(cast(void**)&TCOD_zip_get_char, "TCOD_zip_get_char");
bindFunc(cast(void**)&TCOD_zip_get_color, "TCOD_zip_get_color");
bindFunc(cast(void**)&TCOD_zip_get_console, "TCOD_zip_get_console");
bindFunc(cast(void**)&TCOD_zip_get_current_bytes, "TCOD_zip_get_current_bytes");
bindFunc(cast(void**)&TCOD_zip_get_data, "TCOD_zip_get_data");
bindFunc(cast(void**)&TCOD_zip_get_float, "TCOD_zip_get_float");
bindFunc(cast(void**)&TCOD_zip_get_image, "TCOD_zip_get_image");
bindFunc(cast(void**)&TCOD_zip_get_int, "TCOD_zip_get_int");
bindFunc(cast(void**)&TCOD_zip_get_remaining_bytes, "TCOD_zip_get_remaining_bytes");
bindFunc(cast(void**)&TCOD_zip_get_string, "TCOD_zip_get_string");
bindFunc(cast(void**)&TCOD_zip_load_from_file, "TCOD_zip_load_from_file");
bindFunc(cast(void**)&TCOD_zip_new, "TCOD_zip_new");
bindFunc(cast(void**)&TCOD_zip_put_char, "TCOD_zip_put_char");
bindFunc(cast(void**)&TCOD_zip_put_color, "TCOD_zip_put_color");
bindFunc(cast(void**)&TCOD_zip_put_console, "TCOD_zip_put_console");
bindFunc(cast(void**)&TCOD_zip_put_data, "TCOD_zip_put_data");
bindFunc(cast(void**)&TCOD_zip_put_float, "TCOD_zip_put_float");
bindFunc(cast(void**)&TCOD_zip_put_image, "TCOD_zip_put_image");
bindFunc(cast(void**)&TCOD_zip_put_int, "TCOD_zip_put_int");
bindFunc(cast(void**)&TCOD_zip_put_string, "TCOD_zip_put_string");
bindFunc(cast(void**)&TCOD_zip_save_to_file, "TCOD_zip_save_to_file");
bindFunc(cast(void**)&TCOD_zip_skip_bytes, "TCOD_zip_skip_bytes");
}
}
__gshared DerelictTCODLoader DerelictTCOD;
shared static this()
{
string[] libNames;
if(Derelict_OS_Windows) {
libNames = ["libtcod_debug.dll", "libtcod.dll"];
} else if(Derelict_OS_Linux) {
libNames = ["libtcod_debug.so", "libtcod.so"];
// prepend executable path to library names
string path = dirName(Runtime.args[0]);
libNames = array(map!(e => path ~ dirSeparator ~ e)(libNames));
} else
assert(0, "libtcod-d is not supported on this operating system.");
DerelictTCOD = new DerelictTCODLoader(join(libNames, ','));
DerelictTCOD.load();
}
|
D
|
a crosspiece between the legs of a chair
one of the crosspieces that form the steps of a ladder
sound loudly and sonorously
ring or echo with sound
make (bells) ring, often for the purposes of musical edification
get or try to get into communication (with someone) by telephone
extend on all sides of simultaneously
attach a ring to the foot of, in order to identify
|
D
|
ubyte moo;
//pragma(__range, (1<<31>>(moo%30+2)));
//pragma(__range, cast(uint)(1<<31>>(moo%30+2)));
//pragma(__range, cast(ushort)-5368096384);
//pragma(__range, cast(uint)-536870912);
auto a = [[[[&moo]]]]; // TODO
auto b = [[[[&a]]]]; // TODO
auto c = [[[[&b]]]]; // TODO
auto d = [[[[&c]]]]; // TODO
pragma(msg, typeof(*d)); // error
//int xyz;
int xyz();
int xyz(float);
/*class C{
class D{}
}*/
//int[] y;
pragma(msg, "start");
inout(const(int)[]) foo(inout(const(int)[]) x){
inout(const(inout(shared(immutable(inout(int)[]))))[]) y;
//const(immutable(int)) y;
pragma(msg, typeof(y));
immutable(int[]) p;
inout(immutable(int)[]) q;
pragma(msg, typeof(cast()q));
// inout(int[]) yy;
// immutable(int[]) xx;
//shared(const(immutable(int)*[][][][])) yy;
//shared(inout(int)*[][][][]) xx;
inout(immutable(int)[]*)[] xx;
inout(const(int[])*)[] yy;
//shared(const(int*))* pp = yy;
//const(shared(inout(int)*))* pp=yy;
auto zz = 1 ? xx : yy;
pragma(msg, typeof(zz));
auto ww = 1 ? yy : xx;
pragma(msg, typeof(ww));
assert(0 == 0x80000000);
return x;
}
//x x;
//int x;
void foo(){}
int bar(){ return 1; }
void main(){
int mm;
auto foo = &(mm);
//int[0] nn = [];
//pragma(msg, typeof(nn));
//pragma(msg, typeof(q));
shared(int) x=cast(const(int))1;
const(shared(int)) xxx=1;
shared(const(int)) xxy=xxx;
immutable(const(int)) xxz;
shared(immutable(int)) xxa;
immutable(shared(int)) xxb;
//const(shared(immutable(int))) xxc;
const(typeof(xxa)) xxc = xxa;
immutable(const(int)[]) xxd;
pragma(msg, typeof(xxx));
pragma(msg, typeof(xxy));
pragma(msg, typeof(xxz));
pragma(msg, typeof(xxa));
pragma(msg, typeof(xxb));
pragma(msg, typeof(xxc));
pragma(msg, typeof(xxd));
//static assert(is(typeof(xxd) == const(immutable(int)*[])));
int yyy=xxx;
ushort wc=((x&1)+1)+1U; int ii=wc;
short wx = 10/(1+(wc%2));
uint goo;
ubyte moo = ((goo&252)^2)+1;
pragma(__range,(goo&252)^2);
ubyte momo = (goo|1)-1; // error
pragma(msg, typeof((goo%255)<<2));
long msmm;
//pragma(__range, ((goo%255)|1)-1);
//pragma(__range, cast(dchar)((goo%3)<<30));
auto arr=[2fi+1L, 1.0L, 2,];
float sa=1+1; char cb;//=sa;
int cc;
//cc=x?arr:cb;
//auto arr=["moo",[]];
creal cx,cy;
//pragma(msg,typeof(cx<cy));
pragma(msg,typeof(cc,cb,arr));
//ubyte x;
double y;
//pragma(msg,typeof(x+y));
ifloat ix, iy;
bool a,b;
int c;
//struct S{} S rx;
int rx;
//rx=2;
pragma(msg,typeof(null));
pragma(msg,typeof([]));
pragma(msg,typeof(1?x:y));
pragma(msg,typeof(ix+c));
pragma(msg,typeof(1?ix:iy));
pragma(msg,typeof(1?ix:x));
uint j;
//auto x=delegate uint(dchar i){return i+j;pragma(msg,typeof(i>>j));};
//pragma(msg,typeof(foo()));
//auto y=(int i){return i+soasjojsoj;};
auto xx="hello";
pragma(msg,typeof(xx));
//printf("hello"~" "~"world!\n");
//scanf("%d\n",&x);
//x++;
//int x;
//int i;
//{int i(){};}
//C c=new C;
//C.d d=new c.D;
//printf("x=%d!\n",x);
//int i(){}
for(int i=0;i<100;i++){
//for(int i=0;i<100;i++){}
}//*/
}
//auto foo(){return bar();return 1;}
//auto bar(){return foo();}
extern(C) int scanf(const(char)*, ...);
extern(C) int printf(const(char)*, ...);
//int x=100;
void fill()(){}
void fill()(){}
/+
enum x = [0,y];
enum y = [0,x];
enum xx = uu;
enum uu = xx;
+/
|
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.gchecksum;
import glib.gtypes;
import glib.garray;
import glib.gbytes;
enum GChecksumType {
G_CHECKSUM_MD5,
G_CHECKSUM_SHA1,
G_CHECKSUM_SHA256,
G_CHECKSUM_SHA512
}
struct GChecksum;
extern (C) {
gssize g_checksum_type_get_length (GChecksumType checksum_type);
GChecksum * g_checksum_new (GChecksumType checksum_type);
void g_checksum_reset (GChecksum *checksum);
GChecksum * g_checksum_copy (const(GChecksum) *checksum);
void g_checksum_free (GChecksum *checksum);
void g_checksum_update (GChecksum *checksum,
const(guchar) *data,
gssize length);
const(gchar) * g_checksum_get_string (GChecksum *checksum);
void g_checksum_get_digest (GChecksum *checksum,
guint8 *buffer,
gsize *digest_len);
gchar *g_compute_checksum_for_data (GChecksumType checksum_type,
const(guchar) *data,
gsize length);
gchar *g_compute_checksum_for_string (GChecksumType checksum_type,
const(gchar) *str,
gssize length);
gchar *g_compute_checksum_for_bytes (GChecksumType checksum_type,
GBytes *data);
}
|
D
|
/**
* Exception handling support for Dwarf-style portable exceptions.
*
* Copyright: Copyright (c) 2015-2016 by D Language Foundation
* 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
* Source: $(DRUNTIMESRC rt/_dwarfeh.d)
*/
module rt.dwarfeh;
version (Posix):
import rt.dmain2: _d_print_throwable;
import rt.unwind;
import core.stdc.stdio;
import core.stdc.stdlib;
extern (C)
{
int _d_isbaseof(ClassInfo b, ClassInfo c);
void _d_createTrace(Object o, void* context);
}
/* High 4 bytes = vendor, low 4 bytes = language
* For us: "DMD\0D\0\0\0"
*/
enum _Unwind_Exception_Class dmdExceptionClass =
(cast(_Unwind_Exception_Class)'D' << 56) |
(cast(_Unwind_Exception_Class)'M' << 48) |
(cast(_Unwind_Exception_Class)'D' << 40) |
(cast(_Unwind_Exception_Class)'D' << 24);
/**
* Wrap the unwinder's data with our own compiler specific struct
* with our own data.
*/
struct ExceptionHeader
{
Throwable object; // the thrown D object
_Unwind_Exception exception_object; // the unwinder's data
// Save info on the handler that was detected
int handler; // which catch
const(ubyte)* languageSpecificData; // Language Specific Data Area for function enclosing the handler
_Unwind_Ptr landingPad; // pointer to catch code
// Stack other thrown exceptions in current thread through here.
ExceptionHeader* next;
static ExceptionHeader* stack; // thread local stack of chained exceptions
/* Pre-allocate storage for 1 instance per thread.
* Use calloc/free for multiple exceptions in flight.
* Does not use GC
*/
static ExceptionHeader ehstorage;
/************
* Allocate and initialize an ExceptionHeader.
* Params:
* o = thrown object
* Returns:
* allocated and initalized ExceptionHeader
*/
static ExceptionHeader* create(Throwable o) @nogc
{
auto eh = &ehstorage;
if (eh.object) // if in use
{
eh = cast(ExceptionHeader*)core.stdc.stdlib.calloc(ExceptionHeader.sizeof, 1);
if (!eh)
terminate(__LINE__); // out of memory while throwing - not much else can be done
}
eh.object = o;
eh.exception_object.exception_class = dmdExceptionClass;
//printf("create(): %p\n", eh);
return eh;
}
/**********************
* Free ExceptionHeader that was created by create().
* Params:
* eh = ExceptionHeader to free
*/
static void free(ExceptionHeader* eh)
{
//printf("free(%p)\n", eh);
/* Smite contents even if subsequently free'd,
* to ward off dangling pointer bugs.
*/
*eh = ExceptionHeader.init;
if (eh != &ehstorage)
core.stdc.stdlib.free(eh);
}
/*************************
* Push this onto stack of chained exceptions.
*/
void push()
{
next = stack;
stack = &this;
}
/************************
* Pop and return top of chained exception stack.
*/
static ExceptionHeader* pop()
{
auto eh = stack;
stack = eh.next;
return eh;
}
/*******************************
* Convert from pointer to exception_object to pointer to ExceptionHeader
* that it is embedded inside of.
* Params:
* eo = pointer to exception_object field
* Returns:
* pointer to ExceptionHeader that eo points into.
*/
static ExceptionHeader* toExceptionHeader(_Unwind_Exception* eo)
{
return cast(ExceptionHeader*)(cast(void*)eo - ExceptionHeader.exception_object.offsetof);
}
}
/*******************************************
* The first thing a catch handler does is call this.
* Params:
* exceptionObject = value passed to catch handler by unwinder
* Returns:
* object that was caught
*/
extern(C) Throwable __dmd_begin_catch(_Unwind_Exception* exceptionObject)
{
ExceptionHeader *eh = ExceptionHeader.toExceptionHeader(exceptionObject);
//printf("__dmd_begin_catch(%p), object = %p\n", eh, eh.object);
auto o = eh.object;
// Remove our reference to the exception. We should not decrease its refcount,
// because we pass the object on to the caller.
eh.object = null;
// Pop off of chain
if (eh != ExceptionHeader.pop())
terminate(__LINE__); // eh should have been at top of stack
_Unwind_DeleteException(&eh.exception_object); // done with eh
return o;
}
/****************************************
* Called when fibers switch contexts.
* Params:
* newContext = stack to switch to
* Returns:
* previous value of stack
*/
extern(C) void* _d_eh_swapContextDwarf(void* newContext) nothrow @nogc
{
auto old = ExceptionHeader.stack;
ExceptionHeader.stack = cast(ExceptionHeader*)newContext;
return old;
}
/*********************
* Called by D code to throw an exception via
* ---
* throw o;
* ---
* Params:
* o = Object to throw
* Returns:
* doesn't return
*/
extern(C) void _d_throwdwarf(Throwable o)
{
ExceptionHeader *eh = ExceptionHeader.create(o);
eh.push(); // add to thrown exception stack
//printf("_d_throwdwarf: eh = %p, eh.next = %p\n", eh, eh.next);
/* Increment reference count if `o` is a refcounted Throwable
*/
auto refcount = o.refcount();
if (refcount) // non-zero means it's refcounted
o.refcount() = refcount + 1;
/* Called by unwinder when exception object needs destruction by other than our code.
*/
extern (C) static void exception_cleanup(_Unwind_Reason_Code reason, _Unwind_Exception* eo)
{
//printf("exception_cleanup()\n");
switch (reason)
{
case _URC_FATAL_PHASE1_ERROR: // unknown error code
case _URC_FATAL_PHASE2_ERROR: // probably corruption
default: // uh-oh
terminate(__LINE__); // C++ calls terminate() instead
break;
case _URC_FOREIGN_EXCEPTION_CAUGHT:
case _URC_NO_REASON:
auto eh = ExceptionHeader.toExceptionHeader(eo);
ExceptionHeader.free(eh);
break;
}
}
eh.exception_object.exception_cleanup = &exception_cleanup;
_d_createTrace(o, null);
auto r = _Unwind_RaiseException(&eh.exception_object);
/* Shouldn't have returned, but if it did:
*/
switch (r)
{
case _URC_END_OF_STACK:
/* Unwound the stack without encountering a catch clause.
* In C++, this would mean call uncaught_exception().
* In D, this can happen only if `rt_trapExceptions` is cleared
* since otherwise everything is enclosed by a top-level
* try/catch.
*/
fprintf(stderr, "uncaught exception\n");
/**
As _d_print_throwable() itself may throw multiple times when calling core.demangle,
and with the uncaught exception still on the EH stack, this doesn't bode well with core.demangle's error recovery.
*/
__dmd_begin_catch(&eh.exception_object);
_d_print_throwable(o);
abort();
assert(0);
case _URC_FATAL_PHASE1_ERROR:
/* Unexpected error, likely some sort of corruption.
* In C++, terminate() would be called.
*/
terminate(__LINE__); // should never happen
assert(0);
case _URC_FATAL_PHASE2_ERROR:
/* Unexpected error. Program is in an unknown state.
* In C++, terminate() would be called.
*/
terminate(__LINE__); // should never happen
assert(0);
default:
terminate(__LINE__); // should never happen
assert(0);
}
}
/*****************************************
* "personality" function, specific to each language.
* This one, of course, is specific to DMD.
* Params:
* ver = version must be 1
* actions = bitwise OR of the 4 actions _UA_xxx.
* _UA_SEARCH_PHASE means return _URC_HANDLER_FOUND if current frame has a handler,
* _URC_CONTINUE_UNWIND if not. Cannot be used with _UA_CLEANUP_PHASE.
* _UA_CLEANUP_PHASE means perform cleanup for current frame by calling nested functions
* and returning _URC_CONTINUE_UNWIND. Or, set up registers and IP for Landing Pad
* and return _URC_INSTALL_CONTEXT.
* _UA_HANDLER_FRAME means this frame was the one with the handler in Phase 1, and now
* it is Phase 2 and the handler must be run.
* _UA_FORCE_UNWIND means unwinding the stack for longjmp or thread cancellation. Run
* finally clauses, not catch clauses, finallys must end with call to _Uwind_Resume().
* exceptionClass = 8 byte value indicating type of thrown exception. If the low 4 bytes
* are "C++\0", it's a C++ exception.
* exceptionObject = language specific exception information
* context = opaque type of unwinder state information
* Returns:
* reason code
* See_Also:
* http://www.ucw.cz/~hubicka/papers/abi/node25.html
*/
extern (C) _Unwind_Reason_Code __dmd_personality_v0(int ver, _Unwind_Action actions,
_Unwind_Exception_Class exceptionClass, _Unwind_Exception* exceptionObject,
_Unwind_Context* context)
{
//printf("__dmd_personality_v0(actions = x%x, eo = %p, context = %p)\n", cast(int)actions, exceptionObject, context);
//printf("exceptionClass = x%08lx\n", exceptionClass);
if (ver != 1)
return _URC_FATAL_PHASE1_ERROR;
assert(context);
const(ubyte)* language_specific_data;
int handler;
_Unwind_Ptr landing_pad;
//for (auto ehx = eh; ehx; ehx = ehx.next)
//printf(" eh: %p next=%014p lsda=%p '%.*s'\n", ehx, ehx.next, ehx.languageSpecificData, ehx.object.msg.length, ehx.object.msg.ptr);
language_specific_data = cast(const(ubyte)*)_Unwind_GetLanguageSpecificData(context);
//printf("lsda = %p\n", language_specific_data);
auto Start = _Unwind_GetRegionStart(context);
/* Get instruction pointer (ip) at start of instruction that threw
*/
version (CRuntime_Glibc)
{
int ip_before_insn;
// The instruction pointer must not be decremented when unwinding from a
// signal handler frame (asynchronous exception, also see
// etc.linux.memoryerror). So use _Unwind_GetIPInfo where available.
auto ip = _Unwind_GetIPInfo(context, &ip_before_insn);
if (!ip_before_insn)
--ip;
}
else
{
auto ip = _Unwind_GetIP(context);
--ip;
}
//printf("ip = x%x\n", cast(int)(ip - Start));
//printf("\tStart = %p, ipoff = %p, lsda = %p\n", Start, ip - Start, language_specific_data);
auto result = scanLSDA(language_specific_data, ip - Start, exceptionClass,
(actions & _UA_FORCE_UNWIND) != 0, // don't catch when forced unwinding
(actions & _UA_SEARCH_PHASE) != 0, // search phase is looking for handlers
exceptionObject,
landing_pad,
handler);
landing_pad += Start;
final switch (result)
{
case LsdaResult.notFound:
fprintf(stderr, "not found\n");
terminate(__LINE__);
assert(0);
case LsdaResult.foreign:
terminate(__LINE__);
assert(0);
case LsdaResult.corrupt:
fprintf(stderr, "LSDA is corrupt\n");
terminate(__LINE__);
assert(0);
case LsdaResult.noAction:
//printf(" no action\n");
return _URC_CONTINUE_UNWIND;
case LsdaResult.cleanup:
//printf(" cleanup\n");
if (actions & _UA_SEARCH_PHASE)
{
return _URC_CONTINUE_UNWIND;
}
break;
case LsdaResult.handler:
//printf(" handler\n");
//printf(" eh.lsda = %p, lsda = %p\n", eh.languageSpecificData, language_specific_data);
assert(!(actions & _UA_FORCE_UNWIND));
if (actions & _UA_SEARCH_PHASE)
{
if (exceptionClass == dmdExceptionClass)
{
auto eh = ExceptionHeader.toExceptionHeader(exceptionObject);
eh.handler = handler;
eh.languageSpecificData = language_specific_data;
eh.landingPad = landing_pad;
}
return _URC_HANDLER_FOUND;
}
break;
}
//printf(" lsda = %p, landing_pad = %p, handler = %d\n", language_specific_data, landing_pad, handler);
//printf( '%.*s' next = %p\n", eh.object.msg.length, eh.object.msg.ptr, eh.next);
// Figure out what to do when there are multiple exceptions in flight
if (exceptionClass == dmdExceptionClass)
{
auto eh = ExceptionHeader.toExceptionHeader(exceptionObject);
auto currentLsd = language_specific_data;
bool bypassed = false;
while (eh.next)
{
ExceptionHeader* ehn = eh.next;
Error e = cast(Error)eh.object;
if (e !is null && !cast(Error)ehn.object)
{
/* eh is an Error, ehn is not. Skip ehn.
*/
//printf("bypass\n");
currentLsd = ehn.languageSpecificData;
// Continuing to construct the bypassed chain
eh = ehn;
bypassed = true;
continue;
}
// Don't combine when the exceptions are from different functions
if (currentLsd != ehn.languageSpecificData)
{
//printf("break: %p %p\n", currentLsd, ehn.languageSpecificData);
break;
}
else
{
//printf("chain\n");
// Append eh's object to ehn's object chain
// And replace our exception object with in-flight one
eh.object = Throwable.chainTogether(ehn.object, eh.object);
if (ehn.handler != handler && !bypassed)
{
handler = ehn.handler;
eh.handler = handler;
eh.languageSpecificData = language_specific_data;
eh.landingPad = landing_pad;
}
}
// Remove ehn from threaded chain
eh.next = ehn.next;
//printf("delete %p\n", ehn);
_Unwind_DeleteException(&ehn.exception_object); // discard ehn
}
if (bypassed)
{
eh = ExceptionHeader.toExceptionHeader(exceptionObject);
Error e = cast(Error)eh.object;
auto ehn = eh.next;
e.bypassedException = ehn.object;
eh.next = ehn.next;
_Unwind_DeleteException(&ehn.exception_object);
}
}
// Set up registers and jump to cleanup or handler
int reg0 = 0; // EAX/RAX is __exception_object
int reg1 = (size_t.sizeof == 4) ? 2 : 1; // EDX/RDX is __handler
_Unwind_SetGR(context, reg0, cast(_Unwind_Ptr)exceptionObject);
_Unwind_SetGR(context, reg1, handler);
_Unwind_SetIP(context, landing_pad);
return _URC_INSTALL_CONTEXT;
}
/*************************************************
* Look at the chain of inflight exceptions and pick the class type that'll
* be looked for in catch clauses.
* Params:
* exceptionObject = language specific exception information
* Returns:
* class type to look for
*/
ClassInfo getClassInfo(_Unwind_Exception* exceptionObject)
{
ExceptionHeader* eh = ExceptionHeader.toExceptionHeader(exceptionObject);
Throwable ehobject = eh.object;
//printf("start: %p '%.*s'\n", ehobject, ehobject.classinfo.info.name.length, ehobject.classinfo.info.name.ptr);
for (ExceptionHeader* ehn = eh.next; ehn; ehn = ehn.next)
{
//printf("ehn = %p '%.*s'\n", ehn.object, cast(int)ehn.object.classinfo.info.name.length, ehn.object.classinfo.info.name.ptr);
Error e = cast(Error)ehobject;
if (e is null || (cast(Error)ehn.object) !is null)
ehobject = ehn.object;
}
//printf("end : %p\n", ehobject);
return ehobject.classinfo;
}
/******************************
* Decode Unsigned LEB128.
* Params:
* p = pointer to data pointer, *p is updated
* to point past decoded value
* Returns:
* decoded value
* See_Also:
* https://en.wikipedia.org/wiki/LEB128
*/
_uleb128_t uLEB128(const(ubyte)** p)
{
auto q = *p;
_uleb128_t result = 0;
uint shift = 0;
while (1)
{
ubyte b = *q++;
result |= cast(_uleb128_t)(b & 0x7F) << shift;
if ((b & 0x80) == 0)
break;
shift += 7;
}
*p = q;
return result;
}
/******************************
* Decode Signed LEB128.
* Params:
* p = pointer to data pointer, *p is updated
* to point past decoded value
* Returns:
* decoded value
* See_Also:
* https://en.wikipedia.org/wiki/LEB128
*/
_sleb128_t sLEB128(const(ubyte)** p)
{
auto q = *p;
ubyte b;
_sleb128_t result = 0;
uint shift = 0;
while (1)
{
b = *q++;
result |= cast(_sleb128_t)(b & 0x7F) << shift;
shift += 7;
if ((b & 0x80) == 0)
break;
}
if (shift < result.sizeof * 8 && (b & 0x40))
result |= -(cast(_sleb128_t)1 << shift);
*p = q;
return result;
}
enum
{
DW_EH_PE_FORMAT_MASK = 0x0F,
DW_EH_PE_APPL_MASK = 0x70,
DW_EH_PE_indirect = 0x80,
DW_EH_PE_omit = 0xFF,
DW_EH_PE_ptr = 0x00,
DW_EH_PE_uleb128 = 0x01,
DW_EH_PE_udata2 = 0x02,
DW_EH_PE_udata4 = 0x03,
DW_EH_PE_udata8 = 0x04,
DW_EH_PE_sleb128 = 0x09,
DW_EH_PE_sdata2 = 0x0A,
DW_EH_PE_sdata4 = 0x0B,
DW_EH_PE_sdata8 = 0x0C,
DW_EH_PE_absptr = 0x00,
DW_EH_PE_pcrel = 0x10,
DW_EH_PE_textrel = 0x20,
DW_EH_PE_datarel = 0x30,
DW_EH_PE_funcrel = 0x40,
DW_EH_PE_aligned = 0x50,
}
/**************************************************
* Read and extract information from the LSDA (aka gcc_except_table section).
* The dmd Call Site Table is structurally different from other implementations. It
* is organized as nested ranges, and one ip can map to multiple ranges. The most
* nested candidate is selected when searched. Other implementations have one candidate
* per ip.
* Params:
* lsda = pointer to LSDA table
* ip = offset from start of function at which exception happened
* exceptionClass = which language threw the exception
* cleanupsOnly = only look for cleanups
* preferHandler = if a handler encloses a cleanup, prefer the handler
* exceptionObject = language specific exception information
* landingPad = set to landing pad
* handler = set to index of which catch clause was matched
* Returns:
* LsdaResult
* See_Also:
* http://reverseengineering.stackexchange.com/questions/6311/how-to-recover-the-exception-info-from-gcc-except-table-and-eh-handle-sections
* http://www.airs.com/blog/archives/464
* https://anarcheuz.github.io/2015/02/15/ELF%20internals%20part%202%20-%20exception%20handling/
*/
LsdaResult scanLSDA(const(ubyte)* lsda, _Unwind_Ptr ip, _Unwind_Exception_Class exceptionClass,
bool cleanupsOnly,
bool preferHandler,
_Unwind_Exception* exceptionObject,
out _Unwind_Ptr landingPad, out int handler)
{
auto p = lsda;
if (!p)
return LsdaResult.noAction;
_Unwind_Ptr dw_pe_value(ubyte pe)
{
_Unwind_Ptr value = void;
switch (pe)
{
case DW_EH_PE_uleb128: value = cast(_Unwind_Ptr) uLEB128(&p); break;
case DW_EH_PE_udata2: value = cast(_Unwind_Ptr) *cast(ushort*)p; p += 2; break;
case DW_EH_PE_udata4: value = cast(_Unwind_Ptr) *cast(uint*)p; p += 4; break;
case DW_EH_PE_udata8: value = cast(_Unwind_Ptr) *cast(ulong*)p; p += 8; break;
case DW_EH_PE_sleb128: value = cast(_Unwind_Ptr) sLEB128(&p); break;
case DW_EH_PE_sdata2: value = cast(_Unwind_Ptr) *cast(short*)p; p += 2; break;
case DW_EH_PE_sdata4: value = cast(_Unwind_Ptr) *cast(int*)p; p += 4; break;
case DW_EH_PE_sdata8: value = cast(_Unwind_Ptr) *cast(long*)p; p += 8; break;
case DW_EH_PE_ptr: if (size_t.sizeof == 8)
goto case DW_EH_PE_udata8;
else
goto case DW_EH_PE_udata4;
default:
terminate(__LINE__);
}
return value;
}
ubyte LPstart = *p++;
_Unwind_Ptr LPbase = 0;
if (LPstart != DW_EH_PE_omit)
{
LPbase = dw_pe_value(LPstart);
}
ubyte TType = *p++;
_Unwind_Ptr TTbase = 0;
_Unwind_Ptr TToffset = 0;
if (TType != DW_EH_PE_omit)
{
TTbase = uLEB128(&p);
TToffset = (p - lsda) + TTbase;
}
///*printf(" TType = "); print_dw_pe(TType);*/ printf(" TTbase = x%08llx\n", TTbase);
ubyte CallSiteFormat = *p++;
_Unwind_Ptr CallSiteTableSize = dw_pe_value(DW_EH_PE_uleb128);
///*printf(" CallSiteFormat = "); print_dw_pe(CallSiteFormat);*/ printf(" CallSiteTableSize = x%08llx\n", CallSiteTableSize);
//printf(" Call Site Table\n");
_Unwind_Ptr ipoffset = ip - LPbase;
//printf("ipoffset = x%x\n", cast(int)ipoffset);
bool noAction = false;
auto tt = lsda + TToffset;
const(ubyte)* pActionTable = p + CallSiteTableSize;
while (1)
{
if (p >= pActionTable)
{
if (p == pActionTable)
break;
fprintf(stderr, "no Call Site Table\n");
return LsdaResult.corrupt;
}
_Unwind_Ptr CallSiteStart = dw_pe_value(CallSiteFormat);
_Unwind_Ptr CallSiteRange = dw_pe_value(CallSiteFormat);
_Unwind_Ptr LandingPad = dw_pe_value(CallSiteFormat);
_uleb128_t ActionRecordPtr = uLEB128(&p);
//printf(" XT: start = x%x, range = x%x, landing pad = x%x, action = x%x\n",
//cast(int)CallSiteStart, cast(int)CallSiteRange, cast(int)LandingPad, cast(int)ActionRecordPtr);
if (ipoffset < CallSiteStart)
break;
// The most nested entry will be the last one that ip is in
if (ipoffset < CallSiteStart + CallSiteRange)
{
//printf("\tmatch\n");
if (ActionRecordPtr) // if saw a catch
{
if (cleanupsOnly)
continue; // ignore catch
auto h = actionTableLookup(exceptionObject, cast(uint)ActionRecordPtr, pActionTable, tt, TType, exceptionClass);
if (h < 0)
{
fprintf(stderr, "negative handler\n");
return LsdaResult.corrupt;
}
if (h == 0)
continue; // ignore
// The catch is good
noAction = false;
landingPad = LandingPad;
handler = h;
}
else if (LandingPad) // if saw a cleanup
{
if (preferHandler && handler) // enclosing handler overrides cleanup
continue; // keep looking
noAction = false;
landingPad = LandingPad;
handler = 0; // cleanup hides the handler
}
else // take no action
noAction = true;
}
}
if (noAction)
{
assert(!landingPad && !handler);
return LsdaResult.noAction;
}
if (landingPad)
return handler ? LsdaResult.handler : LsdaResult.cleanup;
return LsdaResult.notFound;
}
/********************************************
* Look up classType in Action Table.
* Params:
* exceptionObject = language specific exception information
* actionRecordPtr = starting index in Action Table + 1
* pActionTable = pointer to start of Action Table
* tt = pointer past end of Type Table
* TType = encoding of entries in Type Table
* exceptionClass = which language threw the exception
* Returns:
* >=1 means the handler index of the classType
* 0 means classType is not in the Action Table
* <0 means corrupt
*/
int actionTableLookup(_Unwind_Exception* exceptionObject, uint actionRecordPtr, const(ubyte)* pActionTable,
const(ubyte)* tt, ubyte TType, _Unwind_Exception_Class exceptionClass)
{
//printf("actionTableLookup(catchType = %p, actionRecordPtr = %d, pActionTable = %p, tt = %p)\n",
//catchType, actionRecordPtr, pActionTable, tt);
assert(pActionTable < tt);
ClassInfo thrownType;
if (exceptionClass == dmdExceptionClass)
{
thrownType = getClassInfo(exceptionObject);
}
for (auto ap = pActionTable + actionRecordPtr - 1; 1; )
{
assert(pActionTable <= ap && ap < tt);
auto TypeFilter = sLEB128(&ap);
auto apn = ap;
auto NextRecordPtr = sLEB128(&ap);
//printf(" at: TypeFilter = %d, NextRecordPtr = %d\n", cast(int)TypeFilter, cast(int)NextRecordPtr);
if (TypeFilter <= 0) // should never happen with DMD generated tables
{
fprintf(stderr, "TypeFilter = %d\n", cast(int)TypeFilter);
return -1; // corrupt
}
/* TypeFilter is negative index from TToffset,
* which is where the ClassInfo is stored
*/
_Unwind_Ptr entry;
const(ubyte)* tt2;
switch (TType & DW_EH_PE_FORMAT_MASK)
{
case DW_EH_PE_udata2: entry = cast(_Unwind_Ptr) *cast(ushort*)(tt2 = tt - TypeFilter * 2); break;
case DW_EH_PE_udata4: entry = cast(_Unwind_Ptr) *cast(uint*) (tt2 = tt - TypeFilter * 4); break;
case DW_EH_PE_udata8: entry = cast(_Unwind_Ptr) *cast(ulong*) (tt2 = tt - TypeFilter * 8); break;
case DW_EH_PE_sdata2: entry = cast(_Unwind_Ptr) *cast(short*) (tt2 = tt - TypeFilter * 2); break;
case DW_EH_PE_sdata4: entry = cast(_Unwind_Ptr) *cast(int*) (tt2 = tt - TypeFilter * 4); break;
case DW_EH_PE_sdata8: entry = cast(_Unwind_Ptr) *cast(long*) (tt2 = tt - TypeFilter * 8); break;
case DW_EH_PE_ptr: if (size_t.sizeof == 8)
goto case DW_EH_PE_udata8;
else
goto case DW_EH_PE_udata4;
default:
fprintf(stderr, "TType = x%x\n", TType);
return -1; // corrupt
}
if (!entry) // the 'catch all' type
return -1; // corrupt: should never happen with DMD, which explicitly uses Throwable
switch (TType & DW_EH_PE_APPL_MASK)
{
case DW_EH_PE_absptr:
break;
case DW_EH_PE_pcrel:
entry += cast(_Unwind_Ptr)tt2;
break;
default:
return -1;
}
if (TType & DW_EH_PE_indirect)
entry = *cast(_Unwind_Ptr*)entry;
ClassInfo ci = cast(ClassInfo)cast(void*)(entry);
if (ci.classinfo is __cpp_type_info_ptr.classinfo)
{
if (exceptionClass == cppExceptionClass || exceptionClass == cppExceptionClass1)
{
// sti is catch clause type_info
auto sti = cast(CppTypeInfo)((cast(__cpp_type_info_ptr)cast(void*)ci).ptr);
auto p = getCppPtrToThrownObject(exceptionObject, sti);
if (p) // if found
{
auto eh = CppExceptionHeader.toExceptionHeader(exceptionObject);
eh.thrownPtr = p; // for __cxa_begin_catch()
return cast(int)TypeFilter;
}
}
}
else if (exceptionClass == dmdExceptionClass && _d_isbaseof(thrownType, ci))
return cast(int)TypeFilter; // found it
if (!NextRecordPtr)
return 0; // catch not found
ap = apn + NextRecordPtr;
}
terminate(__LINE__);
assert(0);
}
enum LsdaResult
{
notFound, // ip was not found in the LSDA - an exception shouldn't have happened
foreign, // found a result we cannot handle
corrupt, // the tables are corrupt
noAction, // found, but no action needed (i.e. no cleanup nor handler)
cleanup, // cleanup found (i.e. finally or destructor)
handler, // handler found (i.e. a catch)
}
void terminate(uint line) @nogc
{
printf("dwarfeh(%u) fatal error\n", line);
abort(); // unceremoniously exit
}
/****************************** C++ Support *****************************/
enum _Unwind_Exception_Class cppExceptionClass =
(cast(_Unwind_Exception_Class)'G' << 56) |
(cast(_Unwind_Exception_Class)'N' << 48) |
(cast(_Unwind_Exception_Class)'U' << 40) |
(cast(_Unwind_Exception_Class)'C' << 32) |
(cast(_Unwind_Exception_Class)'C' << 24) |
(cast(_Unwind_Exception_Class)'+' << 16) |
(cast(_Unwind_Exception_Class)'+' << 8) |
(cast(_Unwind_Exception_Class)0 << 0);
enum _Unwind_Exception_Class cppExceptionClass1 = cppExceptionClass + 1;
/*****************************************
* Get Pointer to Thrown Object if type of thrown object is implicitly
* convertible to the catch type.
* Params:
* exceptionObject = language specific exception information
* sti = type of catch clause
* Returns:
* null if not caught, pointer to thrown object if caught
*/
void* getCppPtrToThrownObject(_Unwind_Exception* exceptionObject, CppTypeInfo sti)
{
void* p; // pointer to thrown object
if (exceptionObject.exception_class & 1)
p = CppExceptionHeader.toExceptionHeader(exceptionObject).ptr;
else
p = cast(void*)(exceptionObject + 1); // thrown object is immediately after it
const tt = (cast(CppExceptionHeader*)p - 1).typeinfo;
if (tt.__is_pointer_p())
p = *cast(void**)p;
// Pointer adjustment may be necessary due to multiple inheritance
return (sti is tt || sti.__do_catch(tt, &p, 1)) ? p : null;
}
extern (C++)
{
/**
* Access C++ std::type_info's virtual functions from D,
* being careful to not require linking with libstd++
* or interfere with core.stdcpp.typeinfo.
* So, give it a different name.
*/
interface CppTypeInfo // map to C++ std::type_info's virtual functions
{
void dtor1(); // consume destructor slot in vtbl[]
void dtor2(); // consume destructor slot in vtbl[]
bool __is_pointer_p() const;
bool __is_function_p() const;
bool __do_catch(const CppTypeInfo, void**, uint) const;
bool __do_upcast(const void*, void**) const;
}
}
/// The C++ version of D's ExceptionHeader wrapper
struct CppExceptionHeader
{
union
{
CppTypeInfo typeinfo; // type that was thrown
void* ptr; // pointer to real exception
}
void* p1; // unreferenced placeholders...
void* p2;
void* p3;
void* p4;
int i1;
int i2;
const(ubyte)* p5;
const(ubyte)* p6;
_Unwind_Ptr p7;
void* thrownPtr; // pointer to thrown object
_Unwind_Exception exception_object; // the unwinder's data
/*******************************
* Convert from pointer to exception_object field to pointer to CppExceptionHeader
* that it is embedded inside of.
* Params:
* eo = pointer to exception_object field
* Returns:
* pointer to CppExceptionHeader that eo points into.
*/
static CppExceptionHeader* toExceptionHeader(_Unwind_Exception* eo)
{
return cast(CppExceptionHeader*)(eo + 1) - 1;
}
}
|
D
|
/Users/caochengfei/Desktop/swiftServiceTest/.build/x86_64-apple-macosx10.10/debug/PerfectMySQL.build/MySQL.swift.o : /Users/caochengfei/Desktop/swiftServiceTest/.build/checkouts/Perfect-MySQL.git-4976130768219902098/Sources/PerfectMySQL/MySQLCRUD.swift /Users/caochengfei/Desktop/swiftServiceTest/.build/checkouts/Perfect-MySQL.git-4976130768219902098/Sources/PerfectMySQL/MySQL.swift /Users/caochengfei/Desktop/swiftServiceTest/.build/checkouts/Perfect-MySQL.git-4976130768219902098/Sources/PerfectMySQL/PerfectMySQL.swift /Users/caochengfei/Desktop/swiftServiceTest/.build/checkouts/Perfect-MySQL.git-4976130768219902098/Sources/PerfectMySQL/MySQLStmt.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/caochengfei/Desktop/swiftServiceTest/.build/x86_64-apple-macosx10.10/debug/PerfectCRUD.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/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 /usr/local/Cellar/mysql/5.7.22/include/mysql/typelib.h /usr/local/Cellar/mysql/5.7.22/include/mysql/my_alloc.h /usr/local/Cellar/mysql/5.7.22/include/mysql/my_command.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql_time.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql/psi/psi_base.h /usr/local/include/mysql/mysql.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql_com.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql/client_plugin.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql_version.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql/plugin_auth_common.h /usr/local/Cellar/mysql/5.7.22/include/mysql/binary_log_types.h /usr/local/Cellar/mysql/5.7.22/include/mysql/my_list.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql/psi/psi_memory.h /Users/caochengfei/Desktop/swiftServiceTest/.build/checkouts/Perfect-mysqlclient.git-5333716826204139417/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/caochengfei/Desktop/swiftServiceTest/.build/x86_64-apple-macosx10.10/debug/PerfectMySQL.build/MySQL~partial.swiftmodule : /Users/caochengfei/Desktop/swiftServiceTest/.build/checkouts/Perfect-MySQL.git-4976130768219902098/Sources/PerfectMySQL/MySQLCRUD.swift /Users/caochengfei/Desktop/swiftServiceTest/.build/checkouts/Perfect-MySQL.git-4976130768219902098/Sources/PerfectMySQL/MySQL.swift /Users/caochengfei/Desktop/swiftServiceTest/.build/checkouts/Perfect-MySQL.git-4976130768219902098/Sources/PerfectMySQL/PerfectMySQL.swift /Users/caochengfei/Desktop/swiftServiceTest/.build/checkouts/Perfect-MySQL.git-4976130768219902098/Sources/PerfectMySQL/MySQLStmt.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/caochengfei/Desktop/swiftServiceTest/.build/x86_64-apple-macosx10.10/debug/PerfectCRUD.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/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 /usr/local/Cellar/mysql/5.7.22/include/mysql/typelib.h /usr/local/Cellar/mysql/5.7.22/include/mysql/my_alloc.h /usr/local/Cellar/mysql/5.7.22/include/mysql/my_command.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql_time.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql/psi/psi_base.h /usr/local/include/mysql/mysql.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql_com.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql/client_plugin.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql_version.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql/plugin_auth_common.h /usr/local/Cellar/mysql/5.7.22/include/mysql/binary_log_types.h /usr/local/Cellar/mysql/5.7.22/include/mysql/my_list.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql/psi/psi_memory.h /Users/caochengfei/Desktop/swiftServiceTest/.build/checkouts/Perfect-mysqlclient.git-5333716826204139417/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/caochengfei/Desktop/swiftServiceTest/.build/x86_64-apple-macosx10.10/debug/PerfectMySQL.build/MySQL~partial.swiftdoc : /Users/caochengfei/Desktop/swiftServiceTest/.build/checkouts/Perfect-MySQL.git-4976130768219902098/Sources/PerfectMySQL/MySQLCRUD.swift /Users/caochengfei/Desktop/swiftServiceTest/.build/checkouts/Perfect-MySQL.git-4976130768219902098/Sources/PerfectMySQL/MySQL.swift /Users/caochengfei/Desktop/swiftServiceTest/.build/checkouts/Perfect-MySQL.git-4976130768219902098/Sources/PerfectMySQL/PerfectMySQL.swift /Users/caochengfei/Desktop/swiftServiceTest/.build/checkouts/Perfect-MySQL.git-4976130768219902098/Sources/PerfectMySQL/MySQLStmt.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/caochengfei/Desktop/swiftServiceTest/.build/x86_64-apple-macosx10.10/debug/PerfectCRUD.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/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 /usr/local/Cellar/mysql/5.7.22/include/mysql/typelib.h /usr/local/Cellar/mysql/5.7.22/include/mysql/my_alloc.h /usr/local/Cellar/mysql/5.7.22/include/mysql/my_command.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql_time.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql/psi/psi_base.h /usr/local/include/mysql/mysql.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql_com.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql/client_plugin.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql_version.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql/plugin_auth_common.h /usr/local/Cellar/mysql/5.7.22/include/mysql/binary_log_types.h /usr/local/Cellar/mysql/5.7.22/include/mysql/my_list.h /usr/local/Cellar/mysql/5.7.22/include/mysql/mysql/psi/psi_memory.h /Users/caochengfei/Desktop/swiftServiceTest/.build/checkouts/Perfect-mysqlclient.git-5333716826204139417/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
|
/**
https://issues.dlang.org/show_bug.cgi?id=21799
PERMUTE_ARGS:
**/
int main()
{
testDeleteD();
testDeleteDScope();
testDeleteWithoutD();
testDeleteCpp();
testDeleteCppScope();
testDeleteWithoutCpp();
testThrowingDtor();
return 0;
}
enum forceCtfe = main();
/*************************************************/
class ParentD
{
char[]* ptr;
~this()
{
*ptr ~= 'A';
}
}
class ChildD : ParentD
{
~this()
{
*ptr ~= 'B';
}
}
void testDeleteD()
{
char[] res;
ChildD cd = new ChildD();
cd.ptr = &res;
if (!__ctfe)
{
destroy(cd);
assert(res == "BA", cast(string) res);
}
}
void testDeleteDScope()
{
char[] res;
{
scope cd = new ChildD();
cd.ptr = &res;
}
assert(res == "BA", cast(string) res);
}
/*************************************************/
class ChildWithoutDtorD : ChildD {}
void testDeleteWithoutD()
{
char[] res;
ChildWithoutDtorD cd = new ChildWithoutDtorD();
cd.ptr = &res;
if (!__ctfe)
{
destroy(cd);
assert(res == "BA", cast(string) res);
}
}
/*************************************************/
extern (C++) class ParentCpp
{
char[]* ptr;
~this()
{
*ptr ~= 'C';
}
}
extern (C++) class ChildCpp : ParentCpp
{
~this()
{
*ptr ~= 'D';
}
}
void testDeleteCpp()
{
// Internal assertion failure
version (Windows)
return;
// Segfault at runtime
if (!__ctfe)
return;
char[] res;
ChildCpp cc = new ChildCpp();
cc.ptr = &res;
if (!__ctfe)
{
destroy(cc);
assert(res == "DC", cast(string) res);
}
}
void testDeleteCppScope()
{
// Unsupported pointer cast
version (Windows) if (__ctfe)
return;
char[] res;
{
scope cc = new ChildCpp();
cc.ptr = &res;
}
assert(res == "DC", cast(string) res);
}
/*************************************************/
class ChildWithoutDtorCpp : ChildCpp {}
void testDeleteWithoutCpp()
{
// delete segfaults at runtime
if (!__ctfe)
return;
char[] res;
ChildWithoutDtorCpp cd = new ChildWithoutDtorCpp();
cd.ptr = &res;
if (!__ctfe)
{
destroy(cd);
assert(res == "DC", cast(string) res);
}
}
/*************************************************/
class ThrowingChildD : ChildD
{
static Exception ex;
static this()
{
ex = new Exception("STOP");
}
~this()
{
throw ex;
}
}
void testThrowingDtor()
{
// Finalization error at runtime
if (!__ctfe)
return;
char[] res;
ThrowingChildD tcd = new ThrowingChildD();
tcd.ptr = &res;
if (!__ctfe)
{
try
{
destroy(tcd);
assert(false, "No exception thrown!");
}
catch (Exception e)
{
assert(e is ThrowingChildD.ex);
}
assert(res == "", cast(string) res);
}
}
|
D
|
void main() {
auto N = ri;
auto arr = iota(N).array.map!(v => rs.to!dstring).array;
auto arr2 = arr.sort().group.array.sort!((a, b) => a[1] > b[1]).array;
ulong l = arr2[0][1];
dstring[] res;
foreach(v; arr2) {
if(v[1] == l) res ~= v[0];
}
res.sort().each!writeln;
}
// ===================================
import std.stdio;
import std.string;
import std.functional;
import std.algorithm;
import std.range;
import std.traits;
import std.math;
import std.container;
import std.bigint;
import std.numeric;
import std.conv;
import std.typecons;
import std.uni;
import std.ascii;
import std.bitmanip;
import core.bitop;
T readAs(T)() if (isBasicType!T) {
return readln.chomp.to!T;
}
T readAs(T)() if (isArray!T) {
return readln.split.to!T;
}
T[][] readMatrix(T)(uint height, uint width) if (!isSomeChar!T) {
auto res = new T[][](height, width);
foreach(i; 0..height) {
res[i] = readAs!(T[]);
}
return res;
}
T[][] readMatrix(T)(uint height, uint width) if (isSomeChar!T) {
auto res = new T[][](height, width);
foreach(i; 0..height) {
auto s = rs;
foreach(j; 0..width) res[i][j] = s[j].to!T;
}
return res;
}
int ri() {
return readAs!int;
}
double rd() {
return readAs!double;
}
string rs() {
return readln.chomp;
}
|
D
|
/Users/TUEY/Documents/ADOL-mobile/build/Pods.build/Debug-iphonesimulator/RAMReel.build/Objects-normal/x86_64/CollectionViewLayout.o : /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/RAMTextField.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/Theme.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/RAMReel.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/CollectionViewCell.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/CollectionViewWrapper.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/TextFieldReactor.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/CollectionViewLayout.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/GradientView.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/DataFlow.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/TUEY/Documents/ADOL-mobile/Pods/Target\ Support\ Files/RAMReel/RAMReel-umbrella.h /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/RAMReel.h /Users/TUEY/Documents/ADOL-mobile/build/Pods.build/Debug-iphonesimulator/RAMReel.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
/Users/TUEY/Documents/ADOL-mobile/build/Pods.build/Debug-iphonesimulator/RAMReel.build/Objects-normal/x86_64/CollectionViewLayout~partial.swiftmodule : /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/RAMTextField.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/Theme.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/RAMReel.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/CollectionViewCell.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/CollectionViewWrapper.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/TextFieldReactor.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/CollectionViewLayout.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/GradientView.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/DataFlow.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/TUEY/Documents/ADOL-mobile/Pods/Target\ Support\ Files/RAMReel/RAMReel-umbrella.h /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/RAMReel.h /Users/TUEY/Documents/ADOL-mobile/build/Pods.build/Debug-iphonesimulator/RAMReel.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
/Users/TUEY/Documents/ADOL-mobile/build/Pods.build/Debug-iphonesimulator/RAMReel.build/Objects-normal/x86_64/CollectionViewLayout~partial.swiftdoc : /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/RAMTextField.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/Theme.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/RAMReel.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/CollectionViewCell.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/CollectionViewWrapper.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/TextFieldReactor.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/CollectionViewLayout.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/GradientView.swift /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/DataFlow.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/TUEY/Documents/ADOL-mobile/Pods/Target\ Support\ Files/RAMReel/RAMReel-umbrella.h /Users/TUEY/Documents/ADOL-mobile/Pods/RAMReel/RAMReel/Framework/RAMReel.h /Users/TUEY/Documents/ADOL-mobile/build/Pods.build/Debug-iphonesimulator/RAMReel.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
|
D
|
/home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Console.build/Console/Style/Console+ConsoleStyle.swift.o : /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/String+ANSI.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Utilities/Bool+Polymorphic.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/Terminal+Command.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Command.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Runnable.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Style/Console+ConsoleStyle.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Style/ConsoleStyle.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Value.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Ask.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/ConsoleStyle+Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/ConsoleColor+Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Ephemeral.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/ConsoleProtocol.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/FileHandle+Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/Pipe+Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Utilities/String+Trim.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Confirm.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Option.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Run.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Group.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Bar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Loading/Console+LoadingBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Loading/LoadingBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Progress/Console+ProgressBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Progress/ProgressBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Clear/ConsoleClear.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Center.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Color/ConsoleColor.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/ConsoleError.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Options.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Argument.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Command+Print.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Print.swift /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/libc.swiftmodule /usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Core.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Debugging.swiftmodule /usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Bits.swiftmodule /usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /usr/lib/swift/linux/x86_64/glibc.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CHTTP.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CSQLite.build/module.modulemap
/home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Console.build/Console+ConsoleStyle~partial.swiftmodule : /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/String+ANSI.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Utilities/Bool+Polymorphic.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/Terminal+Command.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Command.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Runnable.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Style/Console+ConsoleStyle.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Style/ConsoleStyle.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Value.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Ask.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/ConsoleStyle+Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/ConsoleColor+Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Ephemeral.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/ConsoleProtocol.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/FileHandle+Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/Pipe+Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Utilities/String+Trim.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Confirm.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Option.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Run.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Group.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Bar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Loading/Console+LoadingBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Loading/LoadingBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Progress/Console+ProgressBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Progress/ProgressBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Clear/ConsoleClear.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Center.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Color/ConsoleColor.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/ConsoleError.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Options.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Argument.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Command+Print.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Print.swift /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/libc.swiftmodule /usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Core.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Debugging.swiftmodule /usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Bits.swiftmodule /usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /usr/lib/swift/linux/x86_64/glibc.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CHTTP.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CSQLite.build/module.modulemap
/home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Console.build/Console+ConsoleStyle~partial.swiftdoc : /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/String+ANSI.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Utilities/Bool+Polymorphic.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/Terminal+Command.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Command.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Runnable.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Style/Console+ConsoleStyle.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Style/ConsoleStyle.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Value.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Ask.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/ConsoleStyle+Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/ConsoleColor+Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Ephemeral.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/ConsoleProtocol.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/FileHandle+Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/Pipe+Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Utilities/String+Trim.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Confirm.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Option.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Run.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Group.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Bar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Loading/Console+LoadingBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Loading/LoadingBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Progress/Console+ProgressBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Progress/ProgressBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Clear/ConsoleClear.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Center.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Color/ConsoleColor.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/ConsoleError.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Options.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Argument.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Command+Print.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Print.swift /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/libc.swiftmodule /usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Core.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Debugging.swiftmodule /usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Bits.swiftmodule /usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /usr/lib/swift/linux/x86_64/glibc.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CHTTP.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CSQLite.build/module.modulemap
|
D
|
/** ksmedia.d
Converted from 'ksmedia.h'.
Version: V7.0
Authors: Koji Kishita
*/
module c.windows.ksmedia;
import c.windows.windef;
import c.windows.guiddef;
import c.windows.ks;
import c.windows.mmsystem;
import c.windows.vptype;
struct KSMULTIPLE_DATA_PROP {
KSPROPERTY Property;
KSMULTIPLE_ITEM MultipleItem;
}
alias KSMULTIPLE_DATA_PROP* PKSMULTIPLE_DATA_PROP;
mixin DEFINE_GUID!("KSMEDIUMSETID_MidiBus", "05908040-3246-11D0-A5D6-28DB04C10000");
mixin DEFINE_GUID!("KSMEDIUMSETID_VPBus", "A18C15EC-CE43-11D0-ABE7-00A0C9223196");
mixin DEFINE_GUID!("KSINTERFACESETID_Media", "3A13EB40-30A7-11D0-A5D6-28DB04C10000");
enum {
KSINTERFACE_MEDIA_MUSIC,
KSINTERFACE_MEDIA_WAVE_BUFFERED,
KSINTERFACE_MEDIA_WAVE_QUEUED
}
alias int KSINTERFACE_MEDIA;
//(NTDDI_VERSION >= NTDDI_WINXP)
/* #if !defined(INIT_USBAUDIO_MID)
INIT_USBAUDIO_MID(guid, id) { (guid)->Data1 = 0x4e1cecd2 + (USHORT)(id); (guid)->Data2 = 0x1679; (guid)->Data3 = 0x463b; (guid)->Data4[0] = 0xa7; (guid)->Data4[1] = 0x2f; (guid)->Data4[2] = 0xa5; (guid)->Data4[3] = 0xbf; (guid)->Data4[4] = 0x64; (guid)->Data4[5] = 0xc8; (guid)->Data4[6] = 0x6e; (guid)->Data4[7] = 0xba; }
EXTRACT_USBAUDIO_MID(guid) (USHORT)((guid)->Data1 - 0x4e1cecd2)
DEFINE_USBAUDIO_MID_GUID(id) 0x4e1cecd2+(USHORT)(id), 0x1679, 0x463b, 0xa7, 0x2f, 0xa5, 0xbf, 0x64, 0xc8, 0x6e, 0xba
INIT_EXBUS_MANUFACTURER_ID INIT_USBAUDIO_MID
IS_COMPATIBLE_USBAUDIO_MID(guid) (((guid)->Data1 >= 0x4e1cecd2) && ((guid)->Data1 < 0x4e1cecd2 + 0xffff) && ((guid)->Data2 == 0x1679) && ((guid)->Data3 == 0x463b) && ((guid)->Data4[0] == 0xa7) && ((guid)->Data4[1] == 0x2f) && ((guid)->Data4[2] == 0xa5) && ((guid)->Data4[3] == 0xbf) && ((guid)->Data4[4] == 0x64) && ((guid)->Data4[5] == 0xc8) && ((guid)->Data4[6] == 0x6e) && ((guid)->Data4[7] == 0xba))
#endif
#if !defined(INIT_USBAUDIO_PID)
INIT_USBAUDIO_PID(guid, id) { (guid)->Data1 = 0xabcc5a5e + (USHORT)(id); (guid)->Data2 = 0xc263; (guid)->Data3 = 0x463b; (guid)->Data4[0] = 0xa7; (guid)->Data4[1] = 0x2f; (guid)->Data4[2] = 0xa5; (guid)->Data4[3] = 0xbf; (guid)->Data4[4] = 0x64; (guid)->Data4[5] = 0xc8; (guid)->Data4[6] = 0x6e; (guid)->Data4[7] = 0xba; }
EXTRACT_USBAUDIO_PID(guid) (USHORT)((guid)->Data1 - 0xabcc5a5e)
DEFINE_USBAUDIO_PID_GUID(id) 0xabcc5a5e+(USHORT)(id), 0xc263, 0x463b, 0xa7, 0x2f, 0xa5, 0xbf, 0x64, 0xc8, 0x6e, 0xba
INIT_EXBUS_PRODUCT_ID INIT_USBAUDIO_PID
IS_COMPATIBLE_USBAUDIO_PID(guid) (((guid)->Data1 >= 0xabcc5a5e) && ((guid)->Data1 < 0xabcc5a5e + 0xffff) && ((guid)->Data2 == 0xc263) && ((guid)->Data3 == 0x463b) && ((guid)->Data4[0] == 0xa7) && ((guid)->Data4[1] == 0x2f) && ((guid)->Data4[2] == 0xa5) && ((guid)->Data4[3] == 0xbf) && ((guid)->Data4[4] == 0x64) && ((guid)->Data4[5] == 0xc8) && ((guid)->Data4[6] == 0x6e) && ((guid)->Data4[7] == 0xba))
#endif
#if !defined(INIT_USBAUDIO_PRODUCT_NAME)
INIT_USBAUDIO_PRODUCT_NAME(guid, vid, pid, strIndex) { (guid)->Data1 = 0XFC575048 + (USHORT)(vid); (guid)->Data2 = 0x2E08 + (USHORT)(pid); (guid)->Data3 = 0x463B + (USHORT)(strIndex); (guid)->Data4[0] = 0xA7; (guid)->Data4[1] = 0x2F; (guid)->Data4[2] = 0xA5; (guid)->Data4[3] = 0xBF; (guid)->Data4[4] = 0x64; (guid)->Data4[5] = 0xC8; (guid)->Data4[6] = 0x6E; (guid)->Data4[7] = 0xBA; }
DEFINE_USBAUDIO_PRODUCT_NAME(vid, pid, strIndex) 0xFC575048+(USHORT)(vid), 0x2E08+(USHORT)(pid), 0x463B+(USHORT)(strIndex), 0xA7, 0x2F, 0xA5, 0xBF, 0x64, 0xC8, 0x6E, 0xBA
#endif
INIT_EXBUS_PRODUCT_NAME INIT_USBAUDIO_PRODUCT_NAME
*/
mixin DEFINE_GUID!("KSCOMPONENTID_USBAUDIO", "8F1275F0-26E9-4264-BA4D-39FFF01D94AA");
/*
INIT_USB_TERMINAL(guid, id) { (guid)->Data1 = 0xDFF219E0 + (USHORT)(id); (guid)->Data2 = 0xF70F; (guid)->Data3 = 0x11D0; (guid)->Data4[0] = 0xb9; (guid)->Data4[1] = 0x17; (guid)->Data4[2] = 0x00; (guid)->Data4[3] = 0xa0; (guid)->Data4[4] = 0xc9; (guid)->Data4[5] = 0x22; (guid)->Data4[6] = 0x31; (guid)->Data4[7] = 0x96; }
EXTRACT_USB_TERMINAL(guid) (USHORT)((guid)->Data1 - 0xDFF219E0)
DEFINE_USB_TERMINAL_GUID(id) 0xDFF219E0+(USHORT)(id), 0xF70F, 0x11D0, 0xB9, 0x17, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
*/
mixin DEFINE_GUID!("KSNODETYPE_INPUT_UNDEFINED", "DFF21BE0-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_MICROPHONE", "DFF21BE1-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_DESKTOP_MICROPHONE", "DFF21BE2-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_PERSONAL_MICROPHONE", "DFF21BE3-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE", "DFF21BE4-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_MICROPHONE_ARRAY", "DFF21BE5-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_PROCESSING_MICROPHONE_ARRAY", "DFF21BE6-F70F-11D0-B917-00A0C9223196");
//(NTDDI_VERSION >= NTDDI_WINXP)
mixin DEFINE_GUID!("KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR", "830a44f2-a32d-476b-be97-42845673b35a");
mixin DEFINE_GUID!("KSNODETYPE_OUTPUT_UNDEFINED", "DFF21CE0-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_SPEAKER", "DFF21CE1-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_HEADPHONES", "DFF21CE2-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO", "DFF21CE3-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_DESKTOP_SPEAKER", "DFF21CE4-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_ROOM_SPEAKER", "DFF21CE5-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_COMMUNICATION_SPEAKER", "DFF21CE6-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER", "DFF21CE7-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_BIDIRECTIONAL_UNDEFINED", "DFF21DE0-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_HANDSET", "DFF21DE1-F70F-11D0-B917-00A0C9223196");
alias KSNODETYPE_PERSONAL_MICROPHONE KSNODETYPE_HEADSET_MICROPHONE;
alias KSNODETYPE_COMMUNICATION_SPEAKER KSNODETYPE_HEADSET_SPEAKERS;
mixin DEFINE_GUID!("KSNODETYPE_HEADSET", "DFF21DE2-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION", "DFF21DE3-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE", "DFF21DE4-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE", "DFF21DE5-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_TELEPHONY_UNDEFINED", "DFF21EE0-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_PHONE_LINE", "DFF21EE1-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_TELEPHONE", "DFF21EE2-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_DOWN_LINE_PHONE", "DFF21EE3-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_EXTERNAL_UNDEFINED", "DFF21FE0-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_ANALOG_CONNECTOR", "DFF21FE1-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_DIGITAL_AUDIO_INTERFACE", "DFF21FE2-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_LINE_CONNECTOR", "DFF21FE3-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_LEGACY_AUDIO_CONNECTOR", "DFF21FE4-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_SPDIF_INTERFACE", "DFF21FE5-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_1394_DA_STREAM", "DFF21FE6-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_1394_DV_STREAM_SOUNDTRACK", "DFF21FE7-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_EMBEDDED_UNDEFINED", "DFF220E0-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE", "DFF220E1-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_EQUALIZATION_NOISE", "DFF220E2-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_CD_PLAYER", "DFF220E3-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE", "DFF220E4-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE", "DFF220E5-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_MINIDISK", "DFF220E6-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_ANALOG_TAPE", "DFF220E7-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_PHONOGRAPH", "DFF220E8-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_VCR_AUDIO", "DFF220E9-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_VIDEO_DISC_AUDIO", "DFF220EA-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_DVD_AUDIO", "DFF220EB-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_TV_TUNER_AUDIO", "DFF220EC-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_SATELLITE_RECEIVER_AUDIO", "DFF220ED-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_CABLE_TUNER_AUDIO", "DFF220EE-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_DSS_AUDIO", "DFF220EF-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_RADIO_RECEIVER", "DFF220F0-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_RADIO_TRANSMITTER", "DFF220F1-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_MULTITRACK_RECORDER", "DFF220F2-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_SYNTHESIZER", "DFF220F3-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_HDMI_INTERFACE", "D1B9CC2A-F519-417f-91C9-55FA65481001");
mixin DEFINE_GUID!("KSNODETYPE_DISPLAYPORT_INTERFACE", "E47E4031-3EA6-418d-8F9B-B73843CCBA97");
mixin DEFINE_GUID!("KSNODETYPE_MIDI_JACK", "265E0C3F-FA39-4df3-AB04-BE01B91E299A");
mixin DEFINE_GUID!("KSNODETYPE_MIDI_ELEMENT", "01C6FE66-6E48-4c65-AC9B-52DB5D656C7E");
mixin DEFINE_GUID!("PINNAME_SPDIF_OUT", "3A264481-E52C-4b82-8E7A-C8E2F91DC380");
mixin DEFINE_GUID!("PINNAME_SPDIF_IN", "15DC9025-22AD-41b3-8875-F4CEB0299E20");
mixin DEFINE_GUID!("PINNAME_HDMI_OUT", "387BFC03-E7EF-4901-86E0-35B7C32B00EF");
mixin DEFINE_GUID!("PINNAME_DISPLAYPORT_OUT", "21FBB329-1A4A-48da-A076-2318A3C59B26");
//(NTDDI_VERSION < NTDDI_VISTA)
mixin DEFINE_GUID!("KSNODETYPE_SWSYNTH", "423274A0-8B81-11D1-A050-0000F8004788");
mixin DEFINE_GUID!("KSNODETYPE_SWMIDI", "CB9BEFA0-A251-11D1-A050-0000F8004788");
//(NTDDI_VERSION >= NTDDI_WINXP)
mixin DEFINE_GUID!("KSNODETYPE_DRM_DESCRAMBLE", "FFBB6E3F-CCFE-4D84-90D9-421418B03A8E");
mixin DEFINE_GUID!("KSCATEGORY_AUDIO", "6994AD04-93EF-11D0-A3CC-00A0C9223196");
mixin DEFINE_GUID!("KSCATEGORY_VIDEO", "6994AD05-93EF-11D0-A3CC-00A0C9223196");
//(NTDDI_VERSION >= NTDDI_VISTA)
mixin DEFINE_GUID!("KSCATEGORY_REALTIME", "EB115FFC-10C8-4964-831D-6DCB02E6F23F");
mixin DEFINE_GUID!("KSCATEGORY_TEXT", "6994AD06-93EF-11D0-A3CC-00A0C9223196");
mixin DEFINE_GUID!("KSCATEGORY_NETWORK", "67C9CC3C-69C4-11D2-8759-00A0C9223196");
mixin DEFINE_GUID!("KSCATEGORY_TOPOLOGY", "DDA54A40-1E4C-11D1-A050-405705C10000");
mixin DEFINE_GUID!("KSCATEGORY_VIRTUAL", "3503EAC4-1F26-11D1-8AB0-00A0C9223196");
mixin DEFINE_GUID!("KSCATEGORY_ACOUSTIC_ECHO_CANCEL", "BF963D80-C559-11D0-8A2B-00A0C9255AC1");
//(NTDDI_VERSION < NTDDI_VISTA)
mixin DEFINE_GUID!("KSCATEGORY_SYSAUDIO", "A7C7A5B1-5AF3-11D1-9CED-00A024BF0407");
mixin DEFINE_GUID!("KSCATEGORY_WDMAUD", "3E227E76-690D-11D2-8161-0000F8775BF1");
//(NTDDI_VERSION >= NTDDI_WINXP && NTDDI_VERSION < NTDDI_VISTA)
mixin DEFINE_GUID!("KSCATEGORY_AUDIO_GFX", "9BAF9572-340C-11D3-ABDC-00A0C90AB16F");
//(NTDDI_VERSION >= NTDDI_WINXP && NTDDI_VERSION < NTDDI_VISTA)
mixin DEFINE_GUID!("KSCATEGORY_AUDIO_SPLITTER", "9EA331FA-B91B-45F8-9285-BD2BC77AFCDE");
alias KSNODETYPE_SYNTHESIZER KSCATEGORY_SYNTHESIZER;
//(NTDDI_VERSION >= NTDDI_WINXP)
alias KSNODETYPE_DRM_DESCRAMBLE KSCATEGORY_DRM_DESCRAMBLE;
//(NTDDI_VERSION < NTDDI_VISTA)
mixin DEFINE_GUID!("KSCATEGORY_AUDIO_DEVICE", "FBF6F530-07B9-11D2-A71E-0000F8004788");
mixin DEFINE_GUID!("KSCATEGORY_PREFERRED_WAVEOUT_DEVICE", "D6C5066E-72C1-11D2-9755-0000F8004788");
mixin DEFINE_GUID!("KSCATEGORY_PREFERRED_WAVEIN_DEVICE", "D6C50671-72C1-11D2-9755-0000F8004788");
mixin DEFINE_GUID!("KSCATEGORY_PREFERRED_MIDIOUT_DEVICE", "D6C50674-72C1-11D2-9755-0000F8004788");
mixin DEFINE_GUID!("KSCATEGORY_WDMAUD_USE_PIN_NAME", "47A4FA20-A251-11D1-A050-0000F8004788");
mixin DEFINE_GUID!("KSCATEGORY_ESCALANTE_PLATFORM_DRIVER", "74f3aea8-9768-11d1-8e07-00a0c95ec22e");
mixin DEFINE_GUID!("KSDATAFORMAT_TYPE_VIDEO", "73646976-0000-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_TYPE_AUDIO", "73647561-0000-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_TYPE_TEXT", "73747874-0000-0010-8000-00aa00389b71");
//DEFINE_WAVEFORMATEX_GUID(x) (USHORT)(x), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_WAVEFORMATEX", "00000000-0000-0010-8000-00aa00389b71");
/*
#if !defined( INIT_WAVEFORMATEX_GUID )
INIT_WAVEFORMATEX_GUID(Guid, x) { *(Guid) = KSDATAFORMAT_SUBTYPE_WAVEFORMATEX; (Guid)->Data1 = (USHORT)(x); }
#endif
#if !defined( EXTRACT_WAVEFORMATEX_ID )
EXTRACT_WAVEFORMATEX_ID(Guid) (USHORT)((Guid)->Data1)
#endif
#if !defined( IS_VALID_WAVEFORMATEX_GUID )
IS_VALID_WAVEFORMATEX_GUID(Guid) (!memcmp(((PUSHORT)&KSDATAFORMAT_SUBTYPE_WAVEFORMATEX) + 1, ((PUSHORT)(Guid)) + 1, sizeof(GUID) - sizeof(USHORT)))
#endif
#if !defined(INIT_MMREG_MID)
INIT_MMREG_MID(guid, id) { (guid)->Data1 = 0xd5a47fa7 + (USHORT)(id); (guid)->Data2 = 0x6d98; (guid)->Data3 = 0x11d1; (guid)->Data4[0] = 0xa2; (guid)->Data4[1] = 0x1a; (guid)->Data4[2] = 0x00; (guid)->Data4[3] = 0xa0; (guid)->Data4[4] = 0xc9; (guid)->Data4[5] = 0x22; (guid)->Data4[6] = 0x31; (guid)->Data4[7] = 0x96; }
EXTRACT_MMREG_MID(guid) (USHORT)((guid)->Data1 - 0xd5a47fa7)
DEFINE_MMREG_MID_GUID(id) 0xd5a47fa7+(USHORT)(id), 0x6d98, 0x11d1, 0xa2, 0x1a, 0x00, 0xa0, 0xc9, 0x22, 0x31, 0x96
IS_COMPATIBLE_MMREG_MID(guid) (((guid)->Data1 >= 0xd5a47fa7) && ((guid)->Data1 < 0xd5a47fa7 + 0xffff) && ((guid)->Data2 == 0x6d98) && ((guid)->Data3 == 0x11d1) && ((guid)->Data4[0] == 0xa2) && ((guid)->Data4[1] == 0x1a) && ((guid)->Data4[2] == 0x00) && ((guid)->Data4[3] == 0xa0) && ((guid)->Data4[4] == 0xc9) && ((guid)->Data4[5] == 0x22) && ((guid)->Data4[6] == 0x31) && ((guid)->Data4[7] == 0x96))
#endif
#if !defined(INIT_MMREG_PID)
INIT_MMREG_PID(guid, id) { (guid)->Data1 = 0xe36dc2ac + (USHORT)(id); (guid)->Data2 = 0x6d9a; (guid)->Data3 = 0x11d1; (guid)->Data4[0] = 0xa2; (guid)->Data4[1] = 0x1a; (guid)->Data4[2] = 0x00; (guid)->Data4[3] = 0xa0; (guid)->Data4[4] = 0xc9; (guid)->Data4[5] = 0x22; (guid)->Data4[6] = 0x31; (guid)->Data4[7] = 0x96; }
EXTRACT_MMREG_PID(guid) (USHORT)((guid)->Data1 - 0xe36dc2ac)
DEFINE_MMREG_PID_GUID(id) 0xe36dc2ac+(USHORT)(id), 0x6d9a, 0x11d1, 0xa2, 0x1a, 0x00, 0xa0, 0xc9, 0x22, 0x31, 0x96
IS_COMPATIBLE_MMREG_PID(guid) (((guid)->Data1 >= 0xe36dc2ac) && ((guid)->Data1 < 0xe36dc2ac + 0xffff) && ((guid)->Data2 == 0x6d9a) && ((guid)->Data3 == 0x11d1) && ((guid)->Data4[0] == 0xa2) && ((guid)->Data4[1] == 0x1a) && ((guid)->Data4[2] == 0x00) && ((guid)->Data4[3] == 0xa0) && ((guid)->Data4[4] == 0xc9) && ((guid)->Data4[5] == 0x22) && ((guid)->Data4[6] == 0x31) && ((guid)->Data4[7] == 0x96))
#endif
*/
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_ANALOG", "6dba3190-67bd-11cf-a0f7-0020afd156e4");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_PCM", "00000001-0000-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_IEEE_FLOAT", "00000003-0000-0010-8000-00aa00389b71");
//(NTDDI_VERSION >= NTDDI_WINXP)
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_DRM", "00000009-0000-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_ALAW", "00000006-0000-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_MULAW", "00000007-0000-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_ADPCM", "00000002-0000-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_MPEG", "00000050-0000-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_SPECIFIER_VC_ID", "AD98D184-AAC3-11D0-A41C-00A0C9223196");
mixin DEFINE_GUID!("KSDATAFORMAT_SPECIFIER_WAVEFORMATEX", "05589f81-c356-11ce-bf01-00aa0055595a");
mixin DEFINE_GUID!("KSDATAFORMAT_SPECIFIER_DSOUND", "518590a2-a184-11d0-8522-00c04fd9baf3");
align(1){
struct KSDATAFORMAT_WAVEFORMATEX {
KSDATAFORMAT DataFormat;
WAVEFORMATEX WaveFormatEx;
}
alias KSDATAFORMAT_WAVEFORMATEX* PKSDATAFORMAT_WAVEFORMATEX;
struct WAVEFORMATEXTENSIBLE {
WAVEFORMATEX Format;
union {
WORD wValidBitsPerSample;
WORD wSamplesPerBlock;
WORD wReserved;
}
DWORD dwChannelMask;
GUID SubFormat;
}
alias WAVEFORMATEXTENSIBLE* PWAVEFORMATEXTENSIBLE;
struct WAVEFORMATEXTENSIBLE_IEC61937 {
WAVEFORMATEXTENSIBLE FormatExt;
DWORD dwEncodedSamplesPerSec;
DWORD dwEncodedChannelCount;
DWORD dwAverageBytesPerSec;
}
alias WAVEFORMATEXTENSIBLE_IEC61937* PWAVEFORMATEXTENSIBLE_IEC61937;
enum WAVE_FORMAT_EXTENSIBLE = 0xFFFE;
struct KSDSOUND_BUFFERDESC {
ULONG Flags;
ULONG Control;
WAVEFORMATEX WaveFormatEx;
}
alias KSDSOUND_BUFFERDESC* PKSDSOUND_BUFFERDESC;
struct KSDATAFORMAT_DSOUND {
KSDATAFORMAT DataFormat;
KSDSOUND_BUFFERDESC BufferDesc;
}
alias KSDATAFORMAT_DSOUND* PKSDATAFORMAT_DSOUND;
}// align(1)
enum {
KSDSOUND_BUFFER_PRIMARY = 0x00000001,
KSDSOUND_BUFFER_STATIC = 0x00000002,
KSDSOUND_BUFFER_LOCHARDWARE = 0x00000004,
KSDSOUND_BUFFER_LOCSOFTWARE = 0x00000008,
}
enum {
KSDSOUND_BUFFER_CTRL_3D = 0x00000001,
KSDSOUND_BUFFER_CTRL_FREQUENCY = 0x00000002,
KSDSOUND_BUFFER_CTRL_PAN = 0x00000004,
KSDSOUND_BUFFER_CTRL_VOLUME = 0x00000008,
KSDSOUND_BUFFER_CTRL_POSITIONNOTIFY = 0x00000010,
}
struct KSAUDIO_POSITION {
DWORDLONG PlayOffset;
DWORDLONG WriteOffset;
}
alias KSAUDIO_POSITION* PKSAUDIO_POSITION;
//(NTDDI_VERSION >= NTDDI_VISTA)
enum {
KSMICARRAY_MICTYPE_OMNIDIRECTIONAL,
KSMICARRAY_MICTYPE_SUBCARDIOID,
KSMICARRAY_MICTYPE_CARDIOID,
KSMICARRAY_MICTYPE_SUPERCARDIOID,
KSMICARRAY_MICTYPE_HYPERCARDIOID,
KSMICARRAY_MICTYPE_8SHAPED,
KSMICARRAY_MICTYPE_VENDORDEFINED = 0x0F
}
alias int KSMICARRAY_MICTYPE;
struct KSAUDIO_MICROPHONE_COORDINATES {
USHORT usType;
SHORT wXCoord;
SHORT wYCoord;
SHORT wZCoord;
SHORT wVerticalAngle;
SHORT wHorizontalAngle;
}
alias KSAUDIO_MICROPHONE_COORDINATES* PKSAUDIO_MICROPHONE_COORDINATES;
enum {
KSMICARRAY_MICARRAYTYPE_LINEAR,
KSMICARRAY_MICARRAYTYPE_PLANAR,
KSMICARRAY_MICARRAYTYPE_3D
}
alias int KSMICARRAY_MICARRAYTYPE;
struct KSAUDIO_MIC_ARRAY_GEOMETRY {
USHORT usVersion;
USHORT usMicArrayType;
SHORT wVerticalAngleBegin;
SHORT wVerticalAngleEnd;
SHORT wHorizontalAngleBegin;
SHORT wHorizontalAngleEnd;
USHORT usFrequencyBandLo;
USHORT usFrequencyBandHi;
USHORT usNumberOfMicrophones;
KSAUDIO_MICROPHONE_COORDINATES KsMicCoord[1];
}
alias KSAUDIO_MIC_ARRAY_GEOMETRY* PKSAUDIO_MIC_ARRAY_GEOMETRY;
struct DS3DVECTOR {
union {
FLOAT x;
FLOAT dvX;
}
union {
FLOAT y;
FLOAT dvY;
}
union {
FLOAT z;
FLOAT dvZ;
}
}
alias DS3DVECTOR* PDS3DVECTOR;
mixin DEFINE_GUID!("KSPROPSETID_DirectSound3DListener", "437b3414-d060-11d0-8583-00c04fd9baf3");
enum {
KSPROPERTY_DIRECTSOUND3DLISTENER_ALL,
KSPROPERTY_DIRECTSOUND3DLISTENER_POSITION,
KSPROPERTY_DIRECTSOUND3DLISTENER_VELOCITY,
KSPROPERTY_DIRECTSOUND3DLISTENER_ORIENTATION,
KSPROPERTY_DIRECTSOUND3DLISTENER_DISTANCEFACTOR,
KSPROPERTY_DIRECTSOUND3DLISTENER_ROLLOFFFACTOR,
KSPROPERTY_DIRECTSOUND3DLISTENER_DOPPLERFACTOR,
KSPROPERTY_DIRECTSOUND3DLISTENER_BATCH,
KSPROPERTY_DIRECTSOUND3DLISTENER_ALLOCATION
}
alias int KSPROPERTY_DIRECTSOUND3DLISTENER;
struct KSDS3D_LISTENER_ALL {
DS3DVECTOR Position;
DS3DVECTOR Velocity;
DS3DVECTOR OrientFront;
DS3DVECTOR OrientTop;
FLOAT DistanceFactor;
FLOAT RolloffFactor;
FLOAT DopplerFactor;
}
alias KSDS3D_LISTENER_ALL* PKSDS3D_LISTENER_ALL;
struct KSDS3D_LISTENER_ORIENTATION {
DS3DVECTOR Front;
DS3DVECTOR Top;
}
alias KSDS3D_LISTENER_ORIENTATION* PKSDS3D_LISTENER_ORIENTATION;
mixin DEFINE_GUID!("KSPROPSETID_DirectSound3DBuffer", "437b3411-d060-11d0-8583-00c04fd9baf3");
enum {
KSPROPERTY_DIRECTSOUND3DBUFFER_ALL,
KSPROPERTY_DIRECTSOUND3DBUFFER_POSITION,
KSPROPERTY_DIRECTSOUND3DBUFFER_VELOCITY,
KSPROPERTY_DIRECTSOUND3DBUFFER_CONEANGLES,
KSPROPERTY_DIRECTSOUND3DBUFFER_CONEORIENTATION,
KSPROPERTY_DIRECTSOUND3DBUFFER_CONEOUTSIDEVOLUME,
KSPROPERTY_DIRECTSOUND3DBUFFER_MINDISTANCE,
KSPROPERTY_DIRECTSOUND3DBUFFER_MAXDISTANCE,
KSPROPERTY_DIRECTSOUND3DBUFFER_MODE
}
alias int KSPROPERTY_DIRECTSOUND3DBUFFER;
struct KSDS3D_BUFFER_ALL {
DS3DVECTOR Position;
DS3DVECTOR Velocity;
ULONG InsideConeAngle;
ULONG OutsideConeAngle;
DS3DVECTOR ConeOrientation;
LONG ConeOutsideVolume;
FLOAT MinDistance;
FLOAT MaxDistance;
ULONG Mode;
}
alias KSDS3D_BUFFER_ALL* PKSDS3D_BUFFER_ALL;
struct KSDS3D_BUFFER_CONE_ANGLES {
ULONG InsideConeAngle;
ULONG OutsideConeAngle;
}
alias KSDS3D_BUFFER_CONE_ANGLES* PKSDS3D_BUFFER_CONE_ANGLES;
enum {
KSAUDIO_STEREO_SPEAKER_GEOMETRY_HEADPHONE = -1,
KSAUDIO_STEREO_SPEAKER_GEOMETRY_MIN = 5,
KSAUDIO_STEREO_SPEAKER_GEOMETRY_NARROW = 10,
KSAUDIO_STEREO_SPEAKER_GEOMETRY_WIDE = 20,
KSAUDIO_STEREO_SPEAKER_GEOMETRY_MAX = 180,
}
enum {
KSDSOUND_3D_MODE_NORMAL = 0x00000000,
KSDSOUND_3D_MODE_HEADRELATIVE = 0x00000001,
KSDSOUND_3D_MODE_DISABLE = 0x00000002,
KSDSOUND_BUFFER_CTRL_HRTF_3D = 0x40000000,
}
struct KSDS3D_HRTF_PARAMS_MSG {
ULONG Size;
ULONG Enabled;
BOOL SwapChannels;
BOOL ZeroAzimuth;
BOOL CrossFadeOutput;
ULONG FilterSize;
}
alias KSDS3D_HRTF_PARAMS_MSG* PKSDS3D_HRTF_PARAMS_MSG;
enum {
FULL_FILTER,
LIGHT_FILTER,
KSDS3D_FILTER_QUALITY_COUNT
}
alias int KSDS3D_HRTF_FILTER_QUALITY;
struct KSDS3D_HRTF_INIT_MSG {
ULONG Size;
KSDS3D_HRTF_FILTER_QUALITY Quality;
FLOAT SampleRate;
ULONG MaxFilterSize;
ULONG FilterTransientMuteLength;
ULONG FilterOverlapBufferLength;
ULONG OutputOverlapBufferLength;
ULONG Reserved;
}
alias KSDS3D_HRTF_INIT_MSG* PKSDS3D_HRTF_INIT_MSG;
enum {
FLOAT_COEFF,
SHORT_COEFF,
KSDS3D_COEFF_COUNT
}
alias int KSDS3D_HRTF_COEFF_FORMAT;
enum {
DIRECT_FORM,
CASCADE_FORM,
KSDS3D_FILTER_METHOD_COUNT
}
alias int KSDS3D_HRTF_FILTER_METHOD;
enum {
DS3D_HRTF_VERSION_1
}
alias int KSDS3D_HRTF_FILTER_VERSION;
struct KSDS3D_HRTF_FILTER_FORMAT_MSG {
KSDS3D_HRTF_FILTER_METHOD FilterMethod;
KSDS3D_HRTF_COEFF_FORMAT CoeffFormat;
KSDS3D_HRTF_FILTER_VERSION Version;
ULONG Reserved;
}
alias KSDS3D_HRTF_FILTER_FORMAT_MSG* PKSDS3D_HRTF_FILTER_FORMAT_MSG;
mixin DEFINE_GUID!("KSPROPSETID_Hrtf3d", "b66decb0-a083-11d0-851e-00c04fd9baf3");
enum {
KSPROPERTY_HRTF3D_PARAMS = 0,
KSPROPERTY_HRTF3D_INITIALIZE,
KSPROPERTY_HRTF3D_FILTER_FORMAT
}
alias int KSPROPERTY_HRTF3D;
struct KSDS3D_ITD_PARAMS {
LONG Channel;
FLOAT VolSmoothScale;
FLOAT TotalDryAttenuation;
FLOAT TotalWetAttenuation;
LONG SmoothFrequency;
LONG Delay;
}
alias KSDS3D_ITD_PARAMS* PKSDS3D_ITD_PARAMS;
struct KSDS3D_ITD_PARAMS_MSG {
ULONG Enabled;
KSDS3D_ITD_PARAMS LeftParams;
KSDS3D_ITD_PARAMS RightParams;
ULONG Reserved;
}
alias KSDS3D_ITD_PARAMS_MSG* PKSDS3D_ITD_PARAMS_MSG;
mixin DEFINE_GUID!("KSPROPSETID_Itd3d", "6429f090-9fd9-11d0-a75b-00a0c90365e3");
enum {
KSPROPERTY_ITD3D_PARAMS = 0
}
alias int KSPROPERTY_ITD3D;
struct KSDATARANGE_AUDIO {
KSDATARANGE DataRange;
ULONG MaximumChannels;
ULONG MinimumBitsPerSample;
ULONG MaximumBitsPerSample;
ULONG MinimumSampleFrequency;
ULONG MaximumSampleFrequency;
}
alias KSDATARANGE_AUDIO* PKSDATARANGE_AUDIO;
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_RIFF", "4995DAEE-9EE6-11D0-A40E-00A0C9223196");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_RIFFWAVE", "e436eb8b-524f-11ce-9f53-0020af0ba770");
mixin DEFINE_GUID!("KSPROPSETID_Bibliographic", "07BA150E-E2B1-11D0-AC17-00A0C9223196");
enum {
KSPROPERTY_BIBLIOGRAPHIC_LEADER = ('R' << 24) | ('D' << 16) | ('L' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_LCCN = ('0' << 24) | ('1' << 16) | ('0' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_ISBN = ('0' << 24) | ('2' << 16) | ('0' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_ISSN = ('2' << 24) | ('2' << 16) | ('0' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_CATALOGINGSOURCE = ('0' << 24) | ('4' << 16) | ('0' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_MAINPERSONALNAME = ('0' << 24) | ('0' << 16) | ('1' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_MAINCORPORATEBODY = ('0' << 24) | ('1' << 16) | ('1' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_MAINMEETINGNAME = ('1' << 24) | ('1' << 16) | ('1' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_MAINUNIFORMTITLE = ('0' << 24) | ('3' << 16) | ('1' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_UNIFORMTITLE = ('0' << 24) | ('4' << 16) | ('2' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_TITLESTATEMENT = ('5' << 24) | ('4' << 16) | ('2' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_VARYINGFORMTITLE = ('6' << 24) | ('4' << 16) | ('2' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_PUBLICATION = ('0' << 24) | ('6' << 16) | ('2' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_PHYSICALDESCRIPTION = ('0' << 24) | ('0' << 16) | ('3' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYTITLE = ('0' << 24) | ('4' << 16) | ('4' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_SERIESSTATEMENT = ('0' << 24) | ('9' << 16) | ('4' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_GENERALNOTE = ('0' << 24) | ('0' << 16) | ('5' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_BIBLIOGRAPHYNOTE = ('4' << 24) | ('0' << 16) | ('5' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_CONTENTSNOTE = ('5' << 24) | ('0' << 16) | ('5' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_CREATIONCREDIT = ('8' << 24) | ('0' << 16) | ('5' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_CITATION = ('0' << 24) | ('1' << 16) | ('5' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_PARTICIPANT = ('1' << 24) | ('1' << 16) | ('5' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_SUMMARY = ('0' << 24) | ('2' << 16) | ('5' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_TARGETAUDIENCE = ('1' << 24) | ('2' << 16) | ('5' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_ADDEDFORMAVAILABLE = ('0' << 24) | ('3' << 16) | ('5' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_SYSTEMDETAILS = ('8' << 24) | ('3' << 16) | ('5' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_AWARDS = ('6' << 24) | ('8' << 16) | ('5' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYPERSONALNAME = ('0' << 24) | ('0' << 16) | ('6' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYTOPICALTERM = ('0' << 24) | ('5' << 16) | ('6' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYGEOGRAPHIC = ('1' << 24) | ('5' << 16) | ('6' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_INDEXTERMGENRE = ('5' << 24) | ('5' << 16) | ('6' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_INDEXTERMCURRICULUM = ('8' << 24) | ('5' << 16) | ('6' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYUNIFORMTITLE = ('0' << 24) | ('3' << 16) | ('7' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYRELATED = ('0' << 24) | ('4' << 16) | ('7' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_SERIESSTATEMENTPERSONALNAME = ('0' << 24) | ('0' << 16) | ('8' << 8) | ' ',
KSPROPERTY_BIBLIOGRAPHIC_SERIESSTATEMENTUNIFORMTITLE = ('0' << 24) | ('3' << 16) | ('8' << 8) | ' '
}
alias int KSPROPERTY_BIBLIOGRAPHIC;
mixin DEFINE_GUID!("KSPROPSETID_TopologyNode", "45FFAAA1-6E1B-11D0-BCF2-444553540000");
enum {
KSPROPERTY_TOPOLOGYNODE_ENABLE = 1,
//(NTDDI_VERSION >= NTDDI_WINXP)
KSPROPERTY_TOPOLOGYNODE_RESET
}
alias int KSPROPERTY_TOPOLOGYNODE;
//(NTDDI_VERSION >= NTDDI_WINXP)
version(none){//_NTDDK_
alias extern(Windows) NTSTATUS function(PFILE_OBJECT PinFileObject, PUCHAR* ppPlayPosition, PLONG plOffset) PRTAUDIOGETPOSITION;
}
mixin DEFINE_GUID!("KSPROPSETID_RtAudio", "A855A48C-2F78-4729-9051-1968746B9EEF");
enum {
KSPROPERTY_RTAUDIO_GETPOSITIONFUNCTION,
//(NTDDI_VERSION >= NTDDI_VISTA)
KSPROPERTY_RTAUDIO_BUFFER,
KSPROPERTY_RTAUDIO_HWLATENCY,
KSPROPERTY_RTAUDIO_POSITIONREGISTER,
KSPROPERTY_RTAUDIO_CLOCKREGISTER,
KSPROPERTY_RTAUDIO_BUFFER_WITH_NOTIFICATION,
KSPROPERTY_RTAUDIO_REGISTER_NOTIFICATION_EVENT,
KSPROPERTY_RTAUDIO_UNREGISTER_NOTIFICATION_EVENT,
//(NTDDI_VERSION >= NTDDI_WIN7)
KSPROPERTY_RTAUDIO_QUERY_NOTIFICATION_SUPPORT
}
alias int KSPROPERTY_RTAUDIO;
//(NTDDI_VERSION >= NTDDI_VISTA)
struct KSRTAUDIO_BUFFER_PROPERTY {
KSPROPERTY Property;
PVOID BaseAddress;
ULONG RequestedBufferSize;
}
alias KSRTAUDIO_BUFFER_PROPERTY* PKSRTAUDIO_BUFFER_PROPERTY;
struct KSRTAUDIO_BUFFER_PROPERTY32 {
KSPROPERTY Property;
ULONG BaseAddress;
ULONG RequestedBufferSize;
}
alias KSRTAUDIO_BUFFER_PROPERTY32* PKSRTAUDIO_BUFFER_PROPERTY32;
struct KSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION {
KSPROPERTY Property;
PVOID BaseAddress;
ULONG RequestedBufferSize;
ULONG NotificationCount;
}
alias KSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION* PKSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION;
struct KSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION32 {
KSPROPERTY Property;
ULONG BaseAddress;
ULONG RequestedBufferSize;
ULONG NotificationCount;
}
alias KSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION32* PKSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION32;
struct KSRTAUDIO_BUFFER {
PVOID BufferAddress;
ULONG ActualBufferSize;
BOOL CallMemoryBarrier;
}
alias KSRTAUDIO_BUFFER* PKSRTAUDIO_BUFFER;
struct KSRTAUDIO_BUFFER32 {
ULONG BufferAddress;
ULONG ActualBufferSize;
BOOL CallMemoryBarrier;
}
alias KSRTAUDIO_BUFFER32* PKSRTAUDIO_BUFFER32;
struct KSRTAUDIO_HWLATENCY {
ULONG FifoSize;
ULONG ChipsetDelay;
ULONG CodecDelay;
}
alias KSRTAUDIO_HWLATENCY* PKSRTAUDIO_HWLATENCY;
struct KSRTAUDIO_HWREGISTER_PROPERTY {
KSPROPERTY Property;
PVOID BaseAddress;
}
alias KSRTAUDIO_HWREGISTER_PROPERTY* PKSRTAUDIO_HWREGISTER_PROPERTY;
struct KSRTAUDIO_HWREGISTER_PROPERTY32 {
KSPROPERTY Property;
ULONG BaseAddress;
}
alias KSRTAUDIO_HWREGISTER_PROPERTY32* PKSRTAUDIO_HWREGISTER_PROPERTY32;
struct KSRTAUDIO_HWREGISTER {
PVOID Register;
ULONG Width;
ULONGLONG Numerator;
ULONGLONG Denominator;
ULONG Accuracy;
}
alias KSRTAUDIO_HWREGISTER* PKSRTAUDIO_HWREGISTER;
struct KSRTAUDIO_HWREGISTER32 {
ULONG Register;
ULONG Width;
ULONGLONG Numerator;
ULONGLONG Denominator;
ULONG Accuracy;
}
alias KSRTAUDIO_HWREGISTER32* PKSRTAUDIO_HWREGISTER32;
struct KSRTAUDIO_NOTIFICATION_EVENT_PROPERTY {
KSPROPERTY Property;
HANDLE NotificationEvent;
}
alias KSRTAUDIO_NOTIFICATION_EVENT_PROPERTY* PKSRTAUDIO_NOTIFICATION_EVENT_PROPERTY;
struct KSRTAUDIO_NOTIFICATION_EVENT_PROPERTY32 {
KSPROPERTY Property;
ULONG NotificationEvent;
}
alias KSRTAUDIO_NOTIFICATION_EVENT_PROPERTY32* PKSRTAUDIO_NOTIFICATION_EVENT_PROPERTY32;
//(NTDDI_VERSION >= NTDDI_WIN7)
mixin DEFINE_GUID!("KSPROPSETID_BtAudio", "7FA06C40-B8F6-4C7E-8556-E8C33A12E54D");
enum {
KSPROPERTY_ONESHOT_RECONNECT
}
mixin DEFINE_GUID!("KSPROPSETID_DrmAudioStream", "2F2C8DDD-4198-4fac-BA29-61BB05B7DE06");
enum {
KSPROPERTY_DRMAUDIOSTREAM_CONTENTID
}
alias int KSPROPERTY_DRMAUDIOSTREAM;
mixin DEFINE_GUID!("KSPROPSETID_Audio", "45FFAAA0-6E1B-11D0-BCF2-444553540000");
enum {
KSPROPERTY_AUDIO_LATENCY = 1,
KSPROPERTY_AUDIO_COPY_PROTECTION,
KSPROPERTY_AUDIO_CHANNEL_CONFIG,
KSPROPERTY_AUDIO_VOLUMELEVEL,
KSPROPERTY_AUDIO_POSITION,
KSPROPERTY_AUDIO_DYNAMIC_RANGE,
KSPROPERTY_AUDIO_QUALITY,
KSPROPERTY_AUDIO_SAMPLING_RATE,
KSPROPERTY_AUDIO_DYNAMIC_SAMPLING_RATE,
KSPROPERTY_AUDIO_MIX_LEVEL_TABLE,
KSPROPERTY_AUDIO_MIX_LEVEL_CAPS,
KSPROPERTY_AUDIO_MUX_SOURCE,
KSPROPERTY_AUDIO_MUTE,
KSPROPERTY_AUDIO_BASS,
KSPROPERTY_AUDIO_MID,
KSPROPERTY_AUDIO_TREBLE,
KSPROPERTY_AUDIO_BASS_BOOST,
KSPROPERTY_AUDIO_EQ_LEVEL,
KSPROPERTY_AUDIO_NUM_EQ_BANDS,
KSPROPERTY_AUDIO_EQ_BANDS,
KSPROPERTY_AUDIO_AGC,
KSPROPERTY_AUDIO_DELAY,
KSPROPERTY_AUDIO_LOUDNESS,
KSPROPERTY_AUDIO_WIDE_MODE,
KSPROPERTY_AUDIO_WIDENESS,
KSPROPERTY_AUDIO_REVERB_LEVEL,
KSPROPERTY_AUDIO_CHORUS_LEVEL,
KSPROPERTY_AUDIO_DEV_SPECIFIC,
KSPROPERTY_AUDIO_DEMUX_DEST,
KSPROPERTY_AUDIO_STEREO_ENHANCE,
KSPROPERTY_AUDIO_MANUFACTURE_GUID,
KSPROPERTY_AUDIO_PRODUCT_GUID,
KSPROPERTY_AUDIO_CPU_RESOURCES,
KSPROPERTY_AUDIO_STEREO_SPEAKER_GEOMETRY,
KSPROPERTY_AUDIO_SURROUND_ENCODE,
KSPROPERTY_AUDIO_3D_INTERFACE,
//(NTDDI_VERSION >= NTDDI_WINXP)
KSPROPERTY_AUDIO_PEAKMETER,
KSPROPERTY_AUDIO_ALGORITHM_INSTANCE,
KSPROPERTY_AUDIO_FILTER_STATE,
KSPROPERTY_AUDIO_PREFERRED_STATUS,
//(NTDDI_VERSION >= NTDDI_VISTA)
KSPROPERTY_AUDIO_PEQ_MAX_BANDS,
KSPROPERTY_AUDIO_PEQ_NUM_BANDS,
KSPROPERTY_AUDIO_PEQ_BAND_CENTER_FREQ,
KSPROPERTY_AUDIO_PEQ_BAND_Q_FACTOR,
KSPROPERTY_AUDIO_PEQ_BAND_LEVEL,
KSPROPERTY_AUDIO_CHORUS_MODULATION_RATE,
KSPROPERTY_AUDIO_CHORUS_MODULATION_DEPTH,
KSPROPERTY_AUDIO_REVERB_TIME,
KSPROPERTY_AUDIO_REVERB_DELAY_FEEDBACK,
KSPROPERTY_AUDIO_POSITIONEX,
KSPROPERTY_AUDIO_MIC_ARRAY_GEOMETRY,
}
alias int KSPROPERTY_AUDIO;
enum {
KSAUDIO_QUALITY_WORST = 0x0,
KSAUDIO_QUALITY_PC = 0x1,
KSAUDIO_QUALITY_BASIC = 0x2,
KSAUDIO_QUALITY_ADVANCED = 0x3,
}
enum {
KSAUDIO_CPU_RESOURCES_NOT_HOST_CPU = 0x00000000,
KSAUDIO_CPU_RESOURCES_HOST_CPU = 0x7FFFFFFF,
}
struct KSAUDIO_COPY_PROTECTION {
BOOL fCopyrighted;
BOOL fOriginal;
}
alias KSAUDIO_COPY_PROTECTION* PKSAUDIO_COPY_PROTECTION;
struct KSAUDIO_CHANNEL_CONFIG {
LONG ActiveSpeakerPositions;
}
alias KSAUDIO_CHANNEL_CONFIG* PKSAUDIO_CHANNEL_CONFIG;
enum {
SPEAKER_FRONT_LEFT = 0x1,
SPEAKER_FRONT_RIGHT = 0x2,
SPEAKER_FRONT_CENTER = 0x4,
SPEAKER_LOW_FREQUENCY = 0x8,
SPEAKER_BACK_LEFT = 0x10,
SPEAKER_BACK_RIGHT = 0x20,
SPEAKER_FRONT_LEFT_OF_CENTER = 0x40,
SPEAKER_FRONT_RIGHT_OF_CENTER = 0x80,
SPEAKER_BACK_CENTER = 0x100,
SPEAKER_SIDE_LEFT = 0x200,
SPEAKER_SIDE_RIGHT = 0x400,
SPEAKER_TOP_CENTER = 0x800,
SPEAKER_TOP_FRONT_LEFT = 0x1000,
SPEAKER_TOP_FRONT_CENTER = 0x2000,
SPEAKER_TOP_FRONT_RIGHT = 0x4000,
SPEAKER_TOP_BACK_LEFT = 0x8000,
SPEAKER_TOP_BACK_CENTER = 0x10000,
SPEAKER_TOP_BACK_RIGHT = 0x20000,
SPEAKER_RESERVED = 0x7FFC0000,
SPEAKER_ALL = 0x80000000,
//(NTDDI_VERSION >= NTDDI_WINXP)
KSAUDIO_SPEAKER_DIRECTOUT = 0,
KSAUDIO_SPEAKER_MONO = SPEAKER_FRONT_CENTER,
KSAUDIO_SPEAKER_STEREO = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT,
KSAUDIO_SPEAKER_QUAD = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT,
KSAUDIO_SPEAKER_SURROUND = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER,
KSAUDIO_SPEAKER_5POINT1 = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT,
KSAUDIO_SPEAKER_7POINT1 = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_FRONT_LEFT_OF_CENTER | SPEAKER_FRONT_RIGHT_OF_CENTER,
//( (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
KSAUDIO_SPEAKER_5POINT1_SURROUND = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT,
KSAUDIO_SPEAKER_7POINT1_SURROUND = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT,
KSAUDIO_SPEAKER_5POINT1_BACK = KSAUDIO_SPEAKER_5POINT1,
KSAUDIO_SPEAKER_7POINT1_WIDE = KSAUDIO_SPEAKER_7POINT1,
KSAUDIO_SPEAKER_GROUND_FRONT_LEFT = SPEAKER_FRONT_LEFT,
KSAUDIO_SPEAKER_GROUND_FRONT_CENTER = SPEAKER_FRONT_CENTER,
KSAUDIO_SPEAKER_GROUND_FRONT_RIGHT = SPEAKER_FRONT_RIGHT,
KSAUDIO_SPEAKER_GROUND_REAR_LEFT = SPEAKER_BACK_LEFT,
KSAUDIO_SPEAKER_GROUND_REAR_RIGHT = SPEAKER_BACK_RIGHT,
KSAUDIO_SPEAKER_TOP_MIDDLE = SPEAKER_TOP_CENTER,
KSAUDIO_SPEAKER_SUPER_WOOFER = SPEAKER_LOW_FREQUENCY,
}
struct KSAUDIO_DYNAMIC_RANGE {
ULONG QuietCompression;
ULONG LoudCompression;
}
alias KSAUDIO_DYNAMIC_RANGE* PKSAUDIO_DYNAMIC_RANGE;
struct KSAUDIO_MIXLEVEL {
BOOL Mute;
LONG Level;
}
alias KSAUDIO_MIXLEVEL* PKSAUDIO_MIXLEVEL;
struct KSAUDIO_MIX_CAPS {
BOOL Mute;
LONG Minimum;
LONG Maximum;
union {
LONG Reset;
LONG Resolution;
}
}
alias KSAUDIO_MIX_CAPS* PKSAUDIO_MIX_CAPS;
struct KSAUDIO_MIXCAP_TABLE {
ULONG InputChannels;
ULONG OutputChannels;
KSAUDIO_MIX_CAPS Capabilities[1];
}
alias KSAUDIO_MIXCAP_TABLE* PKSAUDIO_MIXCAP_TABLE;
//(NTDDI_VERSION < NTDDI_VISTA)
enum {
KSPROPERTY_SYSAUDIO_NORMAL_DEFAULT = 0,
KSPROPERTY_SYSAUDIO_PLAYBACK_DEFAULT,
KSPROPERTY_SYSAUDIO_RECORD_DEFAULT,
KSPROPERTY_SYSAUDIO_MIDI_DEFAULT,
KSPROPERTY_SYSAUDIO_MIXER_DEFAULT
}
alias int KSPROPERTY_SYSAUDIO_DEFAULT_TYPE;
//(NTDDI_VERSION >= NTDDI_WINXP && NTDDI_VERSION < NTDDI_VISTA)
struct KSAUDIO_PREFERRED_STATUS {
BOOL Enable;
KSPROPERTY_SYSAUDIO_DEFAULT_TYPE DeviceType;
ULONG Flags;
ULONG Reserved;
}
alias KSAUDIO_PREFERRED_STATUS* PKSAUDIO_PREFERRED_STATUS;
//(NTDDI_VERSION >= NTDDI_VISTA)
struct KSAUDIO_POSITIONEX {
LARGE_INTEGER TimerFrequency;
LARGE_INTEGER TimeStamp1;
KSAUDIO_POSITION Position;
LARGE_INTEGER TimeStamp2;
}
alias KSAUDIO_POSITIONEX* PKSAUDIO_POSITIONEX;
mixin DEFINE_GUID!("KSNODETYPE_DAC", "507AE360-C554-11D0-8A2B-00A0C9255AC1");
mixin DEFINE_GUID!("KSNODETYPE_ADC", "4D837FE0-C555-11D0-8A2B-00A0C9255AC1");
mixin DEFINE_GUID!("KSNODETYPE_SRC", "9DB7B9E0-C555-11D0-8A2B-00A0C9255AC1");
mixin DEFINE_GUID!("KSNODETYPE_SUPERMIX", "E573ADC0-C555-11D0-8A2B-00A0C9255AC1");
mixin DEFINE_GUID!("KSNODETYPE_MUX", "2CEAF780-C556-11D0-8A2B-00A0C9255AC1");
mixin DEFINE_GUID!("KSNODETYPE_DEMUX", "C0EB67D4-E807-11D0-958A-00C04FB925D3");
mixin DEFINE_GUID!("KSNODETYPE_SUM", "DA441A60-C556-11D0-8A2B-00A0C9255AC1");
mixin DEFINE_GUID!("KSNODETYPE_MUTE", "02B223C0-C557-11D0-8A2B-00A0C9255AC1");
mixin DEFINE_GUID!("KSNODETYPE_VOLUME", "3A5ACC00-C557-11D0-8A2B-00A0C9255AC1");
mixin DEFINE_GUID!("KSNODETYPE_TONE", "7607E580-C557-11D0-8A2B-00A0C9255AC1");
mixin DEFINE_GUID!("KSNODETYPE_EQUALIZER", "9D41B4A0-C557-11D0-8A2B-00A0C9255AC1");
mixin DEFINE_GUID!("KSNODETYPE_AGC", "E88C9BA0-C557-11D0-8A2B-00A0C9255AC1");
//(NTDDI_VERSION >= NTDDI_WINXP)
mixin DEFINE_GUID!("KSNODETYPE_NOISE_SUPPRESS", "E07F903F-62FD-4e60-8CDD-DEA7236665B5");
mixin DEFINE_GUID!("KSNODETYPE_DELAY", "144981E0-C558-11D0-8A2B-00A0C9255AC1");
mixin DEFINE_GUID!("KSNODETYPE_LOUDNESS", "41887440-C558-11D0-8A2B-00A0C9255AC1");
mixin DEFINE_GUID!("KSNODETYPE_PROLOGIC_DECODER", "831C2C80-C558-11D0-8A2B-00A0C9255AC1");
mixin DEFINE_GUID!("KSNODETYPE_STEREO_WIDE", "A9E69800-C558-11D0-8A2B-00A0C9255AC1");
mixin DEFINE_GUID!("KSNODETYPE_REVERB", "EF0328E0-C558-11D0-8A2B-00A0C9255AC1");
mixin DEFINE_GUID!("KSNODETYPE_CHORUS", "20173F20-C559-11D0-8A2B-00A0C9255AC1");
mixin DEFINE_GUID!("KSNODETYPE_3D_EFFECTS", "55515860-C559-11D0-8A2B-00A0C9255AC1");
mixin DEFINE_GUID!("KSNODETYPE_PARAMETRIC_EQUALIZER", "19BB3A6A-CE2B-4442-87EC-6727C3CAB477");
mixin DEFINE_GUID!("KSNODETYPE_UPDOWN_MIX", "B7EDC5CF-7B63-4ee2-A100-29EE2CB6B2DE");
mixin DEFINE_GUID!("KSNODETYPE_DYN_RANGE_COMPRESSOR", "08C8A6A8-601F-4af8-8793-D905FF4CA97D");
alias KSCATEGORY_ACOUSTIC_ECHO_CANCEL KSNODETYPE_ACOUSTIC_ECHO_CANCEL;
//(NTDDI_VERSION >= NTDDI_WINXP)
mixin DEFINE_GUID!("KSALGORITHMINSTANCE_SYSTEM_ACOUSTIC_ECHO_CANCEL", "1C22C56D-9879-4f5b-A389-27996DDC2810");
mixin DEFINE_GUID!("KSALGORITHMINSTANCE_SYSTEM_NOISE_SUPPRESS", "5AB0882E-7274-4516-877D-4EEE99BA4FD0");
mixin DEFINE_GUID!("KSALGORITHMINSTANCE_SYSTEM_AGC", "950E55B9-877C-4c67-BE08-E47B5611130A");
mixin DEFINE_GUID!("KSALGORITHMINSTANCE_SYSTEM_MICROPHONE_ARRAY_PROCESSOR", "B6F5A0A0-9E61-4f8c-91E3-76CF0F3C471F");
alias KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR KSNODETYPE_MICROPHONE_ARRAY_PROCESSOR;
mixin DEFINE_GUID!("KSNODETYPE_DEV_SPECIFIC", "941C7AC0-C559-11D0-8A2B-00A0C9255AC1");
//(NTDDI_VERSION >= NTDDI_WINXP)
mixin DEFINE_GUID!("KSNODETYPE_PROLOGIC_ENCODER", "8074C5B2-3C66-11D2-B45A-3078302C2030");
alias KSNODETYPE_PROLOGIC_ENCODER KSNODETYPE_SURROUND_ENCODER;
mixin DEFINE_GUID!("KSNODETYPE_PEAKMETER", "A085651E-5F0D-4b36-A869-D195D6AB4B9E");
//(NTDDI_VERSION < NTDDI_WINXP)
mixin DEFINE_GUID!("KSNODETYPE_SURROUND_ENCODER", "8074C5B2-3C66-11D2-B45A-3078302C2030");
mixin DEFINE_GUID!("KSAUDFNAME_BASS", "185FEDE0-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_TREBLE", "185FEDE1-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_MIDRANGE", "A2CBE478-AE84-49A1-8B72-4AD09B78ED34");
mixin DEFINE_GUID!("KSAUDFNAME_3D_STEREO", "185FEDE2-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_MASTER_VOLUME", "185FEDE3-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_MASTER_MUTE", "185FEDE4-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_WAVE_VOLUME", "185FEDE5-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_WAVE_MUTE", "185FEDE6-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_MIDI_VOLUME", "185FEDE7-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_MIDI_MUTE", "185FEDE8-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_CD_VOLUME", "185FEDE9-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_CD_MUTE", "185FEDEA-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_LINE_VOLUME", "185FEDEB-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_LINE_MUTE", "185FEDEC-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_MIC_VOLUME", "185FEDED-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_MIC_MUTE", "185FEDEE-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_RECORDING_SOURCE", "185FEDEF-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_PC_SPEAKER_VOLUME", "185FEDF0-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_PC_SPEAKER_MUTE", "185FEDF1-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_MIDI_IN_VOLUME", "185FEDF2-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_CD_IN_VOLUME", "185FEDF3-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_LINE_IN_VOLUME", "185FEDF4-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_MIC_IN_VOLUME", "185FEDF5-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_WAVE_IN_VOLUME", "185FEDF6-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_VOLUME_CONTROL", "185FEDF7-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_MIDI", "185FEDF8-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_LINE_IN", "185FEDF9-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_RECORDING_CONTROL", "185FEDFA-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_CD_AUDIO", "185FEDFB-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_AUX_VOLUME", "185FEDFC-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_AUX_MUTE", "185FEDFD-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_AUX", "185FEDFE-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_PC_SPEAKER", "185FEDFF-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_WAVE_OUT_MIX", "185FEE00-9905-11D1-95A9-00C04FB925D3");
mixin DEFINE_GUID!("KSAUDFNAME_MONO_OUT", "F9B41DC3-96E2-11d2-AC4C-00C04F8EFB68");
mixin DEFINE_GUID!("KSAUDFNAME_STEREO_MIX", "00DFF077-96E3-11d2-AC4C-00C04F8EFB68");
mixin DEFINE_GUID!("KSAUDFNAME_MONO_MIX", "00DFF078-96E3-11d2-AC4C-00C04F8EFB68");
mixin DEFINE_GUID!("KSAUDFNAME_MONO_OUT_VOLUME", "1AD247EB-96E3-11d2-AC4C-00C04F8EFB68");
mixin DEFINE_GUID!("KSAUDFNAME_MONO_OUT_MUTE", "1AD247EC-96E3-11d2-AC4C-00C04F8EFB68");
mixin DEFINE_GUID!("KSAUDFNAME_STEREO_MIX_VOLUME", "1AD247ED-96E3-11d2-AC4C-00C04F8EFB68");
mixin DEFINE_GUID!("KSAUDFNAME_STEREO_MIX_MUTE", "22B0EAFD-96E3-11d2-AC4C-00C04F8EFB68");
mixin DEFINE_GUID!("KSAUDFNAME_MONO_MIX_VOLUME", "22B0EAFE-96E3-11d2-AC4C-00C04F8EFB68");
mixin DEFINE_GUID!("KSAUDFNAME_MONO_MIX_MUTE", "2BC31D69-96E3-11d2-AC4C-00C04F8EFB68");
mixin DEFINE_GUID!("KSAUDFNAME_MICROPHONE_BOOST", "2BC31D6A-96E3-11d2-AC4C-00C04F8EFB68");
mixin DEFINE_GUID!("KSAUDFNAME_ALTERNATE_MICROPHONE", "2BC31D6B-96E3-11d2-AC4C-00C04F8EFB68");
mixin DEFINE_GUID!("KSAUDFNAME_3D_DEPTH", "63FF5747-991F-11d2-AC4D-00C04F8EFB68");
mixin DEFINE_GUID!("KSAUDFNAME_3D_CENTER", "9F0670B4-991F-11d2-AC4D-00C04F8EFB68");
mixin DEFINE_GUID!("KSAUDFNAME_VIDEO_VOLUME", "9B46E708-992A-11d2-AC4D-00C04F8EFB68");
mixin DEFINE_GUID!("KSAUDFNAME_VIDEO_MUTE", "9B46E709-992A-11d2-AC4D-00C04F8EFB68");
mixin DEFINE_GUID!("KSAUDFNAME_VIDEO", "915DAEC4-A434-11d2-AC52-00C04F8EFB68");
//(NTDDI_VERSION >= NTDDI_WINXP)
mixin DEFINE_GUID!("KSAUDFNAME_PEAKMETER", "57E24340-FC5B-4612-A562-72B11A29DFAE");
enum {
KSNODEPIN_STANDARD_IN = 1,
KSNODEPIN_STANDARD_OUT = 0,
KSNODEPIN_SUM_MUX_IN = 1,
KSNODEPIN_SUM_MUX_OUT = 0,
KSNODEPIN_DEMUX_IN = 0,
KSNODEPIN_DEMUX_OUT = 1,
//(NTDDI_VERSION < NTDDI_VISTA)
KSNODEPIN_AEC_RENDER_IN = 1,
KSNODEPIN_AEC_RENDER_OUT = 0,
KSNODEPIN_AEC_CAPTURE_IN = 2,
KSNODEPIN_AEC_CAPTURE_OUT = 3,
}
mixin DEFINE_GUID!("KSMETHODSETID_Wavetable", "DCEF31EB-D907-11D0-9583-00C04FB925D3");
enum {
KSMETHOD_WAVETABLE_WAVE_ALLOC,
KSMETHOD_WAVETABLE_WAVE_FREE,
KSMETHOD_WAVETABLE_WAVE_FIND,
KSMETHOD_WAVETABLE_WAVE_WRITE
}
alias int KSMETHOD_WAVETABLE;
struct KSWAVETABLE_WAVE_DESC {
KSIDENTIFIER Identifier;
ULONG Size;
BOOL Looped;
ULONG LoopPoint;
BOOL InROM;
KSDATAFORMAT Format;
}
alias KSWAVETABLE_WAVE_DESC* PKSWAVETABLE_WAVE_DESC;
//(NTDDI_VERSION >= NTDDI_WINXP && NTDDI_VERSION < NTDDI_VISTA)
mixin DEFINE_GUID!("KSPROPSETID_Acoustic_Echo_Cancel", "D7A4AF8B-3DC1-4902-91EA-8A15C90E05B2");
enum {
KSPROPERTY_AEC_NOISE_FILL_ENABLE = 0,
KSPROPERTY_AEC_STATUS,
KSPROPERTY_AEC_MODE
}
alias int KSPROPERTY_AEC;
enum {
AEC_STATUS_FD_HISTORY_UNINITIALIZED = 0x0,
AEC_STATUS_FD_HISTORY_CONTINUOUSLY_CONVERGED = 0x1,
AEC_STATUS_FD_HISTORY_PREVIOUSLY_DIVERGED = 0x2,
AEC_STATUS_FD_CURRENTLY_CONVERGED = 0x8,
AEC_MODE_PASS_THROUGH = 0x0,
AEC_MODE_HALF_DUPLEX = 0x1,
AEC_MODE_FULL_DUPLEX = 0x2,
}
//(NTDDI_VERSION < NTDDI_WS03)
mixin DEFINE_GUID!("KSPROPSETID_Wave_Queued", "16a15b10-16f0-11d0-a195-0020afd156e4");
enum KSPROPERTY_WAVE_QUEUED_POSITION = 0x00000001;
mixin DEFINE_GUID!("KSMETHODSETID_Wave_Queued", "7432c160-8827-11cf-a102-0020afd156e4");
enum KSMETHOD_WAVE_QUEUED_BREAKLOOP = 0x00000001;
mixin DEFINE_GUID!("KSPROPSETID_Wave", "924e54b0-630f-11cf-ada7-08003e30494a");
enum {
KSPROPERTY_WAVE_COMPATIBLE_CAPABILITIES,
KSPROPERTY_WAVE_INPUT_CAPABILITIES,
KSPROPERTY_WAVE_OUTPUT_CAPABILITIES,
KSPROPERTY_WAVE_BUFFER,
KSPROPERTY_WAVE_FREQUENCY,
KSPROPERTY_WAVE_VOLUME,
KSPROPERTY_WAVE_PAN
}
alias int KSPROPERTY_WAVE;
struct KSWAVE_COMPATCAPS {
ULONG ulDeviceType;
}
alias KSWAVE_COMPATCAPS* PKSWAVE_COMPATCAPS;
enum {
KSWAVE_COMPATCAPS_INPUT = 0x00000000,
KSWAVE_COMPATCAPS_OUTPUT = 0x00000001,
}
struct KSWAVE_INPUT_CAPABILITIES {
ULONG MaximumChannelsPerConnection;
ULONG MinimumBitsPerSample;
ULONG MaximumBitsPerSample;
ULONG MinimumSampleFrequency;
ULONG MaximumSampleFrequency;
ULONG TotalConnections;
ULONG ActiveConnections;
}
alias KSWAVE_INPUT_CAPABILITIES* PKSWAVE_INPUT_CAPABILITIES;
struct KSWAVE_OUTPUT_CAPABILITIES {
ULONG MaximumChannelsPerConnection;
ULONG MinimumBitsPerSample;
ULONG MaximumBitsPerSample;
ULONG MinimumSampleFrequency;
ULONG MaximumSampleFrequency;
ULONG TotalConnections;
ULONG StaticConnections;
ULONG StreamingConnections;
ULONG ActiveConnections;
ULONG ActiveStaticConnections;
ULONG ActiveStreamingConnections;
ULONG Total3DConnections;
ULONG Static3DConnections;
ULONG Streaming3DConnections;
ULONG Active3DConnections;
ULONG ActiveStatic3DConnections;
ULONG ActiveStreaming3DConnections;
ULONG TotalSampleMemory;
ULONG FreeSampleMemory;
ULONG LargestFreeContiguousSampleMemory;
}
alias KSWAVE_OUTPUT_CAPABILITIES* PKSWAVE_OUTPUT_CAPABILITIES;
struct KSWAVE_VOLUME {
LONG LeftAttenuation;
LONG RightAttenuation;
}
alias KSWAVE_VOLUME* PKSWAVE_VOLUME;
enum {
KSWAVE_BUFFER_ATTRIBUTEF_LOOPING = 0x00000001,
KSWAVE_BUFFER_ATTRIBUTEF_STATIC = 0x00000002,
}
struct KSWAVE_BUFFER {
ULONG Attributes;
ULONG BufferSize;
PVOID BufferAddress;
}
alias KSWAVE_BUFFER* PKSWAVE_BUFFER;
mixin DEFINE_GUID!("KSMUSIC_TECHNOLOGY_PORT", "86C92E60-62E8-11CF-A5D6-28DB04C10000");
mixin DEFINE_GUID!("KSMUSIC_TECHNOLOGY_SQSYNTH", "0ECF4380-62E9-11CF-A5D6-28DB04C10000");
mixin DEFINE_GUID!("KSMUSIC_TECHNOLOGY_FMSYNTH", "252C5C80-62E9-11CF-A5D6-28DB04C10000");
mixin DEFINE_GUID!("KSMUSIC_TECHNOLOGY_WAVETABLE", "394EC7C0-62E9-11CF-A5D6-28DB04C10000");
mixin DEFINE_GUID!("KSMUSIC_TECHNOLOGY_SWSYNTH", "37407736-3620-11D1-85D3-0000F8754380");
//(NTDDI_VERSION < NTDDI_WS03)
mixin DEFINE_GUID!("KSPROPSETID_WaveTable", "8539E660-62E9-11CF-A5D6-28DB04C10000");
enum {
KSPROPERTY_WAVETABLE_LOAD_SAMPLE,
KSPROPERTY_WAVETABLE_UNLOAD_SAMPLE,
KSPROPERTY_WAVETABLE_MEMORY,
KSPROPERTY_WAVETABLE_VERSION
}
alias int KSPROPERTY_WAVETABLE;
struct KSDATARANGE_MUSIC {
KSDATARANGE DataRange;
GUID Technology;
ULONG Channels;
ULONG Notes;
ULONG ChannelMask;
}
alias KSDATARANGE_MUSIC* PKSDATARANGE_MUSIC;
//(NTDDI_VERSION < NTDDI_WS03)
mixin DEFINE_GUID!("KSEVENTSETID_Cyclic", "142C1AC0-072A-11D0-A5D6-28DB04C10000");
enum {
KSEVENT_CYCLIC_TIME_INTERVAL,
}
alias int KSEVENT_CYCLIC_TIME;
mixin DEFINE_GUID!("KSPROPSETID_Cyclic", "3FFEAEA0-2BEE-11CF-A5D6-28DB04C10000");
enum {
KSPROPERTY_CYCLIC_POSITION,
}
alias int KSPROPERTY_CYCLIC;
mixin DEFINE_GUID!("KSEVENTSETID_AudioControlChange", "E85E9698-FA2F-11D1-95BD-00C04FB925D3");
enum {
KSEVENT_CONTROL_CHANGE,
}
alias int KSEVENT_AUDIO_CONTROL_CHANGE;
mixin DEFINE_GUID!("KSEVENTSETID_LoopedStreaming", "4682B940-C6EF-11D0-96D8-00AA0051E51D");
enum {
KSEVENT_LOOPEDSTREAMING_POSITION,
}
alias int KSEVENT_LOOPEDSTREAMING;
struct LOOPEDSTREAMING_POSITION_EVENT_DATA {
KSEVENTDATA KsEventData;
DWORDLONG Position;
}
alias LOOPEDSTREAMING_POSITION_EVENT_DATA* PLOOPEDSTREAMING_POSITION_EVENT_DATA ;
//(NTDDI_VERSION <= NTDDI_WINXP)
mixin DEFINE_GUID!("KSEVENTSETID_Sysaudio", "04800320-4491-11D1-A050-405705C10000");
enum {
KSEVENT_SYSAUDIO_ADDREMOVE_DEVICE,
KSEVENT_SYSAUDIO_CHANGE_DEVICE
}
alias int KSEVENT_SYSAUDIO;
//(NTDDI_VERSION < NTDDI_VISTA)
mixin DEFINE_GUID!("KSPROPSETID_Sysaudio", "CBE3FAA0-CC75-11D0-B465-00001A1818E6");
//(NTDDI_VERSION >= NTDDI_WINXP && NTDDI_VERSION < NTDDI_VISTA)
enum {
KSPROPERTY_SYSAUDIO_DEVICE_COUNT = 1,
KSPROPERTY_SYSAUDIO_DEVICE_FRIENDLY_NAME = 2,
KSPROPERTY_SYSAUDIO_DEVICE_INSTANCE = 3,
KSPROPERTY_SYSAUDIO_DEVICE_INTERFACE_NAME = 4,
KSPROPERTY_SYSAUDIO_SELECT_GRAPH = 5,
KSPROPERTY_SYSAUDIO_CREATE_VIRTUAL_SOURCE = 6,
KSPROPERTY_SYSAUDIO_DEVICE_DEFAULT = 7,
KSPROPERTY_SYSAUDIO_INSTANCE_INFO = 14,
KSPROPERTY_SYSAUDIO_COMPONENT_ID = 16,
}
alias int KSPROPERTY_SYSAUDIO;
// (NTDDI_VERSION < NTDDI_WINXP)
/*
enum {
KSPROPERTY_SYSAUDIO_DEVICE_COUNT = 1,
KSPROPERTY_SYSAUDIO_DEVICE_FRIENDLY_NAME,
KSPROPERTY_SYSAUDIO_DEVICE_INSTANCE,
KSPROPERTY_SYSAUDIO_DEVICE_INTERFACE_NAME,
KSPROPERTY_SYSAUDIO_SELECT_GRAPH,
KSPROPERTY_SYSAUDIO_CREATE_VIRTUAL_SOURCE,
KSPROPERTY_SYSAUDIO_DEVICE_DEFAULT,
KSPROPERTY_SYSAUDIO_ALWAYS_CREATE_VIRTUAL_SOURCE,
KSPROPERTY_SYSAUDIO_ADDREMOVE_LOCK,
KSPROPERTY_SYSAUDIO_ADDREMOVE_UNLOCK,
KSPROPERTY_SYSAUDIO_RENDER_PIN_INSTANCES,
KSPROPERTY_SYSAUDIO_RENDER_CONNECTION_INDEX,
KSPROPERTY_SYSAUDIO_CREATE_VIRTUAL_SOURCE_ONLY,
KSPROPERTY_SYSAUDIO_INSTANCE_INFO,
KSPROPERTY_SYSAUDIO_PREFERRED_DEVICE
}
alias int KSPROPERTY_SYSAUDIO;
*/
//(NTDDI_VERSION < NTDDI_VISTA)
struct SYSAUDIO_CREATE_VIRTUAL_SOURCE {
KSPROPERTY Property;
GUID PinCategory;
GUID PinName;
}
alias SYSAUDIO_CREATE_VIRTUAL_SOURCE* PSYSAUDIO_CREATE_VIRTUAL_SOURCE;
//(NTDDI_VERSION < NTDDI_VISTA)
struct SYSAUDIO_SELECT_GRAPH {
KSPROPERTY Property;
ULONG PinId;
ULONG NodeId;
ULONG Flags;
ULONG Reserved;
}
alias SYSAUDIO_SELECT_GRAPH* PSYSAUDIO_SELECT_GRAPH;
struct SYSAUDIO_INSTANCE_INFO {
KSPROPERTY Property;
ULONG Flags;
ULONG DeviceNumber;
}
alias SYSAUDIO_INSTANCE_INFO* PSYSAUDIO_INSTANCE_INFO;
enum SYSAUDIO_FLAGS_DONT_COMBINE_PINS = 0x00000001;
//(NTDDI_VERSION < NTDDI_WINXP)
struct SYSAUDIO_PREFERRED_DEVICE {
KSPROPERTY Property;
ULONG Flags;
ULONG Index;
}
alias SYSAUDIO_PREFERRED_DEVICE* PSYSAUDIO_PREFERRED_DEVICE;
enum SYSAUDIO_FLAGS_CLEAR_PREFERRED = 0x00000002;
//(NTDDI_VERSION < NTDDI_VISTA)
mixin DEFINE_GUID!("KSPROPSETID_Sysaudio_Pin", "A3A53220-C6E4-11D0-B465-00001A1818E6");
//(NTDDI_VERSION >= NTDDI_WINXP && NTDDI_VERSION < NTDDI_VISTA)
enum {
KSPROPERTY_SYSAUDIO_ATTACH_VIRTUAL_SOURCE = 1,
}
alias int KSPROPERTY_SYSAUDIO_PIN;
//(NTDDI_VERSION < NTDDI_WINXP)
/* enum {
KSPROPERTY_SYSAUDIO_TOPOLOGY_CONNECTION_INDEX,
KSPROPERTY_SYSAUDIO_ATTACH_VIRTUAL_SOURCE,
KSPROPERTY_SYSAUDIO_PIN_VOLUME_NODE
}
alias int KSPROPERTY_SYSAUDIO_PIN;*/
//(NTDDI_VERSION < NTDDI_VISTA)
struct SYSAUDIO_ATTACH_VIRTUAL_SOURCE {
KSPROPERTY Property;
ULONG MixerPinId;
ULONG Reserved;
}
alias SYSAUDIO_ATTACH_VIRTUAL_SOURCE* PSYSAUDIO_ATTACH_VIRTUAL_SOURCE;
struct KSNODEPROPERTY {
KSPROPERTY Property;
ULONG NodeId;
ULONG Reserved;
}
alias KSNODEPROPERTY* PKSNODEPROPERTY;
struct KSNODEPROPERTY_AUDIO_CHANNEL {
KSNODEPROPERTY NodeProperty;
LONG Channel;
ULONG Reserved;
}
alias KSNODEPROPERTY_AUDIO_CHANNEL* PKSNODEPROPERTY_AUDIO_CHANNEL;
struct KSNODEPROPERTY_AUDIO_DEV_SPECIFIC {
KSNODEPROPERTY NodeProperty;
ULONG DevSpecificId;
ULONG DeviceInfo;
ULONG Length;
}
alias KSNODEPROPERTY_AUDIO_DEV_SPECIFIC* PKSNODEPROPERTY_AUDIO_DEV_SPECIFIC;
struct KSNODEPROPERTY_AUDIO_3D_LISTENER {
KSNODEPROPERTY NodeProperty;
PVOID ListenerId;
version(Win32){
ULONG Reserved;
}
}
alias KSNODEPROPERTY_AUDIO_3D_LISTENER* PKSNODEPROPERTY_AUDIO_3D_LISTENER;
struct KSNODEPROPERTY_AUDIO_PROPERTY {
KSNODEPROPERTY NodeProperty;
PVOID AppContext;
ULONG Length;
version(Win32){
ULONG Reserved;
}
}
alias KSNODEPROPERTY_AUDIO_PROPERTY* PKSNODEPROPERTY_AUDIO_PROPERTY;
//(NTDDI_VERSION >= NTDDI_WINXP && NTDDI_VERSION < NTDDI_VISTA)
mixin DEFINE_GUID!("KSPROPSETID_AudioGfx", "79A9312E-59AE-43b0-A350-8B05284CAB24");
enum {
KSPROPERTY_AUDIOGFX_RENDERTARGETDEVICEID,
KSPROPERTY_AUDIOGFX_CAPTURETARGETDEVICEID
}
alias int KSPROPERTY_AUDIOGFX;
//(NTDDI_VERSION < NTDDI_WS03)
mixin DEFINE_GUID!("KSPROPSETID_Linear", "5A2FFE80-16B9-11D0-A5D6-28DB04C10000");
enum {
KSPROPERTY_LINEAR_POSITION,
}
alias int KSPROPERTY_LINEAR;
mixin DEFINE_GUID!("KSDATAFORMAT_TYPE_MUSIC", "E725D360-62CC-11CF-A5D6-28DB04C10000");
mixin DEFINE_GUID!("KSDATAFORMAT_TYPE_MIDI", "7364696D-0000-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_MIDI", "1D262760-E957-11CF-A5D6-28DB04C10000");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_MIDI_BUS", "2CA15FA0-6CFE-11CF-A5D6-28DB04C10000");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_RIFFMIDI", "4995DAF0-9EE6-11D0-A40E-00A0C9223196");
struct KSMUSICFORMAT {
ULONG TimeDeltaMs;
ULONG ByteCount;
}
alias KSMUSICFORMAT* PKSMUSICFORMAT;
mixin DEFINE_GUID!("KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM ", "36523B11-8EE5-11d1-8CA3-0060B057664A");
mixin DEFINE_GUID!("KSDATAFORMAT_TYPE_STANDARD_PES_PACKET ", "36523B12-8EE5-11d1-8CA3-0060B057664A");
mixin DEFINE_GUID!("KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER ", "36523B13-8EE5-11d1-8CA3-0060B057664A");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO ", "36523B21-8EE5-11d1-8CA3-0060B057664A");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO ", "36523B22-8EE5-11d1-8CA3-0060B057664A");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO ", "36523B23-8EE5-11d1-8CA3-0060B057664A");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO ", "36523B24-8EE5-11d1-8CA3-0060B057664A");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO ", "36523B25-8EE5-11d1-8CA3-0060B057664A");
mixin DEFINE_GUID!("KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO ", "36523B31-8EE5-11d1-8CA3-0060B057664A");
mixin DEFINE_GUID!("KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO ", "36523B32-8EE5-11d1-8CA3-0060B057664A");
mixin DEFINE_GUID!("KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO ", "36523B33-8EE5-11d1-8CA3-0060B057664A");
mixin DEFINE_GUID!("KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO ", "36523B34-8EE5-11d1-8CA3-0060B057664A");
mixin DEFINE_GUID!("KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO ", "36523B35-8EE5-11d1-8CA3-0060B057664A");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_DSS_VIDEO", "a0af4f81-e163-11d0-bad9-00609744111a");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_DSS_AUDIO", "a0af4f82-e163-11d0-bad9-00609744111a");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_MPEG1Packet", "e436eb80-524f-11ce-9F53-0020af0ba770");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_MPEG1Payload", "e436eb81-524f-11ce-9F53-0020af0ba770");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_MPEG1Video", "e436eb86-524f-11ce-9f53-0020af0ba770");
mixin DEFINE_GUID!("KSDATAFORMAT_SPECIFIER_MPEG1_VIDEO", "05589f82-c356-11ce-bf01-00aa0055595a");
mixin DEFINE_GUID!("KSDATAFORMAT_TYPE_MPEG2_PES", "e06d8020-db46-11cf-b4d1-00805f6cbbea");
mixin DEFINE_GUID!("KSDATAFORMAT_TYPE_MPEG2_PROGRAM", "e06d8022-db46-11cf-b4d1-00805f6cbbea");
mixin DEFINE_GUID!("KSDATAFORMAT_TYPE_MPEG2_TRANSPORT", "e06d8023-db46-11cf-b4d1-00805f6cbbea");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO", "e06d8026-db46-11cf-b4d1-00805f6cbbea");
mixin DEFINE_GUID!("KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO", "e06d80e3-db46-11cf-b4d1-00805f6cbbea");
mixin DEFINE_GUID!("KSPROPSETID_Mpeg2Vid", "C8E11B60-0CC9-11D0-BD69-003505C103A9");
enum {
KSPROPERTY_MPEG2VID_MODES,
KSPROPERTY_MPEG2VID_CUR_MODE,
KSPROPERTY_MPEG2VID_4_3_RECT,
KSPROPERTY_MPEG2VID_16_9_RECT,
KSPROPERTY_MPEG2VID_16_9_PANSCAN,
}
alias int KSPROPERTY_MPEG2VID;
enum {
KSMPEGVIDMODE_PANSCAN = 0x0001,
KSMPEGVIDMODE_LTRBOX = 0x0002,
KSMPEGVIDMODE_SCALE = 0x0004,
}
struct KSMPEGVID_RECT {
ULONG StartX;
ULONG StartY;
ULONG EndX;
ULONG EndY;
}
alias KSMPEGVID_RECT* PKSMPEGVID_RECT;
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO", "e06d802b-db46-11cf-b4d1-00805f6cbbea");
mixin DEFINE_GUID!("KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO", "e06d80e5-db46-11cf-b4d1-00805f6cbbea");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_LPCM_AUDIO", "e06d8032-db46-11cf-b4d1-00805f6cbbea");
mixin DEFINE_GUID!("KSDATAFORMAT_SPECIFIER_LPCM_AUDIO", "e06d80e6-db46-11cf-b4d1-00805f6cbbea");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_AC3_AUDIO", "e06d802c-db46-11cf-b4d1-00805f6cbbea");
mixin DEFINE_GUID!("KSDATAFORMAT_SPECIFIER_AC3_AUDIO", "e06d80e4-db46-11cf-b4d1-00805f6cbbea");
mixin DEFINE_GUID!("KSPROPSETID_AC3", "BFABE720-6E1F-11D0-BCF2-444553540000");
enum {
KSPROPERTY_AC3_ERROR_CONCEALMENT = 1,
KSPROPERTY_AC3_ALTERNATE_AUDIO,
KSPROPERTY_AC3_DOWNMIX,
KSPROPERTY_AC3_BIT_STREAM_MODE,
KSPROPERTY_AC3_DIALOGUE_LEVEL,
KSPROPERTY_AC3_LANGUAGE_CODE,
KSPROPERTY_AC3_ROOM_TYPE
}
alias int KSPROPERTY_AC3;
struct KSAC3_ERROR_CONCEALMENT {
BOOL fRepeatPreviousBlock;
BOOL fErrorInCurrentBlock;
}
alias KSAC3_ERROR_CONCEALMENT* PKSAC3_ERROR_CONCEALMENT;
struct KSAC3_ALTERNATE_AUDIO {
BOOL fStereo;
ULONG DualMode;
}
alias KSAC3_ALTERNATE_AUDIO* PKSAC3_ALTERNATE_AUDIO;
enum {
KSAC3_ALTERNATE_AUDIO_1 = 1,
KSAC3_ALTERNATE_AUDIO_2 = 2,
KSAC3_ALTERNATE_AUDIO_BOTH = 3,
}
struct KSAC3_DOWNMIX {
BOOL fDownMix;
BOOL fDolbySurround;
}
alias KSAC3_DOWNMIX* PKSAC3_DOWNMIX;
struct KSAC3_BIT_STREAM_MODE {
LONG BitStreamMode;
}
alias KSAC3_BIT_STREAM_MODE* PKSAC3_BIT_STREAM_MODE;
enum {
KSAC3_SERVICE_MAIN_AUDIO = 0,
KSAC3_SERVICE_NO_DIALOG = 1,
KSAC3_SERVICE_VISUALLY_IMPAIRED = 2,
KSAC3_SERVICE_HEARING_IMPAIRED = 3,
KSAC3_SERVICE_DIALOG_ONLY = 4,
KSAC3_SERVICE_COMMENTARY = 5,
KSAC3_SERVICE_EMERGENCY_FLASH = 6,
KSAC3_SERVICE_VOICE_OVER = 7,
}
struct KSAC3_DIALOGUE_LEVEL {
ULONG DialogueLevel;
}
alias KSAC3_DIALOGUE_LEVEL* PKSAC3_DIALOGUE_LEVEL;
struct KSAC3_ROOM_TYPE {
BOOL fLargeRoom;
}
alias KSAC3_ROOM_TYPE* PKSAC3_ROOM_TYPE;
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL", "00000092-0000-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_IEC61937_WMA_PRO", "00000164-0000-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_IEC61937_DTS", "00000008-0000-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_IEC61937_MPEG1", "00000003-0cea-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_IEC61937_MPEG2", "00000004-0cea-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_IEC61937_MPEG3", "00000005-0cea-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_IEC61937_AAC", "00000006-0cea-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_IEC61937_ATRAC", "00000008-0cea-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_IEC61937_ONE_BIT_AUDIO", "00000009-0cea-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL_PLUS", "0000000a-0cea-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_IEC61937_DTS_HD", "0000000b-0cea-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_MLP", "0000000c-0cea-0010-8000-00aa00389b71");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_IEC61937_DST", "0000000d-0cea-0010-8000-00aa00389b71");
//(NTDDI_VERSION >= NTDDI_WINXP)
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_DTS_AUDIO", "e06d8033-db46-11cf-b4d1-00805f6cbbea");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_SDDS_AUDIO", "e06d8034-db46-11cf-b4d1-00805f6cbbea");
mixin DEFINE_GUID!("KSPROPSETID_AudioDecoderOut", "6ca6e020-43bd-11d0-bd6a-003505c103a9");
enum {
KSPROPERTY_AUDDECOUT_MODES,
KSPROPERTY_AUDDECOUT_CUR_MODE,
}
alias int KSPROPERTY_AUDDECOUT;
enum {
KSAUDDECOUTMODE_STEREO_ANALOG = 0x0001,
KSAUDDECOUTMODE_PCM_51 = 0x0002,
KSAUDDECOUTMODE_SPDIFF = 0x0004,
}
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_SUBPICTURE", "e06d802d-db46-11cf-b4d1-00805f6cbbea");
mixin DEFINE_GUID!("KSPROPSETID_DvdSubPic", "ac390460-43af-11d0-bd6a-003505c103a9");
enum {
KSPROPERTY_DVDSUBPIC_PALETTE,
KSPROPERTY_DVDSUBPIC_HLI,
KSPROPERTY_DVDSUBPIC_COMPOSIT_ON,
}
alias int KSPROPERTY_DVDSUBPIC;
struct KS_DVD_YCrCb {
UCHAR Reserved;
UCHAR Y;
UCHAR Cr;
UCHAR Cb;
}
alias KS_DVD_YCrCb* PKS_DVD_YCrCb;
struct KS_DVD_YUV {
UCHAR Reserved;
UCHAR Y;
UCHAR V;
UCHAR U;
}
alias KS_DVD_YUV* PKS_DVD_YUV;
struct KSPROPERTY_SPPAL {
KS_DVD_YUV sppal[16];
}
alias KSPROPERTY_SPPAL* PKSPROPERTY_SPPAL;
struct KS_COLCON {
DWORD flags_;
/*
UCHAR emph1col:4;
UCHAR emph2col:4;
UCHAR backcol:4;
UCHAR patcol:4;
UCHAR emph1con:4;
UCHAR emph2con:4;
UCHAR backcon:4;
UCHAR patcon:4;
*/
}
alias KS_COLCON* PKS_COLCON;
struct KSPROPERTY_SPHLI {
USHORT HLISS;
USHORT Reserved;
ULONG StartPTM;
ULONG EndPTM;
USHORT StartX;
USHORT StartY;
USHORT StopX;
USHORT StopY;
KS_COLCON ColCon;
}
alias KSPROPERTY_SPHLI* PKSPROPERTY_SPHLI;
alias BOOL KSPROPERTY_COMPOSIT_ON;
alias KSPROPERTY_COMPOSIT_ON* PKSPROPERTY_COMPOSIT_ON;
mixin DEFINE_GUID!("KSPROPSETID_CopyProt", "0E8A0A40-6AEF-11D0-9ED0-00A024CA19B3");
enum {
KSPROPERTY_DVDCOPY_CHLG_KEY = 0x01,
KSPROPERTY_DVDCOPY_DVD_KEY1,
KSPROPERTY_DVDCOPY_DEC_KEY2,
KSPROPERTY_DVDCOPY_TITLE_KEY,
KSPROPERTY_COPY_MACROVISION,
KSPROPERTY_DVDCOPY_REGION,
KSPROPERTY_DVDCOPY_SET_COPY_STATE,
KSPROPERTY_DVDCOPY_DISC_KEY = 0x80
}
alias int KSPROPERTY_COPYPROT;
struct KS_DVDCOPY_CHLGKEY {
BYTE[10] ChlgKey;
BYTE[2] Reserved;
}
alias KS_DVDCOPY_CHLGKEY* PKS_DVDCOPY_CHLGKEY;
struct KS_DVDCOPY_BUSKEY {
BYTE[5] BusKey;
BYTE[1] Reserved;
}
alias KS_DVDCOPY_BUSKEY* PKS_DVDCOPY_BUSKEY;
struct KS_DVDCOPY_DISCKEY {
BYTE[2048] DiscKey;
}
alias KS_DVDCOPY_DISCKEY* PKS_DVDCOPY_DISCKEY;
struct KS_DVDCOPY_REGION {
UCHAR Reserved;
UCHAR RegionData;
UCHAR[2] Reserved2;
}
alias KS_DVDCOPY_REGION* PKS_DVDCOPY_REGION;
struct KS_DVDCOPY_TITLEKEY {
ULONG KeyFlags;
ULONG[2] ReservedNT;
UCHAR[6] TitleKey;
UCHAR[2] Reserved;
}
alias KS_DVDCOPY_TITLEKEY* PKS_DVDCOPY_TITLEKEY;
struct KS_COPY_MACROVISION {
ULONG MACROVISIONLevel;
}
alias KS_COPY_MACROVISION* PKS_COPY_MACROVISION;
struct KS_DVDCOPY_SET_COPY_STATE {
ULONG DVDCopyState;
}
alias KS_DVDCOPY_SET_COPY_STATE* PKS_DVDCOPY_SET_COPY_STATE;
enum {
KS_DVDCOPYSTATE_INITIALIZE,
KS_DVDCOPYSTATE_INITIALIZE_TITLE,
KS_DVDCOPYSTATE_AUTHENTICATION_NOT_REQUIRED,
KS_DVDCOPYSTATE_AUTHENTICATION_REQUIRED,
KS_DVDCOPYSTATE_DONE,
}
alias int KS_DVDCOPYSTATE;
enum {
KS_MACROVISION_DISABLED,
KS_MACROVISION_LEVEL1,
KS_MACROVISION_LEVEL2,
KS_MACROVISION_LEVEL3
}
alias int KS_COPY_MACROVISION_LEVEL;
alias KS_COPY_MACROVISION_LEVEL* PKS_COPY_MACROVISION_LEVEL;
enum {
KS_DVD_CGMS_RESERVED_MASK = 0x00000078,
KS_DVD_CGMS_COPY_PROTECT_MASK = 0x00000018,
KS_DVD_CGMS_COPY_PERMITTED = 0x00000000,
KS_DVD_CGMS_COPY_ONCE = 0x00000010,
KS_DVD_CGMS_NO_COPY = 0x00000018,
KS_DVD_COPYRIGHT_MASK = 0x00000040,
KS_DVD_NOT_COPYRIGHTED = 0x00000000,
KS_DVD_COPYRIGHTED = 0x00000040,
KS_DVD_SECTOR_PROTECT_MASK = 0x00000020,
KS_DVD_SECTOR_NOT_PROTECTED = 0x00000000,
KS_DVD_SECTOR_PROTECTED = 0x00000020,
}
mixin DEFINE_GUID!("KSCATEGORY_TVTUNER", "a799a800-a46d-11d0-a18c-00a02401dcd4");
mixin DEFINE_GUID!("KSCATEGORY_CROSSBAR", "a799a801-a46d-11d0-a18c-00a02401dcd4");
mixin DEFINE_GUID!("KSCATEGORY_TVAUDIO", "a799a802-a46d-11d0-a18c-00a02401dcd4");
mixin DEFINE_GUID!("KSCATEGORY_VPMUX", "a799a803-a46d-11d0-a18c-00a02401dcd4");
mixin DEFINE_GUID!("KSCATEGORY_VBICODEC", "07dad660-22f1-11d1-a9f4-00c04fbbde8f");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_VPVideo", "5a9b6a40-1a22-11d1-bad9-00609744111a");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_VPVBI", "5a9b6a41-1a22-11d1-bad9-00609744111a");
mixin DEFINE_GUID!("KSDATAFORMAT_SPECIFIER_VIDEOINFO", "05589f80-c356-11ce-bf01-00aa0055595a");
mixin DEFINE_GUID!("KSDATAFORMAT_SPECIFIER_VIDEOINFO2", "f72a76A0-eb0a-11d0-ace4-0000c0cc16ba");
mixin DEFINE_GUID!("KSDATAFORMAT_TYPE_ANALOGVIDEO", "0482dde1-7817-11cf-8a03-00aa006ecb65");
mixin DEFINE_GUID!("KSDATAFORMAT_SPECIFIER_ANALOGVIDEO", "0482dde0-7817-11cf-8a03-00aa006ecb65");
//( (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
mixin DEFINE_GUID!("KSDATAFORMAT_TYPE_ANALOGAUDIO", "0482DEE1-7817-11cf-8a03-00aa006ecb65");
mixin DEFINE_GUID!("KSDATAFORMAT_SPECIFIER_VBI", "f72a76e0-eb0a-11d0-ace4-0000c0cc16ba");
mixin DEFINE_GUID!("KSDATAFORMAT_TYPE_VBI", "f72a76e1-eb0a-11d0-ace4-0000c0cc16ba");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_RAW8", "ca20d9a0-3e3e-11d1-9bf9-00c04fbbdebf");
//(NTDDI_VERSION >= NTDDI_WINXP)
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_CC", "33214CC1-011F-11D2-B4B1-00A0D102CFBE");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_NABTS", "f72a76e2-eb0a-11d0-ace4-0000c0cc16ba");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_TELETEXT", "f72a76e3-eb0a-11d0-ace4-0000c0cc16ba");
enum {
KS_BI_RGB = 0,
KS_BI_RLE8 = 1,
KS_BI_RLE4 = 2,
KS_BI_BITFIELDS = 3,
}
struct KS_RGBQUAD {
BYTE rgbBlue;
BYTE rgbGreen;
BYTE rgbRed;
BYTE rgbReserved;
}
alias KS_RGBQUAD* PKS_RGBQUAD;
enum {
KS_iPALETTE_COLORS = 256,
KS_iEGA_COLORS = 16,
KS_iMASK_COLORS = 3,
KS_iTRUECOLOR = 16,
KS_iRED = 0,
KS_iGREEN = 1,
KS_iBLUE = 2,
KS_iPALETTE = 8,
KS_iMAXBITS = 8,
KS_SIZE_EGA_PALETTE = KS_iEGA_COLORS * KS_RGBQUAD.sizeof,
KS_SIZE_PALETTE = KS_iPALETTE_COLORS * KS_RGBQUAD.sizeof,
}
struct KS_BITMAPINFOHEADER {
DWORD biSize;
LONG biWidth;
LONG biHeight;
WORD biPlanes;
WORD biBitCount;
DWORD biCompression;
DWORD biSizeImage;
LONG biXPelsPerMeter;
LONG biYPelsPerMeter;
DWORD biClrUsed;
DWORD biClrImportant;
}
alias KS_BITMAPINFOHEADER* PKS_BITMAPINFOHEADER;
struct KS_TRUECOLORINFO {
DWORD[KS_iMASK_COLORS] dwBitMasks;
KS_RGBQUAD[KS_iPALETTE_COLORS] bmiColors;
}
alias KS_TRUECOLORINFO* PKS_TRUECOLORINFO;
//KS_WIDTHBYTES(bits) ((DWORD)(((bits)+31) & (~31)) / 8)
//KS_DIBWIDTHBYTES(bi) (DWORD)KS_WIDTHBYTES((DWORD)(bi).biWidth * (DWORD)(bi).biBitCount)
//KS__DIBSIZE(bi) (KS_DIBWIDTHBYTES(bi) * (DWORD)(bi).biHeight)
//KS_DIBSIZE(bi) ((bi).biHeight < 0 ? (-1)*(KS__DIBSIZE(bi)) : KS__DIBSIZE(bi))
alias LONGLONG REFERENCE_TIME;
struct KS_VIDEOINFOHEADER {
RECT rcSource;
RECT rcTarget;
DWORD dwBitRate;
DWORD dwBitErrorRate;
REFERENCE_TIME AvgTimePerFrame;
KS_BITMAPINFOHEADER bmiHeader;
}
alias KS_VIDEOINFOHEADER* PKS_VIDEOINFOHEADER;
struct KS_VIDEOINFO {
RECT rcSource;
RECT rcTarget;
DWORD dwBitRate;
DWORD dwBitErrorRate;
REFERENCE_TIME AvgTimePerFrame;
KS_BITMAPINFOHEADER bmiHeader;
union {
KS_RGBQUAD[KS_iPALETTE_COLORS] bmiColors;
DWORD[KS_iMASK_COLORS] dwBitMasks;
KS_TRUECOLORINFO TrueColorInfo;
}
}
alias KS_VIDEOINFO* PKS_VIDEOINFO;
enum {
KS_SIZE_MASKS = KS_iMASK_COLORS * DWORD.sizeof,
KS_SIZE_PREHEADER = KS_VIDEOINFOHEADER.bmiHeader.offsetof,
}
// KS_SIZE_VIDEOHEADER(pbmi) (pbmi)->bmiHeader.biSize + KS_SIZE_PREHEADER,
struct KS_VBIINFOHEADER {
ULONG StartLine;
ULONG EndLine;
ULONG SamplingFrequency;
ULONG MinLineStartTime;
ULONG MaxLineStartTime;
ULONG ActualLineStartTime;
ULONG ActualLineEndTime;
ULONG VideoStandard;
ULONG SamplesPerLine;
ULONG StrideInBytes;
ULONG BufferSize;
}
alias KS_VBIINFOHEADER* PKS_VBIINFOHEADER;
//(NTDDI_VERSION >= NTDDI_WINXP)
enum KS_VBIDATARATE_NABTS = 5727272;
enum KS_VBIDATARATE_CC = 503493;
enum KS_VBISAMPLINGRATE_4X_NABTS = 4 * KS_VBIDATARATE_NABTS;
enum KS_VBISAMPLINGRATE_47X_NABTS = 27000000;
enum KS_VBISAMPLINGRATE_5X_NABTS = 5 * KS_VBIDATARATE_NABTS;
const double KS_47NABTS_SCALER = KS_VBISAMPLINGRATE_47X_NABTS / cast(double)KS_VBIDATARATE_NABTS;
struct KS_ANALOGVIDEOINFO {
RECT rcSource;
RECT rcTarget;
DWORD dwActiveWidth;
DWORD dwActiveHeight;
REFERENCE_TIME AvgTimePerFrame;
}
alias KS_ANALOGVIDEOINFO* PKS_ANALOGVIDEOINFO;
enum {
KS_TVTUNER_CHANGE_BEGIN_TUNE = 0x0001,
KS_TVTUNER_CHANGE_END_TUNE = 0x0002,
}
struct KS_TVTUNER_CHANGE_INFO {
DWORD dwFlags;
DWORD dwCountryCode;
DWORD dwAnalogVideoStandard;
DWORD dwChannel;
}
alias KS_TVTUNER_CHANGE_INFO* PKS_TVTUNER_CHANGE_INFO;
enum {
KS_MPEG2Level_Low,
KS_MPEG2Level_Main,
KS_MPEG2Level_High1440,
KS_MPEG2Level_High
}
alias int KS_MPEG2Level;
enum {
KS_MPEG2Profile_Simple,
KS_MPEG2Profile_Main,
KS_MPEG2Profile_SNRScalable,
KS_MPEG2Profile_SpatiallyScalable,
KS_MPEG2Profile_High
}
alias int KS_MPEG2Profile;
enum {
KS_INTERLACE_IsInterlaced = 0x00000001,
KS_INTERLACE_1FieldPerSample = 0x00000002,
KS_INTERLACE_Field1First = 0x00000004,
KS_INTERLACE_UNUSED = 0x00000008,
KS_INTERLACE_FieldPatternMask = 0x00000030,
KS_INTERLACE_FieldPatField1Only = 0x00000000,
KS_INTERLACE_FieldPatField2Only = 0x00000010,
KS_INTERLACE_FieldPatBothRegular = 0x00000020,
KS_INTERLACE_FieldPatBothIrregular = 0x00000030,
KS_INTERLACE_DisplayModeMask = 0x000000c0,
KS_INTERLACE_DisplayModeBobOnly = 0x00000000,
KS_INTERLACE_DisplayModeWeaveOnly = 0x00000040,
KS_INTERLACE_DisplayModeBobOrWeave = 0x00000080,
KS_COPYPROTECT_RestrictDuplication = 0x00000001,
KS_MPEG2_DoPanScan = 0x00000001,
KS_MPEG2_DVDLine21Field1 = 0x00000002,
KS_MPEG2_DVDLine21Field2 = 0x00000004,
KS_MPEG2_SourceIsLetterboxed = 0x00000008,
KS_MPEG2_FilmCameraMode = 0x00000010,
KS_MPEG2_LetterboxAnalogOut = 0x00000020,
KS_MPEG2_DSS_UserData = 0x00000040,
KS_MPEG2_DVB_UserData = 0x00000080,
KS_MPEG2_27MhzTimebase = 0x00000100,
//(NTDDI_VERSION >= NTDDI_WINXP)
KS_MPEG2_WidescreenAnalogOut = 0x00000200,
KS_AMCONTROL_USED = 0x00000001,
KS_AMCONTROL_PAD_TO_4x3 = 0x00000002,
KS_AMCONTROL_PAD_TO_16x9 = 0x00000004,
KS_AMCONTROL_COLORINFO_PRESENT = 0x00000080,
}
struct KS_VIDEOINFOHEADER2 {
RECT rcSource;
RECT rcTarget;
DWORD dwBitRate;
DWORD dwBitErrorRate;
REFERENCE_TIME AvgTimePerFrame;
DWORD dwInterlaceFlags;
DWORD dwCopyProtectFlags;
DWORD dwPictAspectRatioX;
DWORD dwPictAspectRatioY;
union {
DWORD dwControlFlags;
DWORD dwReserved1;
}
DWORD dwReserved2;
KS_BITMAPINFOHEADER bmiHeader;
}
alias KS_VIDEOINFOHEADER2* PKS_VIDEOINFOHEADER2;
struct KS_MPEG1VIDEOINFO {
KS_VIDEOINFOHEADER hdr;
DWORD dwStartTimeCode;
DWORD cbSequenceHeader;
BYTE[1] bSequenceHeader;
}
alias KS_MPEG1VIDEOINFO* PKS_MPEG1VIDEOINFO;
enum {
KS_MAX_SIZE_MPEG1_SEQUENCE_INFO = 140
}
//KS_SIZE_MPEG1VIDEOINFO(pv) (FIELD_OFFSET(KS_MPEG1VIDEOINFO, bSequenceHeader[0]) + (pv)->cbSequenceHeader)
//KS_MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)
struct KS_MPEGVIDEOINFO2 {
KS_VIDEOINFOHEADER2 hdr;
DWORD dwStartTimeCode;
DWORD cbSequenceHeader;
DWORD dwProfile;
DWORD dwLevel;
DWORD dwFlags;
DWORD[1] bSequenceHeader;
}
alias KS_MPEGVIDEOINFO2* PKS_MPEGVIDEOINFO2;
//KS_SIZE_MPEGVIDEOINFO2(pv) (FIELD_OFFSET(KS_MPEGVIDEOINFO2, bSequenceHeader[0]) + (pv)->cbSequenceHeader)
//KS_MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)
enum KS_MPEGAUDIOINFO_27MhzTimebase = 0x00000001;
struct KS_MPEGAUDIOINFO {
DWORD dwFlags;
DWORD dwReserved1;
DWORD dwReserved2;
DWORD dwReserved3;
}
alias KS_MPEGAUDIOINFO* PKS_MPEGAUDIOINFO;
struct KS_DATAFORMAT_VIDEOINFOHEADER {
KSDATAFORMAT DataFormat;
KS_VIDEOINFOHEADER VideoInfoHeader;
}
alias KS_DATAFORMAT_VIDEOINFOHEADER* PKS_DATAFORMAT_VIDEOINFOHEADER;
struct KS_DATAFORMAT_VIDEOINFOHEADER2 {
KSDATAFORMAT DataFormat;
KS_VIDEOINFOHEADER2 VideoInfoHeader2;
}
alias KS_DATAFORMAT_VIDEOINFOHEADER2* PKS_DATAFORMAT_VIDEOINFOHEADER2;
struct KS_DATAFORMAT_MPEGVIDEOINFO2 {
KSDATAFORMAT DataFormat;
KS_MPEGVIDEOINFO2 MpegVideoInfoHeader2;
}
alias KS_DATAFORMAT_MPEGVIDEOINFO2* PKS_DATAFORMAT_MPEGVIDEOINFO2;
struct KS_DATAFORMAT_VIDEOINFO_PALETTE {
KSDATAFORMAT DataFormat;
KS_VIDEOINFO VideoInfo;
}
alias KS_DATAFORMAT_VIDEOINFO_PALETTE* PKS_DATAFORMAT_VIDEOINFO_PALETTE;
struct KS_DATAFORMAT_VBIINFOHEADER {
KSDATAFORMAT DataFormat;
KS_VBIINFOHEADER VBIInfoHeader;
}
alias KS_DATAFORMAT_VBIINFOHEADER* PKS_DATAFORMAT_VBIINFOHEADER;
struct KS_VIDEO_STREAM_CONFIG_CAPS {
GUID guid;
ULONG VideoStandard;
SIZE InputSize;
SIZE MinCroppingSize;
SIZE MaxCroppingSize;
int CropGranularityX;
int CropGranularityY;
int CropAlignX;
int CropAlignY;
SIZE MinOutputSize;
SIZE MaxOutputSize;
int OutputGranularityX;
int OutputGranularityY;
int StretchTapsX;
int StretchTapsY;
int ShrinkTapsX;
int ShrinkTapsY;
LONGLONG MinFrameInterval;
LONGLONG MaxFrameInterval;
LONG MinBitsPerSecond;
LONG MaxBitsPerSecond;
}
alias KS_VIDEO_STREAM_CONFIG_CAPS* PKS_VIDEO_STREAM_CONFIG_CAPS;
struct KS_DATARANGE_VIDEO {
KSDATARANGE DataRange;
BOOL bFixedSizeSamples;
BOOL bTemporalCompression;
DWORD StreamDescriptionFlags;
DWORD MemoryAllocationFlags;
KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
KS_VIDEOINFOHEADER VideoInfoHeader;
}
alias KS_DATARANGE_VIDEO* PKS_DATARANGE_VIDEO;
struct KS_DATARANGE_VIDEO2 {
KSDATARANGE DataRange;
BOOL bFixedSizeSamples;
BOOL bTemporalCompression;
DWORD StreamDescriptionFlags;
DWORD MemoryAllocationFlags;
KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
KS_VIDEOINFOHEADER2 VideoInfoHeader;
}
alias KS_DATARANGE_VIDEO2* PKS_DATARANGE_VIDEO2;
struct KS_DATARANGE_MPEG1_VIDEO {
KSDATARANGE DataRange;
BOOL bFixedSizeSamples;
BOOL bTemporalCompression;
DWORD StreamDescriptionFlags;
DWORD MemoryAllocationFlags;
KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
KS_MPEG1VIDEOINFO VideoInfoHeader;
}
alias KS_DATARANGE_MPEG1_VIDEO* PKS_DATARANGE_MPEG1_VIDEO;
struct KS_DATARANGE_MPEG2_VIDEO {
KSDATARANGE DataRange;
BOOL bFixedSizeSamples;
BOOL bTemporalCompression;
DWORD StreamDescriptionFlags;
DWORD MemoryAllocationFlags;
KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
KS_MPEGVIDEOINFO2 VideoInfoHeader;
}
alias KS_DATARANGE_MPEG2_VIDEO* PKS_DATARANGE_MPEG2_VIDEO;
struct KS_DATARANGE_VIDEO_PALETTE {
KSDATARANGE DataRange;
BOOL bFixedSizeSamples;
BOOL bTemporalCompression;
DWORD StreamDescriptionFlags;
DWORD MemoryAllocationFlags;
KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
KS_VIDEOINFO VideoInfo;
}
alias KS_DATARANGE_VIDEO_PALETTE* PKS_DATARANGE_VIDEO_PALETTE;
struct KS_DATARANGE_VIDEO_VBI {
KSDATARANGE DataRange;
BOOL bFixedSizeSamples;
BOOL bTemporalCompression;
DWORD StreamDescriptionFlags;
DWORD MemoryAllocationFlags;
KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
KS_VBIINFOHEADER VBIInfoHeader;
}
alias KS_DATARANGE_VIDEO_VBI* PKS_DATARANGE_VIDEO_VBI;
struct KS_DATARANGE_ANALOGVIDEO {
KSDATARANGE DataRange;
KS_ANALOGVIDEOINFO AnalogVideoInfo;
}
alias KS_DATARANGE_ANALOGVIDEO* PKS_DATARANGE_ANALOGVIDEO;
enum {
KS_VIDEOSTREAM_PREVIEW = 0x0001,
KS_VIDEOSTREAM_CAPTURE = 0x0002,
KS_VIDEOSTREAM_VBI = 0x0010,
KS_VIDEOSTREAM_NABTS = 0x0020,
KS_VIDEOSTREAM_CC = 0x0100,
KS_VIDEOSTREAM_EDS = 0x0200,
KS_VIDEOSTREAM_TELETEXT = 0x0400,
KS_VIDEOSTREAM_STILL = 0x1000,
KS_VIDEOSTREAM_IS_VPE = 0x8000,
}
enum {
KS_VIDEO_ALLOC_VPE_SYSTEM = 0x0001,
KS_VIDEO_ALLOC_VPE_DISPLAY = 0x0002,
KS_VIDEO_ALLOC_VPE_AGP = 0x0004,
}
//(NTDDI_VERSION >= NTDDI_WINXP)
mixin DEFINE_GUID!("KSPROPSETID_VBICAP_PROPERTIES", "F162C607-7B35-496f-AD7F-2DCA3B46B718");
enum {
KSPROPERTY_VBICAP_PROPERTIES_PROTECTION = 0x01,
}
alias int KSPROPERTY_VBICAP;
struct VBICAP_PROPERTIES_PROTECTION_S {
KSPROPERTY Property;
ULONG StreamIndex;
ULONG Status;
}
alias VBICAP_PROPERTIES_PROTECTION_S* PVBICAP_PROPERTIES_PROTECTION_S;
enum {
KS_VBICAP_PROTECTION_MV_PRESENT = 0x0001,
KS_VBICAP_PROTECTION_MV_HARDWARE = 0x0002,
KS_VBICAP_PROTECTION_MV_DETECTED = 0x0004,
}
enum {
KS_NABTS_GROUPID_ORIGINAL_CONTENT_BASE = 0x800,
KS_NABTS_GROUPID_ORIGINAL_CONTENT_ADVERTISER_BASE = 0x810,
KS_NABTS_GROUPID_PRODUCTION_COMPANY_CONTENT_BASE = 0x820,
KS_NABTS_GROUPID_PRODUCTION_COMPANY_ADVERTISER_BASE = 0x830,
KS_NABTS_GROUPID_SYNDICATED_SHOW_CONTENT_BASE = 0x840,
KS_NABTS_GROUPID_SYNDICATED_SHOW_ADVERTISER_BASE = 0x850,
KS_NABTS_GROUPID_NETWORK_WIDE_CONTENT_BASE = 0x860,
KS_NABTS_GROUPID_NETWORK_WIDE_ADVERTISER_BASE = 0x870,
KS_NABTS_GROUPID_TELEVISION_STATION_CONTENT_BASE = 0x880,
KS_NABTS_GROUPID_TELEVISION_STATION_ADVERTISER_BASE = 0x890,
KS_NABTS_GROUPID_LOCAL_CABLE_SYSTEM_CONTENT_BASE = 0x8A0,
KS_NABTS_GROUPID_LOCAL_CABLE_SYSTEM_ADVERTISER_BASE = 0x8B0,
KS_NABTS_GROUPID_MICROSOFT_RESERVED_TEST_DATA_BASE = 0x8F0,
}
mixin DEFINE_GUID!("KSDATAFORMAT_TYPE_NABTS", "E757BCA0-39AC-11d1-A9F5-00C04FBBDE8F");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_NABTS_FEC", "E757BCA1-39AC-11d1-A9F5-00C04FBBDE8F");
enum {
MAX_NABTS_VBI_LINES_PER_FIELD = 11,
NABTS_LINES_PER_BUNDLE = 16,
NABTS_PAYLOAD_PER_LINE = 28,
NABTS_BYTES_PER_LINE = 36,
}
struct NABTSFEC_BUFFER {
ULONG dataSize;
USHORT groupID;
USHORT Reserved;
UCHAR data[NABTS_LINES_PER_BUNDLE * NABTS_PAYLOAD_PER_LINE];
}
alias NABTSFEC_BUFFER* PNABTSFEC_BUFFER;
mixin DEFINE_GUID!("KSPROPSETID_VBICodecFiltering", "cafeb0ca-8715-11d0-bd6a-0035c0edbabe");
enum {
KSPROPERTY_VBICODECFILTERING_SCANLINES_REQUESTED_BIT_ARRAY = 0x01,
KSPROPERTY_VBICODECFILTERING_SCANLINES_DISCOVERED_BIT_ARRAY,
KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_REQUESTED_BIT_ARRAY,
KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_DISCOVERED_BIT_ARRAY,
KSPROPERTY_VBICODECFILTERING_STATISTICS,
}
alias int KSPROPERTY_VBICODECFILTERING;
struct VBICODECFILTERING_SCANLINES {
DWORD[32] DwordBitArray;
}
alias VBICODECFILTERING_SCANLINES* PVBICODECFILTERING_SCANLINES;
struct VBICODECFILTERING_NABTS_SUBSTREAMS {
DWORD[128] SubstreamMask;
}
alias VBICODECFILTERING_NABTS_SUBSTREAMS* PVBICODECFILTERING_NABTS_SUBSTREAMS;
struct VBICODECFILTERING_CC_SUBSTREAMS {
DWORD SubstreamMask;
}
alias VBICODECFILTERING_CC_SUBSTREAMS* PVBICODECFILTERING_CC_SUBSTREAMS;
enum {
KS_CC_SUBSTREAM_ODD = 0x0001,
KS_CC_SUBSTREAM_EVEN = 0x0002,
}
//(NTDDI_VERSION >= NTDDI_WINXP)
enum {
KS_CC_SUBSTREAM_FIELD1_MASK = 0x00F0,
KS_CC_SUBSTREAM_SERVICE_CC1 = 0x0010,
KS_CC_SUBSTREAM_SERVICE_CC2 = 0x0020,
KS_CC_SUBSTREAM_SERVICE_T1 = 0x0040,
KS_CC_SUBSTREAM_SERVICE_T2 = 0x0080,
KS_CC_SUBSTREAM_FIELD2_MASK = 0x1F00,
KS_CC_SUBSTREAM_SERVICE_CC3 = 0x0100,
KS_CC_SUBSTREAM_SERVICE_CC4 = 0x0200,
KS_CC_SUBSTREAM_SERVICE_T3 = 0x0400,
KS_CC_SUBSTREAM_SERVICE_T4 = 0x0800,
KS_CC_SUBSTREAM_SERVICE_XDS = 0x1000,
}
enum CC_MAX_HW_DECODE_LINES = 12;
struct CC_BYTE_PAIR {
BYTE[2] Decoded;
USHORT Reserved;
}
alias CC_BYTE_PAIR* PCC_BYTE_PAIR;
struct CC_HW_FIELD {
VBICODECFILTERING_SCANLINES ScanlinesRequested;
ULONG fieldFlags;
LONGLONG PictureNumber;
CC_BYTE_PAIR[CC_MAX_HW_DECODE_LINES] Lines;
}
alias CC_HW_FIELD* PCC_HW_FIELD;
align(1){
struct NABTS_BUFFER_LINE {
BYTE Confidence;
BYTE[NABTS_BYTES_PER_LINE] Bytes;
}
alias NABTS_BUFFER_LINE* PNABTS_BUFFER_LINE;
enum NABTS_BUFFER_PICTURENUMBER_SUPPORT = 1;
struct NABTS_BUFFER {
VBICODECFILTERING_SCANLINES ScanlinesRequested;
LONGLONG PictureNumber;
NABTS_BUFFER_LINE[MAX_NABTS_VBI_LINES_PER_FIELD] NabtsLines;
}
alias NABTS_BUFFER* PNABTS_BUFFER;
}
//(NTDDI_VERSION >= NTDDI_WINXP)
enum {
WST_TVTUNER_CHANGE_BEGIN_TUNE = 0x1000,
WST_TVTUNER_CHANGE_END_TUNE = 0x2000,
MAX_WST_VBI_LINES_PER_FIELD = 17,
WST_BYTES_PER_LINE = 42,
}
struct WST_BUFFER_LINE {
BYTE Confidence;
BYTE[WST_BYTES_PER_LINE] Bytes;
}
alias WST_BUFFER_LINE* PWST_BUFFER_LINE;
struct WST_BUFFER {
VBICODECFILTERING_SCANLINES ScanlinesRequested;
WST_BUFFER_LINE[MAX_WST_VBI_LINES_PER_FIELD] WstLines;
}
alias WST_BUFFER* PWST_BUFFER;
struct VBICODECFILTERING_STATISTICS_COMMON {
DWORD InputSRBsProcessed;
DWORD OutputSRBsProcessed;
DWORD SRBsIgnored;
DWORD InputSRBsMissing;
DWORD OutputSRBsMissing;
DWORD OutputFailures;
DWORD InternalErrors;
DWORD ExternalErrors;
DWORD InputDiscontinuities;
DWORD DSPFailures;
DWORD TvTunerChanges;
DWORD VBIHeaderChanges;
DWORD LineConfidenceAvg;
DWORD BytesOutput;
}
alias VBICODECFILTERING_STATISTICS_COMMON* PVBICODECFILTERING_STATISTICS_COMMON;
struct VBICODECFILTERING_STATISTICS_COMMON_PIN {
DWORD SRBsProcessed;
DWORD SRBsIgnored;
DWORD SRBsMissing;
DWORD InternalErrors;
DWORD ExternalErrors;
DWORD Discontinuities;
DWORD LineConfidenceAvg;
DWORD BytesOutput;
}
alias VBICODECFILTERING_STATISTICS_COMMON_PIN* PVBICODECFILTERING_STATISTICS_COMMON_PIN;
struct VBICODECFILTERING_STATISTICS_NABTS {
VBICODECFILTERING_STATISTICS_COMMON Common;
DWORD FECBundleBadLines;
DWORD FECQueueOverflows;
DWORD FECCorrectedLines;
DWORD FECUncorrectableLines;
DWORD BundlesProcessed;
DWORD BundlesSent2IP;
DWORD FilteredLines;
}
alias VBICODECFILTERING_STATISTICS_NABTS* PVBICODECFILTERING_STATISTICS_NABTS;
struct VBICODECFILTERING_STATISTICS_NABTS_PIN {
VBICODECFILTERING_STATISTICS_COMMON_PIN Common;
}
alias VBICODECFILTERING_STATISTICS_NABTS_PIN* PVBICODECFILTERING_STATISTICS_NABTS_PIN;
struct VBICODECFILTERING_STATISTICS_CC {
VBICODECFILTERING_STATISTICS_COMMON Common;
}
alias VBICODECFILTERING_STATISTICS_CC* PVBICODECFILTERING_STATISTICS_CC;
struct VBICODECFILTERING_STATISTICS_CC_PIN {
VBICODECFILTERING_STATISTICS_COMMON_PIN Common;
}
alias VBICODECFILTERING_STATISTICS_CC_PIN* PVBICODECFILTERING_STATISTICS_CC_PIN;
//(NTDDI_VERSION >= NTDDI_WINXP)
struct VBICODECFILTERING_STATISTICS_TELETEXT {
VBICODECFILTERING_STATISTICS_COMMON Common;
}
alias VBICODECFILTERING_STATISTICS_TELETEXT* PVBICODECFILTERING_STATISTICS_TELETEXT;
struct VBICODECFILTERING_STATISTICS_TELETEXT_PIN {
VBICODECFILTERING_STATISTICS_COMMON_PIN Common;
}
alias VBICODECFILTERING_STATISTICS_TELETEXT_PIN* PVBICODECFILTERING_STATISTICS_TELETEXT_PIN;
struct KSPROPERTY_VBICODECFILTERING_SCANLINES_S {
KSPROPERTY Property;
VBICODECFILTERING_SCANLINES Scanlines;
}
alias KSPROPERTY_VBICODECFILTERING_SCANLINES_S* PKSPROPERTY_VBICODECFILTERING_SCANLINES_S;
struct KSPROPERTY_VBICODECFILTERING_NABTS_SUBSTREAMS_S {
KSPROPERTY Property;
VBICODECFILTERING_NABTS_SUBSTREAMS Substreams;
}
alias KSPROPERTY_VBICODECFILTERING_NABTS_SUBSTREAMS_S* PKSPROPERTY_VBICODECFILTERING_NABTS_SUBSTREAMS_S;
struct KSPROPERTY_VBICODECFILTERING_CC_SUBSTREAMS_S {
KSPROPERTY Property;
VBICODECFILTERING_CC_SUBSTREAMS Substreams;
}
alias KSPROPERTY_VBICODECFILTERING_CC_SUBSTREAMS_S* PKSPROPERTY_VBICODECFILTERING_CC_SUBSTREAMS_S;
struct KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_S {
KSPROPERTY Property;
VBICODECFILTERING_STATISTICS_COMMON Statistics;
}
alias KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_S* PKSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_S;
struct KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_PIN_S {
KSPROPERTY Property;
VBICODECFILTERING_STATISTICS_COMMON_PIN Statistics;
}
alias KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_PIN_S* PKSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_PIN_S;
struct KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_S {
KSPROPERTY Property;
VBICODECFILTERING_STATISTICS_NABTS Statistics;
}
alias KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_S* PKSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_S;
struct KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_PIN_S {
KSPROPERTY Property;
VBICODECFILTERING_STATISTICS_NABTS_PIN Statistics;
}
alias KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_PIN_S* PKSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_PIN_S;
struct KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_S {
KSPROPERTY Property;
VBICODECFILTERING_STATISTICS_CC Statistics;
}
alias KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_S* PKSPROPERTY_VBICODECFILTERING_STATISTICS_CC_S;
struct KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_PIN_S {
KSPROPERTY Property;
VBICODECFILTERING_STATISTICS_CC_PIN Statistics;
}
alias KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_PIN_S* PKSPROPERTY_VBICODECFILTERING_STATISTICS_CC_PIN_S;
mixin DEFINE_GUID!("PINNAME_VIDEO_CAPTURE", "FB6C4281-0353-11d1-905F-0000C0CC16BA");
alias PINNAME_VIDEO_CAPTURE PINNAME_CAPTURE;
//(NTDDI_VERSION >= NTDDI_WINXP)
mixin DEFINE_GUID!("PINNAME_VIDEO_CC_CAPTURE", "1AAD8061-012D-11d2-B4B1-00A0D102CFBE");
mixin DEFINE_GUID!("PINNAME_VIDEO_NABTS_CAPTURE", "29703660-498A-11d2-B4B1-00A0D102CFBE");
mixin DEFINE_GUID!("PINNAME_VIDEO_PREVIEW", "FB6C4282-0353-11d1-905F-0000C0CC16BA");
mixin DEFINE_GUID!("PINNAME_VIDEO_ANALOGVIDEOIN", "FB6C4283-0353-11d1-905F-0000C0CC16BA");
mixin DEFINE_GUID!("PINNAME_VIDEO_VBI", "FB6C4284-0353-11d1-905F-0000C0CC16BA");
mixin DEFINE_GUID!("PINNAME_VIDEO_VIDEOPORT", "FB6C4285-0353-11d1-905F-0000C0CC16BA");
mixin DEFINE_GUID!("PINNAME_VIDEO_NABTS", "FB6C4286-0353-11d1-905F-0000C0CC16BA");
mixin DEFINE_GUID!("PINNAME_VIDEO_EDS", "FB6C4287-0353-11d1-905F-0000C0CC16BA");
mixin DEFINE_GUID!("PINNAME_VIDEO_TELETEXT", "FB6C4288-0353-11d1-905F-0000C0CC16BA");
mixin DEFINE_GUID!("PINNAME_VIDEO_CC", "FB6C4289-0353-11d1-905F-0000C0CC16BA");
mixin DEFINE_GUID!("PINNAME_VIDEO_STILL", "FB6C428A-0353-11d1-905F-0000C0CC16BA");
mixin DEFINE_GUID!("PINNAME_VIDEO_TIMECODE", "FB6C428B-0353-11d1-905F-0000C0CC16BA");
mixin DEFINE_GUID!("PINNAME_VIDEO_VIDEOPORT_VBI", "FB6C428C-0353-11d1-905F-0000C0CC16BA");
enum {
KS_CAPTURE_ALLOC_INVALID = 0,
KS_CAPTURE_ALLOC_SYSTEM = 0x0001,
KS_CAPTURE_ALLOC_VRAM = 0x0002,
KS_CAPTURE_ALLOC_SYSTEM_AGP = 0x0004,
KS_CAPTURE_ALLOC_VRAM_MAPPED = 0x0008
}
alias int CAPTURE_MEMORY_ALLOCATION_FLAGS;
alias CAPTURE_MEMORY_ALLOCATION_FLAGS* PCAPTURE_MEMORY_ALLOCATION_FLAGS;
mixin DEFINE_GUID!("KSPROPSETID_VramCapture", "E73FACE3-2880-4902-B799-88D0CD634E0F");
enum {
KSPROPERTY_DISPLAY_ADAPTER_GUID = 1,
KSPROPERTY_PREFERRED_CAPTURE_SURFACE,
KSPROPERTY_CURRENT_CAPTURE_SURFACE,
KSPROPERTY_MAP_CAPTURE_HANDLE_TO_VRAM_ADDRESS
}
alias int KSPROPERTY_VIDMEM_TRANSPORT;
/*
DEFINE_KSPROPERTY_ITEM_DISPLAY_ADAPTER_GUID(GetHandler) DEFINE_KSPROPERTY_ITEM( KSPROPERTY_DISPLAY_ADAPTER_GUID, (GetHandler), sizeof(KSPROPERTY), sizeof(GUID), NULL, NULL, 0, NULL, NULL, 0)
DEFINE_KSPROPERTY_PREFERRED_CAPTURE_SURFACE(GetHandler) DEFINE_KSPROPERTY_ITEM( KSPROPERTY_PREFERRED_CAPTURE_SURFACE, (GetHandler), sizeof(KSPROPERTY), sizeof(CAPTURE_MEMORY_ALLOCATION_FLAGS), NULL, NULL, 0, NULL, NULL, 0)
DEFINE_KSPROPERTY_CURRENT_CAPTURE_SURFACE(GetHandler, SetHandler) DEFINE_KSPROPERTY_ITEM( KSPROPERTY_CURRENT_CAPTURE_SURFACE, (GetHandler), sizeof(KSPROPERTY), sizeof(CAPTURE_MEMORY_ALLOCATION_FLAGS), (SetHandler), NULL, 0, NULL, NULL, 0)
DEFINE_KSPROPERTY_MAP_CAPTURE_HANDLE_TO_VRAM_ADDRESS(GetHandler) DEFINE_KSPROPERTY_ITEM( KSPROPERTY_MAP_CAPTURE_HANDLE_TO_VRAM_ADDRESS, (GetHandler), sizeof(VRAM_SURFACE_INFO_PROPERTY_S), sizeof(DWORD), NULL, NULL, 0, NULL, NULL, 0)
*/
struct VRAM_SURFACE_INFO {
UINT_PTR hSurface;
LONGLONG VramPhysicalAddress;
DWORD cbCaptured;
DWORD dwWidth;
DWORD dwHeight;
DWORD dwLinearSize;
LONG lPitch;
ULONGLONG[16] ullReserved;
}
alias VRAM_SURFACE_INFO* PVRAM_SURFACE_INFO;
struct VRAM_SURFACE_INFO_PROPERTY_S {
KSPROPERTY Property;
PVRAM_SURFACE_INFO pVramSurfaceInfo;
}
alias VRAM_SURFACE_INFO_PROPERTY_S* PVRAM_SURFACE_INFO_PROPERTY_S;
mixin DEFINE_GUID!("KSPROPSETID_MPEG4_MediaType_Attributes", "FF6C4BFA-07A9-4c7b-A237-672F9D68065F");
enum {
KSPROPERTY_MPEG4_MEDIATYPE_SD_BOX = 1
}
alias int KSPROPERTY_MPEG4_MEDIATYPE_ATTRIBUTES;
mixin DEFINE_GUID!("KSEVENTSETID_DynamicFormatChange", "162AC456-83D7-4239-96DF-C75FFA138BC6");
enum {
KSEVENT_DYNAMIC_FORMAT_CHANGE = 0
}
enum {
KS_VIDEO_FLAG_FIELD_MASK = 0x0003,
KS_VIDEO_FLAG_FRAME = 0x0000,
KS_VIDEO_FLAG_FIELD1 = 0x0001,
KS_VIDEO_FLAG_FIELD2 = 0x0002,
KS_VIDEO_FLAG_FIELD1FIRST = 0x0004,
KS_VIDEO_FLAG_WEAVE = 0x0008,
KS_VIDEO_FLAG_IPB_MASK = 0x0030,
KS_VIDEO_FLAG_I_FRAME = 0x0000,
KS_VIDEO_FLAG_P_FRAME = 0x0010,
KS_VIDEO_FLAG_B_FRAME = 0x0020,
KS_VIDEO_FLAG_REPEAT_FIELD = 0x0040,
}
struct KS_FRAME_INFO {
ULONG ExtendedHeaderSize;
DWORD dwFrameFlags;
LONGLONG PictureNumber;
LONGLONG DropCount;
HANDLE hDirectDraw;
HANDLE hSurfaceHandle;
RECT DirectDrawRect;
union {
LONG lSurfacePitch;
DWORD Reserved1;
}
DWORD Reserved2;
DWORD Reserved3;
DWORD Reserved4;
}
alias KS_FRAME_INFO* PKS_FRAME_INFO;
enum {
//(NTDDI_VERSION < NTDDI_WINXP)
KS_VBI_FLAG_FRAME = 0x0000,
KS_VBI_FLAG_FIELD1 = 0x0001,
KS_VBI_FLAG_FIELD2 = 0x0002,
//(NTDDI_VERSION >= NTDDI_WINXP)
KS_VBI_FLAG_MV_PRESENT = 0x0100,
KS_VBI_FLAG_MV_HARDWARE = 0x0200,
KS_VBI_FLAG_MV_DETECTED = 0x0400,
KS_VBI_FLAG_TVTUNER_CHANGE = 0x0010,
KS_VBI_FLAG_VBIINFOHEADER_CHANGE = 0x0020,
}
struct KS_VBI_FRAME_INFO {
ULONG ExtendedHeaderSize;
DWORD dwFrameFlags;
LONGLONG PictureNumber;
LONGLONG DropCount;
DWORD dwSamplingFrequency;
KS_TVTUNER_CHANGE_INFO TvTunerChangeInfo;
KS_VBIINFOHEADER VBIInfoHeader;
}
alias KS_VBI_FRAME_INFO* PKS_VBI_FRAME_INFO;
enum {
KS_AnalogVideo_None = 0x00000000,
KS_AnalogVideo_NTSC_M = 0x00000001,
KS_AnalogVideo_NTSC_M_J = 0x00000002,
KS_AnalogVideo_NTSC_433 = 0x00000004,
KS_AnalogVideo_PAL_B = 0x00000010,
KS_AnalogVideo_PAL_D = 0x00000020,
KS_AnalogVideo_PAL_G = 0x00000040,
KS_AnalogVideo_PAL_H = 0x00000080,
KS_AnalogVideo_PAL_I = 0x00000100,
KS_AnalogVideo_PAL_M = 0x00000200,
KS_AnalogVideo_PAL_N = 0x00000400,
KS_AnalogVideo_PAL_60 = 0x00000800,
KS_AnalogVideo_SECAM_B = 0x00001000,
KS_AnalogVideo_SECAM_D = 0x00002000,
KS_AnalogVideo_SECAM_G = 0x00004000,
KS_AnalogVideo_SECAM_H = 0x00008000,
KS_AnalogVideo_SECAM_K = 0x00010000,
KS_AnalogVideo_SECAM_K1 = 0x00020000,
KS_AnalogVideo_SECAM_L = 0x00040000,
KS_AnalogVideo_SECAM_L1 = 0x00080000,
//(NTDDI_VERSION >= NTDDI_WINXP)
KS_AnalogVideo_PAL_N_COMBO = 0x00100000
}
alias int KS_AnalogVideoStandard;
enum {
KS_AnalogVideo_NTSC_Mask = 0x00000007,
//(NTDDI_VERSION >= NTDDI_WINXP)
KS_AnalogVideo_PAL_Mask = 0x00100FF0,
//KS_AnalogVideo_PAL_Mask 0x00000FF0
KS_AnalogVideo_SECAM_Mask = 0x000FF000
}
mixin DEFINE_GUID!("PROPSETID_ALLOCATOR_CONTROL", "53171960-148E-11d2-9979-0000C0CC16BA");
enum {
KSPROPERTY_ALLOCATOR_CONTROL_HONOR_COUNT,
KSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE,
//(NTDDI_VERSION >= NTDDI_WINXP)
KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_CAPS,
KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_INTERLEAVE,
}
alias int KSPROPERTY_ALLOCATOR_CONTROL;
//(NTDDI_VERSION >= NTDDI_WINXP)
struct KSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE_S {
ULONG CX;
ULONG CY;
}
alias KSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE_S* PKSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE_S;
struct KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_CAPS_S {
ULONG InterleavedCapSupported;
}
alias KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_CAPS_S* PKSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_CAPS_S;
struct KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_INTERLEAVE_S {
ULONG InterleavedCapPossible;
}
alias KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_INTERLEAVE_S* PKSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_INTERLEAVE_S;
mixin DEFINE_GUID!("PROPSETID_VIDCAP_VIDEOPROCAMP", "C6E13360-30AC-11d0-A18C-00A0C9118956");
enum {
KSPROPERTY_VIDEOPROCAMP_BRIGHTNESS,
KSPROPERTY_VIDEOPROCAMP_CONTRAST,
KSPROPERTY_VIDEOPROCAMP_HUE,
KSPROPERTY_VIDEOPROCAMP_SATURATION,
KSPROPERTY_VIDEOPROCAMP_SHARPNESS,
KSPROPERTY_VIDEOPROCAMP_GAMMA,
KSPROPERTY_VIDEOPROCAMP_COLORENABLE,
KSPROPERTY_VIDEOPROCAMP_WHITEBALANCE,
KSPROPERTY_VIDEOPROCAMP_BACKLIGHT_COMPENSATION,
//(NTDDI_VERSION >= NTDDI_WINXP)
KSPROPERTY_VIDEOPROCAMP_GAIN,
//((NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
KSPROPERTY_VIDEOPROCAMP_DIGITAL_MULTIPLIER,
KSPROPERTY_VIDEOPROCAMP_DIGITAL_MULTIPLIER_LIMIT,
KSPROPERTY_VIDEOPROCAMP_WHITEBALANCE_COMPONENT,
KSPROPERTY_VIDEOPROCAMP_POWERLINE_FREQUENCY,
}
alias int KSPROPERTY_VIDCAP_VIDEOPROCAMP;
struct KSPROPERTY_VIDEOPROCAMP_S {
KSPROPERTY Property;
LONG Value;
ULONG Flags;
ULONG Capabilities;
}
alias KSPROPERTY_VIDEOPROCAMP_S* PKSPROPERTY_VIDEOPROCAMP_S;
//((NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
struct KSPROPERTY_VIDEOPROCAMP_NODE_S {
KSP_NODE NodeProperty;
LONG Value;
ULONG Flags;
ULONG Capabilities;
}
alias KSPROPERTY_VIDEOPROCAMP_NODE_S* PKSPROPERTY_VIDEOPROCAMP_NODE_S;
struct KSPROPERTY_VIDEOPROCAMP_S2 {
KSPROPERTY Property;
LONG Value1;
ULONG Flags;
ULONG Capabilities;
LONG Value2;
}
alias KSPROPERTY_VIDEOPROCAMP_S2* PKSPROPERTY_VIDEOPROCAMP_S2;
struct KSPROPERTY_VIDEOPROCAMP_NODE_S2 {
KSP_NODE NodeProperty;
LONG Value1;
ULONG Flags;
ULONG Capabilities;
LONG Value2;
}
alias KSPROPERTY_VIDEOPROCAMP_NODE_S2* PKSPROPERTY_VIDEOPROCAMP_NODE_S2;
enum {
KSPROPERTY_VIDEOPROCAMP_FLAGS_AUTO = 0x0001,
KSPROPERTY_VIDEOPROCAMP_FLAGS_MANUAL = 0x0002,
}
//((NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
mixin DEFINE_GUID!("PROPSETID_VIDCAP_SELECTOR", "1ABDAECA-68B6-4F83-9371-B413907C7B9F");
enum {
KSPROPERTY_SELECTOR_SOURCE_NODE_ID,
KSPROPERTY_SELECTOR_NUM_SOURCES
}
alias int KSPROPERTY_VIDCAP_SELECTOR;
alias KSPROPERTY_VIDCAP_SELECTOR* PKSPROPERTY_VIDCAP_SELECTOR;
struct KSPROPERTY_SELECTOR_S {
KSPROPERTY Property;
LONG Value;
ULONG Flags;
ULONG Capabilities;
}
alias KSPROPERTY_SELECTOR_S* PKSPROPERTY_SELECTOR_S;
struct KSPROPERTY_SELECTOR_NODE_S {
KSP_NODE NodeProperty;
LONG Value;
ULONG Flags;
ULONG Capabilities;
}
alias KSPROPERTY_SELECTOR_NODE_S* PKSPROPERTY_SELECTOR_NODE_S;
mixin DEFINE_GUID!("PROPSETID_TUNER", "6a2e0605-28e4-11d0-a18c-00a0c9118956");
enum {
KSPROPERTY_TUNER_CAPS,
KSPROPERTY_TUNER_MODE_CAPS,
KSPROPERTY_TUNER_MODE,
KSPROPERTY_TUNER_STANDARD,
KSPROPERTY_TUNER_FREQUENCY,
KSPROPERTY_TUNER_INPUT,
KSPROPERTY_TUNER_STATUS,
KSPROPERTY_TUNER_IF_MEDIUM,
KSPROPERTY_TUNER_SCAN_CAPS,
KSPROPERTY_TUNER_SCAN_STATUS,
KSPROPERTY_TUNER_STANDARD_MODE,
KSPROPERTY_TUNER_NETWORKTYPE_SCAN_CAPS
}
alias int KSPROPERTY_TUNER;
enum {
KSPROPERTY_TUNER_MODE_TV = 0x0001,
KSPROPERTY_TUNER_MODE_FM_RADIO = 0x0002,
KSPROPERTY_TUNER_MODE_AM_RADIO = 0x0004,
KSPROPERTY_TUNER_MODE_DSS = 0x0008,
KSPROPERTY_TUNER_MODE_ATSC = 0x0010,
}
alias int KSPROPERTY_TUNER_MODES;
enum {
KS_TUNER_TUNING_EXACT = 1,
KS_TUNER_TUNING_FINE,
KS_TUNER_TUNING_COARSE,
}
alias int KS_TUNER_TUNING_FLAGS;
enum {
KS_TUNER_STRATEGY_PLL = 0x01,
KS_TUNER_STRATEGY_SIGNAL_STRENGTH = 0x02,
KS_TUNER_STRATEGY_DRIVER_TUNES = 0x04,
}
alias int KS_TUNER_STRATEGY;
struct KSPROPERTY_TUNER_CAPS_S {
KSPROPERTY Property;
ULONG ModesSupported;
KSPIN_MEDIUM VideoMedium;
KSPIN_MEDIUM TVAudioMedium;
KSPIN_MEDIUM RadioAudioMedium;
}
alias KSPROPERTY_TUNER_CAPS_S* PKSPROPERTY_TUNER_CAPS_S;
struct KSPROPERTY_TUNER_IF_MEDIUM_S {
KSPROPERTY Property;
KSPIN_MEDIUM IFMedium;
}
alias KSPROPERTY_TUNER_IF_MEDIUM_S* PKSPROPERTY_TUNER_IF_MEDIUM_S;
struct KSPROPERTY_TUNER_MODE_CAPS_S {
KSPROPERTY Property;
ULONG Mode;
ULONG StandardsSupported;
ULONG MinFrequency;
ULONG MaxFrequency;
ULONG TuningGranularity;
ULONG NumberOfInputs;
ULONG SettlingTime;
ULONG Strategy;
}
alias KSPROPERTY_TUNER_MODE_CAPS_S* PKSPROPERTY_TUNER_MODE_CAPS_S;
struct KSPROPERTY_TUNER_MODE_S {
KSPROPERTY Property;
ULONG Mode;
}
alias KSPROPERTY_TUNER_MODE_S* PKSPROPERTY_TUNER_MODE_S;
struct KSPROPERTY_TUNER_FREQUENCY_S {
KSPROPERTY Property;
ULONG Frequency;
ULONG LastFrequency;
ULONG TuningFlags;
ULONG VideoSubChannel;
ULONG AudioSubChannel;
ULONG Channel;
ULONG Country;
}
alias KSPROPERTY_TUNER_FREQUENCY_S* PKSPROPERTY_TUNER_FREQUENCY_S;
struct KSPROPERTY_TUNER_STANDARD_S {
KSPROPERTY Property;
ULONG Standard;
}
alias KSPROPERTY_TUNER_STANDARD_S* PKSPROPERTY_TUNER_STANDARD_S;
struct KSPROPERTY_TUNER_STANDARD_MODE_S {
KSPROPERTY Property;
BOOL AutoDetect;
}
alias KSPROPERTY_TUNER_STANDARD_MODE_S* PKSPROPERTY_TUNER_STANDARD_MODE_S;
struct KSPROPERTY_TUNER_INPUT_S {
KSPROPERTY Property;
ULONG InputIndex;
}
alias KSPROPERTY_TUNER_INPUT_S* PKSPROPERTY_TUNER_INPUT_S;
struct KSPROPERTY_TUNER_STATUS_S {
KSPROPERTY Property;
ULONG CurrentFrequency;
ULONG PLLOffset;
ULONG SignalStrength;
ULONG Busy;
}
alias KSPROPERTY_TUNER_STATUS_S* PKSPROPERTY_TUNER_STATUS_S;
enum {
Tuner_LockType_None = 0x00,
Tuner_LockType_Within_Scan_Sensing_Range = 0x01,
Tuner_LockType_Locked = 0x02
}
alias int TunerLockType;
struct TUNER_ANALOG_CAPS_S {
ULONG Mode;
ULONG StandardsSupported;
ULONG MinFrequency;
ULONG MaxFrequency;
ULONG TuningGranularity;
ULONG SettlingTime;
ULONG ScanSensingRange;
ULONG FineTuneSensingRange;
}
alias TUNER_ANALOG_CAPS_S* PTUNER_ANALOG_CAPS_S;
mixin DEFINE_GUID!("EVENTSETID_TUNER", "6a2e0606-28e4-11d0-a18c-00a0c9118956");
enum {
KSEVENT_TUNER_CHANGED,
KSEVENT_TUNER_INITIATE_SCAN
}
alias int KSEVENT_TUNER;
struct KSPROPERTY_TUNER_SCAN_CAPS_S {
KSPROPERTY Property;
BOOL fSupportsHardwareAssistedScanning;
ULONG SupportedBroadcastStandards;
PVOID GUIDBucket;
ULONG lengthofBucket;
}
alias KSPROPERTY_TUNER_SCAN_CAPS_S* PKSPROPERTY_TUNER_SCAN_CAPS_S;
struct KSPROPERTY_TUNER_NETWORKTYPE_SCAN_CAPS_S {
KSPROPERTY Property;
GUID NetworkType;
ULONG BufferSize;
PVOID NetworkTunerCapabilities;
}
alias KSPROPERTY_TUNER_NETWORKTYPE_SCAN_CAPS_S* PKSPROPERTY_TUNER_NETWORKTYPE_SCAN_CAPS_S;
struct KSPROPERTY_TUNER_SCAN_STATUS_S {
KSPROPERTY Property;
TunerLockType LockStatus;
ULONG CurrentFrequency;
}
alias KSPROPERTY_TUNER_SCAN_STATUS_S* PKSPROPERTY_TUNER_SCAN_STATUS_S;
struct KSEVENT_TUNER_INITIATE_SCAN_S {
KSEVENTDATA EventData;
ULONG StartFrequency;
ULONG EndFrequency;
}
alias KSEVENT_TUNER_INITIATE_SCAN_S* PKSEVENT_TUNER_INITIATE_SCAN_S;
//( (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
mixin DEFINE_GUID!("KSNODETYPE_VIDEO_STREAMING", "DFF229E1-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_VIDEO_INPUT_TERMINAL", "DFF229E2-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_VIDEO_OUTPUT_TERMINAL", "DFF229E3-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_VIDEO_SELECTOR", "DFF229E4-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_VIDEO_PROCESSING", "DFF229E5-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_VIDEO_CAMERA_TERMINAL", "DFF229E6-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_VIDEO_INPUT_MTT", "DFF229E7-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("KSNODETYPE_VIDEO_OUTPUT_MTT", "DFF229E8-F70F-11D0-B917-00A0C9223196");
mixin DEFINE_GUID!("PROPSETID_VIDCAP_VIDEOENCODER", "6a2e0610-28e4-11d0-a18c-00a0c9118956");
enum {
KSPROPERTY_VIDEOENCODER_CAPS,
KSPROPERTY_VIDEOENCODER_STANDARD,
KSPROPERTY_VIDEOENCODER_COPYPROTECTION,
KSPROPERTY_VIDEOENCODER_CC_ENABLE,
}
alias int KSPROPERTY_VIDCAP_VIDEOENCODER;
struct KSPROPERTY_VIDEOENCODER_S {
KSPROPERTY Property;
LONG Value;
ULONG Flags;
ULONG Capabilities;
}
alias KSPROPERTY_VIDEOENCODER_S* PKSPROPERTY_VIDEOENCODER_S;
mixin DEFINE_GUID!("PROPSETID_VIDCAP_VIDEODECODER", "C6E13350-30AC-11d0-A18C-00A0C9118956");
enum {
KSPROPERTY_VIDEODECODER_CAPS,
KSPROPERTY_VIDEODECODER_STANDARD,
KSPROPERTY_VIDEODECODER_STATUS,
KSPROPERTY_VIDEODECODER_OUTPUT_ENABLE,
KSPROPERTY_VIDEODECODER_VCR_TIMING,
KSPROPERTY_VIDEODECODER_STATUS2
}
alias int KSPROPERTY_VIDCAP_VIDEODECODER;
enum {
KS_VIDEODECODER_FLAGS_CAN_DISABLE_OUTPUT = 0X0001,
KS_VIDEODECODER_FLAGS_CAN_USE_VCR_LOCKING = 0X0002,
KS_VIDEODECODER_FLAGS_CAN_INDICATE_LOCKED = 0X0004,
}
alias int KS_VIDEODECODER_FLAGS;
struct KSPROPERTY_VIDEODECODER_CAPS_S {
KSPROPERTY Property;
ULONG StandardsSupported;
ULONG Capabilities;
ULONG SettlingTime;
ULONG HSyncPerVSync;
}
alias KSPROPERTY_VIDEODECODER_CAPS_S* PKSPROPERTY_VIDEODECODER_CAPS_S;
struct KSPROPERTY_VIDEODECODER_STATUS_S {
KSPROPERTY Property;
ULONG NumberOfLines;
ULONG SignalLocked;
}
alias KSPROPERTY_VIDEODECODER_STATUS_S* PKSPROPERTY_VIDEODECODER_STATUS_S;
struct KSPROPERTY_VIDEODECODER_STATUS2_S {
KSPROPERTY Property;
ULONG NumberOfLines;
ULONG SignalLocked;
ULONG ChromaLock;
}
alias KSPROPERTY_VIDEODECODER_STATUS2_S* PKSPROPERTY_VIDEODECODER_STATUS2_S;
struct KSPROPERTY_VIDEODECODER_S {
KSPROPERTY Property;
ULONG Value;
}
alias KSPROPERTY_VIDEODECODER_S* PKSPROPERTY_VIDEODECODER_S;
mixin DEFINE_GUID!("EVENTSETID_VIDEODECODER", "6a2e0621-28e4-11d0-a18c-00a0c9118956");
enum {
KSEVENT_VIDEODECODER_CHANGED
}
alias int KSEVENT_VIDEODECODER;
mixin DEFINE_GUID!("PROPSETID_VIDCAP_CAMERACONTROL", "C6E13370-30AC-11d0-A18C-00A0C9118956");
enum {
KSPROPERTY_CAMERACONTROL_PAN,
KSPROPERTY_CAMERACONTROL_TILT,
KSPROPERTY_CAMERACONTROL_ROLL,
KSPROPERTY_CAMERACONTROL_ZOOM,
KSPROPERTY_CAMERACONTROL_EXPOSURE,
KSPROPERTY_CAMERACONTROL_IRIS,
KSPROPERTY_CAMERACONTROL_FOCUS,
//( (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
KSPROPERTY_CAMERACONTROL_SCANMODE,
KSPROPERTY_CAMERACONTROL_PRIVACY,
KSPROPERTY_CAMERACONTROL_PANTILT,
KSPROPERTY_CAMERACONTROL_PAN_RELATIVE,
KSPROPERTY_CAMERACONTROL_TILT_RELATIVE,
KSPROPERTY_CAMERACONTROL_ROLL_RELATIVE,
KSPROPERTY_CAMERACONTROL_ZOOM_RELATIVE,
KSPROPERTY_CAMERACONTROL_EXPOSURE_RELATIVE,
KSPROPERTY_CAMERACONTROL_IRIS_RELATIVE,
KSPROPERTY_CAMERACONTROL_FOCUS_RELATIVE,
KSPROPERTY_CAMERACONTROL_PANTILT_RELATIVE,
KSPROPERTY_CAMERACONTROL_FOCAL_LENGTH,
KSPROPERTY_CAMERACONTROL_AUTO_EXPOSURE_PRIORITY,
}
alias int KSPROPERTY_VIDCAP_CAMERACONTROL;
struct KSPROPERTY_CAMERACONTROL_S {
KSPROPERTY Property;
LONG Value;
ULONG Flags;
ULONG Capabilities;
}
alias KSPROPERTY_CAMERACONTROL_S* PKSPROPERTY_CAMERACONTROL_S;
enum {
KSPROPERTY_CAMERACONTROL_FLAGS_AUTO = 0x0001,
KSPROPERTY_CAMERACONTROL_FLAGS_MANUAL = 0x0002,
KSPROPERTY_CAMERACONTROL_FLAGS_ABSOLUTE = 0x0000,
KSPROPERTY_CAMERACONTROL_FLAGS_RELATIVE = 0x0010,
}
//( (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
struct KSPROPERTY_CAMERACONTROL_NODE_S {
KSP_NODE NodeProperty;
LONG Value;
ULONG Flags;
ULONG Capabilities;
}
alias KSPROPERTY_CAMERACONTROL_NODE_S* PKSPROPERTY_CAMERACONTROL_NODE_S;
struct KSPROPERTY_CAMERACONTROL_S2 {
KSPROPERTY Property;
LONG Value1;
ULONG Flags;
ULONG Capabilities;
LONG Value2;
}
alias KSPROPERTY_CAMERACONTROL_S2* PKSPROPERTY_CAMERACONTROL_S2;
struct KSPROPERTY_CAMERACONTROL_NODE_S2 {
KSP_NODE NodeProperty;
LONG Value1;
ULONG Flags;
ULONG Capabilities;
LONG Value2;
}
alias KSPROPERTY_CAMERACONTROL_NODE_S2* PKSPROPERTY_CAMERACONTROL_NODE_S2;
struct KSPROPERTY_CAMERACONTROL_FOCAL_LENGTH_S {
KSPROPERTY Property;
LONG lOcularFocalLength;
LONG lObjectiveFocalLengthMin;
LONG lObjectiveFocalLengthMax;
}
alias KSPROPERTY_CAMERACONTROL_FOCAL_LENGTH_S* PKSPROPERTY_CAMERACONTROL_FOCAL_LENGTH_S;
struct KSPROPERTY_CAMERACONTROL_NODE_FOCAL_LENGTH_S {
KSNODEPROPERTY NodeProperty;
LONG lOcularFocalLength;
LONG lObjectiveFocalLengthMin;
LONG lObjectiveFocalLengthMax;
}
alias KSPROPERTY_CAMERACONTROL_NODE_FOCAL_LENGTH_S* PKSPROPERTY_CAMERACONTROL_NODE_FOCAL_LENGTH_S;
mixin DEFINE_GUID!("PROPSETID_EXT_DEVICE", "B5730A90-1A2C-11cf-8C23-00AA006B6814");
enum {
KSPROPERTY_EXTDEVICE_ID,
KSPROPERTY_EXTDEVICE_VERSION,
KSPROPERTY_EXTDEVICE_POWER_STATE,
KSPROPERTY_EXTDEVICE_PORT,
KSPROPERTY_EXTDEVICE_CAPABILITIES
}
alias int KSPROPERTY_EXTDEVICE;
struct DEVCAPS {
LONG CanRecord;
LONG CanRecordStrobe;
LONG HasAudio;
LONG HasVideo;
LONG UsesFiles;
LONG CanSave;
LONG DeviceType;
LONG TCRead;
LONG TCWrite;
LONG CTLRead;
LONG IndexRead;
LONG Preroll;
LONG Postroll;
LONG SyncAcc;
LONG NormRate;
LONG CanPreview;
LONG CanMonitorSrc;
LONG CanTest;
LONG VideoIn;
LONG AudioIn;
LONG Calibrate;
LONG SeekType;
LONG SimulatedHardware;
}
alias DEVCAPS* PDEVCAPS;
struct KSPROPERTY_EXTDEVICE_S {
KSPROPERTY Property;
union {
DEVCAPS Capabilities;
ULONG DevPort;
ULONG PowerState;
WCHAR[MAX_PATH] pawchString;
DWORD[2] NodeUniqueID;
}
}
alias KSPROPERTY_EXTDEVICE_S* PKSPROPERTY_EXTDEVICE_S;
mixin DEFINE_GUID!("PROPSETID_EXT_TRANSPORT", "A03CD5F0-3045-11cf-8C44-00AA006B6814");
enum {
KSPROPERTY_EXTXPORT_CAPABILITIES,
KSPROPERTY_EXTXPORT_INPUT_SIGNAL_MODE,
KSPROPERTY_EXTXPORT_OUTPUT_SIGNAL_MODE,
KSPROPERTY_EXTXPORT_LOAD_MEDIUM,
KSPROPERTY_EXTXPORT_MEDIUM_INFO,
KSPROPERTY_EXTXPORT_STATE,
KSPROPERTY_EXTXPORT_STATE_NOTIFY,
KSPROPERTY_EXTXPORT_TIMECODE_SEARCH,
KSPROPERTY_EXTXPORT_ATN_SEARCH,
KSPROPERTY_EXTXPORT_RTC_SEARCH,
KSPROPERTY_RAW_AVC_CMD
}
alias int KSPROPERTY_EXTXPORT;
struct TRANSPORTSTATUS {
LONG Mode;
LONG LastError;
LONG RecordInhibit;
LONG ServoLock;
LONG MediaPresent;
LONG MediaLength;
LONG MediaSize;
LONG MediaTrackCount;
LONG MediaTrackLength;
LONG MediaTrackSide;
LONG MediaType;
LONG LinkMode;
LONG NotifyOn;
}
alias TRANSPORTSTATUS* PTRANSPORTSTATUS;
struct TRANSPORTBASICPARMS {
LONG TimeFormat;
LONG TimeReference;
LONG Superimpose;
LONG EndStopAction;
LONG RecordFormat;
LONG StepFrames;
LONG SetpField;
LONG Preroll;
LONG RecPreroll;
LONG Postroll;
LONG EditDelay;
LONG PlayTCDelay;
LONG RecTCDelay;
LONG EditField;
LONG FrameServo;
LONG ColorFrameServo;
LONG ServoRef;
LONG WarnGenlock;
LONG SetTracking;
TCHAR[40] VolumeName;
LONG[20] Ballistic;
LONG Speed;
LONG CounterFormat;
LONG TunerChannel;
LONG TunerNumber;
LONG TimerEvent;
LONG TimerStartDay;
LONG TimerStartTime;
LONG TimerStopDay;
LONG TimerStopTime;
}
alias TRANSPORTBASICPARMS* PTRANSPORTBASICPARMS;
struct TRANSPORTVIDEOPARMS {
LONG OutputMode;
LONG Input;
}
alias TRANSPORTVIDEOPARMS* PTRANSPORTVIDEOPARMS;
struct TRANSPORTAUDIOPARMS {
LONG EnableOutput;
LONG EnableRecord;
LONG EnableSelsync;
LONG Input;
LONG MonitorSource;
}
alias TRANSPORTAUDIOPARMS* PTRANSPORTAUDIOPARMS;
struct MEDIUM_INFO {
BOOL MediaPresent;
ULONG MediaType;
BOOL RecordInhibit;
}
alias MEDIUM_INFO* PMEDIUM_INFO;
struct TRANSPORT_STATE {
ULONG Mode;
ULONG State;
}
alias TRANSPORT_STATE* PTRANSPORT_STATE;
struct KSPROPERTY_EXTXPORT_S {
KSPROPERTY Property;
union {
ULONG Capabilities;
ULONG SignalMode;
ULONG LoadMedium;
MEDIUM_INFO MediumInfo;
TRANSPORT_STATE XPrtState;
struct {
BYTE frame;
BYTE second;
BYTE minute;
BYTE hour;
}
DWORD dwTimecode;
DWORD dwAbsTrackNumber;
struct {
ULONG PayloadSize;
BYTE[512] Payload;
}
}
}
alias KSPROPERTY_EXTXPORT_S* PKSPROPERTY_EXTXPORT_S;
struct KSPROPERTY_EXTXPORT_NODE_S {
KSP_NODE NodeProperty;
union {
ULONG Capabilities;
ULONG SignalMode;
ULONG LoadMedium;
MEDIUM_INFO MediumInfo;
TRANSPORT_STATE XPrtState;
struct {
BYTE frame;
BYTE second;
BYTE minute;
BYTE hour;
}
DWORD dwTimecode;
DWORD dwAbsTrackNumber;
struct {
ULONG PayloadSize;
BYTE[512] Payload;
}
}
}
alias KSPROPERTY_EXTXPORT_NODE_S* PKSPROPERTY_EXTXPORT_NODE_S;
mixin DEFINE_GUID!("PROPSETID_TIMECODE_READER", "9B496CE1-811B-11cf-8C77-00AA006B6814");
enum {
KSPROPERTY_TIMECODE_READER,
KSPROPERTY_ATN_READER,
KSPROPERTY_RTC_READER
}
alias int KSPROPERTY_TIMECODE;
union TIMECODE {
struct {
WORD wFrameRate;
WORD wFrameFract;
DWORD dwFrames;
}
DWORDLONG qw;
}
alias TIMECODE* PTIMECODE;
struct TIMECODE_SAMPLE {
LONGLONG qwTick;
TIMECODE timecode;
DWORD dwUser;
DWORD dwFlags;
}
alias TIMECODE_SAMPLE* PTIMECODE_SAMPLE;
struct KSPROPERTY_TIMECODE_S {
KSPROPERTY Property;
TIMECODE_SAMPLE TimecodeSamp;
}
alias KSPROPERTY_TIMECODE_S* PKSPROPERTY_TIMECODE_S;
struct KSPROPERTY_TIMECODE_NODE_S {
KSP_NODE NodeProperty;
TIMECODE_SAMPLE TimecodeSamp;
}
alias KSPROPERTY_TIMECODE_NODE_S* PKSPROPERTY_TIMECODE_NODE_S;
mixin DEFINE_GUID!("KSEVENTSETID_EXTDEV_Command", "109c7988-b3cb-11d2-b48e-006097b3391b");
enum {
KSEVENT_EXTDEV_COMMAND_NOTIFY_INTERIM_READY,
KSEVENT_EXTDEV_COMMAND_CONTROL_INTERIM_READY,
KSEVENT_EXTDEV_COMMAND_BUSRESET,
KSEVENT_EXTDEV_TIMECODE_UPDATE,
KSEVENT_EXTDEV_OPERATION_MODE_UPDATE,
KSEVENT_EXTDEV_TRANSPORT_STATE_UPDATE,
KSEVENT_EXTDEV_NOTIFY_REMOVAL,
KSEVENT_EXTDEV_NOTIFY_MEDIUM_CHANGE
}
alias int KSEVENT_DEVCMD;
mixin DEFINE_GUID!("PROPSETID_VIDCAP_CROSSBAR", "6a2e0640-28e4-11d0-a18c-00a0c9118956");
enum {
KSPROPERTY_CROSSBAR_CAPS,
KSPROPERTY_CROSSBAR_PININFO,
KSPROPERTY_CROSSBAR_CAN_ROUTE,
KSPROPERTY_CROSSBAR_ROUTE,
KSPROPERTY_CROSSBAR_INPUT_ACTIVE
}
alias int KSPROPERTY_VIDCAP_CROSSBAR;
struct KSPROPERTY_CROSSBAR_CAPS_S {
KSPROPERTY Property;
ULONG NumberOfInputs;
ULONG NumberOfOutputs;
}
alias KSPROPERTY_CROSSBAR_CAPS_S* PKSPROPERTY_CROSSBAR_CAPS_S;
struct KSPROPERTY_CROSSBAR_PININFO_S {
KSPROPERTY Property;
KSPIN_DATAFLOW Direction;
ULONG Index;
ULONG PinType;
ULONG RelatedPinIndex;
KSPIN_MEDIUM Medium;
}
alias KSPROPERTY_CROSSBAR_PININFO_S* PKSPROPERTY_CROSSBAR_PININFO_S;
struct KSPROPERTY_CROSSBAR_ROUTE_S {
KSPROPERTY Property;
ULONG IndexInputPin;
ULONG IndexOutputPin;
ULONG CanRoute;
}
alias KSPROPERTY_CROSSBAR_ROUTE_S* PKSPROPERTY_CROSSBAR_ROUTE_S;
struct KSPROPERTY_CROSSBAR_ACTIVE_S {
KSPROPERTY Property;
ULONG IndexInputPin;
ULONG Active;
}
alias KSPROPERTY_CROSSBAR_ACTIVE_S* PKSPROPERTY_CROSSBAR_ACTIVE_S;
mixin DEFINE_GUID!("EVENTSETID_CROSSBAR", "6a2e0641-28e4-11d0-a18c-00a0c9118956");
enum {
KSEVENT_CROSSBAR_CHANGED
}
alias int KSEVENT_CROSSBAR;
enum {
KS_PhysConn_Video_Tuner = 1,
KS_PhysConn_Video_Composite,
KS_PhysConn_Video_SVideo,
KS_PhysConn_Video_RGB,
KS_PhysConn_Video_YRYBY,
KS_PhysConn_Video_SerialDigital,
KS_PhysConn_Video_ParallelDigital,
KS_PhysConn_Video_SCSI,
KS_PhysConn_Video_AUX,
KS_PhysConn_Video_1394,
KS_PhysConn_Video_USB,
KS_PhysConn_Video_VideoDecoder,
KS_PhysConn_Video_VideoEncoder,
KS_PhysConn_Video_SCART,
KS_PhysConn_Audio_Tuner = 4096,
KS_PhysConn_Audio_Line,
KS_PhysConn_Audio_Mic,
KS_PhysConn_Audio_AESDigital,
KS_PhysConn_Audio_SPDIFDigital,
KS_PhysConn_Audio_SCSI,
KS_PhysConn_Audio_AUX,
KS_PhysConn_Audio_1394,
KS_PhysConn_Audio_USB,
KS_PhysConn_Audio_AudioDecoder
}
alias int KS_PhysicalConnectorType;
mixin DEFINE_GUID!("PROPSETID_VIDCAP_TVAUDIO", "6a2e0650-28e4-11d0-a18c-00a0c9118956");
enum {
KSPROPERTY_TVAUDIO_CAPS,
KSPROPERTY_TVAUDIO_MODE,
KSPROPERTY_TVAUDIO_CURRENTLY_AVAILABLE_MODES
}
alias int KSPROPERTY_VIDCAP_TVAUDIO;
enum {
KS_TVAUDIO_MODE_MONO = 0x0001,
KS_TVAUDIO_MODE_STEREO = 0x0002,
KS_TVAUDIO_MODE_LANG_A = 0x0010,
KS_TVAUDIO_MODE_LANG_B = 0x0020,
KS_TVAUDIO_MODE_LANG_C = 0x0040,
//(NTDDI_VERSION >= NTDDI_VISTA)
KS_TVAUDIO_PRESET_STEREO = 0x0200,
KS_TVAUDIO_PRESET_LANG_A = 0x1000,
KS_TVAUDIO_PRESET_LANG_B = 0x2000,
KS_TVAUDIO_PRESET_LANG_C = 0x4000,
}
struct KSPROPERTY_TVAUDIO_CAPS_S {
KSPROPERTY Property;
ULONG Capabilities;
KSPIN_MEDIUM InputMedium;
KSPIN_MEDIUM OutputMedium;
}
alias KSPROPERTY_TVAUDIO_CAPS_S* PKSPROPERTY_TVAUDIO_CAPS_S;
struct KSPROPERTY_TVAUDIO_S {
KSPROPERTY Property;
ULONG Mode;
}
alias KSPROPERTY_TVAUDIO_S* PKSPROPERTY_TVAUDIO_S;
mixin DEFINE_GUID!("KSEVENTSETID_VIDCAP_TVAUDIO", "6a2e0651-28e4-11d0-a18c-00a0c9118956");
enum {
KSEVENT_TVAUDIO_CHANGED,
}
alias int KSEVENT_TVAUDIO;
mixin DEFINE_GUID!("PROPSETID_VIDCAP_VIDEOCOMPRESSION", "C6E13343-30AC-11d0-A18C-00A0C9118956");
enum {
KSPROPERTY_VIDEOCOMPRESSION_GETINFO,
KSPROPERTY_VIDEOCOMPRESSION_KEYFRAME_RATE,
KSPROPERTY_VIDEOCOMPRESSION_PFRAMES_PER_KEYFRAME,
KSPROPERTY_VIDEOCOMPRESSION_QUALITY,
KSPROPERTY_VIDEOCOMPRESSION_OVERRIDE_KEYFRAME,
KSPROPERTY_VIDEOCOMPRESSION_OVERRIDE_FRAME_SIZE,
KSPROPERTY_VIDEOCOMPRESSION_WINDOWSIZE
}
alias int KSPROPERTY_VIDCAP_VIDEOCOMPRESSION;
enum {
KS_CompressionCaps_CanQuality = 1,
KS_CompressionCaps_CanCrunch = 2,
KS_CompressionCaps_CanKeyFrame = 4,
KS_CompressionCaps_CanBFrame = 8,
KS_CompressionCaps_CanWindow = 0x10
}
alias int KS_CompressionCaps;
//((NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
enum {
KS_StreamingHint_FrameInterval = 0x0100,
KS_StreamingHint_KeyFrameRate = 0x0200,
KS_StreamingHint_PFrameRate = 0x0400,
KS_StreamingHint_CompQuality = 0x0800,
KS_StreamingHint_CompWindowSize = 0x1000
}
alias int KS_VideoStreamingHints;
struct KSPROPERTY_VIDEOCOMPRESSION_GETINFO_S {
KSPROPERTY Property;
ULONG StreamIndex;
LONG DefaultKeyFrameRate;
LONG DefaultPFrameRate;
LONG DefaultQuality;
LONG NumberOfQualitySettings;
LONG Capabilities;
}
alias KSPROPERTY_VIDEOCOMPRESSION_GETINFO_S* PKSPROPERTY_VIDEOCOMPRESSION_GETINFO_S;
struct KSPROPERTY_VIDEOCOMPRESSION_S {
KSPROPERTY Property;
ULONG StreamIndex;
LONG Value;
}
alias KSPROPERTY_VIDEOCOMPRESSION_S* PKSPROPERTY_VIDEOCOMPRESSION_S;
//((NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
struct KSPROPERTY_VIDEOCOMPRESSION_S1 {
KSPROPERTY Property;
ULONG StreamIndex;
LONG Value;
ULONG Flags;
}
alias KSPROPERTY_VIDEOCOMPRESSION_S1* PKSPROPERTY_VIDEOCOMPRESSION_S1;
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_OVERLAY", "e436eb7f-524f-11ce-9f53-0020af0ba770");
mixin DEFINE_GUID!("KSPROPSETID_OverlayUpdate", "490EA5CF-7681-11D1-A21C-00A0C9223196");
enum {
KSPROPERTY_OVERLAYUPDATE_INTERESTS,
KSPROPERTY_OVERLAYUPDATE_CLIPLIST = 0x1,
KSPROPERTY_OVERLAYUPDATE_PALETTE = 0x2,
KSPROPERTY_OVERLAYUPDATE_COLORKEY = 0x4,
KSPROPERTY_OVERLAYUPDATE_VIDEOPOSITION = 0x8,
KSPROPERTY_OVERLAYUPDATE_DISPLAYCHANGE = 0x10,
KSPROPERTY_OVERLAYUPDATE_COLORREF = 0x10000000
}
alias int KSPROPERTY_OVERLAYUPDATE;
struct KSDISPLAYCHANGE {
ULONG PelsWidth;
ULONG PelsHeight;
ULONG BitsPerPel;
WCHAR[1] DeviceID;
}
alias KSDISPLAYCHANGE* PKSDISPLAYCHANGE;
/*
DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_INTERESTS(Handler) DEFINE_KSPROPERTY_ITEM( KSPROPERTY_OVERLAYUPDATE_INTERESTS, (Handler), sizeof(KSPROPERTY), sizeof(ULONG), NULL, NULL, 0, NULL, NULL, 0)
DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_PALETTE(Handler) DEFINE_KSPROPERTY_ITEM( KSPROPERTY_OVERLAYUPDATE_PALETTE, NULL, sizeof(KSPROPERTY), 0, (Handler), NULL, 0, NULL, NULL, 0)
DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_COLORKEY(Handler) DEFINE_KSPROPERTY_ITEM( KSPROPERTY_OVERLAYUPDATE_COLORKEY, NULL, sizeof(KSPROPERTY), sizeof(COLORKEY), (Handler), NULL, 0, NULL, NULL, 0)
DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_CLIPLIST(Handler) DEFINE_KSPROPERTY_ITEM( KSPROPERTY_OVERLAYUPDATE_CLIPLIST, NULL, sizeof(KSPROPERTY), 2 * sizeof(RECT) + sizeof(RGNDATAHEADER), (Handler), NULL, 0, NULL, NULL, 0)
DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_VIDEOPOSITION(Handler) DEFINE_KSPROPERTY_ITEM( KSPROPERTY_OVERLAYUPDATE_VIDEOPOSITION, NULL, sizeof(KSPROPERTY), 2 * sizeof(RECT), (Handler), NULL, 0, NULL, NULL, 0)
DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_DISPLAYCHANGE(Handler) DEFINE_KSPROPERTY_ITEM( KSPROPERTY_OVERLAYUPDATE_DISPLAYCHANGE, NULL, sizeof(KSPROPERTY), sizeof(KSDISPLAYCHANGE), (Handler), NULL, 0, NULL, NULL, 0)
DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_COLORREF(Handler) DEFINE_KSPROPERTY_ITEM( KSPROPERTY_OVERLAYUPDATE_COLORREF, (Handler), sizeof(KSPROPERTY), sizeof(COLORREF), NULL, NULL, 0, NULL, NULL, 0)
*/
mixin DEFINE_GUID!("PROPSETID_VIDCAP_VIDEOCONTROL", "6a2e0670-28e4-11d0-a18c-00a0c9118956");
enum {
KSPROPERTY_VIDEOCONTROL_CAPS,
KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE,
KSPROPERTY_VIDEOCONTROL_FRAME_RATES,
KSPROPERTY_VIDEOCONTROL_MODE
}
alias int KSPROPERTY_VIDCAP_VIDEOCONTROL;
enum {
KS_VideoControlFlag_FlipHorizontal = 0x0001,
KS_VideoControlFlag_FlipVertical = 0x0002,
KS_Obsolete_VideoControlFlag_ExternalTriggerEnable = 0x0010,
KS_Obsolete_VideoControlFlag_Trigger = 0x0020,
KS_VideoControlFlag_ExternalTriggerEnable = 0x0004,
KS_VideoControlFlag_Trigger = 0x0008
}
alias int KS_VideoControlFlags;
struct KSPROPERTY_VIDEOCONTROL_CAPS_S {
KSPROPERTY Property;
ULONG StreamIndex;
ULONG VideoControlCaps;
}
alias KSPROPERTY_VIDEOCONTROL_CAPS_S* PKSPROPERTY_VIDEOCONTROL_CAPS_S;
struct KSPROPERTY_VIDEOCONTROL_MODE_S {
KSPROPERTY Property;
ULONG StreamIndex;
LONG Mode;
}
alias KSPROPERTY_VIDEOCONTROL_MODE_S* PKSPROPERTY_VIDEOCONTROL_MODE_S;
struct KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S {
KSPROPERTY Property;
ULONG StreamIndex;
ULONG RangeIndex;
SIZE Dimensions;
LONGLONG CurrentActualFrameRate;
LONGLONG CurrentMaxAvailableFrameRate;
}
alias KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S* PKSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S;
struct KSPROPERTY_VIDEOCONTROL_FRAME_RATES_S {
KSPROPERTY Property;
ULONG StreamIndex;
ULONG RangeIndex;
SIZE Dimensions;
}
alias KSPROPERTY_VIDEOCONTROL_FRAME_RATES_S* PKSPROPERTY_VIDEOCONTROL_FRAME_RATES_S;
mixin DEFINE_GUID!("PROPSETID_VIDCAP_DROPPEDFRAMES", "C6E13344-30AC-11d0-A18C-00A0C9118956");
enum {
KSPROPERTY_DROPPEDFRAMES_CURRENT
}
alias int KSPROPERTY_VIDCAP_DROPPEDFRAMES;
struct KSPROPERTY_DROPPEDFRAMES_CURRENT_S {
KSPROPERTY Property;
LONGLONG PictureNumber;
LONGLONG DropCount;
ULONG AverageFrameSize;
}
alias KSPROPERTY_DROPPEDFRAMES_CURRENT_S* PKSPROPERTY_DROPPEDFRAMES_CURRENT_S;
mixin DEFINE_GUID!("KSPROPSETID_VPConfig", "bc29a660-30e3-11d0-9e69-00c04fd7c15b");
mixin DEFINE_GUID!("KSPROPSETID_VPVBIConfig", "ec529b00-1a1f-11d1-bad9-00609744111a");
enum {
KSPROPERTY_VPCONFIG_NUMCONNECTINFO,
KSPROPERTY_VPCONFIG_GETCONNECTINFO,
KSPROPERTY_VPCONFIG_SETCONNECTINFO,
KSPROPERTY_VPCONFIG_VPDATAINFO,
KSPROPERTY_VPCONFIG_MAXPIXELRATE,
KSPROPERTY_VPCONFIG_INFORMVPINPUT,
KSPROPERTY_VPCONFIG_NUMVIDEOFORMAT,
KSPROPERTY_VPCONFIG_GETVIDEOFORMAT,
KSPROPERTY_VPCONFIG_SETVIDEOFORMAT,
KSPROPERTY_VPCONFIG_INVERTPOLARITY,
KSPROPERTY_VPCONFIG_DECIMATIONCAPABILITY,
KSPROPERTY_VPCONFIG_SCALEFACTOR,
KSPROPERTY_VPCONFIG_DDRAWHANDLE,
KSPROPERTY_VPCONFIG_VIDEOPORTID,
KSPROPERTY_VPCONFIG_DDRAWSURFACEHANDLE,
KSPROPERTY_VPCONFIG_SURFACEPARAMS
}
alias int KSPROPERTY_VPCONFIG;
//(NTDDI_VERSION >= NTDDI_WINXP)
mixin DEFINE_GUID!("CLSID_KsIBasicAudioInterfaceHandler", "b9f8ac3e-0f71-11d2-b72c-00c04fb6bd3d");
version(all){//__IVPType__
struct KSVPMAXPIXELRATE {
AMVPSIZE Size;
DWORD MaxPixelsPerSecond;
DWORD Reserved;
}
alias KSVPMAXPIXELRATE* PKSVPMAXPIXELRATE;
struct KSVPSIZE_PROP {
KSPROPERTY Property;
AMVPSIZE Size;
}
alias KSVPSIZE_PROP* PKSVPSIZE_PROP;
struct KSVPSURFACEPARAMS {
DWORD dwPitch;
DWORD dwXOrigin;
DWORD dwYOrigin;
}
alias KSVPSURFACEPARAMS* PKSVPSURFACEPARAMS;
}else{
// __DVP_INCLUDED__
/* dvp.h in directx
struct DDVIDEOPORTCONNECT {
DWORD dwSize;
DWORD dwPortWidth;
GUID guidTypeID;
DWORD dwFlags;
ULONG_PTR dwReserved1;
}
alias DDVIDEOPORTCONNECT* LPDDVIDEOPORTCONNECT;
DDVPTYPE_E_HREFH_VREFH 0x54F39980L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8
DDVPTYPE_E_HREFL_VREFL 0xE09C77E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8
*/
// vptype.h in AM 2.0 sdk
enum {
KS_PixAspectRatio_NTSC4x3,
KS_PixAspectRatio_NTSC16x9,
KS_PixAspectRatio_PAL4x3,
KS_PixAspectRatio_PAL16x9
}
alias int KS_AMPixAspectRatio;
enum {
KS_AMVP_DO_NOT_CARE,
KS_AMVP_BEST_BANDWIDTH,
KS_AMVP_INPUT_SAME_AS_OUTPUT
}
alias int KS_AMVP_SELECTFORMATBY;
enum {
KS_AMVP_MODE_WEAVE,
KS_AMVP_MODE_BOBINTERLEAVED,
KS_AMVP_MODE_BOBNONINTERLEAVED,
KS_AMVP_MODE_SKIPEVEN,
KS_AMVP_MODE_SKIPODD
}
alias int KS_AMVP_MODE;
struct KS_AMVPDIMINFO {
DWORD dwFieldWidth;
DWORD dwFieldHeight;
DWORD dwVBIWidth;
DWORD dwVBIHeight;
RECT rcValidRegion;
}
alias KS_AMVPDIMINFO* PKS_AMVPDIMINFO;
struct KS_AMVPDATAINFO {
DWORD dwSize;
DWORD dwMicrosecondsPerField;
KS_AMVPDIMINFO amvpDimInfo;
DWORD dwPictAspectRatioX;
DWORD dwPictAspectRatioY;
BOOL bEnableDoubleClock;
BOOL bEnableVACT;
BOOL bDataIsInterlaced;
LONG lHalfLinesOdd;
BOOL bFieldPolarityInverted;
DWORD dwNumLinesInVREF;
LONG lHalfLinesEven;
DWORD dwReserved1;
}
alias KS_AMVPDATAINFO* PKS_AMVPDATAINFO;
struct KS_AMVPSIZE {
DWORD dwWidth;
DWORD dwHeight;
}
alias KS_AMVPSIZE* PKS_AMVPSIZE;
struct KSVPMAXPIXELRATE {
KS_AMVPSIZE Size;
DWORD MaxPixelsPerSecond;
DWORD Reserved;
}
alias KSVPMAXPIXELRATE* PKSVPMAXPIXELRATE;
struct KSVPSIZE_PROP {
KSPROPERTY Property;
KS_AMVPSIZE Size;
}
alias KSVPSIZE_PROP* PKSVPSIZE_PROP;
struct KSVPSURFACEPARAMS {
DWORD dwPitch;
DWORD dwXOrigin;
DWORD dwYOrigin;
}
alias KSVPSURFACEPARAMS* PKSVPSURFACEPARAMS;
}
mixin DEFINE_GUID!("KSEVENTSETID_VPNotify", "20c5598e-d3c8-11d0-8dfc-00c04fd7c08b");
enum {
KSEVENT_VPNOTIFY_FORMATCHANGE
}
alias int KSEVENT_VPNOTIFY;
mixin DEFINE_GUID!("KSEVENTSETID_VIDCAPTOSTI", "DB47DE20-F628-11d1-BA41-00A0C90D2B05");
enum {
KSEVENT_VIDCAPTOSTI_EXT_TRIGGER,
//((NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
KSEVENT_VIDCAP_AUTO_UPDATE,
KSEVENT_VIDCAP_SEARCH,
}
alias int KSEVENT_VIDCAPTOSTI;
//((NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
enum {
KSPROPERTY_EXTENSION_UNIT_INFO,
KSPROPERTY_EXTENSION_UNIT_CONTROL,
KSPROPERTY_EXTENSION_UNIT_PASS_THROUGH = 0xffff
}
alias int KSPROPERTY_EXTENSION_UNIT;
alias KSPROPERTY_EXTENSION_UNIT* PKSPROPERTY_EXTENSION_UNIT;
mixin DEFINE_GUID!("KSEVENTSETID_VPVBINotify", "ec529b01-1a1f-11d1-bad9-00609744111a");
enum {
KSEVENT_VPVBINOTIFY_FORMATCHANGE
}
alias int KSEVENT_VPVBINOTIFY;
mixin DEFINE_GUID!("KSDATAFORMAT_TYPE_AUXLine21Data", "670aea80-3a82-11d0-b79b-00aa003767a7");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_Line21_BytePair", "6e8d4a22-310c-11d0-b79a-00aa003767a7");
mixin DEFINE_GUID!("KSDATAFORMAT_SUBTYPE_Line21_GOPPacket", "6e8d4a23-310c-11d0-b79a-00aa003767a7");
struct KSGOP_USERDATA {
ULONG sc;
ULONG reserved1;
BYTE cFields;
CHAR l21Data[3];
}
alias KSGOP_USERDATA* PKSGOP_USERDATA;
mixin DEFINE_GUID!("KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK", "ed0b916a-044d-11d1-aa78-00c04fc31d60");
enum KS_AM_UseNewCSSKey = 0x0001;
mixin DEFINE_GUID!("KSPROPSETID_TSRateChange", "A503C5C0-1D1D-11D1-AD80-444553540000");
enum {
KS_AM_RATE_SimpleRateChange = 1,
KS_AM_RATE_ExactRateChange = 2,
KS_AM_RATE_MaxFullDataRate = 3,
KS_AM_RATE_Step = 4
}
alias int KS_AM_PROPERTY_TS_RATE_CHANGE;
struct KS_AM_SimpleRateChange {
REFERENCE_TIME StartTime;
LONG Rate;
}
alias KS_AM_SimpleRateChange* PKS_AM_SimpleRateChange;
struct KS_AM_ExactRateChange {
REFERENCE_TIME OutputZeroTime;
LONG Rate;
}
alias KS_AM_ExactRateChange* PKS_AM_ExactRateChange;
alias LONG KS_AM_MaxFullDataRate;
alias DWORD KS_AM_Step;
//(NTDDI_VERSION >= NTDDI_WINXPSP1)
mixin DEFINE_GUID!("KSCATEGORY_ENCODER", "19689BF6-C384-48fd-AD51-90E58C79F70B");
mixin DEFINE_GUID!("KSCATEGORY_MULTIPLEXER", "7A5DE1D3-01A1-452c-B481-4FA2B96271E8");
mixin DEFINE_GUID!("ENCAPIPARAM_BITRATE", "49CC4C43-CA83-4ad4-A9AF-F3696AF666DF");
mixin DEFINE_GUID!("ENCAPIPARAM_PEAK_BITRATE", "703F16A9-3D48-44a1-B077-018DFF915D19");
mixin DEFINE_GUID!("ENCAPIPARAM_BITRATE_MODE", "EE5FB25C-C713-40d1-9D58-C0D7241E250F");
//((NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
mixin DEFINE_GUID!("CODECAPI_CHANGELISTS", "62B12ACF-F6B0-47D9-9456-96F22C4E0B9D");
mixin DEFINE_GUID!("CODECAPI_VIDEO_ENCODER", "7112E8E1-3D03-47EF-8E60-03F1CF537301");
mixin DEFINE_GUID!("CODECAPI_AUDIO_ENCODER", "B9D19A3E-F897-429C-BC46-8138B7272B2D");
mixin DEFINE_GUID!("CODECAPI_SETALLDEFAULTS", "6C5E6A7C-ACF8-4F55-A999-1A628109051B");
mixin DEFINE_GUID!("CODECAPI_ALLSETTINGS", "6A577E92-83E1-4113-ADC2-4FCEC32F83A1");
mixin DEFINE_GUID!("CODECAPI_SUPPORTSEVENTS", "0581AF97-7693-4DBD-9DCA-3F9EBD6585A1");
mixin DEFINE_GUID!("CODECAPI_CURRENTCHANGELIST", "1CB14E83-7D72-4657-83FD-47A2C5B9D13D");
enum {
ConstantBitRate = 0,
VariableBitRateAverage,
VariableBitRatePeak
}
alias int VIDEOENCODER_BITRATE_MODE;
mixin DEFINE_GUID!("KSPROPSETID_Jack", "4509F757-2D46-4637-8E62-CE7DB944F57B");
enum {
KSPROPERTY_JACK_DESCRIPTION = 1,
KSPROPERTY_JACK_DESCRIPTION2,
KSPROPERTY_JACK_SINK_INFO
}
alias int KSPROPERTY_JACK;
enum {
eConnTypeUnknown,
eConnType3Point5mm,
eConnTypeQuarter,
eConnTypeAtapiInternal,
eConnTypeRCA,
eConnTypeOptical,
eConnTypeOtherDigital,
eConnTypeOtherAnalog,
eConnTypeMultichannelAnalogDIN,
eConnTypeXlrProfessional,
eConnTypeRJ11Modem,
eConnTypeCombination
}
alias int EPcxConnectionType;
enum {
eGeoLocRear = 0x1,
eGeoLocFront,
eGeoLocLeft,
eGeoLocRight,
eGeoLocTop,
eGeoLocBottom,
eGeoLocRearPanel,
eGeoLocRiser,
eGeoLocInsideMobileLid,
eGeoLocDrivebay,
eGeoLocHDMI,
eGeoLocOutsideMobileLid,
eGeoLocATAPI,
eGeoLocReserved5,
eGeoLocReserved6,
EPcxGeoLocation_enum_count
}
alias int EPcxGeoLocation;
enum {
eGenLocPrimaryBox = 0,
eGenLocInternal,
eGenLocSeparate,
eGenLocOther,
EPcxGenLocation_enum_count
}
alias int EPcxGenLocation;
enum {
ePortConnJack = 0,
ePortConnIntegratedDevice,
ePortConnBothIntegratedAndJack,
ePortConnUnknown
}
alias int EPxcPortConnection;
struct KSJACK_DESCRIPTION {
DWORD ChannelMapping;
COLORREF Color;
EPcxConnectionType ConnectionType;
EPcxGeoLocation GeoLocation;
EPcxGenLocation GenLocation;
EPxcPortConnection PortConnection;
BOOL IsConnected;
}
alias KSJACK_DESCRIPTION* PKSJACK_DESCRIPTION;
enum {
KSJACK_SINK_CONNECTIONTYPE_HDMI = 0,
KSJACK_SINK_CONNECTIONTYPE_DISPLAYPORT,
}
alias int KSJACK_SINK_CONNECTIONTYPE;
enum MAX_SINK_DESCRIPTION_NAME_LENGTH = 32;
struct KSJACK_SINK_INFORMATION {
KSJACK_SINK_CONNECTIONTYPE ConnType;
WORD ManufacturerId;
WORD ProductId;
WORD AudioLatency;
BOOL HDCPCapable;
BOOL AICapable;
UCHAR SinkDescriptionLength;
WCHAR SinkDescription[MAX_SINK_DESCRIPTION_NAME_LENGTH];
LUID PortId;
}
alias KSJACK_SINK_INFORMATION* PKSJACK_SINK_INFORMATION;
enum {
JACKDESC2_PRESENCE_DETECT_CAPABILITY = 0x00000001,
JACKDESC2_DYNAMIC_FORMAT_CHANGE_CAPABILITY = 0x00000002,
}
struct KSJACK_DESCRIPTION2 {
DWORD DeviceStateInfo;
DWORD JackCapabilities;
}
alias KSJACK_DESCRIPTION2* PKSJACK_DESCRIPTION2;
mixin DEFINE_GUID!("KSPROPSETID_AudioBufferDuration", "4E73C07F-23CC-4955-A7EA-3DA502496290");
enum KSPROPERTY_AUDIO_BUFFER_DURATION = 1;
|
D
|
module ui.button;
import std.stdio;
import std.string;
import derelict.sdl2.sdl;
import app;
import util.window;
import util.colour;
import textures.texture;
import textures.manager;
import math.vec2;
class Button {
private:
SDL_Rect pos;
Texture image = null;
bool isSelected = false;
SDL_Rect imgSect;
public:
Colour fillColour;
Colour outlineColour;
Colour selectColour;
// Getters and Setters
void selected(bool selected) @property{
isSelected = selected;
}
const(SDL_Rect) position() const @property{
return pos;
}
void position(SDL_Rect position) @property{
pos = position;
}
void SetImage(string image, SDL_Rect section){
this.image = App.Inst.TextureMan().Get(image);
this.imgSect = section;
}
void SetImage(Texture image, SDL_Rect section) {
this.image = image;
this.imgSect = section;
}
// Member functions
this(SDL_Rect pos = SDL_Rect(0,0,0,0), Colour fill = Colour(0,0,0), Colour outline = Colour(255, 255, 255), Colour select = Colour.Yellow) {
this.pos = pos;
fillColour = fill;
outlineColour = outline;
selectColour = select;
}
~this() {
}
void HandleEvent(ref SDL_Event e) {
}
bool LoadButtonImage(string path, Window window) {
image = new Texture();
return image.LoadFromFile(path, window);
}
void Render(Window window, float scale = 1) {
SDL_SetRenderDrawColor(window.Renderer, fillColour.r, fillColour.g, fillColour.b, fillColour.a);
// Scale button fill
SDL_RenderSetScale(window.Renderer, scale, scale);
SDL_RenderFillRect(window.Renderer, &pos);
SDL_RenderSetScale(window.Renderer, 1, 1);
if(image) {
image.Render(pos.x, pos.y, window, &imgSect, scale);
}
if(isSelected) {
SDL_SetRenderDrawColor(window.Renderer, selectColour.r, selectColour.g, selectColour.b, selectColour.a);
}
else {
SDL_SetRenderDrawColor(window.Renderer, outlineColour.r, outlineColour.g, outlineColour.b, outlineColour.a);
}
// Scale button outline
SDL_RenderSetScale(window.Renderer, scale, scale);
SDL_RenderDrawRect(window.Renderer, &pos);
SDL_RenderSetScale(window.Renderer, 1, 1);
}
}
|
D
|
/Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Crypto.build/RSA/RSAKey.swift.o : /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Utilities/Base32.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/RSA/RSA.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/MAC/HMAC.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/MAC/OTP.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Utilities/Deprecated.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/RSA/RSAPadding.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/CipherAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/OpenSSLCipherAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/AuthenticatedCipherAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Digest/DigestAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Random/CryptoRandom.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/Cipher.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/AuthenticatedCipher.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/OpenSSLStreamCipher.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Utilities/CryptoError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Utilities/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Digest/Digest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/BCrypt/BCryptDigest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/RSA/RSAKey.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Random.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Swift.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /usr/local/Cellar/libressl/3.0.2/include/openssl/asn1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/tls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dtls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs12.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl23.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509v3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/md5.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs7.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509.h /usr/local/Cellar/libressl/3.0.2/include/openssl/sha.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/obj_mac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/hmac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ec.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rand.h /usr/local/Cellar/libressl/3.0.2/include/openssl/conf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslconf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/lhash.h /usr/local/Cellar/libressl/3.0.2/include/openssl/stack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/safestack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/CCryptoOpenSSL/include/c_crypto_openssl.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bn.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bio.h /usr/local/Cellar/libressl/3.0.2/include/openssl/crypto.h /usr/local/Cellar/libressl/3.0.2/include/openssl/srtp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/evp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/3.0.2/include/openssl/buffer.h /usr/local/Cellar/libressl/3.0.2/include/openssl/err.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/3.0.2/include/openssl/objects.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslv.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509_vfy.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/MySQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentMySQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/HTTP.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Async.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Command.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Service.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Console.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Core.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentSQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOPriorityQueue.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Debugging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Routing.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQLBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Random.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/URLEncodedForm.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Authentication.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Validation.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/App.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Bits.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/WebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/DatabaseKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/TemplateKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Multipart.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/CBase32/include/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/CBcrypt/include/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio-zlib-support/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio-ssl-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Crypto.build/RSA/RSAKey~partial.swiftmodule : /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Utilities/Base32.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/RSA/RSA.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/MAC/HMAC.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/MAC/OTP.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Utilities/Deprecated.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/RSA/RSAPadding.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/CipherAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/OpenSSLCipherAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/AuthenticatedCipherAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Digest/DigestAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Random/CryptoRandom.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/Cipher.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/AuthenticatedCipher.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/OpenSSLStreamCipher.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Utilities/CryptoError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Utilities/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Digest/Digest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/BCrypt/BCryptDigest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/RSA/RSAKey.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Random.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Swift.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /usr/local/Cellar/libressl/3.0.2/include/openssl/asn1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/tls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dtls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs12.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl23.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509v3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/md5.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs7.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509.h /usr/local/Cellar/libressl/3.0.2/include/openssl/sha.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/obj_mac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/hmac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ec.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rand.h /usr/local/Cellar/libressl/3.0.2/include/openssl/conf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslconf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/lhash.h /usr/local/Cellar/libressl/3.0.2/include/openssl/stack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/safestack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/CCryptoOpenSSL/include/c_crypto_openssl.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bn.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bio.h /usr/local/Cellar/libressl/3.0.2/include/openssl/crypto.h /usr/local/Cellar/libressl/3.0.2/include/openssl/srtp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/evp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/3.0.2/include/openssl/buffer.h /usr/local/Cellar/libressl/3.0.2/include/openssl/err.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/3.0.2/include/openssl/objects.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslv.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509_vfy.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/MySQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentMySQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/HTTP.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Async.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Command.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Service.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Console.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Core.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentSQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOPriorityQueue.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Debugging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Routing.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQLBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Random.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/URLEncodedForm.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Authentication.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Validation.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/App.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Bits.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/WebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/DatabaseKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/TemplateKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Multipart.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/CBase32/include/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/CBcrypt/include/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio-zlib-support/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio-ssl-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Crypto.build/RSA/RSAKey~partial.swiftdoc : /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Utilities/Base32.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/RSA/RSA.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/MAC/HMAC.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/MAC/OTP.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Utilities/Deprecated.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/RSA/RSAPadding.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/CipherAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/OpenSSLCipherAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/AuthenticatedCipherAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Digest/DigestAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Random/CryptoRandom.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/Cipher.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/AuthenticatedCipher.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/OpenSSLStreamCipher.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Utilities/CryptoError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Utilities/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Digest/Digest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/BCrypt/BCryptDigest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/RSA/RSAKey.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Random.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Swift.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /usr/local/Cellar/libressl/3.0.2/include/openssl/asn1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/tls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dtls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs12.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl23.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509v3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/md5.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs7.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509.h /usr/local/Cellar/libressl/3.0.2/include/openssl/sha.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/obj_mac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/hmac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ec.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rand.h /usr/local/Cellar/libressl/3.0.2/include/openssl/conf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslconf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/lhash.h /usr/local/Cellar/libressl/3.0.2/include/openssl/stack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/safestack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/CCryptoOpenSSL/include/c_crypto_openssl.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bn.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bio.h /usr/local/Cellar/libressl/3.0.2/include/openssl/crypto.h /usr/local/Cellar/libressl/3.0.2/include/openssl/srtp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/evp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/3.0.2/include/openssl/buffer.h /usr/local/Cellar/libressl/3.0.2/include/openssl/err.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/3.0.2/include/openssl/objects.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslv.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509_vfy.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/MySQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentMySQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/HTTP.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Async.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Command.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Service.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Console.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Core.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentSQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOPriorityQueue.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Debugging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Routing.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQLBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Random.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/URLEncodedForm.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Authentication.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Validation.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/App.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Bits.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/WebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/DatabaseKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/TemplateKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Multipart.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/CBase32/include/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/CBcrypt/include/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio-zlib-support/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio-ssl-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Crypto.build/RSA/RSAKey~partial.swiftsourceinfo : /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Utilities/Base32.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/RSA/RSA.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/MAC/HMAC.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/MAC/OTP.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Utilities/Deprecated.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/RSA/RSAPadding.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/CipherAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/OpenSSLCipherAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/AuthenticatedCipherAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Digest/DigestAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Random/CryptoRandom.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/Cipher.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/AuthenticatedCipher.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Cipher/OpenSSLStreamCipher.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Utilities/CryptoError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Utilities/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/Digest/Digest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/BCrypt/BCryptDigest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/Crypto/RSA/RSAKey.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Random.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Swift.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /usr/local/Cellar/libressl/3.0.2/include/openssl/asn1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/tls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dtls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs12.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl23.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509v3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/md5.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs7.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509.h /usr/local/Cellar/libressl/3.0.2/include/openssl/sha.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/obj_mac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/hmac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ec.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rand.h /usr/local/Cellar/libressl/3.0.2/include/openssl/conf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslconf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/lhash.h /usr/local/Cellar/libressl/3.0.2/include/openssl/stack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/safestack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/CCryptoOpenSSL/include/c_crypto_openssl.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bn.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bio.h /usr/local/Cellar/libressl/3.0.2/include/openssl/crypto.h /usr/local/Cellar/libressl/3.0.2/include/openssl/srtp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/evp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/3.0.2/include/openssl/buffer.h /usr/local/Cellar/libressl/3.0.2/include/openssl/err.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/3.0.2/include/openssl/objects.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslv.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509_vfy.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/MySQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentMySQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/HTTP.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Async.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Command.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Service.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Console.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Core.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentSQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOPriorityQueue.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Debugging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Routing.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQLBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Random.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/URLEncodedForm.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Authentication.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Validation.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/App.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Bits.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/WebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/DatabaseKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/TemplateKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Multipart.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/CBase32/include/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/crypto/Sources/CBcrypt/include/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio-zlib-support/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio-ssl-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
/Users/ericfoster/Documents/Developer/Swift/flux/.build/x86_64-apple-macosx10.10/debug/flux.build/main.swift.o : /Users/ericfoster/Documents/Developer/Swift/flux/Sources/Bottle.swift /Users/ericfoster/Documents/Developer/Swift/flux/Sources/FluxStream.swift /Users/ericfoster/Documents/Developer/Swift/flux/Sources/main.swift /Users/ericfoster/Documents/Developer/Swift/flux/Sources/pointers.swift /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
/Users/ericfoster/Documents/Developer/Swift/flux/.build/x86_64-apple-macosx10.10/debug/flux.build/main~partial.swiftmodule : /Users/ericfoster/Documents/Developer/Swift/flux/Sources/Bottle.swift /Users/ericfoster/Documents/Developer/Swift/flux/Sources/FluxStream.swift /Users/ericfoster/Documents/Developer/Swift/flux/Sources/main.swift /Users/ericfoster/Documents/Developer/Swift/flux/Sources/pointers.swift /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
/Users/ericfoster/Documents/Developer/Swift/flux/.build/x86_64-apple-macosx10.10/debug/flux.build/main~partial.swiftdoc : /Users/ericfoster/Documents/Developer/Swift/flux/Sources/Bottle.swift /Users/ericfoster/Documents/Developer/Swift/flux/Sources/FluxStream.swift /Users/ericfoster/Documents/Developer/Swift/flux/Sources/main.swift /Users/ericfoster/Documents/Developer/Swift/flux/Sources/pointers.swift /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Library/Developer/CommandLineTools/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
|
D
|
//***************************
// Sheep Prototype
//***************************
PROTOTYPE Mst_Default_Sheep(C_Npc)
{
//----- Maonster ----
name = "Owca";
guild = GIL_SHEEP;
aivar[AIV_MM_REAL_ID] = ID_SHEEP;
level = 1;
//----- Attribute ----
attribute [ATR_STRENGTH] = 5;
attribute [ATR_DEXTERITY] = 5;
attribute [ATR_HITPOINTS_MAX] = 10;
attribute [ATR_HITPOINTS] = 10;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protection ----
protection [PROT_BLUNT] = 0;
protection [PROT_EDGE] = 0;
protection [PROT_POINT] = 0;
protection [PROT_FIRE] = 0;
protection [PROT_FLY] = 0;
protection [PROT_MAGIC] = 0;
//----- Damage Types ----
damagetype = DAM_EDGE;
// damage [DAM_INDEX_BLUNT] = 0;
// damage [DAM_INDEX_EDGE] = 0;
// damage [DAM_INDEX_POINT] = 0;
// damage [DAM_INDEX_FIRE] = 0;
// damage [DAM_INDEX_FLY] = 0;
// damage [DAM_INDEX_MAGIC] = 0;
//----- Kampf-Taktik ----
//fight_tactic = FAI_Giant_Rat;//Schafe kämpfen nicht!!
//----- Senses & Ranges ----
senses = SENSE_HEAR | SENSE_SEE | SENSE_SMELL;
senses_range = PERC_DIST_MONSTER_ACTIVE_MAX;
aivar[AIV_MM_FollowTime] = FOLLOWTIME_MEDIUM;
aivar[AIV_MM_FollowInWater] = FALSE;
//----- Daily Routine ----
};
//************
// Visuals
//************
func void B_SetVisuals_Sheep()
{
Mdl_SetVisual (self, "Sheep.mds");
// Body-Mesh Body-Tex Skin-Color Head-MMS Head-Tex Teeth-Tex ARMOR
Mdl_SetVisualBody (self, "Sheep_Body", DEFAULT, DEFAULT, "", DEFAULT, DEFAULT, -1);
};
// ------ Hammel ------
func void B_SetVisuals_Hammel ()
{
Mdl_SetVisual (self, "Sheep.mds");
// Body-Mesh Body-Tex Skin-Color Head-MMS Head-Tex Teeth-Tex ARMOR
Mdl_SetVisualBody (self, "Hammel_Body", DEFAULT, DEFAULT, "", DEFAULT, DEFAULT, -1);
};
//***************
// Sheep
//***************
INSTANCE Sheep (Mst_Default_Sheep)
{
B_SetVisuals_Sheep();
Npc_SetToFistMode(self);
start_aistate = ZS_MM_AllScheduler;
aivar[AIV_MM_RoamStart] = OnlyRoutine;
CreateInvItems (self, ItFoMuttonRaw, 1);
};
//***************
// Hammel
//***************
INSTANCE Hammel (Mst_Default_Sheep)
{
B_SetVisuals_Hammel();
Npc_SetToFistMode(self);
start_aistate = ZS_MM_AllScheduler;
aivar[AIV_MM_RoamStart] = OnlyRoutine;
CreateInvItems (self, ItFoMuttonRaw, 1);
};
//***************
// Follow_Sheep
//***************
INSTANCE Follow_Sheep (Mst_Default_Sheep)
{
name = "Betsy";
aivar[AIV_ToughGuy] = TRUE; //Liesel knn getötet werden, ohne daß jemand sich anpißt!
B_SetVisuals_Sheep();
Npc_SetToFistMode(self);
aivar[AIV_MM_RoamStart] = OnlyRoutine;
start_aistate = ZS_MM_Rtn_Follow_Sheep;
CreateInvItems (self, ItFoMuttonRaw, 1);
};
INSTANCE Weed_Sheep (Mst_Default_Sheep)
{
name = "Du¿a Owca";
aivar[AIV_ToughGuy] = TRUE;
B_SetVisuals_Sheep();
Npc_SetToFistMode(self);
aivar[AIV_MM_RoamStart] = OnlyRoutine;
start_aistate = ZS_MM_Rtn_Follow_Sheep;
CreateInvItems (self, ItFoMuttonRaw, 1);
Mdl_SetModelScale(self, 1.5, 1.5, 1.5);
};
//***************
// Follow_Sheep_AKIL
//***************
INSTANCE Follow_Sheep_AKIL (Mst_Default_Sheep)
{
name = "Owca";
aivar[AIV_ToughGuy] = TRUE;
B_SetVisuals_Sheep();
Npc_SetToFistMode(self);
aivar[AIV_MM_RoamStart] = OnlyRoutine;
start_aistate = ZS_MM_Rtn_Follow_Sheep;
CreateInvItems (self, ItFoMuttonRaw, 1);
};
//******************************
// Balthasar_Sheeps
//******************************
INSTANCE Balthasar_Sheep1 (Mst_Default_Sheep)
{
B_SetVisuals_Hammel();
Npc_SetToFistMode(self);
start_aistate = ZS_MM_AllScheduler;
aivar[AIV_MM_RoamStart] = OnlyRoutine;
CreateInvItems (self, ItFoMuttonRaw, 1);
};
INSTANCE Balthasar_Sheep2 (Mst_Default_Sheep)
{
B_SetVisuals_Sheep();
Npc_SetToFistMode(self);
start_aistate = ZS_MM_AllScheduler;
aivar[AIV_MM_RoamStart] = OnlyRoutine;
CreateInvItems (self, ItFoMuttonRaw, 1);
};
INSTANCE Balthasar_Sheep3 (Mst_Default_Sheep)
{
B_SetVisuals_Sheep();
Npc_SetToFistMode(self);
start_aistate = ZS_MM_AllScheduler;
aivar[AIV_MM_RoamStart] = OnlyRoutine;
CreateInvItems (self, ItFoMuttonRaw, 1);
};
|
D
|
a disposition that is confused or nervous and upset
be flustered
cause to be nervous or upset
|
D
|
/Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/DerivedData/allbeat/Build/Intermediates/Alamofire.build/Debug-iphonesimulator/Alamofire\ iOS.build/Objects-normal/x86_64/Timeline.o : /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Timeline.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/SessionDelegate.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/ParameterEncoding.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Request.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/ResponseSerialization.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Error.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/SessionManager.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Response.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Alamofire.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/MultipartFormData.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/ServerTrustPolicy.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/NetworkReachabilityManager.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/TaskDelegate.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Validation.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Notifications.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Result.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Alamofire.h /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/DerivedData/allbeat/Build/Intermediates/Alamofire.build/Debug-iphonesimulator/Alamofire\ iOS.build/unextended-module.modulemap /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/SwiftOnoneSupport.swiftmodule
/Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/DerivedData/allbeat/Build/Intermediates/Alamofire.build/Debug-iphonesimulator/Alamofire\ iOS.build/Objects-normal/x86_64/Timeline~partial.swiftmodule : /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Timeline.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/SessionDelegate.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/ParameterEncoding.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Request.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/ResponseSerialization.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Error.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/SessionManager.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Response.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Alamofire.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/MultipartFormData.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/ServerTrustPolicy.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/NetworkReachabilityManager.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/TaskDelegate.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Validation.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Notifications.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Result.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Alamofire.h /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/DerivedData/allbeat/Build/Intermediates/Alamofire.build/Debug-iphonesimulator/Alamofire\ iOS.build/unextended-module.modulemap /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/SwiftOnoneSupport.swiftmodule
/Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/DerivedData/allbeat/Build/Intermediates/Alamofire.build/Debug-iphonesimulator/Alamofire\ iOS.build/Objects-normal/x86_64/Timeline~partial.swiftdoc : /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Timeline.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/SessionDelegate.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/ParameterEncoding.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Request.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/ResponseSerialization.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Error.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/SessionManager.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Response.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Alamofire.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/MultipartFormData.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/ServerTrustPolicy.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/NetworkReachabilityManager.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/TaskDelegate.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Validation.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Notifications.swift /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Result.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/Alamofire/Source/Alamofire.h /Users/Ari/Desktop/ArisAdditionsToAllBeat/allbeat-ios/allbeat/DerivedData/allbeat/Build/Intermediates/Alamofire.build/Debug-iphonesimulator/Alamofire\ iOS.build/unextended-module.modulemap /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/SwiftOnoneSupport.swiftmodule
|
D
|
/// $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
/// Author: Walter Bright
module core.sys.windows.stat;
version (Windows):
extern (C) nothrow @nogc:
// Posix version is in core.sys.posix.sys.stat
enum S_IFMT = 0xF000;
enum S_IFDIR = 0x4000;
enum S_IFCHR = 0x2000;
enum S_IFIFO = 0x1000;
enum S_IFREG = 0x8000;
enum S_IREAD = 0x0100;
enum S_IWRITE = 0x0080;
enum S_IEXEC = 0x0040;
enum S_IFBLK = 0x6000;
enum S_IFNAM = 0x5000;
@safe pure
{
int S_ISREG(int m) { return (m & S_IFMT) == S_IFREG; }
int S_ISBLK(int m) { return (m & S_IFMT) == S_IFBLK; }
int S_ISNAM(int m) { return (m & S_IFMT) == S_IFNAM; }
int S_ISDIR(int m) { return (m & S_IFMT) == S_IFDIR; }
int S_ISCHR(int m) { return (m & S_IFMT) == S_IFCHR; }
}
struct struct_stat
{
short st_dev;
ushort st_ino;
ushort st_mode;
short st_nlink;
ushort st_uid;
ushort st_gid;
short st_rdev;
short dummy;
int st_size;
int st_atime;
int st_mtime;
int st_ctime;
}
int stat(const(char)*, struct_stat *);
int fstat(int, struct_stat *) @trusted;
int _wstat(const(wchar)*, struct_stat *);
|
D
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.