code
stringlengths 3
10M
| language
stringclasses 31
values |
|---|---|
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSensors module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QSENSORBACKEND_H
#define QSENSORBACKEND_H
public import qt.QtSensors.qsensor;
public import qt.QtSensors.qsensormanager;
QT_BEGIN_NAMESPACE
class QSensorBackendPrivate;
class Q_SENSORS_EXPORT QSensorBackend : public QObject
{
mixin Q_OBJECT;
public:
explicit QSensorBackend(QSensor *sensor, QObject *parent = 0);
/+virtual+/ ~QSensorBackend();
/+virtual+/ void start() = 0;
/+virtual+/ void stop() = 0;
/+virtual+/ bool isFeatureSupported(QSensor::Feature feature) const;
// used by the backend to set metadata properties
void addDataRate(qreal min, qreal max);
void setDataRates(const(QSensor)* otherSensor);
void addOutputRange(qreal min, qreal max, qreal accuracy);
void setDescription(ref const(QString) description);
template <typename T>
T *setReading(T *readingClass)
{
if (!readingClass)
readingClass = new T(this);
setReadings(readingClass, new T(this), new T(this));
return readingClass;
}
QSensorReading *reading() const;
QSensor *sensor() const;
// used by the backend to inform us of events
void newReadingAvailable();
void sensorStopped();
void sensorBusy();
void sensorError(int error);
private:
void setReadings(QSensorReading *device, QSensorReading *filter, QSensorReading *cache);
mixin Q_DECLARE_PRIVATE;
mixin Q_DISABLE_COPY;
};
QT_END_NAMESPACE
#endif
|
D
|
/Users/Kelly/Desktop/Venture/Build/Intermediates/Venture.build/Debug-iphoneos/Venture.build/Objects-normal/arm64/SwitchPageViewController.o : /Users/Kelly/Desktop/Venture/Venture/ItineraryTableViewController.swift /Users/Kelly/Desktop/Venture/Venture/GoogleAPIWrapper.swift /Users/Kelly/Desktop/Venture/Venture/LocationsTableViewController.swift /Users/Kelly/Desktop/Venture/Venture/MapViewController.swift /Users/Kelly/Desktop/Venture/Venture/Place.swift /Users/Kelly/Desktop/Venture/Venture/Indexable.swift /Users/Kelly/Desktop/Venture/Venture/AppDelegate.swift /Users/Kelly/Desktop/Venture/Venture/SwitchPageViewController.swift /Users/Kelly/Desktop/Venture/Venture/SettingsViewController.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/UIKit.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/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreLocation.swiftmodule /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSURLTileLayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSTileLayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSSyncTileLayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSServices.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPolyline.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPolygon.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlaceTypes.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSUserAddedPlace.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacesErrors.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacesClient.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacePickerConfig.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacePicker.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacePhotoMetadataList.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacePhotoMetadata.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlaceLikelihoodList.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlaceLikelihood.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaView.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaService.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaLink.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaLayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaCameraUpdate.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaCamera.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanorama.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSOrientation.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMutablePath.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMarkerLayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMarker.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSUISettings.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMapView.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMapView+Animation.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMapLayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSIndoorLevel.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSIndoorDisplay.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSIndoorBuilding.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSGroundOverlay.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPath.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSGeometryUtils.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSGeocoder.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSOverlay.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCircle.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCameraUpdate.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCameraPosition.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCALayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteViewController.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteTableDataSource.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlace.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteResultsViewController.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompletePrediction.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteMatchFragment.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteFilter.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSProjection.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCoordinateBounds.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteFetcher.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAddressComponent.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSDeprecationMacros.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCompatabilityMacros.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAddress.h /Users/Kelly/Desktop/Venture/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Headers/GoogleMaps.h /Users/Kelly/Desktop/Venture/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreData.swiftmodule
/Users/Kelly/Desktop/Venture/Build/Intermediates/Venture.build/Debug-iphoneos/Venture.build/Objects-normal/arm64/SwitchPageViewController~partial.swiftmodule : /Users/Kelly/Desktop/Venture/Venture/ItineraryTableViewController.swift /Users/Kelly/Desktop/Venture/Venture/GoogleAPIWrapper.swift /Users/Kelly/Desktop/Venture/Venture/LocationsTableViewController.swift /Users/Kelly/Desktop/Venture/Venture/MapViewController.swift /Users/Kelly/Desktop/Venture/Venture/Place.swift /Users/Kelly/Desktop/Venture/Venture/Indexable.swift /Users/Kelly/Desktop/Venture/Venture/AppDelegate.swift /Users/Kelly/Desktop/Venture/Venture/SwitchPageViewController.swift /Users/Kelly/Desktop/Venture/Venture/SettingsViewController.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/UIKit.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/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreLocation.swiftmodule /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSURLTileLayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSTileLayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSSyncTileLayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSServices.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPolyline.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPolygon.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlaceTypes.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSUserAddedPlace.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacesErrors.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacesClient.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacePickerConfig.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacePicker.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacePhotoMetadataList.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacePhotoMetadata.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlaceLikelihoodList.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlaceLikelihood.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaView.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaService.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaLink.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaLayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaCameraUpdate.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaCamera.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanorama.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSOrientation.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMutablePath.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMarkerLayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMarker.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSUISettings.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMapView.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMapView+Animation.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMapLayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSIndoorLevel.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSIndoorDisplay.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSIndoorBuilding.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSGroundOverlay.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPath.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSGeometryUtils.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSGeocoder.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSOverlay.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCircle.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCameraUpdate.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCameraPosition.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCALayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteViewController.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteTableDataSource.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlace.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteResultsViewController.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompletePrediction.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteMatchFragment.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteFilter.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSProjection.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCoordinateBounds.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteFetcher.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAddressComponent.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSDeprecationMacros.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCompatabilityMacros.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAddress.h /Users/Kelly/Desktop/Venture/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Headers/GoogleMaps.h /Users/Kelly/Desktop/Venture/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreData.swiftmodule
/Users/Kelly/Desktop/Venture/Build/Intermediates/Venture.build/Debug-iphoneos/Venture.build/Objects-normal/arm64/SwitchPageViewController~partial.swiftdoc : /Users/Kelly/Desktop/Venture/Venture/ItineraryTableViewController.swift /Users/Kelly/Desktop/Venture/Venture/GoogleAPIWrapper.swift /Users/Kelly/Desktop/Venture/Venture/LocationsTableViewController.swift /Users/Kelly/Desktop/Venture/Venture/MapViewController.swift /Users/Kelly/Desktop/Venture/Venture/Place.swift /Users/Kelly/Desktop/Venture/Venture/Indexable.swift /Users/Kelly/Desktop/Venture/Venture/AppDelegate.swift /Users/Kelly/Desktop/Venture/Venture/SwitchPageViewController.swift /Users/Kelly/Desktop/Venture/Venture/SettingsViewController.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/UIKit.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/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreLocation.swiftmodule /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSURLTileLayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSTileLayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSSyncTileLayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSServices.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPolyline.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPolygon.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlaceTypes.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSUserAddedPlace.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacesErrors.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacesClient.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacePickerConfig.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacePicker.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacePhotoMetadataList.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlacePhotoMetadata.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlaceLikelihoodList.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlaceLikelihood.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaView.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaService.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaLink.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaLayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaCameraUpdate.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanoramaCamera.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPanorama.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSOrientation.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMutablePath.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMarkerLayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMarker.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSUISettings.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMapView.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMapView+Animation.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSMapLayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSIndoorLevel.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSIndoorDisplay.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSIndoorBuilding.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSGroundOverlay.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPath.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSGeometryUtils.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSGeocoder.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSOverlay.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCircle.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCameraUpdate.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCameraPosition.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCALayer.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteViewController.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteTableDataSource.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSPlace.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteResultsViewController.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompletePrediction.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteMatchFragment.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteFilter.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSProjection.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCoordinateBounds.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAutocompleteFetcher.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAddressComponent.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSDeprecationMacros.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSCompatabilityMacros.h /Users/Kelly/Desktop/Venture/Pods/Headers/Public/GoogleMaps/GoogleMaps/GMSAddress.h /Users/Kelly/Desktop/Venture/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Headers/GoogleMaps.h /Users/Kelly/Desktop/Venture/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreData.swiftmodule
|
D
|
import std.stdio, std.math, std.algorithm, std.numeric;
alias V3 = double[3];
immutable light = normalize([30.0, 30.0, -50.0]);
V3 normalize(V3 v) pure @nogc {
v[] /= dotProduct(v, v) ^^ 0.5;
return v;
}
double dot(in ref V3 x, in ref V3 y) pure nothrow @nogc {
immutable double d = dotProduct(x, y);
return d < 0 ? -d : 0;
}
void drawSphere(in double R, in double k, in double ambient) @nogc {
enum shades = ".:!*oe&#%@";
foreach (immutable i; cast(int)floor(-R) .. cast(int)ceil(R) + 1) {
immutable double x = i + 0.5;
foreach (immutable j; cast(int)floor(-2 * R) ..
cast(int)ceil(2 * R) + 1) {
immutable double y = j / 2. + 0.5;
if (x ^^ 2 + y ^^ 2 <= R ^^ 2) {
immutable vec = [x, y, (R^^2 - x^^2 - y^^2) ^^ 0.5]
.normalize;
immutable double b = dot(light, vec) ^^ k + ambient;
int intensity = cast(int)((1 - b) * (shades.length-1));
intensity = min(shades.length - 1, max(intensity, 0));
shades[intensity].putchar;
} else
' '.putchar;
}
'\n'.putchar;
}
}
void main() {
drawSphere(20, 4, 0.1);
drawSphere(10, 2, 0.4);
}
|
D
|
/Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Command.build/Command/Command.swift.o : /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Command/Command.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Base/CommandRunnable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/Output+Autocomplete.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Config/CommandConfig.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Base/CommandOption.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/Console+Run.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/Output+Help.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Group/CommandGroup.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Group/BasicCommandGroup.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Utilities/CommandError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Config/Commands.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Utilities/Utilities.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Utilities/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Command/CommandArgument.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/CommandInput.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/CommandContext.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/Service.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Console.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/Logging.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 /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 /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 /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.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/swift-nio-zlib-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/Command.build/Command/Command~partial.swiftmodule : /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Command/Command.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Base/CommandRunnable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/Output+Autocomplete.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Config/CommandConfig.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Base/CommandOption.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/Console+Run.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/Output+Help.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Group/CommandGroup.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Group/BasicCommandGroup.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Utilities/CommandError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Config/Commands.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Utilities/Utilities.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Utilities/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Command/CommandArgument.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/CommandInput.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/CommandContext.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/Service.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Console.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/Logging.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 /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 /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 /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.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/swift-nio-zlib-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/Command.build/Command/Command~partial.swiftdoc : /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Command/Command.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Base/CommandRunnable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/Output+Autocomplete.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Config/CommandConfig.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Base/CommandOption.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/Console+Run.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/Output+Help.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Group/CommandGroup.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Group/BasicCommandGroup.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Utilities/CommandError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Config/Commands.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Utilities/Utilities.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Utilities/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Command/CommandArgument.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/CommandInput.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/CommandContext.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/Service.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Console.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/Logging.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 /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 /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 /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.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/swift-nio-zlib-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/Command.build/Command/Command~partial.swiftsourceinfo : /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Command/Command.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Base/CommandRunnable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/Output+Autocomplete.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Config/CommandConfig.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Base/CommandOption.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/Console+Run.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/Output+Help.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Group/CommandGroup.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Group/BasicCommandGroup.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Utilities/CommandError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Config/Commands.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Utilities/Utilities.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Utilities/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Command/CommandArgument.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/CommandInput.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/console/Sources/Command/Run/CommandContext.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/Service.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Console.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/Logging.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 /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 /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 /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.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/swift-nio-zlib-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
|
/**
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1984-1998 by Symantec
* Copyright (C) 2000-2019 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/backend/util2.d, backend/util2.d)
*/
// Only used for DMD
module dmd.backend.util2;
// Utility subroutines
import core.stdc.stdio;
import core.stdc.stdlib;
import core.stdc.string;
import core.stdc.stdint : uint64_t;
import dmd.backend.cc;
import dmd.backend.cdef;
import dmd.backend.global;
import dmd.backend.mem;
extern (C++):
nothrow:
void *ph_malloc(size_t nbytes);
void *ph_calloc(size_t nbytes);
void ph_free(void *p);
void *ph_realloc(void *p , size_t nbytes);
extern (C) void printInternalFailure(FILE* stream); // from dmd/mars.d
void util_exit(int exitcode);
void file_progress()
{
}
/*******************************
* Alternative assert failure.
*/
void util_assert(const(char)* file, int line)
{
fflush(stdout);
printInternalFailure(stdout);
printf("Internal error: %s %d\n",file,line);
err_exit();
//#if __clang__
// __builtin_unreachable();
//#endif
}
/****************************
* Clean up and exit program.
*/
void err_exit()
{
util_exit(EXIT_FAILURE);
}
/********************************
* Clean up and exit program.
*/
void err_break()
{
util_exit(255);
}
/****************************
* Clean up and exit program.
*/
void util_exit(int exitcode)
{
exit(exitcode); /* terminate abnormally */
}
version (CRuntime_DigitalMars)
{
extern (C) extern __gshared int controlc_saw;
/********************************
* Control C interrupts go here.
*/
private extern (C) void controlc_handler()
{
//printf("saw controlc\n");
controlc_saw = 1;
}
/*********************************
* Trap control C interrupts.
*/
version (MARS) { } else
{
extern (C)
{
void controlc_open();
void controlc_close();
alias _controlc_handler_t = void function();
extern __gshared _controlc_handler_t _controlc_handler;
void _STI_controlc()
{
//printf("_STI_controlc()\n");
_controlc_handler = &controlc_handler;
controlc_open(); /* trap control C */
}
void _STD_controlc()
{
//printf("_STD_controlc()\n");
controlc_close();
}
}
}
}
/***********************************
* Send progress report.
*/
void util_progress()
{
version (MARS) { } else {
version (CRuntime_DigitalMars)
{
if (controlc_saw)
err_break();
}
}
}
void util_progress(int linnum)
{
version (MARS) { } else {
version (CRuntime_DigitalMars)
{
if (controlc_saw)
err_break();
}
}
}
/**********************************
* Binary string search.
* Input:
* p . string of characters
* tab array of pointers to strings
* n = number of pointers in the array
* Returns:
* index (0..n-1) into tab[] if we found a string match
* else -1
*/
version (X86) version (CRuntime_DigitalMars)
version = X86asm;
int binary(const(char)* p, const(char)* *table,int high)
{
version (X86asm)
{
alias len = high; // reuse parameter storage
asm
{
// First find the length of the identifier.
xor EAX,EAX ; // Scan for a 0.
mov EDI,p ;
mov ECX,EAX ;
dec ECX ; // Longest possible string.
repne ;
scasb ;
mov EDX,high ; // EDX = high
not ECX ; // length of the id including '/0', stays in ECX
dec EDX ; // high--
js short Lnotfound ;
dec EAX ; // EAX = -1, so that eventually EBX = low (0)
mov len,ECX ;
even ;
L4D: lea EBX,[EAX + 1] ; // low = mid + 1
cmp EBX,EDX ;
jg Lnotfound ;
even ;
L15: lea EAX,[EBX + EDX] ; // EAX = low + high
// Do the string compare.
mov EDI,table ;
sar EAX,1 ; // mid = (low + high) >> 1
mov ESI,p ;
mov EDI,[4*EAX+EDI] ; // Load table[mid]
mov ECX,len ; // length of id
repe ;
cmpsb ;
je short L63 ; // return mid if equal
jns short L4D ; // if (cond < 0)
lea EDX,-1[EAX] ; // high = mid - 1
cmp EBX,EDX ;
jle L15 ;
Lnotfound:
mov EAX,-1 ; // Return -1.
even ;
L63: ;
}
}
else
{
int low = 0;
char cp = *p;
high--;
p++;
while (low <= high)
{
int mid = (low + high) >> 1;
int cond = table[mid][0] - cp;
if (cond == 0)
cond = strcmp(table[mid] + 1,p);
if (cond > 0)
high = mid - 1;
else if (cond < 0)
low = mid + 1;
else
return mid; /* match index */
}
return -1;
}
}
// search table[0 .. high] for p[0 .. len] (where p.length not necessairily equal to len)
int binary(const(char)* p, size_t len, const(char)** table, int high)
{
int low = 0;
char cp = *p;
high--;
p++;
len--;
while (low <= high)
{
int mid = (low + high) >> 1;
int cond = table[mid][0] - cp;
if (cond == 0)
{
cond = strncmp(table[mid] + 1, p, len);
if (cond == 0)
cond = table[mid][len+1]; // same as: if (table[mid][len+1] != '\0') cond = 1;
}
if (cond > 0)
high = mid - 1;
else if (cond < 0)
low = mid + 1;
else
return mid; /* match index */
}
return -1;
}
/**********************
* If c is a power of 2, return that power else -1.
*/
int ispow2(uint64_t c)
{ int i;
if (c == 0 || (c & (c - 1)))
i = -1;
else
for (i = 0; c >>= 1; i++)
{ }
return i;
}
/***************************
*/
enum UTIL_PH = true;
version (MEM_DEBUG)
enum MEM_DEBUG = false; //true;
else
enum MEM_DEBUG = false;
version (Windows)
{
void *util_malloc(uint n,uint size)
{
static if (MEM_DEBUG)
{
void *p;
p = mem_malloc(n * size);
//dbg_printf("util_calloc(%d) = %p\n",n * size,p);
return p;
}
else static if (UTIL_PH)
{
return ph_malloc(n * size);
}
else
{
size_t nbytes = cast(size_t)n * cast(size_t)size;
void *p = malloc(nbytes);
if (!p && nbytes)
err_nomem();
return p;
}
}
}
/***************************
*/
version (Windows)
{
void *util_calloc(uint n,uint size)
{
static if (MEM_DEBUG)
{
void *p;
p = mem_calloc(n * size);
//dbg_printf("util_calloc(%d) = %p\n",n * size,p);
return p;
}
else static if (UTIL_PH)
{
return ph_calloc(n * size);
}
else
{
size_t nbytes = cast(size_t) n * cast(size_t) size;
void *p = calloc(n,size);
if (!p && nbytes)
err_nomem();
return p;
}
}
}
/***************************
*/
version (Windows)
{
void util_free(void *p)
{
//dbg_printf("util_free(%p)\n",p);
static if (MEM_DEBUG)
{
mem_free(p);
}
else static if (UTIL_PH)
{
ph_free(p);
}
else
{
free(p);
}
}
}
/***************************
*/
version (Windows)
{
void *util_realloc(void *oldp,uint n,uint size)
{
static if (MEM_DEBUG)
{
//dbg_printf("util_realloc(%p,%d)\n",oldp,n * size);
return mem_realloc(oldp,n * size);
}
else static if (UTIL_PH)
{
return ph_realloc(oldp,n * size);
}
else
{
size_t nbytes = cast(size_t) n * cast(size_t) size;
void *p = realloc(oldp,nbytes);
if (!p && nbytes)
err_nomem();
return p;
}
}
}
/*****************************
*/
void *mem_malloc2(uint size)
{
return mem_malloc(size);
}
|
D
|
perceive (sound) via the auditory sense
get to know or become aware of, usually accidentally
examine or hear (evidence or a case) by judicial process
receive a communication from someone
listen and pay attention
|
D
|
instance CS_ESKORTE5(NPC_DEFAULT)
{
name[0] = "Эскорт5";
slot = "guard";
guild = GIL_GRD;
level = 5;
flags = 0;
voice = 11;
id = 3029;
attribute[ATR_STRENGTH] = 13;
attribute[ATR_DEXTERITY] = 9;
attribute[ATR_MANA_MAX] = 0;
attribute[ATR_MANA] = 0;
attribute[ATR_HITPOINTS_MAX] = 26;
attribute[ATR_HITPOINTS] = 26;
Mdl_SetVisual(self,"HUMANS.MDS");
Mdl_ApplyOverlayMds(self,"Humans_Militia.MDS");
Mdl_SetVisualBody(self,"hum_body_Naked0",0,1,"Hum_Head_Fighter",18,2,grd_armor_i);
b_scale(self);
Mdl_SetModelFatness(self,0);
fight_tactic = FAI_HUMAN_STRONG;
Npc_SetTalentSkill(self,NPC_TALENT_1H,2);
Npc_SetTalentSkill(self,NPC_TALENT_1H,2);
Npc_SetTalentSkill(self,NPC_TALENT_2H,1);
Npc_SetTalentSkill(self,NPC_TALENT_CROSSBOW,1);
daily_routine = rtn_start_3029;
};
func void rtn_start_3029()
{
ta_position(0,0,24,0,"WP_INTRO_WI01");
};
|
D
|
/**
* Example main entry point
*
* License:
* The MIT License (MIT)
*
* Copyright (c) 2015 Richard Andrew Cattermole
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
module main;
import dnetdev.webserver.runners.config;
import dnetdev.webserver.runners.cliargs;
import colorize : fg, cwriteln, color, style, mode;
import dlogg.strict;
int main(string[] args) {
import dnetdev.webserver.modules;
import core.memory : GC;
GC.disable; // make sure we do not do any hidden collections
bool doDefaultSetup;
if (args.length > 1 && args[1].length > 1 && args[1][0] != '-') {
try {
ModLoader!WebServerModuleInterface loader;
size_t id = loader.load("webserverd_" ~ args[1] ~ "_ui.dll");
int errorCode;
doDefaultSetup = loader[id].onUIRequest(args.length > 2 ? args[2 .. $] : null, errorCode);
if (errorCode != 0)
return errorCode;
loader.unload(id);
} catch(Exception e) {
}
}
if (cliArgs(args) || doDefaultSetup) {
/// logging
if (logFile == "") {
import std.conv : text;
import std.process : thisProcessID;
version(Windows) logFile = "C:\\webserver_PID_" ~ text(thisProcessID()) ~ ".log";
else logFile = "webserver_PID_" ~ text(thisProcessID()) ~ ".log";
}
logger = new shared StrictLogger(logFile);
/// actual init stuff
if (runMode == RunMode.Independent) {
import dnetdev.webserver.runners.independent : initializeByVibeIndepenent;
initializeByVibeIndepenent;
return 0; // ran correctly
} else if (runMode == RunMode.Daemon) {
version(OSX) {
assert(0); // should NEVER be hit
} else {
import dnetdev.webserver.runners.daemon : initializeAsDaemon;
initializeAsDaemon;
return 0;
}
} else if (runMode == RunMode.DaemonDo) {
version(OSX) {
assert(0); // should NEVER be hit
} else {
import dnetdev.webserver.runners.daemon;
try {
if (daemonDo == "reload")
clientSend(logger, ReloadConfigs);
else if (daemonDo == "stop")
clientSend(logger, Signal.Stop);
else if (daemonDo == "gcreset")
clientSend(logger, ResetGC);
else if (daemonDo == "uninstall") {
version(Windows) {
daemonClient.uninstall(logger);
} else {
assert(0); // should NEVER be hit
}
} else
assert(0); // should NEVER be hit
return 0;
} catch(Exception e) {
cwriteln("Could not send signal to service: ".color(fg.red).style(mode.bold), e.msg);
return -2;
}
}
} else if (runMode == RunMode.FastCGI) {
import dnetdev.webserver.runners.fastcgi : initializeAsFastCGIClient;
initializeAsFastCGIClient;
return 0; // ran correctly
} else {
assert(0); // should NEVER be hit
}
} else {
return -1; // invalid args
}
}
|
D
|
a column of wood or steel or concrete that is driven into the ground to provide support for a structure
one of two stout poles with foot rests in the middle
long-legged three-toed wading bird of brackish marshes of Australia
long-legged three-toed black-and-white wading bird of inland ponds and marshes or brackish lagoons
|
D
|
/Users/dali/Documents/GitHub/rustlings/target/release/deps/parking_lot-85f84a60f3e6eac5.rmeta: /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/lib.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/condvar.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/elision.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/fair_mutex.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/mutex.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/once.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/raw_fair_mutex.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/raw_mutex.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/raw_rwlock.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/remutex.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/rwlock.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/util.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/deadlock.rs
/Users/dali/Documents/GitHub/rustlings/target/release/deps/libparking_lot-85f84a60f3e6eac5.rlib: /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/lib.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/condvar.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/elision.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/fair_mutex.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/mutex.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/once.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/raw_fair_mutex.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/raw_mutex.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/raw_rwlock.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/remutex.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/rwlock.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/util.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/deadlock.rs
/Users/dali/Documents/GitHub/rustlings/target/release/deps/parking_lot-85f84a60f3e6eac5.d: /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/lib.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/condvar.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/elision.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/fair_mutex.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/mutex.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/once.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/raw_fair_mutex.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/raw_mutex.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/raw_rwlock.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/remutex.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/rwlock.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/util.rs /Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/deadlock.rs
/Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/lib.rs:
/Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/condvar.rs:
/Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/elision.rs:
/Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/fair_mutex.rs:
/Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/mutex.rs:
/Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/once.rs:
/Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/raw_fair_mutex.rs:
/Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/raw_mutex.rs:
/Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/raw_rwlock.rs:
/Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/remutex.rs:
/Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/rwlock.rs:
/Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/util.rs:
/Users/dali/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/parking_lot-0.11.1/src/deadlock.rs:
|
D
|
/home/mailboxhead/Documents/Practice/rust/itemRestAPI/target/rls/debug/build/num-traits-a25172b68222f80a/build_script_build-a25172b68222f80a: /home/mailboxhead/.cargo/registry/src/github.com-1ecc6299db9ec823/num-traits-0.2.8/build.rs
/home/mailboxhead/Documents/Practice/rust/itemRestAPI/target/rls/debug/build/num-traits-a25172b68222f80a/build_script_build-a25172b68222f80a.d: /home/mailboxhead/.cargo/registry/src/github.com-1ecc6299db9ec823/num-traits-0.2.8/build.rs
/home/mailboxhead/.cargo/registry/src/github.com-1ecc6299db9ec823/num-traits-0.2.8/build.rs:
|
D
|
module herktarertragsregelungswerte;
enum herw {
PW = 105,
QW = 105,
LW = 150,
DW = 150,
GW = 200
}
|
D
|
/Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Intermediates.noindex/CryptoLive.build/Debug-iphonesimulator/CryptoLive.build/Objects-normal/x86_64/HistoricDataModel.o : /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/CoinAPI.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/CAGradientLayer+Convenience.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/AppDelegate.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/Network.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/HistoricDataModel.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/CurrencyModel.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/CrytoCurrencyModelCell.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/FavouritesTableViewCell.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/CryptoCurrencyModelCellProtocol.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/FavouriteCurrencyCellProtocol.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/DatabaseManager.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/ViewController.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/ProfileViewController.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/CurrencyDetailViewController.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/FavouritesViewController.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/AboutUs.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/FavouriteCurrency.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Modules/Fusuma.swiftmodule/x86_64.swiftmodule /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/LTMorphingLabel/LTMorphingLabel.framework/Modules/LTMorphingLabel.swiftmodule/x86_64.swiftmodule /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/GearRefreshControl/GearRefreshControl.framework/Modules/GearRefreshControl.swiftmodule/x86_64.swiftmodule /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/FaveButton/FaveButton.framework/Modules/FaveButton.swiftmodule/x86_64.swiftmodule /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Charts/Charts.framework/Modules/Charts.swiftmodule/x86_64.swiftmodule /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Modules/RealmSwift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/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/CoreLocation.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/AVFoundation.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/CoreAudio.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/Photos.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/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Headers/Fusuma-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/LTMorphingLabel/LTMorphingLabel.framework/Headers/LTMorphingLabel-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/GearRefreshControl/GearRefreshControl.framework/Headers/GearRefreshControl-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/FaveButton/FaveButton.framework/Headers/FaveButton-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Charts/Charts.framework/Headers/Charts-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Headers/RealmSwift-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSchema.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObjectSchema.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObjectBase_Dynamic.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealm_Dynamic.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealm+Sync.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealmConfiguration+Sync.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/NSError+RLMSync.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMThreadSafeReference.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObjectStore.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMOptionalBase.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObjectBase.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMListBase.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMSchema_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObjectSchema_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObjectBase_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMSyncUtil_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMRealm_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMSyncConfiguration_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMRealmConfiguration_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMCollection_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMResults_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObject_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMArray_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMProperty_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/LTMorphingLabel/LTMorphingLabel.framework/Headers/LTMorphingLabel.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncUtil.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/Realm.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealm.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMPlatform.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncSession.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermission.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMMigration.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncConfiguration.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealmConfiguration.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMCollection.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncManager.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncUser.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMAccessor.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncCredentials.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMResults.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMConstants.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObject.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Headers/Fusuma-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/LTMorphingLabel/LTMorphingLabel.framework/Headers/LTMorphingLabel-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/GearRefreshControl/GearRefreshControl.framework/Headers/GearRefreshControl-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/FaveButton/FaveButton.framework/Headers/FaveButton-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Charts/Charts.framework/Headers/Charts-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Headers/RealmSwift-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMArray.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMProperty.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/LTMorphingLabel/LTMorphingLabel.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/GearRefreshControl/GearRefreshControl.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/FaveButton/FaveButton.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Charts/Charts.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Modules/module.modulemap
/Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Intermediates.noindex/CryptoLive.build/Debug-iphonesimulator/CryptoLive.build/Objects-normal/x86_64/HistoricDataModel~partial.swiftmodule : /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/CoinAPI.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/CAGradientLayer+Convenience.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/AppDelegate.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/Network.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/HistoricDataModel.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/CurrencyModel.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/CrytoCurrencyModelCell.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/FavouritesTableViewCell.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/CryptoCurrencyModelCellProtocol.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/FavouriteCurrencyCellProtocol.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/DatabaseManager.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/ViewController.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/ProfileViewController.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/CurrencyDetailViewController.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/FavouritesViewController.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/AboutUs.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/FavouriteCurrency.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Modules/Fusuma.swiftmodule/x86_64.swiftmodule /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/LTMorphingLabel/LTMorphingLabel.framework/Modules/LTMorphingLabel.swiftmodule/x86_64.swiftmodule /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/GearRefreshControl/GearRefreshControl.framework/Modules/GearRefreshControl.swiftmodule/x86_64.swiftmodule /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/FaveButton/FaveButton.framework/Modules/FaveButton.swiftmodule/x86_64.swiftmodule /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Charts/Charts.framework/Modules/Charts.swiftmodule/x86_64.swiftmodule /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Modules/RealmSwift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/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/CoreLocation.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/AVFoundation.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/CoreAudio.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/Photos.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/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Headers/Fusuma-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/LTMorphingLabel/LTMorphingLabel.framework/Headers/LTMorphingLabel-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/GearRefreshControl/GearRefreshControl.framework/Headers/GearRefreshControl-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/FaveButton/FaveButton.framework/Headers/FaveButton-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Charts/Charts.framework/Headers/Charts-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Headers/RealmSwift-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSchema.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObjectSchema.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObjectBase_Dynamic.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealm_Dynamic.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealm+Sync.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealmConfiguration+Sync.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/NSError+RLMSync.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMThreadSafeReference.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObjectStore.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMOptionalBase.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObjectBase.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMListBase.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMSchema_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObjectSchema_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObjectBase_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMSyncUtil_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMRealm_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMSyncConfiguration_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMRealmConfiguration_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMCollection_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMResults_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObject_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMArray_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMProperty_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/LTMorphingLabel/LTMorphingLabel.framework/Headers/LTMorphingLabel.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncUtil.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/Realm.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealm.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMPlatform.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncSession.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermission.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMMigration.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncConfiguration.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealmConfiguration.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMCollection.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncManager.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncUser.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMAccessor.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncCredentials.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMResults.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMConstants.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObject.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Headers/Fusuma-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/LTMorphingLabel/LTMorphingLabel.framework/Headers/LTMorphingLabel-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/GearRefreshControl/GearRefreshControl.framework/Headers/GearRefreshControl-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/FaveButton/FaveButton.framework/Headers/FaveButton-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Charts/Charts.framework/Headers/Charts-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Headers/RealmSwift-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMArray.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMProperty.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/LTMorphingLabel/LTMorphingLabel.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/GearRefreshControl/GearRefreshControl.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/FaveButton/FaveButton.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Charts/Charts.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Modules/module.modulemap
/Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Intermediates.noindex/CryptoLive.build/Debug-iphonesimulator/CryptoLive.build/Objects-normal/x86_64/HistoricDataModel~partial.swiftdoc : /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/CoinAPI.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/CAGradientLayer+Convenience.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/AppDelegate.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/Network.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/HistoricDataModel.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/CurrencyModel.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/CrytoCurrencyModelCell.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/FavouritesTableViewCell.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/CryptoCurrencyModelCellProtocol.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/FavouriteCurrencyCellProtocol.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/DatabaseManager.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/ViewController.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/ProfileViewController.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/CurrencyDetailViewController.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/FavouritesViewController.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/AboutUs.swift /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/CryptoLive/FavouriteCurrency.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Modules/Fusuma.swiftmodule/x86_64.swiftmodule /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/LTMorphingLabel/LTMorphingLabel.framework/Modules/LTMorphingLabel.swiftmodule/x86_64.swiftmodule /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/GearRefreshControl/GearRefreshControl.framework/Modules/GearRefreshControl.swiftmodule/x86_64.swiftmodule /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/FaveButton/FaveButton.framework/Modules/FaveButton.swiftmodule/x86_64.swiftmodule /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Charts/Charts.framework/Modules/Charts.swiftmodule/x86_64.swiftmodule /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Modules/RealmSwift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/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/CoreLocation.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/AVFoundation.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/CoreAudio.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/Photos.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/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Headers/Fusuma-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/LTMorphingLabel/LTMorphingLabel.framework/Headers/LTMorphingLabel-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/GearRefreshControl/GearRefreshControl.framework/Headers/GearRefreshControl-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/FaveButton/FaveButton.framework/Headers/FaveButton-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Charts/Charts.framework/Headers/Charts-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Headers/RealmSwift-umbrella.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSchema.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObjectSchema.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObjectBase_Dynamic.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealm_Dynamic.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealm+Sync.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealmConfiguration+Sync.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/NSError+RLMSync.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMThreadSafeReference.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObjectStore.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMOptionalBase.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObjectBase.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMListBase.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMSchema_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObjectSchema_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObjectBase_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMSyncUtil_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMRealm_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMSyncConfiguration_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMRealmConfiguration_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMCollection_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMResults_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObject_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMArray_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMProperty_Private.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/LTMorphingLabel/LTMorphingLabel.framework/Headers/LTMorphingLabel.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncUtil.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/Realm.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealm.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMPlatform.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncSession.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermission.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMMigration.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncConfiguration.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealmConfiguration.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMCollection.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncManager.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncUser.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMAccessor.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncCredentials.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMResults.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMConstants.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObject.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Headers/Fusuma-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/LTMorphingLabel/LTMorphingLabel.framework/Headers/LTMorphingLabel-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/GearRefreshControl/GearRefreshControl.framework/Headers/GearRefreshControl-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/FaveButton/FaveButton.framework/Headers/FaveButton-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Charts/Charts.framework/Headers/Charts-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Headers/RealmSwift-Swift.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMArray.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMProperty.h /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/LTMorphingLabel/LTMorphingLabel.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/GearRefreshControl/GearRefreshControl.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/FaveButton/FaveButton.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/Charts/Charts.framework/Modules/module.modulemap /Users/Jaskeerat/Desktop/CryptoLive/CryptoLive/DerivedData/CryptoLive/Build/Products/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Modules/module.modulemap
|
D
|
instance VLK_6034_BUERGERIN(Npc_Default)
{
name[0] = NAME_Buergerin;
guild = GIL_VLK;
id = 6034;
voice = 16;
flags = 0;
npcType = NPCTYPE_AMBIENT;
aivar[AIV_ToughGuy] = TRUE;
B_SetAttributesToChapter(self,1);
level = 1;
fight_tactic = FAI_HUMAN_COWARD;
B_CreateAmbientInv(self);
EquipItem(self,ItMw_1h_Vlk_Dagger);
B_SetNpcVisual(self,FEMALE,"Hum_Head_Babe0",FaceBabe_N_HairAndCloth,BodyTex_N,ITAR_BauBabe_L);
Mdl_ApplyOverlayMds(self,"Humans_Babe.mds");
B_GiveNpcTalents(self);
B_SetFightSkills(self,30);
daily_routine = rtn_start_6034;
};
func void rtn_start_6034()
{
TA_Smoke_Joint(8,0,20,0,"OCR_CROWD_07");
TA_Sit_Bench(20,0,8,0,"NW_CITY_MERCHANT_CONCERTPUB_07");
};
func void rtn_tot_6034()
{
TA_Sit_Bench(8,0,20,0,"NW_CITY_MERCHANT_CONCERTPUB_07");
TA_Sit_Bench(20,0,8,0,"NW_CITY_MERCHANT_CONCERTPUB_07");
};
|
D
|
enum IsPathHandler(alias T) = is(PathHandler == typeof(T));
|
D
|
a native or inhabitant of Saudi Arabia
of or relating to Saudi Arabia or its people
|
D
|
module UnrealScript.TribesGame.TrAward_Kills_Midair;
import ScriptClasses;
import UnrealScript.Helpers;
import UnrealScript.TribesGame.TrAward;
extern(C++) interface TrAward_Kills_Midair : TrAward
{
public extern(D):
private static __gshared ScriptClass mStaticClass;
@property final static ScriptClass StaticClass() { mixin(MGSCC("Class TribesGame.TrAward_Kills_Midair")); }
private static __gshared TrAward_Kills_Midair mDefaultProperties;
@property final static TrAward_Kills_Midair DefaultProperties() { mixin(MGDPC("TrAward_Kills_Midair", "TrAward_Kills_Midair TribesGame.Default__TrAward_Kills_Midair")); }
}
|
D
|
/*
* Copyright (c) 2004-2009 Derelict Developers
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the names 'Derelict', 'DerelictGL', nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
module derelict.opengl.extension.nv.texture_shader2;
private
{
import derelict.opengl.gltypes;
import derelict.opengl.gl;
import derelict.util.wrapper;
}
private bool enabled = false;
struct NVTextureShader2
{
static bool load(char[] extString)
{
if(extString.findStr("GL_NV_texture_shader2") == -1)
return false;
enabled = true;
return true;
}
static bool isEnabled()
{
return enabled;
}
}
version(DerelictGL_NoExtensionLoaders)
{
}
else
{
static this()
{
DerelictGL.registerExtensionLoader(&NVTextureShader2.load);
}
}
enum : GLenum
{
GL_DOT_PRODUCT_TEXTURE_3D_NV = 0x86EF
}
|
D
|
a toxic colorless flammable liquid organic base with a disagreeable odor
|
D
|
of or relating to a combinatorial system devised by George Boole that combines propositions with the logical operators AND and OR and IF THEN and EXCEPT and NOT
|
D
|
instance SEK_8012_TALAS(Npc_Default)
{
name[0] = "Talas";
guild = GIL_SEK;
id = 8012;
voice = 13;
flags = 0;
npcType = npctype_main;
B_SetAttributesToChapter(self,3);
level = 1;
fight_tactic = FAI_HUMAN_COWARD;
EquipItem(self,ItMw_1h_Vlk_Axe);
B_CreateAmbientInv(self);
B_SetNpcVisual(self,MALE,"Hum_Head_FatBald",FACE_N_TALAS,BodyTex_N,itar_slp_ul);
Mdl_ApplyOverlayMds(self,"Humans_Relaxed.mds");
B_GiveNpcTalents(self);
B_SetFightSkills(self,40);
daily_routine = rtn_start_8012;
};
func void rtn_start_8012()
{
TA_Stand_ArmsCrossed(9,0,20,0,"NW_PSICAMP_TALAS");
TA_Sit_Bench(20,0,9,0,"NW_PSICAMP_TALAS_SIT");
};
func void rtn_campon_8012()
{
TA_Stand_Guarding(9,0,23,0,"NW_BIGFARM_CAMPON_PSI_16");
TA_Stand_Guarding(23,0,9,0,"NW_BIGFARM_CAMPON_PSI_16");
};
func void rtn_inbattle_8012()
{
ta_bigfight(8,0,22,0,"NW_BIGFIGHT_8621");
ta_bigfight(22,0,8,0,"NW_BIGFIGHT_8621");
};
|
D
|
/*
* par2.d
*
* This module implements the par2 standard, which describes parity volume
* sets.
*
* Author: Dave Wilkinson
* Originated: June 9th, 2009
* References: http://www.par2.net/par2spec.php
*
*/
module codecs.binary.par2;
import core.endian;
import core.literals;
import interfaces.stream;
import codecs.binary.codec;
private {
// States
enum {
PAR2_STATE_INIT,
}
align(4) struct Par2PacketHeader {
ubyte[8] magic; // Magic Sequence
ulong length; // Length of packet
ulong[2] hash; // 16 byte MD5 hash
ulong[2] recoverySetID; // 16 byte set ID
ubyte[16] type; // can be "anything"
// Body follows, aligned by 4 bytes
}
align(4) struct MainPacket {
ulong sliceSize; // must be a multiple of 4
uint numFiles; // number of files in recovery set
// Followed by dynamic list of file IDs (16 byte MD5 hashes)
// and following that a dynamic list of file IDs (again hashes)
// for the non-recovery set.
}
align(4) struct FileDescriptorPacket {
ulong[2] id; // 16 byte MD5 hash
ulong[2] hash; // 16 byte MD5 hash
ulong[2] subHash; // 16 byte MD5 hash of first 16kB of file
ulong length; // length of file
// Name (in ASCII) follows
}
align(4) struct SliceChecksumPacket {
ulong[2] fileID; // 16 byte MD5 hash
// An array of hashes and crc32 pairs follow for the slices of the
// file. The HASH/CRC pairs are in the same order as their
// respective slices in the file.
}
align(4) struct RecoverySlicePacket {
uint exponent; // exponent used to generate recovery data
// Follows is a byte array aligned to 4 that contains the
// recovery data
}
}
// Section: Codecs/Binary
// Description: This represents the Par2 Codec.
class Par2Codec : BinaryCodec {
StreamData decode(AbstractStream stream, AbstractStream toStream) {
for (;;) {
switch (decoderState) {
default: return StreamData.Invalid;
}
}
return StreamData.Invalid;
}
}
|
D
|
/Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/Build/Intermediates/ProtocolCodingDemo.build/Debug-iphonesimulator/ProtocolCodingDemo.build/Objects-normal/x86_64/HeaderTableViewCell.o : /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/Model/dataSource.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/AppDelegate.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/Model/globalModel.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/View/NormalTableViewCell.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/View/ThirdNormalTableViewCell.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/View/HeaderTableViewCell.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/View/CollectViewCell.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/ViewController.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/ViewController/NormalViewController.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/ViewController/CollectViewController.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/ViewController/HeaderMixViewController.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/tuikai/Desktop/swift实例/ProtocolCodingDemo/Build/Intermediates/ProtocolCodingDemo.build/Debug-iphonesimulator/ProtocolCodingDemo.build/Objects-normal/x86_64/HeaderTableViewCell~partial.swiftmodule : /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/Model/dataSource.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/AppDelegate.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/Model/globalModel.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/View/NormalTableViewCell.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/View/ThirdNormalTableViewCell.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/View/HeaderTableViewCell.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/View/CollectViewCell.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/ViewController.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/ViewController/NormalViewController.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/ViewController/CollectViewController.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/ViewController/HeaderMixViewController.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/tuikai/Desktop/swift实例/ProtocolCodingDemo/Build/Intermediates/ProtocolCodingDemo.build/Debug-iphonesimulator/ProtocolCodingDemo.build/Objects-normal/x86_64/HeaderTableViewCell~partial.swiftdoc : /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/Model/dataSource.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/AppDelegate.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/Model/globalModel.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/View/NormalTableViewCell.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/View/ThirdNormalTableViewCell.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/View/HeaderTableViewCell.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/View/CollectViewCell.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/ViewController.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/ViewController/NormalViewController.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/ViewController/CollectViewController.swift /Users/tuikai/Desktop/swift实例/ProtocolCodingDemo/ProtocolCodingDemo/ViewController/HeaderMixViewController.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
|
D
|
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
module vtkImageMask;
static import vtkd_im;
static import core.stdc.config;
static import std.conv;
static import std.string;
static import std.conv;
static import std.string;
static import vtkObjectBase;
static import vtkImageData;
static import vtkDataObject;
static import vtkThreadedImageAlgorithm;
class vtkImageMask : vtkThreadedImageAlgorithm.vtkThreadedImageAlgorithm {
private void* swigCPtr;
public this(void* cObject, bool ownCObject) {
super(vtkd_im.vtkImageMask_Upcast(cObject), ownCObject);
swigCPtr = cObject;
}
public static void* swigGetCPtr(vtkImageMask obj) {
return (obj is null) ? null : obj.swigCPtr;
}
mixin vtkd_im.SwigOperatorDefinitions;
public override void dispose() {
synchronized(this) {
if (swigCPtr !is null) {
if (swigCMemOwn) {
swigCMemOwn = false;
throw new object.Exception("C++ destructor does not have public access");
}
swigCPtr = null;
super.dispose();
}
}
}
public static vtkImageMask New() {
void* cPtr = vtkd_im.vtkImageMask_New();
vtkImageMask ret = (cPtr is null) ? null : new vtkImageMask(cPtr, false);
return ret;
}
public static int IsTypeOf(string type) {
auto ret = vtkd_im.vtkImageMask_IsTypeOf((type ? std.string.toStringz(type) : null));
return ret;
}
public static vtkImageMask SafeDownCast(vtkObjectBase.vtkObjectBase o) {
void* cPtr = vtkd_im.vtkImageMask_SafeDownCast(vtkObjectBase.vtkObjectBase.swigGetCPtr(o));
vtkImageMask ret = (cPtr is null) ? null : new vtkImageMask(cPtr, false);
return ret;
}
public vtkImageMask NewInstance() const {
void* cPtr = vtkd_im.vtkImageMask_NewInstance(cast(void*)swigCPtr);
vtkImageMask ret = (cPtr is null) ? null : new vtkImageMask(cPtr, false);
return ret;
}
alias vtkThreadedImageAlgorithm.vtkThreadedImageAlgorithm.NewInstance NewInstance;
public void SetMaskedOutputValue(int num, double* v) {
vtkd_im.vtkImageMask_SetMaskedOutputValue__SWIG_0(cast(void*)swigCPtr, num, cast(void*)v);
}
public void SetMaskedOutputValue(double v) {
vtkd_im.vtkImageMask_SetMaskedOutputValue__SWIG_1(cast(void*)swigCPtr, v);
}
public void SetMaskedOutputValue(double v1, double v2) {
vtkd_im.vtkImageMask_SetMaskedOutputValue__SWIG_2(cast(void*)swigCPtr, v1, v2);
}
public void SetMaskedOutputValue(double v1, double v2, double v3) {
vtkd_im.vtkImageMask_SetMaskedOutputValue__SWIG_3(cast(void*)swigCPtr, v1, v2, v3);
}
public double* GetMaskedOutputValue() {
auto ret = cast(double*)vtkd_im.vtkImageMask_GetMaskedOutputValue(cast(void*)swigCPtr);
return ret;
}
public int GetMaskedOutputValueLength() {
auto ret = vtkd_im.vtkImageMask_GetMaskedOutputValueLength(cast(void*)swigCPtr);
return ret;
}
public void SetMaskAlpha(double _arg) {
vtkd_im.vtkImageMask_SetMaskAlpha(cast(void*)swigCPtr, _arg);
}
public double GetMaskAlphaMinValue() {
auto ret = vtkd_im.vtkImageMask_GetMaskAlphaMinValue(cast(void*)swigCPtr);
return ret;
}
public double GetMaskAlphaMaxValue() {
auto ret = vtkd_im.vtkImageMask_GetMaskAlphaMaxValue(cast(void*)swigCPtr);
return ret;
}
public double GetMaskAlpha() {
auto ret = vtkd_im.vtkImageMask_GetMaskAlpha(cast(void*)swigCPtr);
return ret;
}
public void SetImageInputData(vtkImageData.vtkImageData arg0) {
vtkd_im.vtkImageMask_SetImageInputData(cast(void*)swigCPtr, vtkImageData.vtkImageData.swigGetCPtr(arg0));
}
public void SetMaskInputData(vtkImageData.vtkImageData arg0) {
vtkd_im.vtkImageMask_SetMaskInputData(cast(void*)swigCPtr, vtkImageData.vtkImageData.swigGetCPtr(arg0));
}
public void SetNotMask(int _arg) {
vtkd_im.vtkImageMask_SetNotMask(cast(void*)swigCPtr, _arg);
}
public int GetNotMask() {
auto ret = vtkd_im.vtkImageMask_GetNotMask(cast(void*)swigCPtr);
return ret;
}
public void NotMaskOn() {
vtkd_im.vtkImageMask_NotMaskOn(cast(void*)swigCPtr);
}
public void NotMaskOff() {
vtkd_im.vtkImageMask_NotMaskOff(cast(void*)swigCPtr);
}
public void SetInput1Data(vtkDataObject.vtkDataObject arg0) {
vtkd_im.vtkImageMask_SetInput1Data(cast(void*)swigCPtr, vtkDataObject.vtkDataObject.swigGetCPtr(arg0));
}
public void SetInput2Data(vtkDataObject.vtkDataObject arg0) {
vtkd_im.vtkImageMask_SetInput2Data(cast(void*)swigCPtr, vtkDataObject.vtkDataObject.swigGetCPtr(arg0));
}
}
|
D
|
/Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/WebSockets.build/Model/Fragmentation.swift.o : /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Communication/WebSocket+Send.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Model/Frame.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Connection/WebSockets+Hash.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Model/Fragmentation.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Serialization/FrameSerializer.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Serialization/FrameDeserializer.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Model/WebSocket+Error.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Communication/WebSocket+ControlFrames.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Serialization/WebSockets+Flags.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/WebSocketFormatErrors.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Connection/Headers+WebSockets.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Request+WebSockets.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Model/WebSocket.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Client/WebSocket+Client.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/URI.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/HTTP.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/TLS.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/libc.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Random.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Crypto.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Sockets.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Transport.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/CHTTP/include/http_parser.h /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/CHTTP.build/module.modulemap /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/CSQLite.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/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/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/WebSockets.build/Fragmentation~partial.swiftmodule : /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Communication/WebSocket+Send.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Model/Frame.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Connection/WebSockets+Hash.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Model/Fragmentation.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Serialization/FrameSerializer.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Serialization/FrameDeserializer.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Model/WebSocket+Error.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Communication/WebSocket+ControlFrames.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Serialization/WebSockets+Flags.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/WebSocketFormatErrors.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Connection/Headers+WebSockets.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Request+WebSockets.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Model/WebSocket.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Client/WebSocket+Client.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/URI.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/HTTP.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/TLS.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/libc.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Random.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Crypto.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Sockets.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Transport.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/CHTTP/include/http_parser.h /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/CHTTP.build/module.modulemap /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/CSQLite.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/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/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/WebSockets.build/Fragmentation~partial.swiftdoc : /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Communication/WebSocket+Send.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Model/Frame.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Connection/WebSockets+Hash.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Model/Fragmentation.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Serialization/FrameSerializer.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Serialization/FrameDeserializer.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Model/WebSocket+Error.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Communication/WebSocket+ControlFrames.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Serialization/WebSockets+Flags.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/WebSocketFormatErrors.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Connection/Headers+WebSockets.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Request+WebSockets.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Model/WebSocket.swift /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/WebSockets/Client/WebSocket+Client.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/URI.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/HTTP.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/TLS.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/libc.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Random.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Crypto.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Sockets.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/Transport.swiftmodule /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/engine.git-3311994267206676365/Sources/CHTTP/include/http_parser.h /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/CHTTP.build/module.modulemap /Users/AleixDiaz/Documents/VaporProject/HerokuChat/.build/x86_64-apple-macosx10.10/debug/CSQLite.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
|
D
|
/Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/.build/debug/Result.build/ResultProtocol.swift.o : /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/Result-3.2.3/Result/Result.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/Result-3.2.3/Result/ResultProtocol.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/.build/debug/CYaml.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule
/Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/.build/debug/Result.build/ResultProtocol~partial.swiftmodule : /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/Result-3.2.3/Result/Result.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/Result-3.2.3/Result/ResultProtocol.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/.build/debug/CYaml.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule
/Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/.build/debug/Result.build/ResultProtocol~partial.swiftdoc : /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/Result-3.2.3/Result/Result.swift /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/Packages/Result-3.2.3/Result/ResultProtocol.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Users/admin/Desktop/CuckooTest/Pods/Cuckoo/Generator/.build/debug/CYaml.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule
|
D
|
/************************************************************
* *
* This code was made with DedicateD's testgl.d file as a *
* base, and using their D ports of SDL and OpenGL, their *
* website is http://int19h.tamb.ru/ *
* *
* D language compiler is available for download at *
* http://www.digitalmars.com/d/dcompiler.html *
* *
* This code was created by Jeff Molofee '99 *
* *
* If you've found this code useful, please let me know. *
* *
* Visit Jeff at http://nehe.gamedev.net/ *
* *
* Code modified/ported to D programming language *
* by Garibaldi Pineda Garcia (ChaNoKiN) *
* chanok_lobo@hotmail.com *
* 2004 *
* *
************************************************************/
import SDL; // Import the SDL modules
import opengl; // Import the opengl module
import openglu; // Import the openglu module
import std.string; // Import string module
import std.c.stdio; // Import the C stdio modules
import std.random; // Import the random module
bit USE_DEPRECATED_OPENGLBLIT = false;
/* Number of stars */
const int NUM = 50;
/* Twinkling stars */
int twinkle = FALSE;
/* Define the star structure */
struct star
{
int r, g, b; /* Stars Color */
GLfloat dist; /* Stars Distance From Center */
GLfloat angle; /* Stars Current Angle */
}
star stars[NUM]; /* Make an array of size 'NUM' of stars */
GLfloat zoom = -15.0f; /* Viewing Distance Away From Stars */
GLfloat tilt = 90.0f; /* Tilt The View */
GLuint loop; /* General Loop Variable */
GLuint texture[1]; /* Storage For One Texture */
/* function to load in bitmap as a GL texture */
int LoadGLTextures( )
{
/* Status indicator */
int Status = FALSE;
/* Create storage space for the texture */
SDL_Surface *TextureImage[1];
/* Load The Bitmap, Check For Errors, If Bitmap's Not Found Quit */
if ( ( TextureImage[0] = SDL_LoadBMP( "data/star.bmp" ) ) != null )
{
/* Set the status to true */
Status = TRUE;
/* Create The Texture */
glGenTextures( 1, &texture[0] );
/* Load in texture */
/* Typical Texture Generation Using Data From The Bitmap */
glBindTexture( GL_TEXTURE_2D, texture[0] );
/* Linear Filtering */
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
/* Generate The Texture */
glTexImage2D( GL_TEXTURE_2D, 0, 3, TextureImage[0].w,
TextureImage[0].h, 0, GL_BGR_EXT,
GL_UNSIGNED_BYTE, TextureImage[0].pixels );
}
/* Free up any memory we may have used */
if ( TextureImage[0] )
SDL_FreeSurface( TextureImage[0] );
return Status;
}
/* function to handle key press events */
void handleKeyPress( SDL_keysym *keysym )
{
switch ( keysym.sym )
{
case SDLK_t:
/* 't' key was pressed
* this toggles the twinkling of the stars
*/
twinkle = !twinkle;
break;
case SDLK_UP:
/* Up arrow key was pressed
* this changes the tilt of the stars
*/
tilt -= 0.5f;
break;
case SDLK_DOWN:
/* Down arrow key was pressed
* this changes the tilt of the stars
*/
tilt += 0.5f;
break;
case SDLK_PAGEUP:
/* PageUp key was pressed
* zoom into the scene
*/
zoom -= 0.2f;
break;
case SDLK_PAGEDOWN:
/* PageDown key was pressed
* zoom out of the scene
*/
zoom += 0.2f;
break;
case SDLK_g: //If ctrl+g then loose/gain grab
if(keysym.mod & KMOD_CTRL)
HotKey_ToggleGrab();
break;
case SDLK_z: //if ctrl+z minimize
if(keysym.mod & KMOD_CTRL)
HotKey_Iconify();
break;
case SDLK_RETURN: //if alt+enter toggle fullscreen mode
if(keysym.mod & KMOD_ALT)
HotKey_ToggleFullScreen();
break;
default:
break;
}
return;
}
/*This function changes from windowed to fullscreen
mode and viceversa*/
void HotKey_ToggleFullScreen()
{
SDL_Surface *screen; //Make a surface pointer to screen
screen = SDL_GetVideoSurface(); //Get current video surface
if ( SDL_WM_ToggleFullScreen(screen) ) //If the toggle worked
{
printf("Toggled fullscreen mode - now %s\n", //print current window mode
(screen.flags & SDL_FULLSCREEN) ? "fullscrn" : "windowed");
}
else
{
printf("Unable to toggle fullscreen mode\n"); //else, just tell us we can't do it.
}
}
/* This function will keep the mouse pointer
"trapped" inside the GL window
*/
void HotKey_ToggleGrab()
{
SDL_GrabMode mode;
printf("Ctrl-G: toggling input grab!\n"); //Print the action taking place
mode = SDL_WM_GrabInput(SDL_GRAB_QUERY); //Check wether grab is on
if ( mode == SDL_GRAB_ON ) //Print previous grab mode status
{
printf("Grab was on\n");
}
else
{
printf("Grab was off\n");
}
mode = SDL_WM_GrabInput(!mode); //Change grab mode
if ( mode == SDL_GRAB_ON ) //Print current grab mode status
{
printf("Grab is now on\n");
}
else
{
printf("Grab is now off\n");
}
}
/* This will iconify or minimize the
GL window.
*/
void HotKey_Iconify()
{
printf("Ctrl-Z: iconifying window!\n"); //Print action
SDL_WM_IconifyWindow(); //Minimize
}
/*
Main Event Handling function
*/
int HandleEvent(SDL_Event *event)
{
int done; //used to check if we want to quit
done = 0; //state that we still want to go on
switch( event.type ) //Process events
{
case SDL_ACTIVEEVENT: //did we loose or gained input/mouse
//focus?
printf( "app %.*s ", event.active.gain ? "gain" : "lost" );
if ( event.active.state & SDL_APPACTIVE )
{
printf( "active " );
}
else if ( event.active.state & SDL_APPMOUSEFOCUS )
{
printf( "mouse " );
}
else if ( event.active.state & SDL_APPINPUTFOCUS )
{
printf( "input " );
}
printf( "focus\n" );
break;
case SDL_KEYDOWN: //Did we press any key
printf("key '%s' pressed\n",
SDL_GetKeyName(event.key.keysym.sym)); //Print which key was pressed
if ( event.key.keysym.sym == SDLK_ESCAPE ) //If Escape Key then quit
{
done = 1;
}
handleKeyPress( &event.key.keysym );
break;
case SDL_QUIT: //On quit event termnate loop
done = 1;
break;
default:
}
return(done);
}
void SDL_GL_Enter2DMode()
{
SDL_Surface *screen = SDL_GetVideoSurface(); //Get a pointer to video surface
/* Note, there may be other things you need to change,
depending on how you have your OpenGL state set up.
*/
glPushAttrib(GL_ENABLE_BIT); //Save current enables
glDisable(GL_DEPTH_TEST); //Disable depth test
glDisable(GL_CULL_FACE); //Disable face culling
glEnable(GL_TEXTURE_2D); //Enable 2D textures
glViewport(0, 0, screen.w, screen.h); //Set viewport
glMatrixMode(GL_PROJECTION);
glPushMatrix(); //Save projection matrix
glLoadIdentity(); //And reset it
glOrtho(0.0, cast(GLdouble)(screen.w), cast(GLdouble)(screen.h), 0.0, 0.0, 1.0);
//Set orthographic projection
glMatrixMode(GL_MODELVIEW);
glPushMatrix(); //Save modelview matrix
glLoadIdentity(); //Reset it
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
}
void SDL_GL_Leave2DMode()
{
glMatrixMode(GL_MODELVIEW); //Restore previous modelview matrix
glPopMatrix();
glMatrixMode(GL_PROJECTION); //Restore previous projection matrix
glPopMatrix();
glPopAttrib(); //Restore previous enables
}
bool CreateWindowGL(int w, int h, int bpp, Uint32 video_flags) // This Code Creates Our OpenGL Window
{
int value; //Used as a recipient for some info
int[3] rgb_size; //Used to save the number of Red, Green and
/* Initialize the display */ //Blue bits
switch (bpp)
{ //Asing how may bits we want to use
case 8: //depending of the bits per pixel
rgb_size[0] = 2; //passed as an argument to this function.
rgb_size[1] = 3;
rgb_size[2] = 3;
break;
case 15:
case 16:
rgb_size[0] = 5;
rgb_size[1] = 5;
rgb_size[2] = 5;
break;
default:
rgb_size[0] = 8;
rgb_size[1] = 8;
rgb_size[2] = 8;
break;
}
SDL_GL_SetAttribute( SDL_GL_RED_SIZE, rgb_size[0] ); //Try setting Red size (bits)
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, rgb_size[1] ); //Try setting Green size (bits)
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, rgb_size[2] ); //Try setting Blue size (bits)
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 ); //Try setting the depth buffer size (bits)
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); //Try setting a double buffer
if ( SDL_SetVideoMode( w, h, bpp, video_flags ) == null ) { //Try to set the video mode
printf("Couldn't set GL mode: %s\n", SDL_GetError()); //If it can't print error message
SDL_Quit(); //And then quit the app.
return false;
}
//Print the characteristics of our VideoSurface and OpenGL capabilities
printf("Screen BPP: %d\n", SDL_GetVideoSurface().format.BitsPerPixel);
printf("\n");
printf( "Vendor : %s\n", glGetString( GL_VENDOR ) );
printf( "Renderer : %s\n", glGetString( GL_RENDERER ) );
printf( "Version : %s\n", glGetString( GL_VERSION ) );
printf( "Extensions : %s\n", glGetString( GL_EXTENSIONS ) );
printf("\n");
//Print the OpenGL attributes, Red, Green and Blue bit sizes
//Depth buffer size and if we got a double buffer or not
SDL_GL_GetAttribute( SDL_GL_RED_SIZE, &value );
printf( "SDL_GL_RED_SIZE: requested %d, got %d\n", rgb_size[0],value);
SDL_GL_GetAttribute( SDL_GL_GREEN_SIZE, &value );
printf( "SDL_GL_GREEN_SIZE: requested %d, got %d\n", rgb_size[1],value);
SDL_GL_GetAttribute( SDL_GL_BLUE_SIZE, &value );
printf( "SDL_GL_BLUE_SIZE: requested %d, got %d\n", rgb_size[2],value);
SDL_GL_GetAttribute( SDL_GL_DEPTH_SIZE, &value );
printf( "SDL_GL_DEPTH_SIZE: requested %d, got %d\n", bpp, value );
SDL_GL_GetAttribute( SDL_GL_DOUBLEBUFFER, &value );
printf( "SDL_GL_DOUBLEBUFFER: requested 1, got %d\n", value );
//All went well, return true
return true;
}
void ReshapeGL(int width, int height) // Reshape The Window When It's Moved Or Resized
{
glViewport(0,0,cast(GLsizei)(width),cast(GLsizei)(height)); // Reset The Current Viewport
glMatrixMode(GL_PROJECTION); // Select The Projection Matrix
glLoadIdentity(); // Reset The Projection Matrix
gluPerspective(45.0f,(cast(GLfloat)width/cast(GLfloat)height),1.0f,100.0f); // Calculate The Aspect Ratio Of The Window
glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix
glLoadIdentity(); // Reset The Modelview Matrix
}
bool InitGL() // Any OpenGL Initialization Code Goes Here
{
/* Load in the texture */
if ( !LoadGLTextures( ) )
return false;
/* Enable Texture Mapping */
glEnable( GL_TEXTURE_2D );
/* Enable smooth shading */
glShadeModel( GL_SMOOTH );
/* Set the background black */
glClearColor( 0.0f, 0.0f, 0.0f, 0.0f );
/* Depth buffer setup */
glClearDepth( 1.0f );
/* Really Nice Perspective Calculations */
glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST );
/* Set The Blending Function For Translucency */
glBlendFunc( GL_SRC_ALPHA, GL_ONE );
/* Enable Blending */
glEnable( GL_BLEND );
/* Create A Loop That Goes Through All The Stars */
for ( loop = 0; loop < NUM; loop++ )
{
/* Start All The Stars At Angle Zero */
stars[loop].angle = 0.0f;
/* Calculate Distance From The Center */
stars[loop].dist = ( cast( float )loop / NUM ) * 5.0f;
/* Give star[loop] A Random Red Intensity */
stars[loop].r = rand( ) % 256;
/* Give star[loop] A Random Green Intensity */
stars[loop].g = rand( ) % 256;
/* Give star[loop] A Random Blue Intensity */
stars[loop].b = rand( ) % 256;
}
return true; // Return TRUE (Initialization Successful)
}
void Draw3D()
{
static int spin = 0;
/* Clear The Screen And The Depth Buffer */
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
/* Select Our Texture */
glBindTexture( GL_TEXTURE_2D, texture[0] );
glLoadIdentity( );
/* Loop Through All The Stars */
for ( loop = 0; loop < NUM; loop++ )
{
/* Reset The View Before We Draw Each Star */
glLoadIdentity( );
/* Zoom Into The Screen (Using The Value In 'zoom') */
glTranslatef( 0.0f, 0.0f, zoom );
/* Tilt The View (Using The Value In 'tilt') */
glRotatef( tilt, 1.0f, 0.0f, 0.0f );
/* Rotate To The Current Stars Angle */
glRotatef( stars[loop].angle, 0.0f, 1.0f, 0.0f );
/* Move Forward On The X Plane */
glTranslatef( stars[loop].dist, 0.0f, 0.0f );
/* Cancel The Current Stars Angle */
glRotatef( -stars[loop].angle, 0.0f, 1.0f, 0.0f );
/* Cancel The Screen Tilt */
glRotatef( -tilt, 1.0f, 0.0f, 0.0f );
/* Twinkling Stars Enabled */
if ( twinkle )
{
/* Assign A Color Using Bytes */
glColor4ub( stars[( NUM - loop ) - 1].r,
stars[( NUM - loop ) - 1].g,
stars[( NUM - loop ) - 1].b, 255 );
/* Begin Drawing The Textured Quad */
glBegin( GL_QUADS );
glTexCoord2f( 0.0f, 0.0f );
glVertex3f( -1.0f, -1.0f, 0.0f );
glTexCoord2f( 1.0f, 0.0f);
glVertex3f( 1.0f, -1.0f, 0.0f );
glTexCoord2f( 1.0f, 1.0f );
glVertex3f( 1.0f, 1.0f, 0.0f );
glTexCoord2f( 0.0f, 1.0f );
glVertex3f( -1.0f, 1.0f, 0.0f );
glEnd( );
}
/* Rotate The Star On The Z Axis */
glRotatef( spin, 0.0f, 0.0f, 1.0f );
/* Assign A Color Using Bytes */
glColor4ub( stars[loop].r, stars[loop].g, stars[loop].b, 255 );
/* Begin Drawing The Textured Quad */
glBegin( GL_QUADS );
glTexCoord2f( 0.0f, 0.0f ); glVertex3f( -1.0f, -1.0f, 0.0f );
glTexCoord2f( 1.0f, 0.0f ); glVertex3f( 1.0f, -1.0f, 0.0f );
glTexCoord2f( 1.0f, 1.0f ); glVertex3f( 1.0f, 1.0f, 0.0f );
glTexCoord2f( 0.0f, 1.0f ); glVertex3f( -1.0f, 1.0f, 0.0f );
glEnd( );
/* Used To Spin The Stars */
spin += 0.01f;
/* Changes The Angle Of A Star */
stars[loop].angle += cast( float )loop / NUM;
/* Changes The Distance Of A Star */
stars[loop].dist -= 0.01f;
/* Is The Star In The Middle Yet */
if ( stars[loop].dist < 0.0f )
{
/* Move The Star 5 Units From The Center */
stars[loop].dist += 5.0f;
/* Give It A New Red Value */
stars[loop].r = rand( ) % 256;
/* Give It A New Green Value */
stars[loop].g = rand( ) % 256;
/* Give It A New Blue Value */
stars[loop].b = rand( ) % 256;
}
}
glFlush(); // Flush The GL Rendering Pipelines
}
int main(char[][] argv)
{
int argc = argv.length; //Get the argument count
int i; //loop variable
int w = 640; //window width
int h = 480; //window heigth
int bpp = 24; //window bits per pixel
int done = 0; //variable to check if the app is ging on
int frames; //frame counting var
Uint32 start_time, this_time; //time storage variables
Uint32 video_flags; //video flags
if( SDL_Init( SDL_INIT_VIDEO ) < 0 ) //Try to init SDL
{
printf("Couldn't initialize SDL: %s\n",SDL_GetError());
return ( 1 ); //if we can't then just quit
}
/* Enable key repeat */
if ( ( SDL_EnableKeyRepeat( SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL ) ) )
{
printf("Setting keyboard repeat failed: %s\n", SDL_GetError( ) );
return 1;
}
/* See if we need to detect the display depth */
if ( bpp == 0 )
{
if ( SDL_GetVideoInfo().vfmt.BitsPerPixel <= 8 ) {
bpp = 8;
} else {
bpp = 16; /* More doesn't seem to work */
}
}
SDL_VideoInfo *video_info = SDL_GetVideoInfo(); // this holds some info about our display
//video_info = SDL_GetVideoInfo(); // Fetch the video info
/* Set the flags we want to use for setting the video mode */
video_flags = SDL_OPENGL; // Enable OpenGL in SDL
video_flags |= SDL_GL_DOUBLEBUFFER; // Enable double buffering
video_flags |= SDL_HWPALETTE; // Store the palette in hardware
video_flags |= SDL_RESIZABLE; // Enable window resizing
/* This checks to see if surfaces can be stored in memory */
if ( video_info.hw_available )
video_flags |= SDL_HWSURFACE;
else
video_flags |= SDL_SWSURFACE;
/* This checks if hardware blits can be done */
if ( video_info.blit_hw )
video_flags |= SDL_HWACCEL;
/* Sets up OpenGL double buffering */
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
for ( i=1; i < argc; ++i ) { //If any of our args was "-fullscreen"
if ( strcmp(argv[1], "-fullscreen") == 0 ) { //add fullscrren mode to our video flags
video_flags |= SDL_FULLSCREEN;
}
}
CreateWindowGL(w, h, bpp, video_flags); //Create our OpenGL Window
SDL_WM_SetCaption( "NeHe Lesson 09", "Lesson 09" ); //Set the window manager title bar
ReshapeGL(w,h); //Set our viewport/perspective
InitGL(); //Set our OpengGL attributes
/* Loop until done. */
start_time = SDL_GetTicks(); //Get our starting time
frames = 0; //No frames have been rendered yet
while( !done )
{
GLenum gl_error; //OpenGL error storaging variable
char* sdl_error; //SDL error storaging variable
SDL_Event event; //SDL event storing variable
Draw3D(); //Draw our 3D Graphics
SDL_GL_SwapBuffers(); // And Swap The Buffers (We're Double-Buffering, Remember?)
gl_error = glGetError( ); //Check for OpenGL error conditions.
if( gl_error != GL_NO_ERROR ) {
printf("testgl: OpenGL error: %d\n", gl_error );//If we got OpenGL errors, print them
}
sdl_error = SDL_GetError( ); //Check for SDL error conditions.
if( sdl_error[0] != 0 ) {
printf("testgl: SDL error '%s'\n", sdl_error); //If we got DLL errors, print
SDL_ClearError(); //And deal with them
}
SDL_Delay( 1 ); //Set a delay, usefull on really fast Computers
while( SDL_PollEvent( &event ) ) //Check if there's a pending event.
{
done = HandleEvent(&event); //Handle them.
}
++frames; //Increase our frame count
}
/* Print out the frames per second */
this_time = SDL_GetTicks();
if ( this_time != start_time ) {
printf("%2.2f FPS\n",
(cast(float)(frames)/(this_time-start_time))*1000.0);
}
/* Destroy our GL context, etc. */
SDL_Quit( );
return(0);
return 0;
}
|
D
|
/home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Transport.build/Streams/Stream.swift.o : /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Streams/Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Streams/ReadableStream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Streams/WriteableStream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Streams/FoundationStream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Internet/ServerStream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Internet/InternetStream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Internet/ClientStream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Streams/StreamError.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Exports.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Internet/Port.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/Transport.build/Stream~partial.swiftmodule : /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Streams/Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Streams/ReadableStream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Streams/WriteableStream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Streams/FoundationStream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Internet/ServerStream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Internet/InternetStream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Internet/ClientStream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Streams/StreamError.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Exports.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Internet/Port.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/Transport.build/Stream~partial.swiftdoc : /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Streams/Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Streams/ReadableStream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Streams/WriteableStream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Streams/FoundationStream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Internet/ServerStream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Internet/InternetStream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Internet/ClientStream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Streams/StreamError.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Exports.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/sockets.git-1550083001277339713/Sources/Transport/Internet/Port.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
|
/**
* The exception module defines all system-level exceptions and provides a
* mechanism to alter system-level error handling.
*
* Copyright: Copyright Sean Kelly 2005 - 2013.
* License: Distributed under the
* $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0).
* (See accompanying file LICENSE)
* Authors: Sean Kelly and Jonathan M Davis
* Source: $(DRUNTIMESRC core/_exception.d)
*/
module core.exception;
import core.stdc.stdio;
/**
* Thrown on a range error.
*/
class RangeError : Error
{
@safe pure nothrow this( string file = __FILE__, size_t line = __LINE__, Throwable next = null )
{
super( "Range violation", file, line, next );
}
}
unittest
{
{
auto re = new RangeError();
assert(re.file == __FILE__);
assert(re.line == __LINE__ - 2);
assert(re.next is null);
assert(re.msg == "Range violation");
}
{
auto re = new RangeError("hello", 42, new Exception("It's an Exception!"));
assert(re.file == "hello");
assert(re.line == 42);
assert(re.next !is null);
assert(re.msg == "Range violation");
}
}
/**
* Thrown on an assert error.
*/
class AssertError : Error
{
@safe pure nothrow this( string file, size_t line )
{
this(cast(Throwable)null, file, line);
}
@safe pure nothrow this( Throwable next, string file = __FILE__, size_t line = __LINE__ )
{
this( "Assertion failure", file, line, next);
}
@safe pure nothrow this( string msg, string file = __FILE__, size_t line = __LINE__, Throwable next = null )
{
super( msg, file, line, next );
}
}
unittest
{
{
auto ae = new AssertError("hello", 42);
assert(ae.file == "hello");
assert(ae.line == 42);
assert(ae.next is null);
assert(ae.msg == "Assertion failure");
}
{
auto ae = new AssertError(new Exception("It's an Exception!"));
assert(ae.file == __FILE__);
assert(ae.line == __LINE__ - 2);
assert(ae.next !is null);
assert(ae.msg == "Assertion failure");
}
{
auto ae = new AssertError(new Exception("It's an Exception!"), "hello", 42);
assert(ae.file == "hello");
assert(ae.line == 42);
assert(ae.next !is null);
assert(ae.msg == "Assertion failure");
}
{
auto ae = new AssertError("msg");
assert(ae.file == __FILE__);
assert(ae.line == __LINE__ - 2);
assert(ae.next is null);
assert(ae.msg == "msg");
}
{
auto ae = new AssertError("msg", "hello", 42);
assert(ae.file == "hello");
assert(ae.line == 42);
assert(ae.next is null);
assert(ae.msg == "msg");
}
{
auto ae = new AssertError("msg", "hello", 42, new Exception("It's an Exception!"));
assert(ae.file == "hello");
assert(ae.line == 42);
assert(ae.next !is null);
assert(ae.msg == "msg");
}
}
/**
* Thrown on finalize error.
*/
class FinalizeError : Error
{
ClassInfo info;
@safe pure nothrow this( ClassInfo ci, Throwable next, string file = __FILE__, size_t line = __LINE__ )
{
this(ci, file, line, next);
}
@safe pure nothrow this( ClassInfo ci, string file = __FILE__, size_t line = __LINE__, Throwable next = null )
{
super( "Finalization error", file, line, next );
info = ci;
}
@safe override const string toString()
{
return "An exception was thrown while finalizing an instance of class " ~ info.name;
}
}
unittest
{
ClassInfo info = new ClassInfo;
info.name = "testInfo";
{
auto fe = new FinalizeError(info);
assert(fe.file == __FILE__);
assert(fe.line == __LINE__ - 2);
assert(fe.next is null);
assert(fe.msg == "Finalization error");
assert(fe.info == info);
}
{
auto fe = new FinalizeError(info, new Exception("It's an Exception!"));
assert(fe.file == __FILE__);
assert(fe.line == __LINE__ - 2);
assert(fe.next !is null);
assert(fe.msg == "Finalization error");
assert(fe.info == info);
}
{
auto fe = new FinalizeError(info, "hello", 42);
assert(fe.file == "hello");
assert(fe.line == 42);
assert(fe.next is null);
assert(fe.msg == "Finalization error");
assert(fe.info == info);
}
{
auto fe = new FinalizeError(info, "hello", 42, new Exception("It's an Exception!"));
assert(fe.file == "hello");
assert(fe.line == 42);
assert(fe.next !is null);
assert(fe.msg == "Finalization error");
assert(fe.info == info);
}
}
/**
* Thrown on hidden function error.
*/
class HiddenFuncError : Error
{
@safe pure nothrow this( ClassInfo ci )
{
super( "Hidden method called for " ~ ci.name );
}
}
unittest
{
ClassInfo info = new ClassInfo;
info.name = "testInfo";
{
auto hfe = new HiddenFuncError(info);
assert(hfe.next is null);
assert(hfe.msg == "Hidden method called for testInfo");
}
}
/**
* Thrown on an out of memory error.
*/
class OutOfMemoryError : Error
{
@safe pure nothrow this(string file = __FILE__, size_t line = __LINE__, Throwable next = null )
{
super( "Memory allocation failed", file, line, next );
}
@trusted override const string toString()
{
return msg.ptr ? (cast()super).toString() : "Memory allocation failed";
}
}
unittest
{
{
auto oome = new OutOfMemoryError();
assert(oome.file == __FILE__);
assert(oome.line == __LINE__ - 2);
assert(oome.next is null);
assert(oome.msg == "Memory allocation failed");
}
{
auto oome = new OutOfMemoryError("hello", 42, new Exception("It's an Exception!"));
assert(oome.file == "hello");
assert(oome.line == 42);
assert(oome.next !is null);
assert(oome.msg == "Memory allocation failed");
}
}
/**
* Thrown on an invalid memory operation.
*
* An invalid memory operation error occurs in circumstances when the garbage
* collector has detected an operation it cannot reliably handle. The default
* D GC is not re-entrant, so this can happen due to allocations done from
* within finalizers called during a garbage collection cycle.
*/
class InvalidMemoryOperationError : Error
{
@safe pure nothrow this(string file = __FILE__, size_t line = __LINE__, Throwable next = null )
{
super( "Invalid memory operation", file, line, next );
}
@trusted override const string toString()
{
return msg.ptr ? (cast()super).toString() : "Invalid memory operation";
}
}
unittest
{
{
auto oome = new InvalidMemoryOperationError();
assert(oome.file == __FILE__);
assert(oome.line == __LINE__ - 2);
assert(oome.next is null);
assert(oome.msg == "Invalid memory operation");
}
{
auto oome = new InvalidMemoryOperationError("hello", 42, new Exception("It's an Exception!"));
assert(oome.file == "hello");
assert(oome.line == 42);
assert(oome.next !is null);
assert(oome.msg == "Invalid memory operation");
}
}
/**
* Thrown on a switch error.
*/
class SwitchError : Error
{
@safe pure nothrow this( string file = __FILE__, size_t line = __LINE__, Throwable next = null )
{
super( "No appropriate switch clause found", file, line, next );
}
}
unittest
{
{
auto se = new SwitchError();
assert(se.file == __FILE__);
assert(se.line == __LINE__ - 2);
assert(se.next is null);
assert(se.msg == "No appropriate switch clause found");
}
{
auto se = new SwitchError("hello", 42, new Exception("It's an Exception!"));
assert(se.file == "hello");
assert(se.line == 42);
assert(se.next !is null);
assert(se.msg == "No appropriate switch clause found");
}
}
/**
* Thrown on a unicode conversion error.
*/
class UnicodeException : Exception
{
size_t idx;
this( string msg, size_t idx, string file = __FILE__, size_t line = __LINE__, Throwable next = null ) @safe pure nothrow
{
super( msg, file, line, next );
this.idx = idx;
}
}
unittest
{
{
auto ue = new UnicodeException("msg", 2);
assert(ue.file == __FILE__);
assert(ue.line == __LINE__ - 2);
assert(ue.next is null);
assert(ue.msg == "msg");
assert(ue.idx == 2);
}
{
auto ue = new UnicodeException("msg", 2, "hello", 42, new Exception("It's an Exception!"));
assert(ue.file == "hello");
assert(ue.line == 42);
assert(ue.next !is null);
assert(ue.msg == "msg");
assert(ue.idx == 2);
}
}
///////////////////////////////////////////////////////////////////////////////
// Overrides
///////////////////////////////////////////////////////////////////////////////
// NOTE: One assert handler is used for all threads. Thread-local
// behavior should occur within the handler itself. This delegate
// is __gshared for now based on the assumption that it will only
// set by the main thread during program initialization.
private __gshared AssertHandler _assertHandler = null;
/**
Gets/sets assert hander. null means the default handler is used.
*/
alias AssertHandler = void function(string file, size_t line, string msg) nothrow;
/// ditto
@property AssertHandler assertHandler() @trusted nothrow
{
return _assertHandler;
}
/// ditto
@property void assertHandler(AssertHandler handler) @trusted nothrow
{
_assertHandler = handler;
}
/**
* Overrides the default assert hander with a user-supplied version.
* $(RED Deprecated.
* Please use $(LREF assertHandler) instead.)
*
* Params:
* h = The new assert handler. Set to null to use the default handler.
*/
deprecated void setAssertHandler( AssertHandler h ) @trusted nothrow
{
assertHandler = h;
}
///////////////////////////////////////////////////////////////////////////////
// Overridable Callbacks
///////////////////////////////////////////////////////////////////////////////
/**
* A callback for assert errors in D. The user-supplied assert handler will
* be called if one has been supplied, otherwise an AssertError will be thrown.
*
* Params:
* file = The name of the file that signaled this error.
* line = The line number on which this error occurred.
*/
extern (C) void onAssertError( string file = __FILE__, size_t line = __LINE__ ) nothrow
{
if( _assertHandler is null )
throw new AssertError( file, line );
_assertHandler( file, line, null);
}
/**
* A callback for assert errors in D. The user-supplied assert handler will
* be called if one has been supplied, otherwise an AssertError will be thrown.
*
* Params:
* file = The name of the file that signaled this error.
* line = The line number on which this error occurred.
* msg = An error message supplied by the user.
*/
extern (C) void onAssertErrorMsg( string file, size_t line, string msg ) nothrow
{
if( _assertHandler is null )
throw new AssertError( msg, file, line );
_assertHandler( file, line, msg );
}
/**
* A callback for unittest errors in D. The user-supplied unittest handler
* will be called if one has been supplied, otherwise the error will be
* written to stderr.
*
* Params:
* file = The name of the file that signaled this error.
* line = The line number on which this error occurred.
* msg = An error message supplied by the user.
*/
extern (C) void onUnittestErrorMsg( string file, size_t line, string msg ) nothrow
{
onAssertErrorMsg( file, line, msg );
}
///////////////////////////////////////////////////////////////////////////////
// Internal Error Callbacks
///////////////////////////////////////////////////////////////////////////////
/**
* A callback for array bounds errors in D. A RangeError will be thrown.
*
* Params:
* file = The name of the file that signaled this error.
* line = The line number on which this error occurred.
*
* Throws:
* RangeError.
*/
extern (C) void onRangeError( string file = __FILE__, size_t line = __LINE__ ) @safe pure nothrow
{
throw new RangeError( file, line, null );
}
/**
* A callback for finalize errors in D. A FinalizeError will be thrown.
*
* Params:
* info = The ClassInfo instance for the object that failed finalization.
* e = The exception thrown during finalization.
* file = The name of the file that signaled this error.
* line = The line number on which this error occurred.
*
* Throws:
* FinalizeError.
*/
extern (C) void onFinalizeError( ClassInfo info, Exception e, string file = __FILE__, size_t line = __LINE__ ) @safe pure nothrow
{
throw new FinalizeError( info, file, line, e );
}
/**
* A callback for hidden function errors in D. A HiddenFuncError will be
* thrown.
*
* Throws:
* HiddenFuncError.
*/
extern (C) void onHiddenFuncError( Object o ) @safe pure nothrow
{
throw new HiddenFuncError( typeid(o) );
}
/**
* A callback for out of memory errors in D. An OutOfMemoryError will be
* thrown.
*
* Throws:
* OutOfMemoryError.
*/
extern (C) void onOutOfMemoryError() @trusted pure nothrow
{
// NOTE: Since an out of memory condition exists, no allocation must occur
// while generating this object.
throw cast(OutOfMemoryError) cast(void*) typeid(OutOfMemoryError).init;
}
/**
* A callback for invalid memory operations in D. An
* InvalidMemoryOperationError will be thrown.
*
* Throws:
* InvalidMemoryOperationError.
*/
extern (C) void onInvalidMemoryOperationError() @trusted pure nothrow
{
// The same restriction applies as for onOutOfMemoryError. The GC is in an
// undefined state, thus no allocation must occur while generating this object.
throw cast(InvalidMemoryOperationError)
cast(void*) typeid(InvalidMemoryOperationError).init;
}
/**
* A callback for switch errors in D. A SwitchError will be thrown.
*
* Params:
* file = The name of the file that signaled this error.
* line = The line number on which this error occurred.
*
* Throws:
* SwitchError.
*/
extern (C) void onSwitchError( string file = __FILE__, size_t line = __LINE__ ) @safe pure nothrow
{
throw new SwitchError( file, line, null );
}
/**
* A callback for unicode errors in D. A UnicodeException will be thrown.
*
* Params:
* msg = Information about the error.
* idx = String index where this error was detected.
* file = The name of the file that signaled this error.
* line = The line number on which this error occurred.
*
* Throws:
* UnicodeException.
*/
extern (C) void onUnicodeError( string msg, size_t idx, string file = __FILE__, size_t line = __LINE__ ) @safe pure
{
throw new UnicodeException( msg, idx, file, line );
}
/***********************************
* These functions must be defined for any D program linked
* against this library.
*/
/+
extern (C) void onAssertError(string file, size_t line);
extern (C) void onAssertErrorMsg(string file, size_t line, string msg);
extern (C) void onUnittestErrorMsg(string file, size_t line, string msg);
extern (C) void onRangeError(string file, size_t line);
extern (C) void onHiddenFuncError(Object o);
extern (C) void onSwitchError(string file, size_t line);
+/
/***********************************
* Function calls to these are generated by the compiler and inserted into
* the object code.
*/
extern (C)
{
// Use ModuleInfo to get file name for "m" versions
/* One of these three is called upon an assert() fail.
*/
void _d_assertm(ModuleInfo* m, uint line)
{
onAssertError(m.name, line);
}
void _d_assert_msg(string msg, string file, uint line)
{
onAssertErrorMsg(file, line, msg);
}
void _d_assert(string file, uint line)
{
onAssertError(file, line);
}
/* One of these three is called upon an assert() fail inside of a unittest block
*/
void _d_unittestm(ModuleInfo* m, uint line)
{
_d_unittest(m.name, line);
}
void _d_unittest_msg(string msg, string file, uint line)
{
onUnittestErrorMsg(file, line, msg);
}
void _d_unittest(string file, uint line)
{
_d_unittest_msg("unittest failure", file, line);
}
/* Called when an array index is out of bounds
*/
void _d_array_bounds(ModuleInfo* m, uint line)
{
onRangeError(m.name, line);
}
void _d_arraybounds(string file, uint line)
{
onRangeError(file, line);
}
/* Called when a switch statement has no DefaultStatement, yet none of the cases match
*/
void _d_switch_errorm(ModuleInfo* m, uint line)
{
onSwitchError(m.name, line);
}
void _d_switch_error(string file, uint line)
{
onSwitchError(file, line);
}
version (GNU)
{
void _d_hidden_func(Object o)
{
onHiddenFuncError(o);
}
}
else
{
void _d_hidden_func()
{
Object o;
version(D_InlineAsm_X86)
asm
{
mov o, EAX;
}
else version(D_InlineAsm_X86_64)
asm
{
mov o, RDI;
}
else
static assert(0, "unknown os");
onHiddenFuncError(o);
}
}
}
|
D
|
// Copyright Michael D. Parker 2018.
// 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 bindbc.freeimage;
public import bindbc.freeimage.types;
version(BindBC_Static) version = BindFI_Static;
version(BindFI_Static) public import bindbc.freeimage.bindstatic;
else public import bindbc.freeimage.binddynamic;
|
D
|
instance VLK_425_Regis(Npc_Default)
{
name[0] = "Регис";
guild = GIL_NONE;
id = 425;
voice = 13;
flags = 0;
npcType = npctype_main;
B_SetAttributesToChapter(self,5);
aivar[AIV_ToughGuy] = TRUE;
fight_tactic = FAI_HUMAN_STRONG;
EquipItem(self,ItMw_1h_Vlk_Sword);
B_CreateAmbientInv(self);
B_SetNpcVisual(self,MALE,"Hum_Head_Bald",Face_N_Mordrag,BodyTex_N,ITAR_Vlk_L);
Mdl_SetModelFatness(self,0);
Mdl_ApplyOverlayMds(self,"Humans_Relaxed.mds");
B_GiveNpcTalents(self);
B_SetFightSkills(self,30);
daily_routine = Rtn_Start_425;
};
func void Rtn_Start_425()
{
TA_Sit_Bench(5,30,12,0,"NW_CITY_REGIS");
TA_Sit_Chair(12,0,16,0,"NW_CITY_TAVERN_IN_04");
TA_Sit_Bench(16,0,20,30,"NW_CITY_REGIS");
TA_Smalltalk(20,30,0,30,"NW_CITY_MERCHANT_PATH_14_A");
TA_Sit_Chair(0,30,5,30,"NW_CITY_TAVERN_IN_08");
};
|
D
|
# FIXED
grlib/msp-exp432p401r_grlib_example/fonts/fontcmtt48.obj: ../grlib/msp-exp432p401r_grlib_example/fonts/fontcmtt48.c
../grlib/msp-exp432p401r_grlib_example/fonts/fontcmtt48.c:
|
D
|
with hope
it is hoped
|
D
|
/**
* Windows API header module
*
* Translated from MinGW Windows headers
*
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
* Source: $(DRUNTIMESRC core/sys/windows/_winerror.d)
*/
module core.sys.windows.winerror;
version (Windows):
/* Comments from the Mingw header:
* WAIT_TIMEOUT is also defined in winbase.h
*/
import core.sys.windows.windef;
alias int SCODE; // was in core.sys.windows.wtypes.
enum : uint {
ERROR_SUCCESS = 0,
NO_ERROR = 0,
ERROR_INVALID_FUNCTION,
ERROR_FILE_NOT_FOUND,
ERROR_PATH_NOT_FOUND,
ERROR_TOO_MANY_OPEN_FILES,
ERROR_ACCESS_DENIED,
ERROR_INVALID_HANDLE,
ERROR_ARENA_TRASHED,
ERROR_NOT_ENOUGH_MEMORY,
ERROR_INVALID_BLOCK,
ERROR_BAD_ENVIRONMENT,
ERROR_BAD_FORMAT,
ERROR_INVALID_ACCESS,
ERROR_INVALID_DATA,
ERROR_OUTOFMEMORY,
ERROR_INVALID_DRIVE,
ERROR_CURRENT_DIRECTORY,
ERROR_NOT_SAME_DEVICE,
ERROR_NO_MORE_FILES,
ERROR_WRITE_PROTECT,
ERROR_BAD_UNIT,
ERROR_NOT_READY,
ERROR_BAD_COMMAND,
ERROR_CRC,
ERROR_BAD_LENGTH,
ERROR_SEEK,
ERROR_NOT_DOS_DISK,
ERROR_SECTOR_NOT_FOUND,
ERROR_OUT_OF_PAPER,
ERROR_WRITE_FAULT,
ERROR_READ_FAULT,
ERROR_GEN_FAILURE,
ERROR_SHARING_VIOLATION,
ERROR_LOCK_VIOLATION,
ERROR_WRONG_DISK, // = 34
ERROR_SHARING_BUFFER_EXCEEDED = 36,
ERROR_HANDLE_EOF = 38,
ERROR_HANDLE_DISK_FULL, // = 39
ERROR_NOT_SUPPORTED = 50,
ERROR_REM_NOT_LIST,
ERROR_DUP_NAME,
ERROR_BAD_NETPATH,
ERROR_NETWORK_BUSY,
ERROR_DEV_NOT_EXIST,
ERROR_TOO_MANY_CMDS,
ERROR_ADAP_HDW_ERR,
ERROR_BAD_NET_RESP,
ERROR_UNEXP_NET_ERR,
ERROR_BAD_REM_ADAP,
ERROR_PRINTQ_FULL,
ERROR_NO_SPOOL_SPACE,
ERROR_PRINT_CANCELLED,
ERROR_NETNAME_DELETED,
ERROR_NETWORK_ACCESS_DENIED,
ERROR_BAD_DEV_TYPE,
ERROR_BAD_NET_NAME,
ERROR_TOO_MANY_NAMES,
ERROR_TOO_MANY_SESS,
ERROR_SHARING_PAUSED,
ERROR_REQ_NOT_ACCEP,
ERROR_REDIR_PAUSED, // = 72
ERROR_FILE_EXISTS = 80,
ERROR_CANNOT_MAKE = 82,
ERROR_FAIL_I24,
ERROR_OUT_OF_STRUCTURES,
ERROR_ALREADY_ASSIGNED,
ERROR_INVALID_PASSWORD,
ERROR_INVALID_PARAMETER,
ERROR_NET_WRITE_FAULT,
ERROR_NO_PROC_SLOTS, // = 89
ERROR_TOO_MANY_SEMAPHORES = 100,
ERROR_EXCL_SEM_ALREADY_OWNED,
ERROR_SEM_IS_SET,
ERROR_TOO_MANY_SEM_REQUESTS,
ERROR_INVALID_AT_INTERRUPT_TIME,
ERROR_SEM_OWNER_DIED,
ERROR_SEM_USER_LIMIT,
ERROR_DISK_CHANGE,
ERROR_DRIVE_LOCKED,
ERROR_BROKEN_PIPE,
ERROR_OPEN_FAILED,
ERROR_BUFFER_OVERFLOW,
ERROR_DISK_FULL,
ERROR_NO_MORE_SEARCH_HANDLES,
ERROR_INVALID_TARGET_HANDLE, // = 114
ERROR_INVALID_CATEGORY = 117,
ERROR_INVALID_VERIFY_SWITCH,
ERROR_BAD_DRIVER_LEVEL,
ERROR_CALL_NOT_IMPLEMENTED,
ERROR_SEM_TIMEOUT,
ERROR_INSUFFICIENT_BUFFER,
ERROR_INVALID_NAME,
ERROR_INVALID_LEVEL,
ERROR_NO_VOLUME_LABEL,
ERROR_MOD_NOT_FOUND,
ERROR_PROC_NOT_FOUND,
ERROR_WAIT_NO_CHILDREN,
ERROR_CHILD_NOT_COMPLETE,
ERROR_DIRECT_ACCESS_HANDLE,
ERROR_NEGATIVE_SEEK,
ERROR_SEEK_ON_DEVICE,
ERROR_IS_JOIN_TARGET,
ERROR_IS_JOINED,
ERROR_IS_SUBSTED,
ERROR_NOT_JOINED,
ERROR_NOT_SUBSTED,
ERROR_JOIN_TO_JOIN,
ERROR_SUBST_TO_SUBST,
ERROR_JOIN_TO_SUBST,
ERROR_SUBST_TO_JOIN,
ERROR_BUSY_DRIVE,
ERROR_SAME_DRIVE,
ERROR_DIR_NOT_ROOT,
ERROR_DIR_NOT_EMPTY,
ERROR_IS_SUBST_PATH,
ERROR_IS_JOIN_PATH,
ERROR_PATH_BUSY,
ERROR_IS_SUBST_TARGET,
ERROR_SYSTEM_TRACE,
ERROR_INVALID_EVENT_COUNT,
ERROR_TOO_MANY_MUXWAITERS,
ERROR_INVALID_LIST_FORMAT,
ERROR_LABEL_TOO_LONG,
ERROR_TOO_MANY_TCBS,
ERROR_SIGNAL_REFUSED,
ERROR_DISCARDED,
ERROR_NOT_LOCKED,
ERROR_BAD_THREADID_ADDR,
ERROR_BAD_ARGUMENTS,
ERROR_BAD_PATHNAME,
ERROR_SIGNAL_PENDING, // = 162
ERROR_MAX_THRDS_REACHED = 164,
ERROR_LOCK_FAILED = 167,
ERROR_BUSY = 170,
ERROR_CANCEL_VIOLATION = 173,
ERROR_ATOMIC_LOCKS_NOT_SUPPORTED, // = 174
ERROR_INVALID_SEGMENT_NUMBER = 180,
ERROR_INVALID_ORDINAL = 182,
ERROR_ALREADY_EXISTS, // = 183
ERROR_INVALID_FLAG_NUMBER = 186,
ERROR_SEM_NOT_FOUND,
ERROR_INVALID_STARTING_CODESEG,
ERROR_INVALID_STACKSEG,
ERROR_INVALID_MODULETYPE,
ERROR_INVALID_EXE_SIGNATURE,
ERROR_EXE_MARKED_INVALID,
ERROR_BAD_EXE_FORMAT,
ERROR_ITERATED_DATA_EXCEEDS_64k,
ERROR_INVALID_MINALLOCSIZE,
ERROR_DYNLINK_FROM_INVALID_RING,
ERROR_IOPL_NOT_ENABLED,
ERROR_INVALID_SEGDPL,
ERROR_AUTODATASEG_EXCEEDS_64k,
ERROR_RING2SEG_MUST_BE_MOVABLE,
ERROR_RELOC_CHAIN_XEEDS_SEGLIM,
ERROR_INFLOOP_IN_RELOC_CHAIN,
ERROR_ENVVAR_NOT_FOUND, // = 203
ERROR_NO_SIGNAL_SENT = 205,
ERROR_FILENAME_EXCED_RANGE,
ERROR_RING2_STACK_IN_USE,
ERROR_META_EXPANSION_TOO_LONG,
ERROR_INVALID_SIGNAL_NUMBER,
ERROR_THREAD_1_INACTIVE, // = 210
ERROR_LOCKED = 212,
ERROR_TOO_MANY_MODULES = 214,
ERROR_NESTING_NOT_ALLOWED,
ERROR_EXE_MACHINE_TYPE_MISMATCH,
ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY,
ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY, // = 218
ERROR_BAD_PIPE = 230,
ERROR_PIPE_BUSY,
ERROR_NO_DATA,
ERROR_PIPE_NOT_CONNECTED,
ERROR_MORE_DATA, // = 234
ERROR_VC_DISCONNECTED = 240,
ERROR_INVALID_EA_NAME = 254,
ERROR_EA_LIST_INCONSISTENT, // = 255
WAIT_TIMEOUT = 258,
ERROR_NO_MORE_ITEMS, // = 259
ERROR_CANNOT_COPY = 266,
ERROR_DIRECTORY, // = 267
ERROR_EAS_DIDNT_FIT = 275,
ERROR_EA_FILE_CORRUPT,
ERROR_EA_TABLE_FULL,
ERROR_INVALID_EA_HANDLE, // = 278
ERROR_EAS_NOT_SUPPORTED = 282,
ERROR_NOT_OWNER = 288,
ERROR_TOO_MANY_POSTS = 298,
ERROR_PARTIAL_COPY,
ERROR_OPLOCK_NOT_GRANTED,
ERROR_INVALID_OPLOCK_PROTOCOL,
ERROR_DISK_TOO_FRAGMENTED,
ERROR_DELETE_PENDING, // = 303
ERROR_MR_MID_NOT_FOUND = 317,
ERROR_SCOPE_NOT_FOUND, // = 318
ERROR_INVALID_ADDRESS = 487,
ERROR_ARITHMETIC_OVERFLOW = 534,
ERROR_PIPE_CONNECTED,
ERROR_PIPE_LISTENING, // = 536
ERROR_EA_ACCESS_DENIED = 994,
ERROR_OPERATION_ABORTED,
ERROR_IO_INCOMPLETE,
ERROR_IO_PENDING,
ERROR_NOACCESS,
ERROR_SWAPERROR, // = 999
ERROR_STACK_OVERFLOW = 1001,
ERROR_INVALID_MESSAGE,
ERROR_CAN_NOT_COMPLETE,
ERROR_INVALID_FLAGS,
ERROR_UNRECOGNIZED_VOLUME,
ERROR_FILE_INVALID,
ERROR_FULLSCREEN_MODE,
ERROR_NO_TOKEN,
ERROR_BADDB,
ERROR_BADKEY,
ERROR_CANTOPEN,
ERROR_CANTREAD,
ERROR_CANTWRITE,
ERROR_REGISTRY_RECOVERED,
ERROR_REGISTRY_CORRUPT,
ERROR_REGISTRY_IO_FAILED,
ERROR_NOT_REGISTRY_FILE,
ERROR_KEY_DELETED,
ERROR_NO_LOG_SPACE,
ERROR_KEY_HAS_CHILDREN,
ERROR_CHILD_MUST_BE_VOLATILE,
ERROR_NOTIFY_ENUM_DIR, // = 1022
ERROR_DEPENDENT_SERVICES_RUNNING = 1051,
ERROR_INVALID_SERVICE_CONTROL,
ERROR_SERVICE_REQUEST_TIMEOUT,
ERROR_SERVICE_NO_THREAD,
ERROR_SERVICE_DATABASE_LOCKED,
ERROR_SERVICE_ALREADY_RUNNING,
ERROR_INVALID_SERVICE_ACCOUNT,
ERROR_SERVICE_DISABLED,
ERROR_CIRCULAR_DEPENDENCY,
ERROR_SERVICE_DOES_NOT_EXIST,
ERROR_SERVICE_CANNOT_ACCEPT_CTRL,
ERROR_SERVICE_NOT_ACTIVE,
ERROR_FAILED_SERVICE_CONTROLLER_CONNECT,
ERROR_EXCEPTION_IN_SERVICE,
ERROR_DATABASE_DOES_NOT_EXIST,
ERROR_SERVICE_SPECIFIC_ERROR,
ERROR_PROCESS_ABORTED,
ERROR_SERVICE_DEPENDENCY_FAIL,
ERROR_SERVICE_LOGON_FAILED,
ERROR_SERVICE_START_HANG,
ERROR_INVALID_SERVICE_LOCK,
ERROR_SERVICE_MARKED_FOR_DELETE,
ERROR_SERVICE_EXISTS,
ERROR_ALREADY_RUNNING_LKG,
ERROR_SERVICE_DEPENDENCY_DELETED,
ERROR_BOOT_ALREADY_ACCEPTED,
ERROR_SERVICE_NEVER_STARTED,
ERROR_DUPLICATE_SERVICE_NAME,
ERROR_DIFFERENT_SERVICE_ACCOUNT,
ERROR_CANNOT_DETECT_DRIVER_FAILURE,
ERROR_CANNOT_DETECT_PROCESS_ABORT,
ERROR_NO_RECOVERY_PROGRAM,
ERROR_SERVICE_NOT_IN_EXE,
ERROR_NOT_SAFEBOOT_SERVICE, // = 1084
ERROR_END_OF_MEDIA = 1100,
ERROR_FILEMARK_DETECTED,
ERROR_BEGINNING_OF_MEDIA,
ERROR_SETMARK_DETECTED,
ERROR_NO_DATA_DETECTED,
ERROR_PARTITION_FAILURE,
ERROR_INVALID_BLOCK_LENGTH,
ERROR_DEVICE_NOT_PARTITIONED,
ERROR_UNABLE_TO_LOCK_MEDIA,
ERROR_UNABLE_TO_UNLOAD_MEDIA,
ERROR_MEDIA_CHANGED,
ERROR_BUS_RESET,
ERROR_NO_MEDIA_IN_DRIVE,
ERROR_NO_UNICODE_TRANSLATION,
ERROR_DLL_INIT_FAILED,
ERROR_SHUTDOWN_IN_PROGRESS,
ERROR_NO_SHUTDOWN_IN_PROGRESS,
ERROR_IO_DEVICE,
ERROR_SERIAL_NO_DEVICE,
ERROR_IRQ_BUSY,
ERROR_MORE_WRITES,
ERROR_COUNTER_TIMEOUT,
ERROR_FLOPPY_ID_MARK_NOT_FOUND,
ERROR_FLOPPY_WRONG_CYLINDER,
ERROR_FLOPPY_UNKNOWN_ERROR,
ERROR_FLOPPY_BAD_REGISTERS,
ERROR_DISK_RECALIBRATE_FAILED,
ERROR_DISK_OPERATION_FAILED,
ERROR_DISK_RESET_FAILED,
ERROR_EOM_OVERFLOW,
ERROR_NOT_ENOUGH_SERVER_MEMORY,
ERROR_POSSIBLE_DEADLOCK,
ERROR_MAPPED_ALIGNMENT, // = 1132
ERROR_SET_POWER_STATE_VETOED = 1140,
ERROR_SET_POWER_STATE_FAILED,
ERROR_TOO_MANY_LINKS, // = 1142
ERROR_OLD_WIN_VERSION = 1150,
ERROR_APP_WRONG_OS,
ERROR_SINGLE_INSTANCE_APP,
ERROR_RMODE_APP,
ERROR_INVALID_DLL,
ERROR_NO_ASSOCIATION,
ERROR_DDE_FAIL,
ERROR_DLL_NOT_FOUND,
ERROR_NO_MORE_USER_HANDLES,
ERROR_MESSAGE_SYNC_ONLY,
ERROR_SOURCE_ELEMENT_EMPTY,
ERROR_DESTINATION_ELEMENT_FULL,
ERROR_ILLEGAL_ELEMENT_ADDRESS,
ERROR_MAGAZINE_NOT_PRESENT,
ERROR_DEVICE_REINITIALIZATION_NEEDED,
ERROR_DEVICE_REQUIRES_CLEANING,
ERROR_DEVICE_DOOR_OPEN,
ERROR_DEVICE_NOT_CONNECTED,
ERROR_NOT_FOUND,
ERROR_NO_MATCH,
ERROR_SET_NOT_FOUND,
ERROR_POINT_NOT_FOUND,
ERROR_NO_TRACKING_SERVICE,
ERROR_NO_VOLUME_ID, // = 1173
ERROR_UNABLE_TO_REMOVE_REPLACED = 1175,
ERROR_UNABLE_TO_MOVE_REPLACEMENT,
ERROR_UNABLE_TO_MOVE_REPLACEMENT_2,
ERROR_JOURNAL_DELETE_IN_PROGRESS,
ERROR_JOURNAL_NOT_ACTIVE,
ERROR_POTENTIAL_FILE_FOUND,
ERROR_JOURNAL_ENTRY_DELETED, // = 1181
ERROR_BAD_DEVICE = 1200,
ERROR_CONNECTION_UNAVAIL,
ERROR_DEVICE_ALREADY_REMEMBERED,
ERROR_NO_NET_OR_BAD_PATH,
ERROR_BAD_PROVIDER,
ERROR_CANNOT_OPEN_PROFILE,
ERROR_BAD_PROFILE,
ERROR_NOT_CONTAINER,
ERROR_EXTENDED_ERROR,
ERROR_INVALID_GROUPNAME,
ERROR_INVALID_COMPUTERNAME,
ERROR_INVALID_EVENTNAME,
ERROR_INVALID_DOMAINNAME,
ERROR_INVALID_SERVICENAME,
ERROR_INVALID_NETNAME,
ERROR_INVALID_SHARENAME,
ERROR_INVALID_PASSWORDNAME,
ERROR_INVALID_MESSAGENAME,
ERROR_INVALID_MESSAGEDEST,
ERROR_SESSION_CREDENTIAL_CONFLICT,
ERROR_REMOTE_SESSION_LIMIT_EXCEEDED,
ERROR_DUP_DOMAINNAME,
ERROR_NO_NETWORK,
ERROR_CANCELLED,
ERROR_USER_MAPPED_FILE,
ERROR_CONNECTION_REFUSED,
ERROR_GRACEFUL_DISCONNECT,
ERROR_ADDRESS_ALREADY_ASSOCIATED,
ERROR_ADDRESS_NOT_ASSOCIATED,
ERROR_CONNECTION_INVALID,
ERROR_CONNECTION_ACTIVE,
ERROR_NETWORK_UNREACHABLE,
ERROR_HOST_UNREACHABLE,
ERROR_PROTOCOL_UNREACHABLE,
ERROR_PORT_UNREACHABLE,
ERROR_REQUEST_ABORTED,
ERROR_CONNECTION_ABORTED,
ERROR_RETRY,
ERROR_CONNECTION_COUNT_LIMIT,
ERROR_LOGIN_TIME_RESTRICTION,
ERROR_LOGIN_WKSTA_RESTRICTION,
ERROR_INCORRECT_ADDRESS,
ERROR_ALREADY_REGISTERED,
ERROR_SERVICE_NOT_FOUND,
ERROR_NOT_AUTHENTICATED,
ERROR_NOT_LOGGED_ON,
ERROR_CONTINUE,
ERROR_ALREADY_INITIALIZED,
ERROR_NO_MORE_DEVICES,
ERROR_NO_SUCH_SITE,
ERROR_DOMAIN_CONTROLLER_EXISTS,
ERROR_ONLY_IF_CONNECTED,
ERROR_OVERRIDE_NOCHANGES,
ERROR_BAD_USER_PROFILE,
ERROR_NOT_SUPPORTED_ON_SBS,
ERROR_SERVER_SHUTDOWN_IN_PROGRESS,
ERROR_HOST_DOWN,
ERROR_NON_ACCOUNT_SID,
ERROR_NON_DOMAIN_SID,
ERROR_APPHELP_BLOCK,
ERROR_ACCESS_DISABLED_BY_POLICY,
ERROR_REG_NAT_CONSUMPTION,
ERROR_CSCSHARE_OFFLINE,
ERROR_PKINIT_FAILURE,
ERROR_SMARTCARD_SUBSYSTEM_FAILURE,
ERROR_DOWNGRADE_DETECTED,
SEC_E_SMARTCARD_CERT_REVOKED,
SEC_E_ISSUING_CA_UNTRUSTED,
SEC_E_REVOCATION_OFFLINE_C,
SEC_E_PKINIT_CLIENT_FAILUR,
SEC_E_SMARTCARD_CERT_EXPIRED,
ERROR_MACHINE_LOCKED, // = 1271
ERROR_CALLBACK_SUPPLIED_INVALID_DATA = 1273,
ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED,
ERROR_DRIVER_BLOCKED,
ERROR_INVALID_IMPORT_OF_NON_DLL,
ERROR_ACCESS_DISABLED_WEBBLADE,
ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER,
ERROR_RECOVERY_FAILURE,
ERROR_ALREADY_FIBER,
ERROR_ALREADY_THREAD,
ERROR_STACK_BUFFER_OVERRUN,
ERROR_PARAMETER_QUOTA_EXCEEDED,
ERROR_DEBUGGER_INACTIVE, // = 1284
ERROR_NOT_ALL_ASSIGNED = 1300,
ERROR_SOME_NOT_MAPPED,
ERROR_NO_QUOTAS_FOR_ACCOUNT,
ERROR_LOCAL_USER_SESSION_KEY,
ERROR_NULL_LM_PASSWORD,
ERROR_UNKNOWN_REVISION,
ERROR_REVISION_MISMATCH,
ERROR_INVALID_OWNER,
ERROR_INVALID_PRIMARY_GROUP,
ERROR_NO_IMPERSONATION_TOKEN,
ERROR_CANT_DISABLE_MANDATORY,
ERROR_NO_LOGON_SERVERS,
ERROR_NO_SUCH_LOGON_SESSION,
ERROR_NO_SUCH_PRIVILEGE,
ERROR_PRIVILEGE_NOT_HELD,
ERROR_INVALID_ACCOUNT_NAME,
ERROR_USER_EXISTS,
ERROR_NO_SUCH_USER,
ERROR_GROUP_EXISTS,
ERROR_NO_SUCH_GROUP,
ERROR_MEMBER_IN_GROUP,
ERROR_MEMBER_NOT_IN_GROUP,
ERROR_LAST_ADMIN,
ERROR_WRONG_PASSWORD,
ERROR_ILL_FORMED_PASSWORD,
ERROR_PASSWORD_RESTRICTION,
ERROR_LOGON_FAILURE,
ERROR_ACCOUNT_RESTRICTION,
ERROR_INVALID_LOGON_HOURS,
ERROR_INVALID_WORKSTATION,
ERROR_PASSWORD_EXPIRED,
ERROR_ACCOUNT_DISABLED,
ERROR_NONE_MAPPED,
ERROR_TOO_MANY_LUIDS_REQUESTED,
ERROR_LUIDS_EXHAUSTED,
ERROR_INVALID_SUB_AUTHORITY,
ERROR_INVALID_ACL,
ERROR_INVALID_SID,
ERROR_INVALID_SECURITY_DESCR, // = 1338
ERROR_BAD_INHERITANCE_ACL = 1340,
ERROR_SERVER_DISABLED,
ERROR_SERVER_NOT_DISABLED,
ERROR_INVALID_ID_AUTHORITY,
ERROR_ALLOTTED_SPACE_EXCEEDED,
ERROR_INVALID_GROUP_ATTRIBUTES,
ERROR_BAD_IMPERSONATION_LEVEL,
ERROR_CANT_OPEN_ANONYMOUS,
ERROR_BAD_VALIDATION_CLASS,
ERROR_BAD_TOKEN_TYPE,
ERROR_NO_SECURITY_ON_OBJECT,
ERROR_CANT_ACCESS_DOMAIN_INFO,
ERROR_INVALID_SERVER_STATE,
ERROR_INVALID_DOMAIN_STATE,
ERROR_INVALID_DOMAIN_ROLE,
ERROR_NO_SUCH_DOMAIN,
ERROR_DOMAIN_EXISTS,
ERROR_DOMAIN_LIMIT_EXCEEDED,
ERROR_INTERNAL_DB_CORRUPTION,
ERROR_INTERNAL_ERROR,
ERROR_GENERIC_NOT_MAPPED,
ERROR_BAD_DESCRIPTOR_FORMAT,
ERROR_NOT_LOGON_PROCESS,
ERROR_LOGON_SESSION_EXISTS,
ERROR_NO_SUCH_PACKAGE,
ERROR_BAD_LOGON_SESSION_STATE,
ERROR_LOGON_SESSION_COLLISION,
ERROR_INVALID_LOGON_TYPE,
ERROR_CANNOT_IMPERSONATE,
ERROR_RXACT_INVALID_STATE,
ERROR_RXACT_COMMIT_FAILURE,
ERROR_SPECIAL_ACCOUNT,
ERROR_SPECIAL_GROUP,
ERROR_SPECIAL_USER,
ERROR_MEMBERS_PRIMARY_GROUP,
ERROR_TOKEN_ALREADY_IN_USE,
ERROR_NO_SUCH_ALIAS,
ERROR_MEMBER_NOT_IN_ALIAS,
ERROR_MEMBER_IN_ALIAS,
ERROR_ALIAS_EXISTS,
ERROR_LOGON_NOT_GRANTED,
ERROR_TOO_MANY_SECRETS,
ERROR_SECRET_TOO_LONG,
ERROR_INTERNAL_DB_ERROR,
ERROR_TOO_MANY_CONTEXT_IDS,
ERROR_LOGON_TYPE_NOT_GRANTED,
ERROR_NT_CROSS_ENCRYPTION_REQUIRED,
ERROR_NO_SUCH_MEMBER,
ERROR_INVALID_MEMBER,
ERROR_TOO_MANY_SIDS,
ERROR_LM_CROSS_ENCRYPTION_REQUIRED,
ERROR_NO_INHERITANCE,
ERROR_FILE_CORRUPT,
ERROR_DISK_CORRUPT,
ERROR_NO_USER_SESSION_KEY,
ERROR_LICENSE_QUOTA_EXCEEDED,
ERROR_WRONG_TARGET_NAME,
ERROR_MUTUAL_AUTH_FAILED,
ERROR_TIME_SKEW,
ERROR_CURRENT_DOMAIN_NOT_ALLOWED,
ERROR_INVALID_WINDOW_HANDLE,
ERROR_INVALID_MENU_HANDLE,
ERROR_INVALID_CURSOR_HANDLE,
ERROR_INVALID_ACCEL_HANDLE,
ERROR_INVALID_HOOK_HANDLE,
ERROR_INVALID_DWP_HANDLE,
ERROR_TLW_WITH_WSCHILD,
ERROR_CANNOT_FIND_WND_CLASS,
ERROR_WINDOW_OF_OTHER_THREAD,
ERROR_HOTKEY_ALREADY_REGISTERED,
ERROR_CLASS_ALREADY_EXISTS,
ERROR_CLASS_DOES_NOT_EXIST,
ERROR_CLASS_HAS_WINDOWS,
ERROR_INVALID_INDEX,
ERROR_INVALID_ICON_HANDLE,
ERROR_PRIVATE_DIALOG_INDEX,
ERROR_LISTBOX_ID_NOT_FOUND,
ERROR_NO_WILDCARD_CHARACTERS,
ERROR_CLIPBOARD_NOT_OPEN,
ERROR_HOTKEY_NOT_REGISTERED,
ERROR_WINDOW_NOT_DIALOG,
ERROR_CONTROL_ID_NOT_FOUND,
ERROR_INVALID_COMBOBOX_MESSAGE,
ERROR_WINDOW_NOT_COMBOBOX,
ERROR_INVALID_EDIT_HEIGHT,
ERROR_DC_NOT_FOUND,
ERROR_INVALID_HOOK_FILTER,
ERROR_INVALID_FILTER_PROC,
ERROR_HOOK_NEEDS_HMOD,
ERROR_GLOBAL_ONLY_HOOK,
ERROR_JOURNAL_HOOK_SET,
ERROR_HOOK_NOT_INSTALLED,
ERROR_INVALID_LB_MESSAGE,
ERROR_SETCOUNT_ON_BAD_LB,
ERROR_LB_WITHOUT_TABSTOPS,
ERROR_DESTROY_OBJECT_OF_OTHER_THREAD,
ERROR_CHILD_WINDOW_MENU,
ERROR_NO_SYSTEM_MENU,
ERROR_INVALID_MSGBOX_STYLE,
ERROR_INVALID_SPI_VALUE,
ERROR_SCREEN_ALREADY_LOCKED,
ERROR_HWNDS_HAVE_DIFF_PARENT,
ERROR_NOT_CHILD_WINDOW,
ERROR_INVALID_GW_COMMAND,
ERROR_INVALID_THREAD_ID,
ERROR_NON_MDICHILD_WINDOW,
ERROR_POPUP_ALREADY_ACTIVE,
ERROR_NO_SCROLLBARS,
ERROR_INVALID_SCROLLBAR_RANGE,
ERROR_INVALID_SHOWWIN_COMMAND,
ERROR_NO_SYSTEM_RESOURCES,
ERROR_NONPAGED_SYSTEM_RESOURCES,
ERROR_PAGED_SYSTEM_RESOURCES,
ERROR_WORKING_SET_QUOTA,
ERROR_PAGEFILE_QUOTA,
ERROR_COMMITMENT_LIMIT,
ERROR_MENU_ITEM_NOT_FOUND,
ERROR_INVALID_KEYBOARD_HANDLE,
ERROR_HOOK_TYPE_NOT_ALLOWED,
ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION,
ERROR_TIMEOUT,
ERROR_INVALID_MONITOR_HANDLE, // = 1461
ERROR_EVENTLOG_FILE_CORRUPT = 1500,
ERROR_EVENTLOG_CANT_START,
ERROR_LOG_FILE_FULL,
ERROR_EVENTLOG_FILE_CHANGED, // = 1503
ERROR_INSTALL_SERVICE_FAILURE = 1601,
ERROR_INSTALL_USEREXIT,
ERROR_INSTALL_FAILURE,
ERROR_INSTALL_SUSPEND,
ERROR_UNKNOWN_PRODUCT,
ERROR_UNKNOWN_FEATURE,
ERROR_UNKNOWN_COMPONENT,
ERROR_UNKNOWN_PROPERTY,
ERROR_INVALID_HANDLE_STATE,
ERROR_BAD_CONFIGURATION,
ERROR_INDEX_ABSENT,
ERROR_INSTALL_SOURCE_ABSENT,
ERROR_INSTALL_PACKAGE_VERSION,
ERROR_PRODUCT_UNINSTALLED,
ERROR_BAD_QUERY_SYNTAX,
ERROR_INVALID_FIELD,
ERROR_DEVICE_REMOVED,
ERROR_INSTALL_ALREADY_RUNNING,
ERROR_INSTALL_PACKAGE_OPEN_FAILED,
ERROR_INSTALL_PACKAGE_INVALID,
ERROR_INSTALL_UI_FAILURE,
ERROR_INSTALL_LOG_FAILURE,
ERROR_INSTALL_LANGUAGE_UNSUPPORTED,
ERROR_INSTALL_TRANSFORM_FAILURE,
ERROR_INSTALL_PACKAGE_REJECTED,
ERROR_FUNCTION_NOT_CALLED,
ERROR_FUNCTION_FAILED,
ERROR_INVALID_TABLE,
ERROR_DATATYPE_MISMATCH,
ERROR_UNSUPPORTED_TYPE,
ERROR_CREATE_FAILED,
ERROR_INSTALL_TEMP_UNWRITABLE,
ERROR_INSTALL_PLATFORM_UNSUPPORTED,
ERROR_INSTALL_NOTUSED,
ERROR_PATCH_PACKAGE_OPEN_FAILED,
ERROR_PATCH_PACKAGE_INVALID,
ERROR_PATCH_PACKAGE_UNSUPPORTED,
ERROR_PRODUCT_VERSION,
ERROR_INVALID_COMMAND_LINE,
ERROR_INSTALL_REMOTE_DISALLOWED,
ERROR_SUCCESS_REBOOT_INITIATED,
ERROR_PATCH_TARGET_NOT_FOUND,
ERROR_PATCH_PACKAGE_REJECTED,
ERROR_INSTALL_TRANSFORM_REJECTED,
ERROR_INSTALL_REMOTE_PROHIBITED, // = 1645
RPC_S_INVALID_STRING_BINDING = 1700,
RPC_S_WRONG_KIND_OF_BINDING,
RPC_S_INVALID_BINDING,
RPC_S_PROTSEQ_NOT_SUPPORTED,
RPC_S_INVALID_RPC_PROTSEQ,
RPC_S_INVALID_STRING_UUID,
RPC_S_INVALID_ENDPOINT_FORMAT,
RPC_S_INVALID_NET_ADDR,
RPC_S_NO_ENDPOINT_FOUND,
RPC_S_INVALID_TIMEOUT,
RPC_S_OBJECT_NOT_FOUND,
RPC_S_ALREADY_REGISTERED,
RPC_S_TYPE_ALREADY_REGISTERED,
RPC_S_ALREADY_LISTENING,
RPC_S_NO_PROTSEQS_REGISTERED,
RPC_S_NOT_LISTENING,
RPC_S_UNKNOWN_MGR_TYPE,
RPC_S_UNKNOWN_IF,
RPC_S_NO_BINDINGS,
RPC_S_NO_PROTSEQS,
RPC_S_CANT_CREATE_ENDPOINT,
RPC_S_OUT_OF_RESOURCES,
RPC_S_SERVER_UNAVAILABLE,
RPC_S_SERVER_TOO_BUSY,
RPC_S_INVALID_NETWORK_OPTIONS,
RPC_S_NO_CALL_ACTIVE,
RPC_S_CALL_FAILED,
RPC_S_CALL_FAILED_DNE,
RPC_S_PROTOCOL_ERROR, // = 1728
RPC_S_UNSUPPORTED_TRANS_SYN = 1730,
RPC_S_UNSUPPORTED_TYPE = 1732,
RPC_S_INVALID_TAG,
RPC_S_INVALID_BOUND,
RPC_S_NO_ENTRY_NAME,
RPC_S_INVALID_NAME_SYNTAX,
RPC_S_UNSUPPORTED_NAME_SYNTAX, // = 1737
RPC_S_UUID_NO_ADDRESS = 1739,
RPC_S_DUPLICATE_ENDPOINT,
RPC_S_UNKNOWN_AUTHN_TYPE,
RPC_S_MAX_CALLS_TOO_SMALL,
RPC_S_STRING_TOO_LONG,
RPC_S_PROTSEQ_NOT_FOUND,
RPC_S_PROCNUM_OUT_OF_RANGE,
RPC_S_BINDING_HAS_NO_AUTH,
RPC_S_UNKNOWN_AUTHN_SERVICE,
RPC_S_UNKNOWN_AUTHN_LEVEL,
RPC_S_INVALID_AUTH_IDENTITY,
RPC_S_UNKNOWN_AUTHZ_SERVICE,
EPT_S_INVALID_ENTRY,
EPT_S_CANT_PERFORM_OP,
EPT_S_NOT_REGISTERED,
RPC_S_NOTHING_TO_EXPORT,
RPC_S_INCOMPLETE_NAME,
RPC_S_INVALID_VERS_OPTION,
RPC_S_NO_MORE_MEMBERS,
RPC_S_NOT_ALL_OBJS_UNEXPORTED,
RPC_S_INTERFACE_NOT_FOUND,
RPC_S_ENTRY_ALREADY_EXISTS,
RPC_S_ENTRY_NOT_FOUND,
RPC_S_NAME_SERVICE_UNAVAILABLE,
RPC_S_INVALID_NAF_ID,
RPC_S_CANNOT_SUPPORT,
RPC_S_NO_CONTEXT_AVAILABLE,
RPC_S_INTERNAL_ERROR,
RPC_S_ZERO_DIVIDE,
RPC_S_ADDRESS_ERROR,
RPC_S_FP_DIV_ZERO,
RPC_S_FP_UNDERFLOW,
RPC_S_FP_OVERFLOW,
RPC_X_NO_MORE_ENTRIES,
RPC_X_SS_CHAR_TRANS_OPEN_FAIL,
RPC_X_SS_CHAR_TRANS_SHORT_FILE,
RPC_X_SS_IN_NULL_CONTEXT, // = 1775
RPC_X_SS_CONTEXT_DAMAGED = 1777,
RPC_X_SS_HANDLES_MISMATCH,
RPC_X_SS_CANNOT_GET_CALL_HANDLE,
RPC_X_NULL_REF_POINTER,
RPC_X_ENUM_VALUE_OUT_OF_RANGE,
RPC_X_BYTE_COUNT_TOO_SMALL,
RPC_X_BAD_STUB_DATA,
ERROR_INVALID_USER_BUFFER,
ERROR_UNRECOGNIZED_MEDIA,
ERROR_NO_TRUST_LSA_SECRET,
ERROR_NO_TRUST_SAM_ACCOUNT,
ERROR_TRUSTED_DOMAIN_FAILURE,
ERROR_TRUSTED_RELATIONSHIP_FAILURE,
ERROR_TRUST_FAILURE,
RPC_S_CALL_IN_PROGRESS,
ERROR_NETLOGON_NOT_STARTED,
ERROR_ACCOUNT_EXPIRED,
ERROR_REDIRECTOR_HAS_OPEN_HANDLES,
ERROR_PRINTER_DRIVER_ALREADY_INSTALLED,
ERROR_UNKNOWN_PORT,
ERROR_UNKNOWN_PRINTER_DRIVER,
ERROR_UNKNOWN_PRINTPROCESSOR,
ERROR_INVALID_SEPARATOR_FILE,
ERROR_INVALID_PRIORITY,
ERROR_INVALID_PRINTER_NAME,
ERROR_PRINTER_ALREADY_EXISTS,
ERROR_INVALID_PRINTER_COMMAND,
ERROR_INVALID_DATATYPE,
ERROR_INVALID_ENVIRONMENT,
RPC_S_NO_MORE_BINDINGS,
ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT,
ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT,
ERROR_NOLOGON_SERVER_TRUST_ACCOUNT,
ERROR_DOMAIN_TRUST_INCONSISTENT,
ERROR_SERVER_HAS_OPEN_HANDLES,
ERROR_RESOURCE_DATA_NOT_FOUND,
ERROR_RESOURCE_TYPE_NOT_FOUND,
ERROR_RESOURCE_NAME_NOT_FOUND,
ERROR_RESOURCE_LANG_NOT_FOUND,
ERROR_NOT_ENOUGH_QUOTA,
RPC_S_NO_INTERFACES,
RPC_S_CALL_CANCELLED,
RPC_S_BINDING_INCOMPLETE,
RPC_S_COMM_FAILURE,
RPC_S_UNSUPPORTED_AUTHN_LEVEL,
RPC_S_NO_PRINC_NAME,
RPC_S_NOT_RPC_ERROR,
RPC_S_UUID_LOCAL_ONLY,
RPC_S_SEC_PKG_ERROR,
RPC_S_NOT_CANCELLED,
RPC_X_INVALID_ES_ACTION,
RPC_X_WRONG_ES_VERSION,
RPC_X_WRONG_STUB_VERSION,
RPC_X_INVALID_PIPE_OBJECT,
RPC_X_WRONG_PIPE_ORDER,
RPC_X_WRONG_PIPE_VERSION, // = 1832
RPC_S_GROUP_MEMBER_NOT_FOUND = 1898,
EPT_S_CANT_CREATE,
RPC_S_INVALID_OBJECT,
ERROR_INVALID_TIME,
ERROR_INVALID_FORM_NAME,
ERROR_INVALID_FORM_SIZE,
ERROR_ALREADY_WAITING,
ERROR_PRINTER_DELETED,
ERROR_INVALID_PRINTER_STATE,
ERROR_PASSWORD_MUST_CHANGE,
ERROR_DOMAIN_CONTROLLER_NOT_FOUND,
ERROR_ACCOUNT_LOCKED_OUT,
OR_INVALID_OXID,
OR_INVALID_OID,
OR_INVALID_SET,
RPC_S_SEND_INCOMPLETE,
RPC_S_INVALID_ASYNC_HANDLE,
RPC_S_INVALID_ASYNC_CALL,
RPC_X_PIPE_CLOSED,
RPC_X_PIPE_DISCIPLINE_ERROR,
RPC_X_PIPE_EMPTY,
ERROR_NO_SITENAME,
ERROR_CANT_ACCESS_FILE,
ERROR_CANT_RESOLVE_FILENAME,
RPC_S_ENTRY_TYPE_MISMATCH,
RPC_S_NOT_ALL_OBJS_EXPORTED,
RPC_S_INTERFACE_NOT_EXPORTED,
RPC_S_PROFILE_NOT_ADDED,
RPC_S_PRF_ELT_NOT_ADDED,
RPC_S_PRF_ELT_NOT_REMOVED,
RPC_S_GRP_ELT_NOT_ADDED,
RPC_S_GRP_ELT_NOT_REMOVED,
ERROR_KM_DRIVER_BLOCKED,
ERROR_CONTEXT_EXPIRED,
ERROR_PER_USER_TRUST_QUOTA_EXCEEDED,
ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED,
ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED, // = 1934
ERROR_INVALID_PIXEL_FORMAT = 2000,
ERROR_BAD_DRIVER,
ERROR_INVALID_WINDOW_STYLE,
ERROR_METAFILE_NOT_SUPPORTED,
ERROR_TRANSFORM_NOT_SUPPORTED,
ERROR_CLIPPING_NOT_SUPPORTED, // = 2005
ERROR_INVALID_CMM = 2010,
ERROR_INVALID_PROFILE,
ERROR_TAG_NOT_FOUND,
ERROR_TAG_NOT_PRESENT,
ERROR_DUPLICATE_TAG,
ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE,
ERROR_PROFILE_NOT_FOUND,
ERROR_INVALID_COLORSPACE,
ERROR_ICM_NOT_ENABLED,
ERROR_DELETING_ICM_XFORM,
ERROR_INVALID_TRANSFORM,
ERROR_COLORSPACE_MISMATCH,
ERROR_INVALID_COLORINDEX, // = 2022
ERROR_CONNECTED_OTHER_PASSWORD = 2108,
ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT, // = 2109
ERROR_BAD_USERNAME = 2202,
ERROR_NOT_CONNECTED = 2250,
ERROR_OPEN_FILES = 2401,
ERROR_ACTIVE_CONNECTIONS, // = 2402
ERROR_DEVICE_IN_USE = 2404,
ERROR_UNKNOWN_PRINT_MONITOR = 3000,
ERROR_PRINTER_DRIVER_IN_USE,
ERROR_SPOOL_FILE_NOT_FOUND,
ERROR_SPL_NO_STARTDOC,
ERROR_SPL_NO_ADDJOB,
ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED,
ERROR_PRINT_MONITOR_ALREADY_INSTALLED,
ERROR_INVALID_PRINT_MONITOR,
ERROR_PRINT_MONITOR_IN_USE,
ERROR_PRINTER_HAS_JOBS_QUEUED,
ERROR_SUCCESS_REBOOT_REQUIRED,
ERROR_SUCCESS_RESTART_REQUIRED,
ERROR_PRINTER_NOT_FOUND,
ERROR_PRINTER_DRIVER_WARNED,
ERROR_PRINTER_DRIVER_BLOCKED, // = 3014
ERROR_WINS_INTERNAL = 4000,
ERROR_CAN_NOT_DEL_LOCAL_WINS,
ERROR_STATIC_INIT,
ERROR_INC_BACKUP,
ERROR_FULL_BACKUP,
ERROR_REC_NON_EXISTENT,
ERROR_RPL_NOT_ALLOWED, // = 4006
ERROR_DHCP_ADDRESS_CONFLICT = 4100,
ERROR_WMI_GUID_NOT_FOUND = 4200,
ERROR_WMI_INSTANCE_NOT_FOUND,
ERROR_WMI_ITEMID_NOT_FOUND,
ERROR_WMI_TRY_AGAIN,
ERROR_WMI_DP_NOT_FOUND,
ERROR_WMI_UNRESOLVED_INSTANCE_REF,
ERROR_WMI_ALREADY_ENABLED,
ERROR_WMI_GUID_DISCONNECTED,
ERROR_WMI_SERVER_UNAVAILABLE,
ERROR_WMI_DP_FAILED,
ERROR_WMI_INVALID_MOF,
ERROR_WMI_INVALID_REGINFO,
ERROR_WMI_ALREADY_DISABLED,
ERROR_WMI_READ_ONLY,
ERROR_WMI_SET_FAILURE, // = 4214
ERROR_INVALID_MEDIA = 4300,
ERROR_INVALID_LIBRARY,
ERROR_INVALID_MEDIA_POOL,
ERROR_DRIVE_MEDIA_MISMATCH,
ERROR_MEDIA_OFFLINE,
ERROR_LIBRARY_OFFLINE,
ERROR_EMPTY,
ERROR_NOT_EMPTY,
ERROR_MEDIA_UNAVAILABLE,
ERROR_RESOURCE_DISABLED,
ERROR_INVALID_CLEANER,
ERROR_UNABLE_TO_CLEAN,
ERROR_OBJECT_NOT_FOUND,
ERROR_DATABASE_FAILURE,
ERROR_DATABASE_FULL,
ERROR_MEDIA_INCOMPATIBLE,
ERROR_RESOURCE_NOT_PRESENT,
ERROR_INVALID_OPERATION,
ERROR_MEDIA_NOT_AVAILABLE,
ERROR_DEVICE_NOT_AVAILABLE,
ERROR_REQUEST_REFUSED,
ERROR_INVALID_DRIVE_OBJECT,
ERROR_LIBRARY_FULL,
ERROR_MEDIUM_NOT_ACCESSIBLE,
ERROR_UNABLE_TO_LOAD_MEDIUM,
ERROR_UNABLE_TO_INVENTORY_DRIVE,
ERROR_UNABLE_TO_INVENTORY_SLOT,
ERROR_UNABLE_TO_INVENTORY_TRANSPORT,
ERROR_TRANSPORT_FULL,
ERROR_CONTROLLING_IEPORT,
ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA,
ERROR_CLEANER_SLOT_SET,
ERROR_CLEANER_SLOT_NOT_SET,
ERROR_CLEANER_CARTRIDGE_SPENT,
ERROR_UNEXPECTED_OMID,
ERROR_CANT_DELETE_LAST_ITEM,
ERROR_MESSAGE_EXCEEDS_MAX_SIZE,
ERROR_VOLUME_CONTAINS_SYS_FILES,
ERROR_INDIGENOUS_TYPE,
ERROR_NO_SUPPORTING_DRIVES,
ERROR_CLEANER_CARTRIDGE_INSTALLED, // = 4340
ERROR_FILE_OFFLINE = 4350,
ERROR_REMOTE_STORAGE_NOT_ACTIVE,
ERROR_REMOTE_STORAGE_MEDIA_ERROR, // = 4352
ERROR_NOT_A_REPARSE_POINT = 4390,
ERROR_REPARSE_ATTRIBUTE_CONFLICT,
ERROR_INVALID_REPARSE_DATA,
ERROR_REPARSE_TAG_INVALID,
ERROR_REPARSE_TAG_MISMATCH, // = 4394
ERROR_VOLUME_NOT_SIS_ENABLED = 4500,
ERROR_DEPENDENT_RESOURCE_EXISTS = 5001,
ERROR_DEPENDENCY_NOT_FOUND,
ERROR_DEPENDENCY_ALREADY_EXISTS,
ERROR_RESOURCE_NOT_ONLINE,
ERROR_HOST_NODE_NOT_AVAILABLE,
ERROR_RESOURCE_NOT_AVAILABLE,
ERROR_RESOURCE_NOT_FOUND,
ERROR_SHUTDOWN_CLUSTER,
ERROR_CANT_EVICT_ACTIVE_NODE,
ERROR_OBJECT_ALREADY_EXISTS,
ERROR_OBJECT_IN_LIST,
ERROR_GROUP_NOT_AVAILABLE,
ERROR_GROUP_NOT_FOUND,
ERROR_GROUP_NOT_ONLINE,
ERROR_HOST_NODE_NOT_RESOURCE_OWNER,
ERROR_HOST_NODE_NOT_GROUP_OWNER,
ERROR_RESMON_CREATE_FAILED,
ERROR_RESMON_ONLINE_FAILED,
ERROR_RESOURCE_ONLINE,
ERROR_QUORUM_RESOURCE,
ERROR_NOT_QUORUM_CAPABLE,
ERROR_CLUSTER_SHUTTING_DOWN,
ERROR_INVALID_STATE,
ERROR_RESOURCE_PROPERTIES_STORED,
ERROR_NOT_QUORUM_CLASS,
ERROR_CORE_RESOURCE,
ERROR_QUORUM_RESOURCE_ONLINE_FAILED,
ERROR_QUORUMLOG_OPEN_FAILED,
ERROR_CLUSTERLOG_CORRUPT,
ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE,
ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE,
ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND,
ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE,
ERROR_QUORUM_OWNER_ALIVE,
ERROR_NETWORK_NOT_AVAILABLE,
ERROR_NODE_NOT_AVAILABLE,
ERROR_ALL_NODES_NOT_AVAILABLE,
ERROR_RESOURCE_FAILED,
ERROR_CLUSTER_INVALID_NODE,
ERROR_CLUSTER_NODE_EXISTS,
ERROR_CLUSTER_JOIN_IN_PROGRESS,
ERROR_CLUSTER_NODE_NOT_FOUND,
ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND,
ERROR_CLUSTER_NETWORK_EXISTS,
ERROR_CLUSTER_NETWORK_NOT_FOUND,
ERROR_CLUSTER_NETINTERFACE_EXISTS,
ERROR_CLUSTER_NETINTERFACE_NOT_FOUND,
ERROR_CLUSTER_INVALID_REQUEST,
ERROR_CLUSTER_INVALID_NETWORK_PROVIDER,
ERROR_CLUSTER_NODE_DOWN,
ERROR_CLUSTER_NODE_UNREACHABLE,
ERROR_CLUSTER_NODE_NOT_MEMBER,
ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS,
ERROR_CLUSTER_INVALID_NETWORK, // = 5054
ERROR_CLUSTER_NODE_UP = 5056,
ERROR_CLUSTER_IPADDR_IN_USE,
ERROR_CLUSTER_NODE_NOT_PAUSED,
ERROR_CLUSTER_NO_SECURITY_CONTEXT,
ERROR_CLUSTER_NETWORK_NOT_INTERNAL,
ERROR_CLUSTER_NODE_ALREADY_UP,
ERROR_CLUSTER_NODE_ALREADY_DOWN,
ERROR_CLUSTER_NETWORK_ALREADY_ONLINE,
ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE,
ERROR_CLUSTER_NODE_ALREADY_MEMBER,
ERROR_CLUSTER_LAST_INTERNAL_NETWORK,
ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS,
ERROR_INVALID_OPERATION_ON_QUORUM,
ERROR_DEPENDENCY_NOT_ALLOWED,
ERROR_CLUSTER_NODE_PAUSED,
ERROR_NODE_CANT_HOST_RESOURCE,
ERROR_CLUSTER_NODE_NOT_READY,
ERROR_CLUSTER_NODE_SHUTTING_DOWN,
ERROR_CLUSTER_JOIN_ABORTED,
ERROR_CLUSTER_INCOMPATIBLE_VERSIONS,
ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED,
ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED,
ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND,
ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED,
ERROR_CLUSTER_RESNAME_NOT_FOUND,
ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED,
ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST,
ERROR_CLUSTER_DATABASE_SEQMISMATCH,
ERROR_RESMON_INVALID_STATE,
ERROR_CLUSTER_GUM_NOT_LOCKER,
ERROR_QUORUM_DISK_NOT_FOUND,
ERROR_DATABASE_BACKUP_CORRUPT,
ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT,
ERROR_RESOURCE_PROPERTY_UNCHANGEABLE, // = 5089
ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE = 5890,
ERROR_CLUSTER_QUORUMLOG_NOT_FOUND,
ERROR_CLUSTER_MEMBERSHIP_HALT,
ERROR_CLUSTER_INSTANCE_ID_MISMATCH,
ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP,
ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH,
ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP,
ERROR_CLUSTER_PARAMETER_MISMATCH,
ERROR_NODE_CANNOT_BE_CLUSTERED,
ERROR_CLUSTER_WRONG_OS_VERSION,
ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME,
ERROR_CLUSCFG_ALREADY_COMMITTED,
ERROR_CLUSCFG_ROLLBACK_FAILED,
ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT,
ERROR_CLUSTER_OLD_VERSION,
ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME, // = 5905
ERROR_ENCRYPTION_FAILED = 6000,
ERROR_DECRYPTION_FAILED,
ERROR_FILE_ENCRYPTED,
ERROR_NO_RECOVERY_POLICY,
ERROR_NO_EFS,
ERROR_WRONG_EFS,
ERROR_NO_USER_KEYS,
ERROR_FILE_NOT_ENCRYPTED,
ERROR_NOT_EXPORT_FORMAT,
ERROR_FILE_READ_ONLY,
ERROR_DIR_EFS_DISALLOWED,
ERROR_EFS_SERVER_NOT_TRUSTED,
ERROR_BAD_RECOVERY_POLICY,
ERROR_EFS_ALG_BLOB_TOO_BIG,
ERROR_VOLUME_NOT_SUPPORT_EFS,
ERROR_EFS_DISABLED,
ERROR_EFS_VERSION_NOT_SUPPORT, // = 6016
ERROR_NO_BROWSER_SERVERS_FOUND = 6118,
SCHED_E_SERVICE_NOT_LOCALSYSTEM = 6200,
ERROR_CTX_WINSTATION_NAME_INVALID = 7001,
ERROR_CTX_INVALID_PD,
ERROR_CTX_PD_NOT_FOUND,
ERROR_CTX_WD_NOT_FOUND,
ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY,
ERROR_CTX_SERVICE_NAME_COLLISION,
ERROR_CTX_CLOSE_PENDING,
ERROR_CTX_NO_OUTBUF,
ERROR_CTX_MODEM_INF_NOT_FOUND,
ERROR_CTX_INVALID_MODEMNAME,
ERROR_CTX_MODEM_RESPONSE_ERROR,
ERROR_CTX_MODEM_RESPONSE_TIMEOUT,
ERROR_CTX_MODEM_RESPONSE_NO_CARRIER,
ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE,
ERROR_CTX_MODEM_RESPONSE_BUSY,
ERROR_CTX_MODEM_RESPONSE_VOICE,
ERROR_CTX_TD_ERROR, // = 7017
ERROR_CTX_WINSTATION_NOT_FOUND = 7022,
ERROR_CTX_WINSTATION_ALREADY_EXISTS,
ERROR_CTX_WINSTATION_BUSY,
ERROR_CTX_BAD_VIDEO_MODE, // = 7025
ERROR_CTX_GRAPHICS_INVALID = 7035,
ERROR_CTX_LOGON_DISABLED = 7037,
ERROR_CTX_NOT_CONSOLE, // = 7038
ERROR_CTX_CLIENT_QUERY_TIMEOUT = 7040,
ERROR_CTX_CONSOLE_DISCONNECT,
ERROR_CTX_CONSOLE_CONNECT, // = 7042
ERROR_CTX_SHADOW_DENIED = 7044,
ERROR_CTX_WINSTATION_ACCESS_DENIED, // = 7045
ERROR_CTX_INVALID_WD = 7049,
ERROR_CTX_SHADOW_INVALID,
ERROR_CTX_SHADOW_DISABLED,
ERROR_CTX_CLIENT_LICENSE_IN_USE,
ERROR_CTX_CLIENT_LICENSE_NOT_SET,
ERROR_CTX_LICENSE_NOT_AVAILABLE,
ERROR_CTX_LICENSE_CLIENT_INVALID,
ERROR_CTX_LICENSE_EXPIRED,
ERROR_CTX_SHADOW_NOT_RUNNING,
ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE,
ERROR_ACTIVATION_COUNT_EXCEEDED, // = 7059
FRS_ERR_INVALID_API_SEQUENCE = 8001,
FRS_ERR_STARTING_SERVICE,
FRS_ERR_STOPPING_SERVICE,
FRS_ERR_INTERNAL_API,
FRS_ERR_INTERNAL,
FRS_ERR_SERVICE_COMM,
FRS_ERR_INSUFFICIENT_PRIV,
FRS_ERR_AUTHENTICATION,
FRS_ERR_PARENT_INSUFFICIENT_PRIV,
FRS_ERR_PARENT_AUTHENTICATION,
FRS_ERR_CHILD_TO_PARENT_COMM,
FRS_ERR_PARENT_TO_CHILD_COMM,
FRS_ERR_SYSVOL_POPULATE,
FRS_ERR_SYSVOL_POPULATE_TIMEOUT,
FRS_ERR_SYSVOL_IS_BUSY,
FRS_ERR_SYSVOL_DEMOTE,
FRS_ERR_INVALID_SERVICE_PARAMETER, // = 8017
ERROR_DS_NOT_INSTALLED = 8200,
ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY,
ERROR_DS_NO_ATTRIBUTE_OR_VALUE,
ERROR_DS_INVALID_ATTRIBUTE_SYNTAX,
ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED,
ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS,
ERROR_DS_BUSY,
ERROR_DS_UNAVAILABLE,
ERROR_DS_NO_RIDS_ALLOCATED,
ERROR_DS_NO_MORE_RIDS,
ERROR_DS_INCORRECT_ROLE_OWNER,
ERROR_DS_RIDMGR_INIT_ERROR,
ERROR_DS_OBJ_CLASS_VIOLATION,
ERROR_DS_CANT_ON_NON_LEAF,
ERROR_DS_CANT_ON_RDN,
ERROR_DS_CANT_MOD_OBJ_CLASS,
ERROR_DS_CROSS_DOM_MOVE_ERROR,
ERROR_DS_GC_NOT_AVAILABLE,
ERROR_SHARED_POLICY,
ERROR_POLICY_OBJECT_NOT_FOUND,
ERROR_POLICY_ONLY_IN_DS,
ERROR_PROMOTION_ACTIVE,
ERROR_NO_PROMOTION_ACTIVE, // = 8222
ERROR_DS_OPERATIONS_ERROR = 8224,
ERROR_DS_PROTOCOL_ERROR,
ERROR_DS_TIMELIMIT_EXCEEDED,
ERROR_DS_SIZELIMIT_EXCEEDED,
ERROR_DS_ADMIN_LIMIT_EXCEEDED,
ERROR_DS_COMPARE_FALSE,
ERROR_DS_COMPARE_TRUE,
ERROR_DS_AUTH_METHOD_NOT_SUPPORTED,
ERROR_DS_STRONG_AUTH_REQUIRED,
ERROR_DS_INAPPROPRIATE_AUTH,
ERROR_DS_AUTH_UNKNOWN,
ERROR_DS_REFERRAL,
ERROR_DS_UNAVAILABLE_CRIT_EXTENSION,
ERROR_DS_CONFIDENTIALITY_REQUIRED,
ERROR_DS_INAPPROPRIATE_MATCHING,
ERROR_DS_CONSTRAINT_VIOLATION,
ERROR_DS_NO_SUCH_OBJECT,
ERROR_DS_ALIAS_PROBLEM,
ERROR_DS_INVALID_DN_SYNTAX,
ERROR_DS_IS_LEAF,
ERROR_DS_ALIAS_DEREF_PROBLEM,
ERROR_DS_UNWILLING_TO_PERFORM,
ERROR_DS_LOOP_DETECT,
ERROR_DS_NAMING_VIOLATION,
ERROR_DS_OBJECT_RESULTS_TOO_LARGE,
ERROR_DS_AFFECTS_MULTIPLE_DSAS,
ERROR_DS_SERVER_DOWN,
ERROR_DS_LOCAL_ERROR,
ERROR_DS_ENCODING_ERROR,
ERROR_DS_DECODING_ERROR,
ERROR_DS_FILTER_UNKNOWN,
ERROR_DS_PARAM_ERROR,
ERROR_DS_NOT_SUPPORTED,
ERROR_DS_NO_RESULTS_RETURNED,
ERROR_DS_CONTROL_NOT_FOUND,
ERROR_DS_CLIENT_LOOP,
ERROR_DS_REFERRAL_LIMIT_EXCEEDED,
ERROR_DS_SORT_CONTROL_MISSING,
ERROR_DS_OFFSET_RANGE_ERROR, // = 8262
ERROR_DS_ROOT_MUST_BE_NC = 8301,
ERROR_DS_ADD_REPLICA_INHIBITED,
ERROR_DS_ATT_NOT_DEF_IN_SCHEMA,
ERROR_DS_MAX_OBJ_SIZE_EXCEEDED,
ERROR_DS_OBJ_STRING_NAME_EXISTS,
ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA,
ERROR_DS_RDN_DOESNT_MATCH_SCHEMA,
ERROR_DS_NO_REQUESTED_ATTS_FOUND,
ERROR_DS_USER_BUFFER_TO_SMALL,
ERROR_DS_ATT_IS_NOT_ON_OBJ,
ERROR_DS_ILLEGAL_MOD_OPERATION,
ERROR_DS_OBJ_TOO_LARGE,
ERROR_DS_BAD_INSTANCE_TYPE,
ERROR_DS_MASTERDSA_REQUIRED,
ERROR_DS_OBJECT_CLASS_REQUIRED,
ERROR_DS_MISSING_REQUIRED_ATT,
ERROR_DS_ATT_NOT_DEF_FOR_CLASS,
ERROR_DS_ATT_ALREADY_EXISTS, // = 8318
ERROR_DS_CANT_ADD_ATT_VALUES = 8320,
ERROR_DS_SINGLE_VALUE_CONSTRAINT,
ERROR_DS_RANGE_CONSTRAINT,
ERROR_DS_ATT_VAL_ALREADY_EXISTS,
ERROR_DS_CANT_REM_MISSING_ATT,
ERROR_DS_CANT_REM_MISSING_ATT_VAL,
ERROR_DS_ROOT_CANT_BE_SUBREF,
ERROR_DS_NO_CHAINING,
ERROR_DS_NO_CHAINED_EVAL,
ERROR_DS_NO_PARENT_OBJECT,
ERROR_DS_PARENT_IS_AN_ALIAS,
ERROR_DS_CANT_MIX_MASTER_AND_REPS,
ERROR_DS_CHILDREN_EXIST,
ERROR_DS_OBJ_NOT_FOUND,
ERROR_DS_ALIASED_OBJ_MISSING,
ERROR_DS_BAD_NAME_SYNTAX,
ERROR_DS_ALIAS_POINTS_TO_ALIAS,
ERROR_DS_CANT_DEREF_ALIAS,
ERROR_DS_OUT_OF_SCOPE,
ERROR_DS_OBJECT_BEING_REMOVED,
ERROR_DS_CANT_DELETE_DSA_OBJ,
ERROR_DS_GENERIC_ERROR,
ERROR_DS_DSA_MUST_BE_INT_MASTER,
ERROR_DS_CLASS_NOT_DSA,
ERROR_DS_INSUFF_ACCESS_RIGHTS,
ERROR_DS_ILLEGAL_SUPERIOR,
ERROR_DS_ATTRIBUTE_OWNED_BY_SAM,
ERROR_DS_NAME_TOO_MANY_PARTS,
ERROR_DS_NAME_TOO_LONG,
ERROR_DS_NAME_VALUE_TOO_LONG,
ERROR_DS_NAME_UNPARSEABLE,
ERROR_DS_NAME_TYPE_UNKNOWN,
ERROR_DS_NOT_AN_OBJECT,
ERROR_DS_SEC_DESC_TOO_SHORT,
ERROR_DS_SEC_DESC_INVALID,
ERROR_DS_NO_DELETED_NAME,
ERROR_DS_SUBREF_MUST_HAVE_PARENT,
ERROR_DS_NCNAME_MUST_BE_NC,
ERROR_DS_CANT_ADD_SYSTEM_ONLY,
ERROR_DS_CLASS_MUST_BE_CONCRETE,
ERROR_DS_INVALID_DMD,
ERROR_DS_OBJ_GUID_EXISTS,
ERROR_DS_NOT_ON_BACKLINK,
ERROR_DS_NO_CROSSREF_FOR_NC,
ERROR_DS_SHUTTING_DOWN,
ERROR_DS_UNKNOWN_OPERATION,
ERROR_DS_INVALID_ROLE_OWNER,
ERROR_DS_COULDNT_CONTACT_FSMO,
ERROR_DS_CROSS_NC_DN_RENAME,
ERROR_DS_CANT_MOD_SYSTEM_ONLY,
ERROR_DS_REPLICATOR_ONLY,
ERROR_DS_OBJ_CLASS_NOT_DEFINED,
ERROR_DS_OBJ_CLASS_NOT_SUBCLASS,
ERROR_DS_NAME_REFERENCE_INVALID,
ERROR_DS_CROSS_REF_EXISTS,
ERROR_DS_CANT_DEL_MASTER_CROSSREF,
ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD,
ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX,
ERROR_DS_DUP_RDN,
ERROR_DS_DUP_OID,
ERROR_DS_DUP_MAPI_ID,
ERROR_DS_DUP_SCHEMA_ID_GUID,
ERROR_DS_DUP_LDAP_DISPLAY_NAME,
ERROR_DS_SEMANTIC_ATT_TEST,
ERROR_DS_SYNTAX_MISMATCH,
ERROR_DS_EXISTS_IN_MUST_HAVE,
ERROR_DS_EXISTS_IN_MAY_HAVE,
ERROR_DS_NONEXISTENT_MAY_HAVE,
ERROR_DS_NONEXISTENT_MUST_HAVE,
ERROR_DS_AUX_CLS_TEST_FAIL,
ERROR_DS_NONEXISTENT_POSS_SUP,
ERROR_DS_SUB_CLS_TEST_FAIL,
ERROR_DS_BAD_RDN_ATT_ID_SYNTAX,
ERROR_DS_EXISTS_IN_AUX_CLS,
ERROR_DS_EXISTS_IN_SUB_CLS,
ERROR_DS_EXISTS_IN_POSS_SUP,
ERROR_DS_RECALCSCHEMA_FAILED,
ERROR_DS_TREE_DELETE_NOT_FINISHED,
ERROR_DS_CANT_DELETE,
ERROR_DS_ATT_SCHEMA_REQ_ID,
ERROR_DS_BAD_ATT_SCHEMA_SYNTAX,
ERROR_DS_CANT_CACHE_ATT,
ERROR_DS_CANT_CACHE_CLASS,
ERROR_DS_CANT_REMOVE_ATT_CACHE,
ERROR_DS_CANT_REMOVE_CLASS_CACHE,
ERROR_DS_CANT_RETRIEVE_DN,
ERROR_DS_MISSING_SUPREF,
ERROR_DS_CANT_RETRIEVE_INSTANCE,
ERROR_DS_CODE_INCONSISTENCY,
ERROR_DS_DATABASE_ERROR,
ERROR_DS_GOVERNSID_MISSING,
ERROR_DS_MISSING_EXPECTED_ATT,
ERROR_DS_NCNAME_MISSING_CR_REF,
ERROR_DS_SECURITY_CHECKING_ERROR,
ERROR_DS_SCHEMA_NOT_LOADED,
ERROR_DS_SCHEMA_ALLOC_FAILED,
ERROR_DS_ATT_SCHEMA_REQ_SYNTAX,
ERROR_DS_GCVERIFY_ERROR,
ERROR_DS_DRA_SCHEMA_MISMATCH,
ERROR_DS_CANT_FIND_DSA_OBJ,
ERROR_DS_CANT_FIND_EXPECTED_NC,
ERROR_DS_CANT_FIND_NC_IN_CACHE,
ERROR_DS_CANT_RETRIEVE_CHILD,
ERROR_DS_SECURITY_ILLEGAL_MODIFY,
ERROR_DS_CANT_REPLACE_HIDDEN_REC,
ERROR_DS_BAD_HIERARCHY_FILE,
ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED,
ERROR_DS_CONFIG_PARAM_MISSING,
ERROR_DS_COUNTING_AB_INDICES_FAILED,
ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED,
ERROR_DS_INTERNAL_FAILURE,
ERROR_DS_UNKNOWN_ERROR,
ERROR_DS_ROOT_REQUIRES_CLASS_TOP,
ERROR_DS_REFUSING_FSMO_ROLES,
ERROR_DS_MISSING_FSMO_SETTINGS,
ERROR_DS_UNABLE_TO_SURRENDER_ROLES,
ERROR_DS_DRA_GENERIC,
ERROR_DS_DRA_INVALID_PARAMETER,
ERROR_DS_DRA_BUSY,
ERROR_DS_DRA_BAD_DN,
ERROR_DS_DRA_BAD_NC,
ERROR_DS_DRA_DN_EXISTS,
ERROR_DS_DRA_INTERNAL_ERROR,
ERROR_DS_DRA_INCONSISTENT_DIT,
ERROR_DS_DRA_CONNECTION_FAILED,
ERROR_DS_DRA_BAD_INSTANCE_TYPE,
ERROR_DS_DRA_OUT_OF_MEM,
ERROR_DS_DRA_MAIL_PROBLEM,
ERROR_DS_DRA_REF_ALREADY_EXISTS,
ERROR_DS_DRA_REF_NOT_FOUND,
ERROR_DS_DRA_OBJ_IS_REP_SOURCE,
ERROR_DS_DRA_DB_ERROR,
ERROR_DS_DRA_NO_REPLICA,
ERROR_DS_DRA_ACCESS_DENIED,
ERROR_DS_DRA_NOT_SUPPORTED,
ERROR_DS_DRA_RPC_CANCELLED,
ERROR_DS_DRA_SOURCE_DISABLED,
ERROR_DS_DRA_SINK_DISABLED,
ERROR_DS_DRA_NAME_COLLISION,
ERROR_DS_DRA_SOURCE_REINSTALLED,
ERROR_DS_DRA_MISSING_PARENT,
ERROR_DS_DRA_PREEMPTED,
ERROR_DS_DRA_ABANDON_SYNC,
ERROR_DS_DRA_SHUTDOWN,
ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET,
ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA,
ERROR_DS_DRA_EXTN_CONNECTION_FAILED,
ERROR_DS_INSTALL_SCHEMA_MISMATCH,
ERROR_DS_DUP_LINK_ID,
ERROR_DS_NAME_ERROR_RESOLVING,
ERROR_DS_NAME_ERROR_NOT_FOUND,
ERROR_DS_NAME_ERROR_NOT_UNIQUE,
ERROR_DS_NAME_ERROR_NO_MAPPING,
ERROR_DS_NAME_ERROR_DOMAIN_ONLY,
ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING,
ERROR_DS_CONSTRUCTED_ATT_MOD,
ERROR_DS_WRONG_OM_OBJ_CLASS,
ERROR_DS_DRA_REPL_PENDING,
ERROR_DS_DS_REQUIRED,
ERROR_DS_INVALID_LDAP_DISPLAY_NAME,
ERROR_DS_NON_BASE_SEARCH,
ERROR_DS_CANT_RETRIEVE_ATTS,
ERROR_DS_BACKLINK_WITHOUT_LINK,
ERROR_DS_EPOCH_MISMATCH,
ERROR_DS_SRC_NAME_MISMATCH,
ERROR_DS_SRC_AND_DST_NC_IDENTICAL,
ERROR_DS_DST_NC_MISMATCH,
ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC,
ERROR_DS_SRC_GUID_MISMATCH,
ERROR_DS_CANT_MOVE_DELETED_OBJECT,
ERROR_DS_PDC_OPERATION_IN_PROGRESS,
ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD,
ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION,
ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS,
ERROR_DS_NC_MUST_HAVE_NC_PARENT,
ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE,
ERROR_DS_DST_DOMAIN_NOT_NATIVE,
ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER,
ERROR_DS_CANT_MOVE_ACCOUNT_GROUP,
ERROR_DS_CANT_MOVE_RESOURCE_GROUP,
ERROR_DS_INVALID_SEARCH_FLAG,
ERROR_DS_NO_TREE_DELETE_ABOVE_NC,
ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE,
ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE,
ERROR_DS_SAM_INIT_FAILURE,
ERROR_DS_SENSITIVE_GROUP_VIOLATION,
ERROR_DS_CANT_MOD_PRIMARYGROUPID,
ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD,
ERROR_DS_NONSAFE_SCHEMA_CHANGE,
ERROR_DS_SCHEMA_UPDATE_DISALLOWED,
ERROR_DS_CANT_CREATE_UNDER_SCHEMA,
ERROR_DS_INSTALL_NO_SRC_SCH_VERSION,
ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE,
ERROR_DS_INVALID_GROUP_TYPE,
ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN,
ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN,
ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER,
ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER,
ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER,
ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER,
ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER,
ERROR_DS_HAVE_PRIMARY_MEMBERS,
ERROR_DS_STRING_SD_CONVERSION_FAILED,
ERROR_DS_NAMING_MASTER_GC,
ERROR_DS_LOOKUP_FAILURE,
ERROR_DS_COULDNT_UPDATE_SPNS,
ERROR_DS_CANT_RETRIEVE_SD,
ERROR_DS_KEY_NOT_UNIQUE,
ERROR_DS_WRONG_LINKED_ATT_SYNTAX,
ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD,
ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY,
ERROR_DS_CANT_START,
ERROR_DS_INIT_FAILURE,
ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION,
ERROR_DS_SOURCE_DOMAIN_IN_FOREST,
ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST,
ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED,
ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN,
ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER,
ERROR_DS_SRC_SID_EXISTS_IN_FOREST,
ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH,
ERROR_SAM_INIT_FAILURE,
ERROR_DS_DRA_SCHEMA_INFO_SHIP,
ERROR_DS_DRA_SCHEMA_CONFLICT,
ERROR_DS_DRA_EARLIER_SCHEMA_CONLICT,
ERROR_DS_DRA_OBJ_NC_MISMATCH,
ERROR_DS_NC_STILL_HAS_DSAS,
ERROR_DS_GC_REQUIRED,
ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY,
ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS,
ERROR_DS_CANT_ADD_TO_GC,
ERROR_DS_NO_CHECKPOINT_WITH_PDC,
ERROR_DS_SOURCE_AUDITING_NOT_ENABLED,
ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC,
ERROR_DS_INVALID_NAME_FOR_SPN,
ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS,
ERROR_DS_UNICODEPWD_NOT_IN_QUOTES,
ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED,
ERROR_DS_MUST_BE_RUN_ON_DST_DC,
ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER,
ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ,
ERROR_DS_INIT_FAILURE_CONSOLE,
ERROR_DS_SAM_INIT_FAILURE_CONSOLE,
ERROR_DS_FOREST_VERSION_TOO_HIGH,
ERROR_DS_DOMAIN_VERSION_TOO_HIGH,
ERROR_DS_FOREST_VERSION_TOO_LOW,
ERROR_DS_DOMAIN_VERSION_TOO_LOW,
ERROR_DS_INCOMPATIBLE_VERSION,
ERROR_DS_LOW_DSA_VERSION,
ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN,
ERROR_DS_NOT_SUPPORTED_SORT_ORDER,
ERROR_DS_NAME_NOT_UNIQUE,
ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4,
ERROR_DS_OUT_OF_VERSION_STORE,
ERROR_DS_INCOMPATIBLE_CONTROLS_USED,
ERROR_DS_NO_REF_DOMAIN,
ERROR_DS_RESERVED_LINK_ID,
ERROR_DS_LINK_ID_NOT_AVAILABLE,
ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER,
ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE,
ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC,
ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG,
ERROR_DS_MODIFYDN_WRONG_GRANDPARENT,
ERROR_DS_NAME_ERROR_TRUST_REFERRAL,
ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER,
ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD,
ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2,
ERROR_DS_THREAD_LIMIT_EXCEEDED,
ERROR_DS_NOT_CLOSEST,
ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF,
ERROR_DS_SINGLE_USER_MODE_FAILED,
ERROR_DS_NTDSCRIPT_SYNTAX_ERROR,
ERROR_DS_NTDSCRIPT_PROCESS_ERROR,
ERROR_DS_DIFFERENT_REPL_EPOCHS,
ERROR_DS_DRS_EXTENSIONS_CHANGED,
ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR,
ERROR_DS_NO_MSDS_INTID,
ERROR_DS_DUP_MSDS_INTID,
ERROR_DS_EXISTS_IN_RDNATTID,
ERROR_DS_AUTHORIZATION_FAILED,
ERROR_DS_INVALID_SCRIPT,
ERROR_DS_REMOTE_CROSSREF_OP_FAILED,
ERROR_DS_CROSS_REF_BUSY,
ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN,
ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC,
ERROR_DS_DUPLICATE_ID_FOUND,
ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT,
ERROR_DS_GROUP_CONVERSION_ERROR,
ERROR_DS_CANT_MOVE_APP_BASIC_GROUP,
ERROR_DS_CANT_MOVE_APP_QUERY_GROUP,
ERROR_DS_ROLE_NOT_VERIFIED,
ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL,
ERROR_DS_DOMAIN_RENAME_IN_PROGRESS,
ERROR_DS_EXISTING_AD_CHILD_NC, // = 8613
DNS_ERROR_RCODE_FORMAT_ERROR = 9001,
DNS_ERROR_RCODE_SERVER_FAILURE,
DNS_ERROR_RCODE_NAME_ERROR,
DNS_ERROR_RCODE_NOT_IMPLEMENTED,
DNS_ERROR_RCODE_REFUSED,
DNS_ERROR_RCODE_YXDOMAIN,
DNS_ERROR_RCODE_YXRRSET,
DNS_ERROR_RCODE_NXRRSET,
DNS_ERROR_RCODE_NOTAUTH,
DNS_ERROR_RCODE_NOTZONE, // = 9010
DNS_ERROR_RCODE_BADSIG = 9016,
DNS_ERROR_RCODE_BADKEY,
DNS_ERROR_RCODE_BADTIME, // = 9018
DNS_INFO_NO_RECORDS = 9501,
DNS_ERROR_BAD_PACKET,
DNS_ERROR_NO_PACKET,
DNS_ERROR_RCODE,
DNS_ERROR_UNSECURE_PACKET, // = 9505
DNS_ERROR_INVALID_TYPE = 9551,
DNS_ERROR_INVALID_IP_ADDRESS,
DNS_ERROR_INVALID_PROPERTY,
DNS_ERROR_TRY_AGAIN_LATER,
DNS_ERROR_NOT_UNIQUE,
DNS_ERROR_NON_RFC_NAME,
DNS_STATUS_FQDN,
DNS_STATUS_DOTTED_NAME,
DNS_STATUS_SINGLE_PART_NAME,
DNS_ERROR_INVALID_NAME_CHAR,
DNS_ERROR_NUMERIC_NAME,
DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER,
DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION,
DNS_ERROR_CANNOT_FIND_ROOT_HINTS,
DNS_ERROR_INCONSISTENT_ROOT_HINTS, // = 9565
DNS_ERROR_ZONE_DOES_NOT_EXIST = 9601,
DNS_ERROR_NO_ZONE_INFO,
DNS_ERROR_INVALID_ZONE_OPERATION,
DNS_ERROR_ZONE_CONFIGURATION_ERROR,
DNS_ERROR_ZONE_HAS_NO_SOA_RECORD,
DNS_ERROR_ZONE_HAS_NO_NS_RECORDS,
DNS_ERROR_ZONE_LOCKED,
DNS_ERROR_ZONE_CREATION_FAILED,
DNS_ERROR_ZONE_ALREADY_EXISTS,
DNS_ERROR_AUTOZONE_ALREADY_EXISTS,
DNS_ERROR_INVALID_ZONE_TYPE,
DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP,
DNS_ERROR_ZONE_NOT_SECONDARY,
DNS_ERROR_NEED_SECONDARY_ADDRESSES,
DNS_ERROR_WINS_INIT_FAILED,
DNS_ERROR_NEED_WINS_SERVERS,
DNS_ERROR_NBSTAT_INIT_FAILED,
DNS_ERROR_SOA_DELETE_INVALID,
DNS_ERROR_FORWARDER_ALREADY_EXISTS,
DNS_ERROR_ZONE_REQUIRES_MASTER_IP,
DNS_ERROR_ZONE_IS_SHUTDOWN, // = 9621
DNS_ERROR_PRIMARY_REQUIRES_DATAFILE = 9651,
DNS_ERROR_INVALID_DATAFILE_NAME,
DNS_ERROR_DATAFILE_OPEN_FAILURE,
DNS_ERROR_FILE_WRITEBACK_FAILED,
DNS_ERROR_DATAFILE_PARSING, // = 9655
DNS_ERROR_RECORD_DOES_NOT_EXIST = 9701,
DNS_ERROR_RECORD_FORMAT,
DNS_ERROR_NODE_CREATION_FAILED,
DNS_ERROR_UNKNOWN_RECORD_TYPE,
DNS_ERROR_RECORD_TIMED_OUT,
DNS_ERROR_NAME_NOT_IN_ZONE,
DNS_ERROR_CNAME_LOOP,
DNS_ERROR_NODE_IS_CNAME,
DNS_ERROR_CNAME_COLLISION,
DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT,
DNS_ERROR_RECORD_ALREADY_EXISTS,
DNS_ERROR_SECONDARY_DATA,
DNS_ERROR_NO_CREATE_CACHE_DATA,
DNS_ERROR_NAME_DOES_NOT_EXIST,
DNS_WARNING_PTR_CREATE_FAILED,
DNS_WARNING_DOMAIN_UNDELETED,
DNS_ERROR_DS_UNAVAILABLE,
DNS_ERROR_DS_ZONE_ALREADY_EXISTS,
DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE, // = 9719
DNS_INFO_AXFR_COMPLETE = 9751,
DNS_ERROR_AXFR,
DNS_INFO_ADDED_LOCAL_WINS, // = 9753
DNS_STATUS_CONTINUE_NEEDED = 9801,
DNS_ERROR_NO_TCPIP = 9851,
DNS_ERROR_NO_DNS_SERVERS, // = 9852
DNS_ERROR_DP_DOES_NOT_EXIST = 9901,
DNS_ERROR_DP_ALREADY_EXISTS,
DNS_ERROR_DP_NOT_ENLISTED,
DNS_ERROR_DP_ALREADY_ENLISTED,
DNS_ERROR_DP_NOT_AVAILABLE, // = 9905
/+ already in winsock2.d defined!
WSABASEERR = 10000,
WSAEINTR = 10004,
WSAEBADF = 10009,
WSAEACCES = 10013,
WSAEFAULT, // = 10014
WSAEINVAL = 10022,
WSAEMFILE = 10024,
WSAEWOULDBLOCK = 10035,
WSAEINPROGRESS,
WSAEALREADY,
WSAENOTSOCK,
WSAEDESTADDRREQ,
WSAEMSGSIZE,
WSAEPROTOTYPE,
WSAENOPROTOOPT,
WSAEPROTONOSUPPORT,
WSAESOCKTNOSUPPORT,
WSAEOPNOTSUPP,
WSAEPFNOSUPPORT,
WSAEAFNOSUPPORT,
WSAEADDRINUSE,
WSAEADDRNOTAVAIL,
WSAENETDOWN,
WSAENETUNREACH,
WSAENETRESET,
WSAECONNABORTED,
WSAECONNRESET,
WSAENOBUFS,
WSAEISCONN,
WSAENOTCONN,
WSAESHUTDOWN,
WSAETOOMANYREFS,
WSAETIMEDOUT,
WSAECONNREFUSED,
WSAELOOP,
WSAENAMETOOLONG,
WSAEHOSTDOWN,
WSAEHOSTUNREACH,
WSAENOTEMPTY,
WSAEPROCLIM,
WSAEUSERS,
WSAEDQUOT,
WSAESTALE,
WSAEREMOTE, // = 10071
WSASYSNOTREADY = 10091,
WSAVERNOTSUPPORTED,
WSANOTINITIALISED, // = 10093
WSAEDISCON = 10101,
WSAENOMORE,
WSAECANCELLED,
WSAEINVALIDPROCTABLE,
WSAEINVALIDPROVIDER,
WSAEPROVIDERFAILEDINIT,
WSASYSCALLFAILURE,
WSASERVICE_NOT_FOUND,
WSATYPE_NOT_FOUND,
WSA_E_NO_MORE,
WSA_E_CANCELLED,
WSAEREFUSED, // = 10112
WSAHOST_NOT_FOUND = 11001,
WSATRY_AGAIN,
WSANO_RECOVERY,
WSANO_DATA,
WSA_QOS_RECEIVERS,
WSA_QOS_SENDERS,
WSA_QOS_NO_SENDERS,
WSA_QOS_NO_RECEIVERS,
WSA_QOS_REQUEST_CONFIRMED,
WSA_QOS_ADMISSION_FAILURE,
WSA_QOS_POLICY_FAILURE,
WSA_QOS_BAD_STYLE,
WSA_QOS_BAD_OBJECT,
WSA_QOS_TRAFFIC_CTRL_ERROR,
WSA_QOS_GENERIC_ERROR,
WSA_QOS_ESERVICETYPE,
WSA_QOS_EFLOWSPEC,
WSA_QOS_EPROVSPECBUF,
WSA_QOS_EFILTERSTYLE,
WSA_QOS_EFILTERTYPE,
WSA_QOS_EFILTERCOUNT,
WSA_QOS_EOBJLENGTH,
WSA_QOS_EFLOWCOUNT,
WSA_QOS_EUNKNOWNPSOBJ,
WSA_QOS_EPOLICYOBJ,
WSA_QOS_EFLOWDESC,
WSA_QOS_EPSFLOWSPEC,
WSA_QOS_EPSFILTERSPEC,
WSA_QOS_ESDMODEOBJ,
WSA_QOS_ESHAPERATEOBJ,
WSA_QOS_RESERVED_PETYPE, // = 11031
+/
ERROR_IPSEC_QM_POLICY_EXISTS = 13000,
ERROR_IPSEC_QM_POLICY_NOT_FOUND,
ERROR_IPSEC_QM_POLICY_IN_USE,
ERROR_IPSEC_MM_POLICY_EXISTS,
ERROR_IPSEC_MM_POLICY_NOT_FOUND,
ERROR_IPSEC_MM_POLICY_IN_USE,
ERROR_IPSEC_MM_FILTER_EXISTS,
ERROR_IPSEC_MM_FILTER_NOT_FOUND,
ERROR_IPSEC_TRANSPORT_FILTER_EXISTS,
ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND,
ERROR_IPSEC_MM_AUTH_EXISTS,
ERROR_IPSEC_MM_AUTH_NOT_FOUND,
ERROR_IPSEC_MM_AUTH_IN_USE,
ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND,
ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND,
ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND,
ERROR_IPSEC_TUNNEL_FILTER_EXISTS,
ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND,
ERROR_IPSEC_MM_FILTER_PENDING_DELETION,
ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION,
ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION,
ERROR_IPSEC_MM_POLICY_PENDING_DELETION,
ERROR_IPSEC_MM_AUTH_PENDING_DELETION,
ERROR_IPSEC_QM_POLICY_PENDING_DELETION,
WARNING_IPSEC_MM_POLICY_PRUNED,
WARNING_IPSEC_QM_POLICY_PRUNED, // = 13025
ERROR_IPSEC_IKE_AUTH_FAIL = 13801,
ERROR_IPSEC_IKE_ATTRIB_FAIL,
ERROR_IPSEC_IKE_NEGOTIATION_PENDING,
ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR,
ERROR_IPSEC_IKE_TIMED_OUT,
ERROR_IPSEC_IKE_NO_CERT,
ERROR_IPSEC_IKE_SA_DELETED,
ERROR_IPSEC_IKE_SA_REAPED,
ERROR_IPSEC_IKE_MM_ACQUIRE_DROP,
ERROR_IPSEC_IKE_QM_ACQUIRE_DROP,
ERROR_IPSEC_IKE_QUEUE_DROP_MM,
ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM,
ERROR_IPSEC_IKE_DROP_NO_RESPONSE,
ERROR_IPSEC_IKE_MM_DELAY_DROP,
ERROR_IPSEC_IKE_QM_DELAY_DROP,
ERROR_IPSEC_IKE_ERROR,
ERROR_IPSEC_IKE_CRL_FAILED,
ERROR_IPSEC_IKE_INVALID_KEY_USAGE,
ERROR_IPSEC_IKE_INVALID_CERT_TYPE,
ERROR_IPSEC_IKE_NO_PRIVATE_KEY, // = 13820
ERROR_IPSEC_IKE_DH_FAIL = 13822,
ERROR_IPSEC_IKE_INVALID_HEADER = 13824,
ERROR_IPSEC_IKE_NO_POLICY,
ERROR_IPSEC_IKE_INVALID_SIGNATURE,
ERROR_IPSEC_IKE_KERBEROS_ERROR,
ERROR_IPSEC_IKE_NO_PUBLIC_KEY,
ERROR_IPSEC_IKE_PROCESS_ERR,
ERROR_IPSEC_IKE_PROCESS_ERR_SA,
ERROR_IPSEC_IKE_PROCESS_ERR_PROP,
ERROR_IPSEC_IKE_PROCESS_ERR_TRANS,
ERROR_IPSEC_IKE_PROCESS_ERR_KE,
ERROR_IPSEC_IKE_PROCESS_ERR_ID,
ERROR_IPSEC_IKE_PROCESS_ERR_CERT,
ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ,
ERROR_IPSEC_IKE_PROCESS_ERR_HASH,
ERROR_IPSEC_IKE_PROCESS_ERR_SIG,
ERROR_IPSEC_IKE_PROCESS_ERR_NONCE,
ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY,
ERROR_IPSEC_IKE_PROCESS_ERR_DELETE,
ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR,
ERROR_IPSEC_IKE_INVALID_PAYLOAD,
ERROR_IPSEC_IKE_LOAD_SOFT_SA,
ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN,
ERROR_IPSEC_IKE_INVALID_COOKIE,
ERROR_IPSEC_IKE_NO_PEER_CERT,
ERROR_IPSEC_IKE_PEER_CRL_FAILED,
ERROR_IPSEC_IKE_POLICY_CHANGE,
ERROR_IPSEC_IKE_NO_MM_POLICY,
ERROR_IPSEC_IKE_NOTCBPRIV,
ERROR_IPSEC_IKE_SECLOADFAIL,
ERROR_IPSEC_IKE_FAILSSPINIT,
ERROR_IPSEC_IKE_FAILQUERYSSP,
ERROR_IPSEC_IKE_SRVACQFAIL,
ERROR_IPSEC_IKE_SRVQUERYCRED,
ERROR_IPSEC_IKE_GETSPIFAIL,
ERROR_IPSEC_IKE_INVALID_FILTER,
ERROR_IPSEC_IKE_OUT_OF_MEMORY,
ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED,
ERROR_IPSEC_IKE_INVALID_POLICY,
ERROR_IPSEC_IKE_UNKNOWN_DOI,
ERROR_IPSEC_IKE_INVALID_SITUATION,
ERROR_IPSEC_IKE_DH_FAILURE,
ERROR_IPSEC_IKE_INVALID_GROUP,
ERROR_IPSEC_IKE_ENCRYPT,
ERROR_IPSEC_IKE_DECRYPT,
ERROR_IPSEC_IKE_POLICY_MATCH,
ERROR_IPSEC_IKE_UNSUPPORTED_ID,
ERROR_IPSEC_IKE_INVALID_HASH,
ERROR_IPSEC_IKE_INVALID_HASH_ALG,
ERROR_IPSEC_IKE_INVALID_HASH_SIZE,
ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG,
ERROR_IPSEC_IKE_INVALID_AUTH_ALG,
ERROR_IPSEC_IKE_INVALID_SIG,
ERROR_IPSEC_IKE_LOAD_FAILED,
ERROR_IPSEC_IKE_RPC_DELETE,
ERROR_IPSEC_IKE_BENIGN_REINIT,
ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY, // = 13879
ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN = 13881,
ERROR_IPSEC_IKE_MM_LIMIT,
ERROR_IPSEC_IKE_NEGOTIATION_DISABLED,
ERROR_IPSEC_IKE_NEG_STATUS_END,
ERROR_SXS_SECTION_NOT_FOUND,
ERROR_SXS_CANT_GEN_ACTCTX,
ERROR_SXS_INVALID_ACTCTXDATA_FORMAT,
ERROR_SXS_ASSEMBLY_NOT_FOUND,
ERROR_SXS_MANIFEST_FORMAT_ERROR,
ERROR_SXS_MANIFEST_PARSE_ERROR,
ERROR_SXS_ACTIVATION_CONTEXT_DISABLED,
ERROR_SXS_KEY_NOT_FOUND,
ERROR_SXS_VERSION_CONFLICT,
ERROR_SXS_WRONG_SECTION_TYPE,
ERROR_SXS_THREAD_QUERIES_DISABLED,
ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET,
ERROR_SXS_UNKNOWN_ENCODING_GROUP,
ERROR_SXS_UNKNOWN_ENCODING,
ERROR_SXS_INVALID_XML_NAMESPACE_URI,
ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED,
ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED,
ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE,
ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE,
ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE,
ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT,
ERROR_SXS_DUPLICATE_DLL_NAME,
ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME,
ERROR_SXS_DUPLICATE_CLSID,
ERROR_SXS_DUPLICATE_IID,
ERROR_SXS_DUPLICATE_TLBID,
ERROR_SXS_DUPLICATE_PROGID,
ERROR_SXS_DUPLICATE_ASSEMBLY_NAME,
ERROR_SXS_FILE_HASH_MISMATCH,
ERROR_SXS_POLICY_PARSE_ERROR,
ERROR_SXS_XML_E_MISSINGQUOTE,
ERROR_SXS_XML_E_COMMENTSYNTAX,
ERROR_SXS_XML_E_BADSTARTNAMECHAR,
ERROR_SXS_XML_E_BADNAMECHAR,
ERROR_SXS_XML_E_BADCHARINSTRING,
ERROR_SXS_XML_E_XMLDECLSYNTAX,
ERROR_SXS_XML_E_BADCHARDATA,
ERROR_SXS_XML_E_MISSINGWHITESPACE,
ERROR_SXS_XML_E_EXPECTINGTAGEND,
ERROR_SXS_XML_E_MISSINGSEMICOLON,
ERROR_SXS_XML_E_UNBALANCEDPAREN,
ERROR_SXS_XML_E_INTERNALERROR,
ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE,
ERROR_SXS_XML_E_INCOMPLETE_ENCODING,
ERROR_SXS_XML_E_MISSING_PAREN,
ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE,
ERROR_SXS_XML_E_MULTIPLE_COLONS,
ERROR_SXS_XML_E_INVALID_DECIMAL,
ERROR_SXS_XML_E_INVALID_HEXIDECIMAL,
ERROR_SXS_XML_E_INVALID_UNICODE,
ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK,
ERROR_SXS_XML_E_UNEXPECTEDENDTAG,
ERROR_SXS_XML_E_UNCLOSEDTAG,
ERROR_SXS_XML_E_DUPLICATEATTRIBUTE,
ERROR_SXS_XML_E_MULTIPLEROOTS,
ERROR_SXS_XML_E_INVALIDATROOTLEVEL,
ERROR_SXS_XML_E_BADXMLDECL,
ERROR_SXS_XML_E_MISSINGROOT,
ERROR_SXS_XML_E_UNEXPECTEDEOF,
ERROR_SXS_XML_E_BADPEREFINSUBSET,
ERROR_SXS_XML_E_UNCLOSEDSTARTTAG,
ERROR_SXS_XML_E_UNCLOSEDENDTAG,
ERROR_SXS_XML_E_UNCLOSEDSTRING,
ERROR_SXS_XML_E_UNCLOSEDCOMMENT,
ERROR_SXS_XML_E_UNCLOSEDDECL,
ERROR_SXS_XML_E_UNCLOSEDCDATA,
ERROR_SXS_XML_E_RESERVEDNAMESPACE,
ERROR_SXS_XML_E_INVALIDENCODING,
ERROR_SXS_XML_E_INVALIDSWITCH,
ERROR_SXS_XML_E_BADXMLCASE,
ERROR_SXS_XML_E_INVALID_STANDALONE,
ERROR_SXS_XML_E_UNEXPECTED_STANDALONE,
ERROR_SXS_XML_E_INVALID_VERSION,
ERROR_SXS_XML_E_MISSINGEQUALS,
ERROR_SXS_PROTECTION_RECOVERY_FAILED,
ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT,
ERROR_SXS_PROTECTION_CATALOG_NOT_VALID,
ERROR_SXS_UNTRANSLATABLE_HRESULT,
ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING,
ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE,
ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME // = 14080
}
enum : HRESULT {
S_OK = 0x00000000,
S_FALSE = 0x00000001,
NOERROR = 0x00000000,
E_PENDING = 0x8000000A,
E_NOTIMPL = 0x80004001,
E_NOINTERFACE = 0x80004002,
E_POINTER = 0x80004003,
E_ABORT = 0x80004004,
E_FAIL = 0x80004005,
E_ACCESSDENIED = 0x80070005,
E_HANDLE = 0x80070006,
E_OUTOFMEMORY = 0x8007000E,
E_INVALIDARG = 0x80070057,
E_UNEXPECTED = 0x8000FFFF,
CO_E_INIT_TLS = 0x80004006,
CO_E_INIT_SHARED_ALLOCATOR = 0x80004007,
CO_E_INIT_MEMORY_ALLOCATOR = 0x80004008,
CO_E_INIT_CLASS_CACHE = 0x80004009,
CO_E_INIT_RPC_CHANNEL = 0x8000400A,
CO_E_INIT_TLS_SET_CHANNEL_CONTROL = 0x8000400B,
CO_E_INIT_TLS_CHANNEL_CONTROL = 0x8000400C,
CO_E_INIT_UNACCEPTED_USER_ALLOCATOR = 0x8000400D,
CO_E_INIT_SCM_MUTEX_EXISTS = 0x8000400E,
CO_E_INIT_SCM_FILE_MAPPING_EXISTS = 0x8000400F,
CO_E_INIT_SCM_MAP_VIEW_OF_FILE = 0x80004010,
CO_E_INIT_SCM_EXEC_FAILURE = 0x80004011,
CO_E_INIT_ONLY_SINGLE_THREADED = 0x80004012,
RPC_E_CALL_REJECTED = 0x80010001,
RPC_E_CALL_CANCELED = 0x80010002,
RPC_E_CANTPOST_INSENDCALL = 0x80010003,
RPC_E_CANTCALLOUT_INASYNCCALL = 0x80010004,
RPC_E_CANTCALLOUT_INEXTERNALCALL = 0x80010005,
RPC_E_CONNECTION_TERMINATED = 0x80010006,
RPC_E_SERVER_DIED = 0x80010007,
RPC_E_CLIENT_DIED = 0x80010008,
RPC_E_INVALID_DATAPACKET = 0x80010009,
RPC_E_CANTTRANSMIT_CALL = 0x8001000A,
RPC_E_CLIENT_CANTMARSHAL_DATA = 0x8001000B,
RPC_E_CLIENT_CANTUNMARSHAL_DATA = 0x8001000C,
RPC_E_SERVER_CANTMARSHAL_DATA = 0x8001000D,
RPC_E_SERVER_CANTUNMARSHAL_DATA = 0x8001000E,
RPC_E_INVALID_DATA = 0x8001000F,
RPC_E_INVALID_PARAMETER = 0x80010010,
RPC_E_CANTCALLOUT_AGAIN = 0x80010011,
RPC_E_SERVER_DIED_DNE = 0x80010012,
RPC_E_SYS_CALL_FAILED = 0x80010100,
RPC_E_OUT_OF_RESOURCES = 0x80010101,
RPC_E_ATTEMPTED_MULTITHREAD = 0x80010102,
RPC_E_NOT_REGISTERED = 0x80010103,
RPC_E_FAULT = 0x80010104,
RPC_E_SERVERFAULT = 0x80010105,
RPC_E_CHANGED_MODE = 0x80010106,
RPC_E_INVALIDMETHOD = 0x80010107,
RPC_E_DISCONNECTED = 0x80010108,
RPC_E_RETRY = 0x80010109,
RPC_E_SERVERCALL_RETRYLATER = 0x8001010A,
RPC_E_SERVERCALL_REJECTED = 0x8001010B,
RPC_E_INVALID_CALLDATA = 0x8001010C,
RPC_E_CANTCALLOUT_ININPUTSYNCCALL = 0x8001010D,
RPC_E_WRONG_THREAD = 0x8001010E,
RPC_E_THREAD_NOT_INIT = 0x8001010F,
RPC_E_UNEXPECTED = 0x8001FFFF,
DISP_E_UNKNOWNINTERFACE = 0x80020001,
DISP_E_MEMBERNOTFOUND = 0x80020003,
DISP_E_PARAMNOTFOUND = 0x80020004,
DISP_E_TYPEMISMATCH = 0x80020005,
DISP_E_UNKNOWNNAME = 0x80020006,
DISP_E_NONAMEDARGS = 0x80020007,
DISP_E_BADVARTYPE = 0x80020008,
DISP_E_EXCEPTION = 0x80020009,
DISP_E_OVERFLOW = 0x8002000A,
DISP_E_BADINDEX = 0x8002000B,
DISP_E_UNKNOWNLCID = 0x8002000C,
DISP_E_ARRAYISLOCKED = 0x8002000D,
DISP_E_BADPARAMCOUNT = 0x8002000E,
DISP_E_PARAMNOTOPTIONAL = 0x8002000F,
DISP_E_BADCALLEE = 0x80020010,
DISP_E_NOTACOLLECTION = 0x80020011,
DISP_E_DIVBYZERO = 0x80020012,
TYPE_E_BUFFERTOOSMALL = 0x80028016,
TYPE_E_INVDATAREAD = 0x80028018,
TYPE_E_UNSUPFORMAT = 0x80028019,
TYPE_E_REGISTRYACCESS = 0x8002801C,
TYPE_E_LIBNOTREGISTERED = 0x8002801D,
TYPE_E_UNDEFINEDTYPE = 0x80028027,
TYPE_E_QUALIFIEDNAMEDISALLOWED = 0x80028028,
TYPE_E_INVALIDSTATE = 0x80028029,
TYPE_E_WRONGTYPEKIND = 0x8002802A,
TYPE_E_ELEMENTNOTFOUND = 0x8002802B,
TYPE_E_AMBIGUOUSNAME = 0x8002802C,
TYPE_E_NAMECONFLICT = 0x8002802D,
TYPE_E_UNKNOWNLCID = 0x8002802E,
TYPE_E_DLLFUNCTIONNOTFOUND = 0x8002802F,
TYPE_E_BADMODULEKIND = 0x800288BD,
TYPE_E_SIZETOOBIG = 0x800288C5,
TYPE_E_DUPLICATEID = 0x800288C6,
TYPE_E_INVALIDID = 0x800288CF,
TYPE_E_TYPEMISMATCH = 0x80028CA0,
TYPE_E_OUTOFBOUNDS = 0x80028CA1,
TYPE_E_IOERROR = 0x80028CA2,
TYPE_E_CANTCREATETMPFILE = 0x80028CA3,
TYPE_E_CANTLOADLIBRARY = 0x80029C4A,
TYPE_E_INCONSISTENTPROPFUNCS = 0x80029C83,
TYPE_E_CIRCULARTYPE = 0x80029C84,
STG_E_INVALIDFUNCTION = 0x80030001,
STG_E_FILENOTFOUND = 0x80030002,
STG_E_PATHNOTFOUND = 0x80030003,
STG_E_TOOMANYOPENFILES = 0x80030004,
STG_E_ACCESSDENIED = 0x80030005,
STG_E_INVALIDHANDLE = 0x80030006,
STG_E_INSUFFICIENTMEMORY = 0x80030008,
STG_E_INVALIDPOINTER = 0x80030009,
STG_E_NOMOREFILES = 0x80030012,
STG_E_DISKISWRITEPROTECTED = 0x80030013,
STG_E_SEEKERROR = 0x80030019,
STG_E_WRITEFAULT = 0x8003001D,
STG_E_READFAULT = 0x8003001E,
STG_E_SHAREVIOLATION = 0x80030020,
STG_E_LOCKVIOLATION = 0x80030021,
STG_E_FILEALREADYEXISTS = 0x80030050,
STG_E_INVALIDPARAMETER = 0x80030057,
STG_E_MEDIUMFULL = 0x80030070,
STG_E_ABNORMALAPIEXIT = 0x800300FA,
STG_E_INVALIDHEADER = 0x800300FB,
STG_E_INVALIDNAME = 0x800300FC,
STG_E_UNKNOWN = 0x800300FD,
STG_E_UNIMPLEMENTEDFUNCTION = 0x800300FE,
STG_E_INVALIDFLAG = 0x800300FF,
STG_E_INUSE = 0x80030100,
STG_E_NOTCURRENT = 0x80030101,
STG_E_REVERTED = 0x80030102,
STG_E_CANTSAVE = 0x80030103,
STG_E_OLDFORMAT = 0x80030104,
STG_E_OLDDLL = 0x80030105,
STG_E_SHAREREQUIRED = 0x80030106,
STG_E_NOTFILEBASEDSTORAGE = 0x80030107,
STG_E_EXTANTMARSHALLINGS = 0x80030108,
STG_S_CONVERTED = 0x00030200,
OLE_E_FIRST = 0x80040000,
OLE_S_FIRST = 0x00040000,
OLE_E_OLEVERB = 0x80040000,
OLE_S_USEREG = 0x00040000,
OLE_E_ADVF = 0x80040001,
OLE_S_STATIC = 0x00040001,
OLE_E_ENUM_NOMORE = 0x80040002,
OLE_S_MAC_CLIPFORMAT = 0x00040002,
OLE_E_ADVISENOTSUPPORTED = 0x80040003,
OLE_E_NOCONNECTION = 0x80040004,
OLE_E_NOTRUNNING = 0x80040005,
OLE_E_NOCACHE = 0x80040006,
OLE_E_BLANK = 0x80040007,
OLE_E_CLASSDIFF = 0x80040008,
OLE_E_CANT_GETMONIKER = 0x80040009,
OLE_E_CANT_BINDTOSOURCE = 0x8004000A,
OLE_E_STATIC = 0x8004000B,
OLE_E_PROMPTSAVECANCELLED = 0x8004000C,
OLE_E_INVALIDRECT = 0x8004000D,
OLE_E_WRONGCOMPOBJ = 0x8004000E,
OLE_E_INVALIDHWND = 0x8004000F,
OLE_E_NOT_INPLACEACTIVE = 0x80040010,
OLE_E_CANTCONVERT = 0x80040011,
OLE_E_NOSTORAGE = 0x80040012,
DV_E_FORMATETC = 0x80040064,
DV_E_DVTARGETDEVICE = 0x80040065,
DV_E_STGMEDIUM = 0x80040066,
DV_E_STATDATA = 0x80040067,
DV_E_LINDEX = 0x80040068,
DV_E_TYMED = 0x80040069,
DV_E_CLIPFORMAT = 0x8004006A,
DV_E_DVASPECT = 0x8004006B,
DV_E_DVTARGETDEVICE_SIZE = 0x8004006C,
DV_E_NOIVIEWOBJECT = 0x8004006D,
OLE_E_LAST = 0x800400FF,
OLE_S_LAST = 0x000400FF,
DRAGDROP_E_FIRST = 0x80040100,
DRAGDROP_S_FIRST = 0x00040100,
DRAGDROP_E_NOTREGISTERED = 0x80040100,
DRAGDROP_S_DROP = 0x00040100,
DRAGDROP_E_ALREADYREGISTERED = 0x80040101,
DRAGDROP_S_CANCEL = 0x00040101,
DRAGDROP_E_INVALIDHWND = 0x80040102,
DRAGDROP_S_USEDEFAULTCURSORS = 0x00040102,
DRAGDROP_E_LAST = 0x8004010F,
DRAGDROP_S_LAST = 0x0004010F,
CLASSFACTORY_E_FIRST = 0x80040110,
CLASSFACTORY_S_FIRST = 0x00040110,
CLASS_E_NOAGGREGATION = 0x80040110,
CLASS_E_CLASSNOTAVAILABLE = 0x80040111,
CLASSFACTORY_E_LAST = 0x8004011F,
CLASSFACTORY_S_LAST = 0x0004011F,
MARSHAL_E_FIRST = 0x80040120,
MARSHAL_S_FIRST = 0x00040120,
MARSHAL_E_LAST = 0x8004012F,
MARSHAL_S_LAST = 0x0004012F,
DATA_E_FIRST = 0x80040130,
DATA_S_FIRST = 0x00040130,
DATA_S_SAMEFORMATETC = 0x00040130,
DATA_E_LAST = 0x8004013F,
DATA_S_LAST = 0x0004013F,
VIEW_E_FIRST = 0x80040140,
VIEW_S_FIRST = 0x00040140,
VIEW_E_DRAW = 0x80040140,
VIEW_S_ALREADY_FROZEN = 0x00040140,
VIEW_E_LAST = 0x8004014F,
VIEW_S_LAST = 0x0004014F,
REGDB_E_FIRST = 0x80040150,
REGDB_S_FIRST = 0x00040150,
REGDB_E_READREGDB = 0x80040150,
REGDB_E_WRITEREGDB = 0x80040151,
REGDB_E_KEYMISSING = 0x80040152,
REGDB_E_INVALIDVALUE = 0x80040153,
REGDB_E_CLASSNOTREG = 0x80040154,
REGDB_E_IIDNOTREG = 0x80040155,
REGDB_E_LAST = 0x8004015F,
REGDB_S_LAST = 0x0004015F,
CACHE_E_FIRST = 0x80040170,
CACHE_S_FIRST = 0x00040170,
CACHE_E_NOCACHE_UPDATED = 0x80040170,
CACHE_S_FORMATETC_NOTSUPPORTED = 0x00040170,
CACHE_S_SAMECACHE = 0x00040171,
CACHE_S_SOMECACHES_NOTUPDATED = 0x00040172,
CACHE_E_LAST = 0x8004017F,
CACHE_S_LAST = 0x0004017F,
OLEOBJ_E_FIRST = 0x80040180,
OLEOBJ_S_FIRST = 0x00040180,
OLEOBJ_E_NOVERBS = 0x80040180,
OLEOBJ_S_INVALIDVERB = 0x00040180,
OLEOBJ_E_INVALIDVERB = 0x80040181,
OLEOBJ_S_CANNOT_DOVERB_NOW = 0x00040181,
OLEOBJ_S_INVALIDHWND = 0x00040182,
OLEOBJ_E_LAST = 0x8004018F,
OLEOBJ_S_LAST = 0x0004018F,
CLIENTSITE_E_FIRST = 0x80040190,
CLIENTSITE_S_FIRST = 0x00040190,
CLIENTSITE_E_LAST = 0x8004019F,
CLIENTSITE_S_LAST = 0x0004019F,
INPLACE_E_NOTUNDOABLE = 0x800401A0,
INPLACE_E_FIRST = 0x800401A0,
INPLACE_S_FIRST = 0x000401A0,
INPLACE_S_TRUNCATED = 0x000401A0,
INPLACE_E_NOTOOLSPACE = 0x800401A1,
INPLACE_E_LAST = 0x800401AF,
INPLACE_S_LAST = 0x000401AF,
ENUM_E_FIRST = 0x800401B0,
ENUM_S_FIRST = 0x000401B0,
ENUM_E_LAST = 0x800401BF,
ENUM_S_LAST = 0x000401BF,
CONVERT10_E_FIRST = 0x800401C0,
CONVERT10_S_FIRST = 0x000401C0,
CONVERT10_E_OLESTREAM_GET = 0x800401C0,
CONVERT10_S_NO_PRESENTATION = 0x000401C0,
CONVERT10_E_OLESTREAM_PUT = 0x800401C1,
CONVERT10_E_OLESTREAM_FMT = 0x800401C2,
CONVERT10_E_OLESTREAM_BITMAP_TO_DIB = 0x800401C3,
CONVERT10_E_STG_FMT = 0x800401C4,
CONVERT10_E_STG_NO_STD_STREAM = 0x800401C5,
CONVERT10_E_STG_DIB_TO_BITMAP = 0x800401C6,
CONVERT10_E_LAST = 0x800401CF,
CONVERT10_S_LAST = 0x000401CF,
CLIPBRD_E_FIRST = 0x800401D0,
CLIPBRD_S_FIRST = 0x000401D0,
CLIPBRD_E_CANT_OPEN = 0x800401D0,
CLIPBRD_E_CANT_EMPTY = 0x800401D1,
CLIPBRD_E_CANT_SET = 0x800401D2,
CLIPBRD_E_BAD_DATA = 0x800401D3,
CLIPBRD_E_CANT_CLOSE = 0x800401D4,
CLIPBRD_E_LAST = 0x800401DF,
CLIPBRD_S_LAST = 0x000401DF,
MK_E_FIRST = 0x800401E0,
MK_S_FIRST = 0x000401E0,
MK_E_CONNECTMANUALLY = 0x800401E0,
MK_E_EXCEEDEDDEADLINE = 0x800401E1,
MK_E_NEEDGENERIC = 0x800401E2,
MK_S_REDUCED_TO_SELF = 0x000401E2,
MK_E_UNAVAILABLE = 0x800401E3,
MK_E_SYNTAX = 0x800401E4,
MK_S_ME = 0x000401E4,
MK_E_NOOBJECT = 0x800401E5,
MK_S_HIM = 0x000401E5,
MK_E_INVALIDEXTENSION = 0x800401E6,
MK_S_US = 0x000401E6,
MK_E_INTERMEDIATEINTERFACENOTSUPPORTED = 0x800401E7,
MK_S_MONIKERALREADYREGISTERED = 0x000401E7,
MK_E_NOTBINDABLE = 0x800401E8,
MK_E_NOTBOUND = 0x800401E9,
MK_E_CANTOPENFILE = 0x800401EA,
MK_E_MUSTBOTHERUSER = 0x800401EB,
MK_E_NOINVERSE = 0x800401EC,
MK_E_NOSTORAGE = 0x800401ED,
MK_E_NOPREFIX = 0x800401EE,
MK_E_LAST = 0x800401EF,
MK_S_LAST = 0x000401EF,
MK_E_ENUMERATION_FAILED = 0x800401EF,
CO_E_FIRST = 0x800401F0,
CO_S_FIRST = 0x000401F0,
CO_E_NOTINITIALIZED = 0x800401F0,
CO_E_ALREADYINITIALIZED = 0x800401F1,
CO_E_CANTDETERMINECLASS = 0x800401F2,
CO_E_CLASSSTRING = 0x800401F3,
CO_E_IIDSTRING = 0x800401F4,
CO_E_APPNOTFOUND = 0x800401F5,
CO_E_APPSINGLEUSE = 0x800401F6,
CO_E_ERRORINAPP = 0x800401F7,
CO_E_DLLNOTFOUND = 0x800401F8,
CO_E_ERRORINDLL = 0x800401F9,
CO_E_WRONGOSFORAPP = 0x800401FA,
CO_E_OBJNOTREG = 0x800401FB,
CO_E_OBJISREG = 0x800401FC,
CO_E_OBJNOTCONNECTED = 0x800401FD,
CO_E_APPDIDNTREG = 0x800401FE,
CO_E_LAST = 0x800401FF,
CO_S_LAST = 0x000401FF,
CO_E_RELEASED = 0x800401FF,
CO_E_CLASS_CREATE_FAILED = 0x80080001,
CO_E_SCM_ERROR = 0x80080002,
CO_E_SCM_RPC_FAILURE = 0x80080003,
CO_E_BAD_PATH = 0x80080004,
CO_E_SERVER_EXEC_FAILURE = 0x80080005,
CO_E_OBJSRV_RPC_FAILURE = 0x80080006,
MK_E_NO_NORMALIZED = 0x80080007,
CO_E_SERVER_STOPPING = 0x80080008,
MEM_E_INVALID_ROOT = 0x80080009,
MEM_E_INVALID_LINK = 0x80080010,
MEM_E_INVALID_SIZE = 0x80080011,
CO_S_NOTALLINTERFACES = 0x00080012,
NTE_BAD_UID = 0x80090001,
NTE_BAD_HASH = 0x80090002,
NTE_BAD_KEY = 0x80090003,
NTE_BAD_LEN = 0x80090004,
NTE_BAD_DATA = 0x80090005,
NTE_BAD_SIGNATURE = 0x80090006,
NTE_BAD_VER = 0x80090007,
NTE_BAD_ALGID = 0x80090008,
NTE_BAD_FLAGS = 0x80090009,
NTE_BAD_TYPE = 0x8009000A,
NTE_BAD_KEY_STATE = 0x8009000B,
NTE_BAD_HASH_STATE = 0x8009000C,
NTE_NO_KEY = 0x8009000D,
NTE_NO_MEMORY = 0x8009000E,
NTE_EXISTS = 0x8009000F,
NTE_PERM = 0x80090010,
NTE_NOT_FOUND = 0x80090011,
NTE_DOUBLE_ENCRYPT = 0x80090012,
NTE_BAD_PROVIDER = 0x80090013,
NTE_BAD_PROV_TYPE = 0x80090014,
NTE_BAD_PUBLIC_KEY = 0x80090015,
NTE_BAD_KEYSET = 0x80090016,
NTE_PROV_TYPE_NOT_DEF = 0x80090017,
NTE_PROV_TYPE_ENTRY_BAD = 0x80090018,
NTE_KEYSET_NOT_DEF = 0x80090019,
NTE_KEYSET_ENTRY_BAD = 0x8009001A,
NTE_PROV_TYPE_NO_MATCH = 0x8009001B,
NTE_SIGNATURE_FILE_BAD = 0x8009001C,
NTE_PROVIDER_DLL_FAIL = 0x8009001D,
NTE_PROV_DLL_NOT_FOUND = 0x8009001E,
NTE_BAD_KEYSET_PARAM = 0x8009001F,
NTE_FAIL = 0x80090020,
NTE_SYS_ERR = 0x80090021
}
enum : uint {
SEVERITY_SUCCESS = 0,
SEVERITY_ERROR = 1
}
enum : uint {
FACILITY_NULL = 0,
FACILITY_RPC,
FACILITY_DISPATCH,
FACILITY_STORAGE,
FACILITY_ITF, // = 4
FACILITY_WIN32 = 7,
FACILITY_WINDOWS = 8,
FACILITY_CONTROL = 10,
FACILITY_NT_BIT = 0x10000000
}
// C Macros
pure nothrow @nogc {
bool SUCCEEDED(HRESULT Status) {
return Status >= 0;
}
bool FAILED(HRESULT Status) {
return Status < 0;
}
bool IS_ERROR(HRESULT Status) {
return (Status >>> 31) == SEVERITY_ERROR;
}
ushort HRESULT_CODE(HRESULT r) {
return cast(ushort) (r & 0xFFFF);
}
ushort SCODE_CODE(SCODE r) {
return cast(ushort) (r & 0xFFFF);
}
ushort HRESULT_FACILITY(HRESULT r) {
return cast(ushort) ((r>>16) & 0x1fff);
}
ushort SCODE_FACILITY(SCODE r) {
return cast(ushort) ((r>>16) & 0x1fff);
}
ushort HRESULT_SEVERITY(HRESULT r) {
return cast(ushort) ((r>>31) & 0x1);
}
ushort SCODE_SEVERITY(SCODE r) {
return cast(ushort) ((r>>31) & 0x1);
}
HRESULT MAKE_HRESULT(bool s, uint f, uint c) {
return (s << 31) | (f << 16) | c;
}
SCODE MAKE_SCODE(bool s, uint f, uint c) {
return (s << 31) | (f << 16) | c;
}
SCODE GetScode(HRESULT hr) {
return hr;
}
HRESULT ResultFromScode(SCODE c) {
return c;
}
HRESULT HRESULT_FROM_NT(HRESULT x) {
return x | FACILITY_NT_BIT;
}
HRESULT HRESULT_FROM_WIN32(HRESULT x) {
return x ? (x & 0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000 : 0;
}
HRESULT PropagateResult(HRESULT hrPrevious, SCODE scBase) {
return scBase;
}
}
|
D
|
// URL: https://atcoder.jp/contests/arc045/tasks/arc045_b
import std.algorithm, std.container, std.conv, std.math, std.range, std.typecons, std.stdio, std.string;
auto rdsp(){return readln.splitter;}
void pick(R,T)(ref R r,ref T t){t=r.front.to!T;r.popFront;}
void pickV(R,T...)(ref R r,ref T t){foreach(ref v;t)pick(r,v);}
void readV(T...)(ref T t){auto r=rdsp;foreach(ref v;t)pick(r,v);}
void readA(T)(size_t n,ref T[]t){t=new T[](n);auto r=rdsp;foreach(ref v;t)pick(r,v);}
void readM(T)(size_t r,size_t c,ref T[][]t){t=new T[][](r);foreach(ref v;t)readA(c,v);}
void readC(T...)(size_t n,ref T t){foreach(ref v;t)v=new typeof(v)(n);foreach(i;0..n){auto r=rdsp;foreach(ref v;t)pick(r,v[i]);}}
void readS(T)(size_t n,ref T t){t=new T(n);foreach(ref v;t){auto r=rdsp;foreach(ref j;v.tupleof)pick(r,j);}}
void writeA(T)(size_t n,T t){foreach(i,v;t.enumerate){write(v);if(i<n-1)write(" ");}writeln;}
version(unittest) {} else
void main()
{
int n, m; readV(n, m);
int[] s, t; readC(m, s, t); --s[];
auto a = new int[](n+1);
foreach (i; 0..m) {
++a[s[i]];
--a[t[i]];
}
foreach (i; 1..n+1) a[i] += a[i-1];
auto st = a.sparseTable;
int[] r;
foreach (i; 0..m)
if (st[s[i]..t[i]] >= 2) r ~= i+1;
writeln(r.length);
foreach (ri; r) writeln(ri);
}
class SparseTable(alias pred, T)
{
import std.algorithm, std.functional;
alias predFun = binaryFun!pred;
size_t[] logTable;
size_t[][] rmq;
size_t n;
T[] a;
this(T[] a)
{
this.a = a;
this.n = a.length;
logTable = new size_t[n+1];
foreach (i; 2..n+1)
logTable[i] = logTable[i>>1]+1;
rmq = new size_t[][](logTable[n]+1, n);
foreach (i; 0..n) rmq[0][i] = i;
for (size_t k = 1; (1<<k) < n; ++k)
for (size_t i = 0; i+(1<<k) <= n; ++i) {
auto x = rmq[k-1][i];
auto y = rmq[k-1][i+(1<<k-1)];
rmq[k][i] = predFun(a[x], a[y]) == a[x] ? x : y;
}
}
pure T opSlice(size_t l, size_t r)
{
auto k = logTable[r-l-1];
auto x = rmq[k][l];
auto y = rmq[k][r-(1<<k)];
return predFun(a[x], a[y]);
}
pure size_t opDollar() { return n; }
}
auto sparseTable(alias pred = "a < b ? a : b", T)(T[] a) { return new SparseTable!(pred, T)(a); }
|
D
|
module basics.mainloop;
/* This class supervises all the major menus and browsers, game, and editor,
* which are members of this class.
*
* To kill the game at any time, hit Shift + ESC.
* This breaks straight out of the main loop. Unsaved data is lost.
*
* How to use this class: Instantiate, run mainLoop() once, and then
* exit the program when that function is done.
*/
import core.memory;
import basics.alleg5;
import basics.globconf;
import basics.globals;
import editor.editor;
import game.core.game;
import file.filename; // running levels from the command-line
import file.log; // logging uncaught Exceptions
import hardware.display;
import hardware.keyboard;
import hardware.music;
import menu.askname;
import menu.browser.replay;
import menu.browser.single;
import menu.lobby.lobby;
import menu.mainmenu;
import menu.options;
static import gui;
static import hardware.keyboard;
static import hardware.mouse;
static import hardware.mousecur;
static import hardware.sound;
class MainLoop {
bool exit;
MainMenu mainMenu;
BrowserSingle browSin;
Lobby lobby;
BrowserReplay browRep;
OptionsMenu optionsMenu;
MenuAskName askName;
Game game;
Editor editor;
enum AfterGameGoto { single, replays }
AfterGameGoto _afterGameGoto;
public:
this(in Cmdargs cmdargs)
{
// I don't like this function. This takes 1 or 2 arguments, finds out
// which level and replay to run, and creates a game with that.
// Maybe the replay should be responsibile for finding the level?
auto args = cmdargs.fileArgs;
if (args.length >= 1) {
import level.level;
import game.replay;
auto rp = Replay.loadFromFile(args[$-1]);
if (! cmdargs.preferPointedTo) {
auto lv = new Level(args[0]);
if (lv.good) {
this.game = new Game(Runmode.INTERACTIVE, lv, args[0],
rp.empty ? null : rp);
return;
}
}
// The level in the replay file was bad or unwanted.
auto lv = new Level(rp.levelFilename);
if (lv.good)
this.game = new Game(Runmode.INTERACTIVE, lv,
rp.levelFilename, rp.empty ? null : rp);
// DTODO: render an error on the graphical screen
}
// if no fileArgs, let calc() decide what menu to spawn
}
void mainLoop()
{
try while (true) {
immutable lastTick = timerTicks;
calc();
if (exit) break;
draw();
while (lastTick == timerTicks)
al_rest(0.001);
}
catch (Throwable firstThr) {
// Uncaught exceptions, assert errors, and assert (false) should
// fly straight out of main and terminate the program. Since
// Windows users won't run the game from a shell, they should
// retrieve the error message from the logfile, in addition.
// In a release build, assert (false) crashes instead of throwing.
for (Throwable thr = firstThr; thr !is null; thr = thr.next) {
logf("%s:%d:", thr.file, thr.line);
log(thr.msg);
log(thr.info.toString());
}
if (editor)
editor.emergencySave();
throw firstThr;
}
kill();
}
private void kill()
{
if (game) {
game.dispose();
destroy(game);
game = null;
}
if (editor) {
gui.rmElder(editor);
destroy(editor);
editor = null;
}
if (mainMenu) {
gui.rmElder(mainMenu);
mainMenu = null;
}
if (browSin) {
gui.rmElder(browSin);
destroy(browSin); // DTODO: check what is best here. There is a
// Torbit to be destroyed in browser's preview.
browSin = null;
}
if (lobby) {
lobby.disconnect();
gui.rmElder(lobby);
lobby = null;
}
if (browRep) {
gui.rmElder(browRep);
destroy(browRep); // see comment for destroy(browSin)
browRep = null;
}
if (optionsMenu) {
gui.rmElder(optionsMenu);
optionsMenu = null;
}
if (askName) {
gui.rmElder(askName);
askName = null;
}
core.memory.GC.collect();
}
private void calc()
{
hardware.mousecur.mouseCursor.xf = 0;
hardware.mousecur.mouseCursor.yf = 0;
hardware.display .calc();
hardware.mouse .calc();
hardware.keyboard.calcCallThisAfterMouseCalc();
gui .calc();
exit = exit
|| hardware.display.displayCloseWasClicked()
|| shiftHeld() && keyTapped(ALLEGRO_KEY_ESCAPE);
if (exit) {
return;
}
else if (mainMenu) {
// no need to calc the menu, it's a GUI elder
if (mainMenu.gotoSingle) {
kill();
browSin = new BrowserSingle;
gui.addElder(browSin);
}
else if (mainMenu.gotoNetwork) {
kill();
lobby = new Lobby(null);
gui.addElder(lobby);
}
else if (mainMenu.gotoReplays) {
kill();
browRep = new BrowserReplay;
gui.addElder(browRep);
}
else if (mainMenu.gotoOptions) {
kill();
optionsMenu = new OptionsMenu;
gui.addElder(optionsMenu);
}
else if (mainMenu.exitProgram) {
exit = true;
}
}
else if (browSin || browRep) {
auto brow = (browSin !is null ? browSin : browRep);
if (brow.gotoGame) {
auto fn = brow.fileRecent;
auto lv = brow.levelRecent;
auto rp = brow.replayRecent;
_afterGameGoto = (brow is browSin ? AfterGameGoto.single
: AfterGameGoto.replays);
kill();
game = new Game(Runmode.INTERACTIVE, lv, fn, rp);
}
else if (browSin && (browSin.gotoEditorNewLevel
|| browSin.gotoEditorLoadFileRecent)
) {
auto fn = browSin.gotoEditorLoadFileRecent
? browSin.fileRecent : null;
kill();
editor = new Editor(fn);
gui.addElder(editor);
}
else if (brow.gotoMainMenu) {
kill();
mainMenu = new MainMenu;
gui.addElder(mainMenu);
}
}
else if (lobby) {
if (lobby.gotoGame) {
auto net = lobby.loseOwnershipOfRichClient();
kill();
game = new Game(net);
}
else if (lobby.gotoMainMenu) {
kill();
mainMenu = new MainMenu;
gui.addElder(mainMenu);
}
}
else if (optionsMenu) {
if (optionsMenu.gotoMainMenu) {
kill();
mainMenu = new MainMenu;
gui.addElder(mainMenu);
}
}
else if (askName) {
if (askName.gotoMainMenu) {
kill();
mainMenu = new MainMenu;
gui.addElder(mainMenu);
}
else if (askName.gotoExitApp)
exit = true;
}
else if (game) {
game.calc();
if (game.gotoMainMenu) {
suggestMusic(fileMusicMenu);
auto net = game.loseOwnershipOfRichClient();
kill();
if (net) {
lobby = new Lobby(net);
gui.addElder(lobby);
}
else if (_afterGameGoto == AfterGameGoto.replays) {
browRep = new BrowserReplay;
gui.addElder(browRep);
}
else {
browSin = new BrowserSingle;
gui.addElder(browSin);
}
}
}
else if (editor) {
// editor is a GUI elder, thus already calced
if (editor.gotoMainMenu) {
kill();
browSin = new BrowserSingle();
gui.addElder(browSin);
suggestMusic(fileMusicMenu);
}
}
else {
// program has just started, nothing exists yet
if (basics.globconf.userName.length) {
mainMenu = new MainMenu;
gui.addElder(mainMenu);
}
else {
askName = new MenuAskName;
gui.addElder(askName);
}
suggestMusic(fileMusicMenu);
}
}
private void draw()
{
// mainMenu etc. are GUI Windows. Those have been added as elders and
// are therefore supervised by module gui.root.
// Even the editor is a gui elder.
if (game)
game.draw();
gui.draw();
if (! askName)
hardware.mousecur.draw();
hardware.sound.draw();
flip_display();
}
}
// end class MainLoop
|
D
|
<?xml version="1.0" encoding="ASCII" standalone="no"?>
<di:SashWindowsMngr xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmi:version="2.0">
<pageList>
<availablePage>
<emfPageIdentifier href="VAR_20_BeT-9531758921.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</availablePage>
</pageList>
<sashModel currentSelection="//@sashModel/@windows.0/@children.0">
<windows>
<children xsi:type="di:TabFolder">
<children>
<emfPageIdentifier href="VAR_20_BeT-9531758921.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</children>
</children>
</windows>
</sashModel>
</di:SashWindowsMngr>
|
D
|
// Copyright © 2012, Jakob Bornecrantz. All rights reserved.
// See copyright notice in src/charge/charge.d (GPLv2 only).
module miners.classic.playerphysics;
import std.math : floor, fmin, fmax, abs;
import charge.math.quatd;
import charge.math.point3d;
import charge.math.vector3d;
import miners.types;
/**
* Handles player physics interaction against a axis aligned terrain.
*/
class PlayerPhysics
{
public:
alias ubyte delegate(int x, int y, int z) BlockDg;
enum : ubyte {
AIR = 0x0,
FULL = 0x1,
HALF = 0x3,
LIQUID = 0x2,
}
ubyte[256] blockType = [
AIR, // Air // 0
FULL, // Stone
FULL, // Grass
FULL, // Dirt
FULL, // Cobblestone
FULL, // Wooden plank
AIR, // Sapling
FULL, // Bedrock
LIQUID, // Water // 8
LIQUID, // Water s.
LIQUID, // Lava
LIQUID, // Lava s.
FULL, // Sand
FULL, // Gravel
FULL, // Gold ore
FULL, // Iron ore
FULL, // Coal ore // 16
FULL, // Wood
FULL, // Leaves
FULL, // Sponge
FULL, // Glass
FULL, // Red Cloth
FULL, // Orange Cloth
FULL, // Yellow Cloth
FULL, // Lime Cloth // 24
FULL, // Green Cloth
FULL, // Aqua Green Cloth
FULL, // Cyan Cloth
FULL, // Blue Cloth
FULL, // Purple Cloth
FULL, // Indigo Cloth
FULL, // Violet Cloth
FULL, // Magenta Cloth // 32
FULL, // Pink Cloth
FULL, // Black Cloth
FULL, // Gray Cloth
FULL, // White Cloth
AIR, // Dandilion
AIR, // Rose
AIR, // Brow Mushroom
AIR, // Red Mushroom // 40
FULL, // Gold Block
FULL, // Iron Block
FULL, // Double Slabs
HALF, // Slab
FULL, // Brick Block
FULL, // TNT
FULL, // Bookshelf
FULL, // Moss Stone // 48
FULL, // Obsidian
];
// Initial values not really used and overwritten by ClassicScene.
int speedRun = 1000;
int speedWalk = 43;
const double camHeight = 1.505;
const double playerSize = 0.32;
const double playerHeight = 1.62;
const double gravity = 9.8 / 2000.0;
const double jumpFactor = 0.12 - gravity;
const double jumpDoubleFactor = jumpFactor * 1.2;
const double waterGravity = gravity / 4;
const double waterJumpFactor = waterGravity * 1.8;
bool doubleOk;
bool doubleJumped;
Vector3d oldVel;
double ySlideOffset;
bool forward;
bool backward;
bool left;
bool right;
bool run;
bool up; // Camera
bool down; // Camera
bool jump;
bool crouch;
bool flying;
bool noClip;
protected:
BlockDg getBlock;
public:
this(BlockDg getBlock)
{
this.getBlock = getBlock;
oldVel = Vector3d();
ySlideOffset = 0;
}
/**
* Move the player in the given heading.
*/
Point3d movePlayer(Point3d pos, double heading)
{
if (noClip)
return movePlayerNoClip(pos, heading);
else
return movePlayerClip(pos, heading);
}
/**
* Moves the player using a floating camera type mover.
*/
Point3d movePlayerNoClip(Point3d pos, double heading)
{
Vector3d vel = getMoveVector(heading);
// Moving up and down.
if ((jump || up) ^ down)
vel.y += down ? -velSpeed : velSpeed;
// No physics.
pos += vel;
// Reset
oldVel = Vector3d();
return pos;
}
/**
* Moves the player using physics.
*
* XXX: No water/lava physics yet.
*/
Point3d movePlayerClip(Point3d posIn, double heading)
{
Vector3d vel = getMoveVector(heading);
bool collidesX, collidesY, collidesZ;
Aabb current;
// Adjust before copying or we forget about things.
posIn.y += ySlideOffset;
// Copy so we can adjust it.
auto pos = posIn;
// Adjust for the position being the camera.
pos.y -= camHeight;
// Get the current bounding box.
getCollisionBox(pos, current);
// Ground status
bool ground = getIsOnGround(current);
// Do we touch liquid.
bool liquid = getTouchLiquid(current);
// Ignore the old velocity if on the ground.
if (flying) {
if ((jump || up) ^ down)
vel.y += down ? -velSpeed : velSpeed;
doubleOk = false;
doubleJumped = true;
} else if (liquid) {
ground = false;
doubleOk = false;
doubleJumped = true;
vel.scale(0.02);
vel += oldVel;
vel.y = vel.y - waterGravity;
if (jump || up) {
ySlideOffset = 0;
auto test = current;
test.minY += 0.2;
if (getTouchLiquid(test)) {
vel.y += waterJumpFactor;
} else {
vel.y += jumpFactor / 2;
}
}
vel.scale(0.8);
} else if (ground) {
vel.y = -gravity;
doubleOk = false;
// To stop people from double jump when falling off cliffs.
doubleJumped = true;
if (jump || up) {
vel.y = jumpFactor;
ySlideOffset = 0;
ground = false;
doubleJumped = false;
}
} else {
vel.scale(0.02);
vel += oldVel;
vel.y = vel.y - gravity;
// Implements double jump.
if (jump || up) {
if (vel.y < 0 && !doubleJumped && doubleOk) {
vel.y = jumpDoubleFactor;
ySlideOffset = 0;
doubleJumped = true;
doubleOk = false;
}
} else {
// Only double jump after the player
// has released the jump button.
doubleOk = true;
}
}
auto fullVel = vel;
doCollisions(vel, pos, current, collidesX, collidesY, collidesZ);
if (ground && ySlideOffset < 0.01 && (collidesX || collidesZ)) {
pos.y += 0.5;
getCollisionBox(pos, current);
auto tmp = fullVel;
doCollisions(tmp, pos, current, collidesX, collidesY, collidesZ);
// Is kinda smart now, maybe something smarter isn't needed.
if (abs(vel.x) < abs(tmp.x) ||
abs(vel.z) < abs(tmp.z)) {
vel.x = tmp.x;
vel.z = tmp.z;
posIn.y += 0.5;
ySlideOffset += 0.5;
}
}
if (ground && (jump || up) && ySlideOffset < 0.05)
ySlideOffset += 0.5;
ySlideOffset *= 0.9;
oldVel = vel;
posIn += vel;
// Adjust for ySlide when stepping up half steps.
if (ySlideOffset < 0.05)
ySlideOffset = 0;
posIn.y -= ySlideOffset;
return posIn;
}
protected:
/**
* Returns a normalized vector combining the heading and
* the left/right/forward/backward movment booleans.
*/
Vector3d getMoveVector(double heading)
{
// Create a rotation, that we can get
// the different vectors from.
auto rot = Quatd(heading, 0, 0);
Vector3d vel = Vector3d();
if (forward != backward) {
auto v = rot.rotateHeading();
if (backward)
v.scale(-1);
vel += v;
}
if (left != right) {
auto v = rot.rotateLeft();
if (right)
v.scale(-1);
vel += v;
}
// Normalize function is safe.
vel.normalize();
// Scale the speed vector.
vel.scale(velSpeed());
return vel;
}
/**
* The speed at which we move.
*/
final double velSpeed()
{
return (run ? speedRun : speedWalk) / 1000.0;
}
/**
* Returns the player collision AABB.
*/
final void getCollisionBox(ref Point3d pos, ref Aabb current)
{
current.minX = pos.x - playerSize;
current.maxX = pos.x + playerSize;
current.minY = pos.y;
current.maxY = pos.y + playerHeight;
current.minZ = pos.z - playerSize;
current.maxZ = pos.z + playerSize;
}
/**
* Adjusts vel according to collisions, current is also changed.
*/
final void doCollisions(ref Vector3d vel, ref Point3d pos, ref Aabb current,
out bool colX, out bool colY, out bool colZ)
{
Aabb[64] stack = void;
Aabb test;
double v, old;
v = vel.x;
old = pos.x;
if (v != 0) {
test = current;
double x = old + v;
if (v < 0)
test.minX += v;
else
test.maxX += v;
auto num = getColliders(test, current, stack);
if (num > 0) {
if (v < 0) {
foreach(ref b; stack[0 .. num])
x = fmax(x, b.maxX + playerSize + 0.00001);
} else {
foreach(ref b; stack[0 .. num])
x = fmin(x, b.minX - playerSize - 0.00001);
}
colX = true;
vel.x = x - old;
}
current.minX = x - playerSize;
current.maxX = x + playerSize;
}
v = vel.z;
old = pos.z;
if (v != 0) {
test = current;
double z = old + v;
if (v < 0)
test.minZ += v;
else
test.maxZ += v;
auto num = getColliders(test, current, stack);
if (num > 0) {
if (v < 0) {
foreach(ref b; stack[0 .. num])
z = fmax(z, b.maxZ + playerSize + 0.00001);
} else {
foreach(ref b; stack[0 .. num])
z = fmin(z, b.minZ - playerSize - 0.00001);
}
colZ = true;
vel.z = z - old;
}
current.minZ = z - playerSize;
current.maxZ = z + playerSize;
}
v = vel.y;
old = pos.y;
if (v != 0) {
test = current;
double y = old + v;
if (v < 0)
test.minY += v;
else
test.maxY += v;
auto num = getColliders(test, current, stack);
if (num > 0) {
if (v < 0) {
foreach(ref b; stack[0 .. num])
y = fmax(y, b.maxY + 0.00001);
} else {
foreach(ref b; stack[0 .. num])
y = fmin(y, b.minY - playerHeight - 0.00001);
}
colY = true;
vel.y = y - old;
}
current.minY = y;
current.maxY = y + playerHeight;
}
}
/**
* Checks if the player will touch the ground this frame.
*/
bool getIsOnGround(ref Aabb current)
{
Aabb[64] stack = void;
Aabb test;
test = current;
test.minY -= gravity;
if (getColliders(test, current, stack) > 0)
return true;
return false;
}
static align(16) struct Aabb
{
double minX, minY, minZ;
double maxX, maxY, maxZ;
bool collides(ref Aabb c)
{
if (minX <= c.maxX && maxX > c.minX)
if (minZ <= c.maxZ && maxZ > c.minZ)
if (minY <= c.maxY && maxY > c.minY)
return true;
return false;
}
}
final int getColliders(ref Aabb inc, ref Aabb excluding, Aabb[] result)
{
int num;
Aabb test;
int minX = cast(int)floor(inc.minX), minY = cast(int)floor(inc.minY), minZ = cast(int)floor(inc.minZ);
int maxX = cast(int)floor(inc.maxX), maxY = cast(int)floor(inc.maxY), maxZ = cast(int)floor(inc.maxZ);
for (int x = minX; x <= maxX; x++) {
test.minX = x;
test.maxX = x + 1;
for (int z = minZ; z <= maxZ; z++) {
test.minZ = z;
test.maxZ = z + 1;
for (int y = minY; y <= maxY; y++) {
auto t = blockType[getBlock(x, y, z)];
if (t == HALF) {
test.maxY = y + .5;
} else if (t == FULL) {
test.maxY = y + 1;
} else {
continue;
}
test.minY = y;
if (!test.collides(inc))
continue;
if (excluding.collides(test))
continue;
result[num++] = test;
}
}
}
return num;
}
final bool getTouchLiquid(ref Aabb inc)
{
Aabb test;
int minX = cast(int)floor(inc.minX), minY = cast(int)floor(inc.minY), minZ = cast(int)floor(inc.minZ);
int maxX = cast(int)floor(inc.maxX), maxY = cast(int)floor(inc.maxY), maxZ = cast(int)floor(inc.maxZ);
for (int x = minX; x <= maxX; x++) {
test.minX = x;
test.maxX = x + 1;
for (int z = minZ; z <= maxZ; z++) {
test.minZ = z;
test.maxZ = z + 1;
for (int y = minY; y <= maxY; y++) {
if (blockType[getBlock(x, y, z)] != LIQUID)
continue;
test.minY = y;
test.maxY = y + 1;
if (!test.collides(inc))
continue;
return true;
}
}
}
return false;
}
}
|
D
|
var int SkipElzaDay;
var int SkipOnWork;
instance DIA_Addon_Skip_EXIT(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 999;
condition = DIA_Addon_Skip_EXIT_Condition;
information = DIA_Addon_Skip_EXIT_Info;
permanent = TRUE;
description = Dialog_Ende;
};
func int DIA_Addon_Skip_EXIT_Condition()
{
return TRUE;
};
func void DIA_Addon_Skip_EXIT_Info()
{
AI_StopProcessInfos(self);
};
instance DIA_Addon_Skip_PICKPOCKET(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 900;
condition = DIA_Addon_Skip_PICKPOCKET_Condition;
information = DIA_Addon_Skip_PICKPOCKET_Info;
permanent = TRUE;
description = PICKPOCKET_COMM;
};
func int DIA_Addon_Skip_PICKPOCKET_Condition()
{
return C_Beklauen(20,43);
};
func void DIA_Addon_Skip_PICKPOCKET_Info()
{
Info_ClearChoices(DIA_Addon_Skip_PICKPOCKET);
Info_AddChoice(DIA_Addon_Skip_PICKPOCKET,Dialog_Back,DIA_Addon_Skip_PICKPOCKET_BACK);
Info_AddChoice(DIA_Addon_Skip_PICKPOCKET,DIALOG_PICKPOCKET,DIA_Addon_Skip_PICKPOCKET_DoIt);
};
func void DIA_Addon_Skip_PICKPOCKET_DoIt()
{
B_Beklauen();
Info_ClearChoices(DIA_Addon_Skip_PICKPOCKET);
};
func void DIA_Addon_Skip_PICKPOCKET_BACK()
{
Info_ClearChoices(DIA_Addon_Skip_PICKPOCKET);
};
instance DIA_Addon_Skip_Hello(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 1;
condition = DIA_Addon_Skip_Hello_Condition;
information = DIA_Addon_Skip_Hello_Info;
important = TRUE;
};
func int DIA_Addon_Skip_Hello_Condition()
{
if(Npc_IsInState(self,ZS_Talk) && (PlayerTalkedToSkipNW == TRUE))
{
return TRUE;
};
return FALSE;
};
func void DIA_Addon_Skip_Hello_Info()
{
AI_Output(self,other,"DIA_Addon_Skip_Hello_08_00"); //No kdopak to zase kříží cestu starému Skipovi?
AI_Output(self,other,"DIA_Addon_Skip_Hello_08_01"); //Tebe já znám!
AI_Output(self,other,"DIA_Addon_Skip_Hello_08_02"); //Zátoka poblíž města, pamatuješ?
AI_Output(other,self,"DIA_Addon_Skip_Hello_15_03"); //Skip! Správně?
AI_Output(self,other,"DIA_Addon_Skip_Hello_08_04"); //Vidím, že jsem na tebe udělal dojem, že si mě pamatuješ.
AI_Output(self,other,"DIA_Addon_Skip_Hello_08_05"); //Ale zdá se mi, že jsem tvůj obličej musel vidět někde jinde.
AI_Output(self,other,"DIA_Addon_Skip_Hello_08_06"); //Á! Jasně!
B_UseFakeScroll();
AI_Output(self,other,"DIA_Addon_Skip_Hello_08_07"); //No dobrá, není to úplně perfektní podobizna, ale jsi to ty.
AI_Output(self,other,"DIA_Addon_Skip_Hello_08_08"); //Nic se neboj kamaráde. Můj obličej na plakátech nevypadá o nic lépe.
Npc_ExchangeRoutine(self,"Start");
};
instance DIA_Addon_SkipADW_BaltramPaket(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 2;
condition = DIA_Addon_SkipADW_BaltramPaket_Condition;
information = DIA_Addon_SkipADW_BaltramPaket_Info;
description = "Mám pro tebe balík od Baltrama.";
};
func int DIA_Addon_SkipADW_BaltramPaket_Condition()
{
if(Npc_HasItems(other,ItMi_Packet_Baltram4Skip_Addon))
{
return TRUE;
};
return FALSE;
};
func void DIA_Addon_SkipADW_BaltramPaket_Info()
{
AI_Output(other,self,"DIA_Addon_SkipADW_BaltramPaket_15_00"); //Mám pro tebe balík od Baltrama.
AI_Output(self,other,"DIA_Addon_SkipADW_BaltramPaket_08_01"); //(šklebí se) Vypadá to, že si velice přivykl na náš rum.
B_GiveInvItems(other,self,ItMi_Packet_Baltram4Skip_Addon,1);
AI_Output(self,other,"DIA_Addon_SkipADW_BaltramPaket_08_02"); //Tady jsou pro něj 2 láhve rumu. Třetí jsem vypil, když jsem na něj čekal.
B_GiveInvItems(self,other,ItFo_Addon_Rum,2);
B_GivePlayerXP(XP_Addon_Skip_BaltramPaket);
B_LogEntry(TOPIC_Addon_BaltramSkipTrade,LogText_Addon_SkipsRumToBaltram);
Skip_Rum4Baltram = TRUE;
};
instance DIA_Addon_Skip_Job(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 3;
condition = DIA_Addon_Skip_Job_Condition;
information = DIA_Addon_Skip_Job_Info;
description = "Co tady děláš?";
};
func int DIA_Addon_Skip_Job_Condition()
{
return TRUE;
};
func void DIA_Addon_Skip_Job_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_Job_15_00"); //Co tady děláš?
AI_Output(self,other,"DIA_Addon_Skip_Job_08_01"); //Zrovna jsem se vrátil z Khorinisu a teď čekám, až se Greg vrátí.
};
instance DIA_Addon_Skip_ADW_GregGetroffen(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 4;
condition = DIA_Addon_Skip_ADW_GregGetroffen_Condition;
information = DIA_Addon_Skip_ADW_GregGetroffen_Info;
description = "Viděl jsem Grega v Khorinisu.";
};
func int DIA_Addon_Skip_ADW_GregGetroffen_Condition()
{
if((PlayerTalkedToGregNW == TRUE) && (GregIsBack == FALSE) && Npc_KnowsInfo(other,DIA_Addon_Skip_Job))
{
return TRUE;
};
return FALSE;
};
func void DIA_Addon_Skip_ADW_GregGetroffen_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_ADW_GregGetroffen_15_00"); //Viděl jsem Grega v Khorinisu.
AI_Output(self,other,"DIA_Addon_Skip_ADW_GregGetroffen_08_01"); //Opravdu? Do čerta! Něco musí být špatně.
AI_Output(self,other,"DIA_Addon_Skip_ADW_GregGetroffen_08_02"); //Už by tady dávno měl být se svou lodí.
AI_Output(self,other,"DIA_Addon_Skip_ADW_GregGetroffen_08_03"); //(zamyšleně) Bude nejlepší, když se vrátím zpět do Khorinisu, abych se s ním potkal...
AI_Output(self,other,"DIA_Addon_Skip_ADW_GregGetroffen_08_04"); //(povzdech) Ale určitě ne dnes. Zrovna jsem přijel.
B_GivePlayerXP(XP_Ambient);
};
var int Skip_Transport_Variation;
instance DIA_Addon_Skip_Transport(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 99;
condition = DIA_Addon_Skip_Transport_Condition;
information = DIA_Addon_Skip_Transport_Info;
permanent = TRUE;
description = "Můžeš mě vzít zpět do Khorinisu?";
};
func int DIA_Addon_Skip_Transport_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Skip_Job) && (self.aivar[AIV_PARTYMEMBER] == FALSE))
{
return TRUE;
};
return FALSE;
};
func void DIA_Addon_Skip_Transport_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_Transport_15_00"); //Můžeš mě vzít zpět do Khorinisu?
if(GregIsBack == FALSE)
{
AI_Output(self,other,"DIA_Addon_Skip_Transport_08_01"); //Ne. Teďka se ještě nikam nechystám. Nejdřív si dám pořádný hlt grogu.
}
else if(Skip_Transport_Variation == 0)
{
AI_Output(self,other,"DIA_Addon_Skip_Transport_08_02"); //Zbláznil ses? Ztratili jsme naši loď, chlape!
AI_Output(self,other,"DIA_Addon_Skip_Transport_08_03"); //Nebudu riskovat naši poslední loď, jenom proto, že ty jsi moc líný dostat svůj zadek do Khorinisu SÁM!
Skip_Transport_Variation = 1;
}
else
{
AI_Output(self,other,"DIA_Addon_Skip_Transport_08_04"); //Naposled ti říkám: NE!
};
};
instance DIA_Addon_Skip_Bandits(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 6;
condition = DIA_Addon_Skip_Bandits_Condition;
information = DIA_Addon_Skip_Bandits_Info;
description = "Co mi můžeš říct o banditech?";
};
func int DIA_Addon_Skip_Bandits_Condition()
{
return TRUE;
};
func void DIA_Addon_Skip_Bandits_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_Bandits_15_00"); //Co mi můžeš říct o banditech?
AI_Output(self,other,"DIA_Addon_Skip_Bandits_08_01"); //Banditi? Útočí na nás!
AI_Output(self,other,"DIA_Addon_Skip_Bandits_08_02"); //Proč bychom jinak stavěli palisády?
AI_Output(self,other,"DIA_Addon_Skip_Bandits_08_03"); //Vlastně jsme si ty šmejdy sem přivedli sami.
AI_Output(self,other,"DIA_Addon_Skip_Bandits_08_04"); //Prvně jsme s nimi obchodovali. Řeknu ti kamaráde, mají tolik zlata, že už neví kam s ním!
AI_Output(self,other,"DIA_Addon_Skip_Bandits_08_05"); //Za láhev rumu zaplatili pěknou sumičku.
AI_Output(self,other,"DIA_Addon_Skip_Bandits_08_06"); //Ale časy míru jsou ty tam. Teď je válka!
AI_Output(other,self,"DIA_Addon_Erol_Bandits_15_06"); //Co se stalo?
AI_Output(self,other,"DIA_Addon_Skip_Bandits_08_07"); //Ti bastardi nezaplatili za poslední zásilku.
AI_Output(self,other,"DIA_Addon_Skip_Bandits_08_08"); //Byl jsem se tam podívat, abych zjistil, co se stalo s našim zlatem.
AI_Output(self,other,"DIA_Addon_Skip_Bandits_08_09"); //Ale když jsem vstoupil do močálu, ti bastardi na mě začali útočit!
AI_Output(self,other,"DIA_Addon_Skip_Bandits_08_10"); //To ale není vše. Zabili Anguse a Hanka - dva z našich nejlepších lidí.
AI_Output(self,other,"DIA_Addon_Skip_Bandits_08_11"); //Moje rada pro tebe, drž se od toho močálu dál!
AI_Output(self,other,"DIA_Addon_Skip_Bandits_08_12"); //Banditi útočí na každého, kdo vypadá, že se má líp než oni sami.
};
instance DIA_Addon_Skip_ArmorPrice(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 6;
condition = DIA_Addon_Skip_ArmorPrice_Condition;
information = DIA_Addon_Skip_ArmorPrice_Info;
description = "Potřebuji zbroj banditů.";
};
func int DIA_Addon_Skip_ArmorPrice_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Skip_Bandits) && (GregIsBack == FALSE))
{
return TRUE;
};
return FALSE;
};
func void DIA_Addon_Skip_ArmorPrice_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_ArmorPrice_15_00"); //Potřebuji zbroj banditů.
AI_Output(self,other,"DIA_Addon_Skip_ArmorPrice_08_01"); //Ty tam chceš jít? Asi si se úplně zbláznil!
AI_Output(self,other,"DIA_Addon_Skip_ArmorPrice_08_02"); //Jakmile zjistí, že nejsi jeden z nich, je s tebou ámen!
AI_Output(other,self,"DIA_Addon_Skip_ArmorPrice_15_02"); //Nějaký nápad, kde mohu najít takovou zbroj?
AI_Output(self,other,"DIA_Addon_Skip_ArmorPrice_08_03"); //(povzdech) Ty si prostě nedáš říct, že? Dobrá. Měli jsme jedno.
AI_Output(self,other,"DIA_Addon_Skip_ArmorPrice_08_04"); //Pravděpodobně furt leží v Gregově chatrči.
AI_Output(self,other,"DIA_Addon_Skip_ArmorPrice_08_05"); //Až se vrátí, možná ti ho prodá...
B_LogEntry(TOPIC_Addon_BDTRuestung,"Skip si myslí, že zbroj je v Gregově chatrči.");
};
instance DIA_Addon_Skip_GregsHut(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 6;
condition = DIA_Addon_Skip_GregsHut_Condition;
information = DIA_Addon_Skip_GregsHut_Info;
permanent = FALSE;
description = "Nějaký nápad, jak se můžu dostat do jeho chatrče?";
};
func int DIA_Addon_Skip_GregsHut_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Skip_ArmorPrice) && (GregIsBack == FALSE))
{
return TRUE;
};
return FALSE;
};
func void DIA_Addon_Skip_GregsHut_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_GregsHut_15_00"); //Nějaký nápad, jak se můžu dostat do jeho chatrče?
AI_Output(self,other,"DIA_Addon_Skip_GregsHut_08_01"); //Hele! Brzdi!
AI_Output(self,other,"DIA_Addon_Skip_GregsHut_08_02"); //Nechystáš se snad hrabat v Gregových věcech?
AI_Output(self,other,"DIA_Addon_Skip_GregsHut_08_03"); //Když odešel, dal Francisovi klíče a příkaz, že NIKDO nesmí vstoupit do chatrče.
B_LogEntry(TOPIC_Addon_BDTRuestung,"Francis má klíč od Gregovy chatrče, ale má příkaz nikoho nepouštět dovnitř.");
Knows_GregsHut = TRUE;
};
instance DIA_Addon_Skip_Francis(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 6;
condition = DIA_Addon_Skip_Francis_Condition;
information = DIA_Addon_Skip_Francis_Info;
permanent = FALSE;
description = "Co mi můžeš říct o Francisovi?";
};
func int DIA_Addon_Skip_Francis_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Skip_GregsHut))
{
return TRUE;
};
return FALSE;
};
func void DIA_Addon_Skip_Francis_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_Francis_15_00"); //Co mi můžeš říct o Francisovi?
AI_Output(self,other,"DIA_Addon_Skip_Francis_08_01"); //Francis je náš pokladník.
AI_Output(self,other,"DIA_Addon_Skip_Francis_08_02"); //Kapitán mu věří. Proto mu svěřil velení.
AI_Output(self,other,"DIA_Addon_Skip_Francis_08_03"); //Ale nikdo ho tady nebere vážně.
AI_Output(self,other,"DIA_Addon_Skip_Francis_08_04"); //Jestli se chceš dovědět víc, promluv se Samuelem.
AI_Output(self,other,"DIA_Addon_Skip_Francis_08_05"); //Má laboratoř v malé jeskyni na severu odsud.
AI_Output(self,other,"DIA_Addon_Skip_Francis_08_06"); //V tomhle táboře není nikdo, o kom by Samuel nevěděl něco zajímavého...
B_LogEntry(TOPIC_Addon_BDTRuestung,"Měl bych si promluvit se Samuelem. Možná mě může dát nějaký tip.");
};
instance DIA_Addon_Skip_Raven(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 5;
condition = DIA_Addon_Skip_Raven_Condition;
information = DIA_Addon_Skip_Raven_Info;
permanent = FALSE;
description = "Setkal ses někdy s Ravenem?";
};
func int DIA_Addon_Skip_Raven_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Skip_Bandits) == TRUE)
{
return TRUE;
};
return FALSE;
};
func void DIA_Addon_Skip_Raven_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_Raven_15_00"); //Setkal ses někdy s Ravenem?
AI_Output(self,other,"DIA_Addon_Skip_Raven_08_01"); //Jasně, setkal. Byli jsme s Henrym u přední brány na hlídce a viděli jsme, jak Raven posílal některé ze svých lidí do věže na východ odsud.
AI_Output(self,other,"DIA_Addon_Skip_Raven_08_02"); //Z věže je skoro možné dohodit do našeho tábora kamenem. (směje se) Je jasné, že jsou tam proto, aby nás špehovali.
AI_Output(self,other,"DIA_Addon_Skip_Raven_08_03"); //Také jsem viděl, jak skončí lidi, kteří nedělají, co jim přikáže.
AI_Output(self,other,"DIA_Addon_Skip_Raven_08_04"); //Každý kdo neposlechne na slovo, s tím je proces krátký.
AI_Output(self,other,"DIA_Addon_Skip_Raven_08_05"); //Vyvaruj se Ravena, to ti povím.
};
instance DIA_Addon_Skip_AngusHank(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 5;
condition = DIA_Addon_Skip_AngusHank_Condition;
information = DIA_Addon_Skip_AngusHank_Info;
description = "Řekni mi více o Angusovi a Hankovi.";
};
func int DIA_Addon_Skip_AngusHank_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Skip_Bandits))
{
return TRUE;
};
return FALSE;
};
func void DIA_Addon_Skip_AngusHank_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_AngusnHank_15_00"); //Řekni mi více o Angusovi a Hankovi.
AI_Output(self,other,"DIA_Addon_Skip_AngusnHank_08_01"); //Angus a Hank se měli setkat s pár bandity poblíž tábora.
AI_Output(self,other,"DIA_Addon_Skip_AngusnHank_08_02"); //Měli s sebou všechno možné. Vše, o co si ti bastardi řekli.
AI_Output(self,other,"DIA_Addon_Skip_AngusnHank_08_03"); //Surovou ocel, paklíče a další.
AI_Output(self,other,"DIA_Addon_Skip_AngusnHank_08_04"); //Ale zpět se nevrátili. Ty svině je museli odpravit!
AI_Output(self,other,"DIA_Addon_Skip_AngusnHank_08_05"); //Morgan a Bill se po nich byli podívat - bez výsledku.
AI_Output(self,other,"DIA_Addon_Skip_AngusnHank_08_06"); //Bill je z toho pěkně špatný. S Angusem a Hankem byli fakt kamarádi.
AI_Output(self,other,"DIA_Addon_Skip_AngusnHank_08_07"); //Je stále dost mladý a přenést se přes tento incident je pro něj těžší.
AI_Output(self,other,"DIA_Addon_Skip_AngusnHank_08_08"); //Avšak život jde dál. Ztráta věcí se dá přežít. (povzdechne si) Ale ten grog co měli s sebou...
AI_Output(self,other,"DIA_Addon_Skip_AngusnHank_08_09"); //(naštvaně) Mluvíme tu nejméně o 20 láhvích!
MIS_ADDON_SkipsGrog = LOG_Running;
Log_CreateTopic(TOPIC_Addon_SkipsGrog,LOG_MISSION);
Log_SetTopicStatus(TOPIC_Addon_SkipsGrog,LOG_Running);
B_LogEntry(TOPIC_Addon_SkipsGrog,"Banditi nezaplatili Skipovi za 20 láhví grogu. Chce je zpátky!");
Log_AddEntry(TOPIC_Addon_SkipsGrog,"Angus a Hank byli vysláni, aby se setkali s bandity. Od té doby už je nikdo neviděl.");
Log_AddEntry(TOPIC_Addon_SkipsGrog,"Pátrání Morgana a Billa nepřineslo žádné výsledky.");
};
instance DIA_Addon_Skip_AngusHankDead(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 5;
condition = DIA_Addon_Skip_AngusHankDead_Condition;
information = DIA_Addon_Skip_AngusHankDead_Info;
permanent = FALSE;
description = "O Angusovi a Hankovi...";
};
func int DIA_Addon_Skip_AngusHankDead_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Skip_Bandits) && !Npc_HasItems(Angus,ItRi_Addon_MorgansRing_Mission))
{
return TRUE;
};
return FALSE;
};
func void DIA_Addon_Skip_AngusHankDead_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_AngusnHankDead_15_00"); //O Angusovi a Hankovi...
AI_Output(self,other,"DIA_Addon_Skip_AngusnHankDead_08_01"); //Co?
AI_Output(other,self,"DIA_Addon_Skip_AngusnHankDead_15_01"); //Našel jsem je.
AI_Output(other,self,"DIA_Addon_Skip_AngusnHankDead_15_03"); //Jsou mrtví.
AI_Output(self,other,"DIA_Addon_Skip_AngusnHankDead_08_03"); //(pro sebe) zabití... chlapi ubozí...
AI_Output(self,other,"DIA_Addon_Skip_AngusnHankDead_08_04"); //Dobrá, nic víc jsem nečekal.
AI_Output(self,other,"DIA_Addon_Skip_AngusnHankDead_08_05"); //Měl bys dát Billovi vědět, pokud jsi to už neudělal.
AI_Output(self,other,"DIA_Addon_Skip_AngusnHankDead_08_06"); //Ale řekni mu to jemně. Je stále mladý.
};
instance DIA_Addon_Skip_AngusHankMurder(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 5;
condition = DIA_Addon_Skip_AngusHankMurder_Condition;
information = DIA_Addon_Skip_AngusHankMurder_Info;
permanent = FALSE;
description = "Znám vraha Anguse a Hanka.";
};
func int DIA_Addon_Skip_AngusHankMurder_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Skip_AngusHankDead) && (SC_Knows_JuanMurderedAngus == TRUE))
{
return TRUE;
};
return FALSE;
};
func void DIA_Addon_Skip_AngusHankMurder_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_JuanMurder_15_00"); //Znám vraha Anguse a Hanka.
if(MIS_ADDON_SkipsGrog == LOG_SUCCESS)
{
AI_Output(self,other,"DIA_Addon_Skip_AngusHankMurder_08_01"); //To je hezké. Ale jsou oba mrtví. Proč to dál řešit?
AI_Output(self,other,"DIA_Addon_Skip_AngusHankMurder_08_02"); //Díky pomstě pirát nikdy nezbohatl.
AI_Output(self,other,"DIA_Addon_Skip_AngusHankMurder_08_03"); //Nejdůležitější je, abych měl svůj grog zpátky.
}
else
{
AI_Output(self,other,"DIA_Addon_Skip_AngusHankMurder_08_04"); //Vrah mě nezajímá! Co můj grog?!
};
};
instance DIA_Addon_Skip_Grog(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 9;
condition = DIA_Addon_Skip_Grog_Condition;
information = DIA_Addon_Skip_Grog_Info;
permanent = TRUE;
description = "Ohledně grogu...";
};
func int DIA_Addon_Skip_Grog_Condition()
{
if(MIS_ADDON_SkipsGrog == LOG_Running)
{
return TRUE;
};
};
func void DIA_Addon_Skip_Grog_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_Grog_15_00"); //Ohledně grogu...
if(Npc_HasItems(other,ItFo_Addon_Grog) >= 20)
{
Info_ClearChoices(DIA_Addon_Skip_Grog);
Info_AddChoice(DIA_Addon_Skip_Grog,Dialog_Back,DIA_Addon_Skip_Grog_back);
Info_AddChoice(DIA_Addon_Skip_Grog,"Tady je tvých 20 láhví.",DIA_Addon_Skip_Grog_geben);
}
else
{
AI_Output(other,self,"DIA_Addon_Skip_Grog_15_01"); //Postrádáš 20 láhví, že?
AI_Output(self,other,"DIA_Addon_Skip_Grog_08_02"); //Ano, zatraceně. Byly to všechny moje zásoby.
};
};
func void DIA_Addon_Skip_Grog_back()
{
Info_ClearChoices(DIA_Addon_Skip_Grog);
};
func void DIA_Addon_Skip_Grog_geben()
{
AI_Output(other,self,"DIA_Addon_Skip_Grog_geben_15_00"); //Tady je tvých 20 láhví.
B_GiveInvItems(other,self,ItFo_Addon_Grog,20);
B_LogEntry(TOPIC_Addon_SkipsGrog,"Skip má svých 20 láhví grogu a je velice spokojený.");
MIS_ADDON_SkipsGrog = LOG_SUCCESS;
B_GivePlayerXP(XP_Addon_SkipsGrog);
AI_Output(self,other,"DIA_Addon_Skip_Grog_geben_08_01"); //Co to? Nic za to?
AI_Output(other,self,"DIA_Addon_Skip_Grog_geben_15_02"); //Noo...
AI_Output(self,other,"DIA_Addon_Skip_Grog_geben_08_03"); //Dobrá. Zaplatím ti.
AI_Output(other,self,"DIA_Addon_Skip_Grog_geben_15_04"); //Máš u sebe něco zajímavějšího než je zlato?
AI_Output(self,other,"DIA_Addon_Skip_Grog_geben_08_05"); //Hmm. (zaujatě) Nech mě se kouknout. Mám tady jeden prsten.
AI_Output(self,other,"DIA_Addon_Skip_Grog_geben_08_06"); //Vyhrál jsem ho před mnoha lety v jednom zaplivaném přístavním baru v kostkách.
AI_Output(self,other,"DIA_Addon_Skip_Grog_geben_08_07"); //Ten chlápek říkal, že je magický. Nemám ale tucha jestli je to pravda.
AI_Output(self,other,"DIA_Addon_Skip_Grog_geben_08_08"); //Chceš ho, nebo chceš zlato?
Info_ClearChoices(DIA_Addon_Skip_Grog);
Info_AddChoice(DIA_Addon_Skip_Grog,"Dej mi peníze.",DIA_Addon_Skip_Grog_gold);
Info_AddChoice(DIA_Addon_Skip_Grog,"Dej mi prsten.",DIA_Addon_Skip_Grog_ring);
};
func void DIA_Addon_Skip_Grog_ring()
{
AI_Output(other,self,"DIA_Addon_Skip_Grog_ring_15_00"); //Dej mi prsten.
AI_Output(self,other,"DIA_Addon_Skip_Grog_ring_08_01"); //Tady máš.
B_GiveInvItems(self,other,ItRi_Prot_Edge_02,1);
Info_ClearChoices(DIA_Addon_Skip_Grog);
};
func void DIA_Addon_Skip_Grog_gold()
{
var int GrogKohle;
AI_Output(other,self,"DIA_Addon_Skip_Grog_gold_15_00"); //Dej mi peníze.
AI_Output(self,other,"DIA_Addon_Skip_Grog_gold_08_01"); //Jasně.
GrogKohle = Value_Grog * 20;
B_GiveInvItems(self,other,ItMi_Gold,GrogKohle);
Info_ClearChoices(DIA_Addon_Skip_Grog);
};
instance DIA_Addon_Skip_News(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 888;
condition = DIA_Addon_Skip_News_Condition;
information = DIA_Addon_Skip_News_Info;
permanent = FALSE;
description = "Máš něco na prodej?";
};
func int DIA_Addon_Skip_News_Condition()
{
return TRUE;
};
func void DIA_Addon_Skip_News_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_News_15_00"); //Máš něco na prodej?
AI_Output(self,other,"DIA_Addon_Skip_News_08_01"); //Jestli chceš obchodovat, promluv si s Garettem. Stará se o zásoby.
Log_CreateTopic(Topic_Addon_PIR_Trader,LOG_NOTE);
B_LogEntry(Topic_Addon_PIR_Trader,Log_Text_Addon_GarettTrade);
};
instance DIA_Addon_Skip_Anheuern(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 11;
condition = DIA_Addon_Skip_Anheuern_Condition;
information = DIA_Addon_Skip_Anheuern_Info;
permanent = FALSE;
description = "Pojď, pomoz mi.";
};
func int DIA_Addon_Skip_Anheuern_Condition()
{
if(MIS_Addon_Greg_ClearCanyon == LOG_Running)
{
return TRUE;
};
return FALSE;
};
func void DIA_Addon_Skip_Anheuern_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_Anheuern_15_00"); //Pojď, pomoz mi.
AI_Output(self,other,"DIA_Addon_Skip_Anheuern_08_01"); //Co se děje?
AI_Output(other,self,"DIA_Addon_Skip_Anheuern_15_01"); //Kaňon čeká.
if(C_HowManyPiratesInParty() >= 2)
{
AI_Output(self,other,"DIA_Addon_Skip_Anheuern_08_02"); //Vidím, že jsi shromáždil pár chlapců. To je dobře!
}
else
{
AI_Output(self,other,"DIA_Addon_Skip_Anheuern_08_03"); //Radši s sebou vezmi víc chlapů!
};
AI_Output(self,other,"DIA_Addon_Skip_Anheuern_08_04"); //Kaňon je pěkně nebezpečný!
};
instance DIA_Addon_Skip_ComeOn(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 12;
condition = DIA_Addon_Skip_ComeOn_Condition;
information = DIA_Addon_Skip_ComeOn_Info;
permanent = TRUE;
description = "Pojď se mnou.";
};
func int DIA_Addon_Skip_ComeOn_Condition()
{
if((self.aivar[AIV_PARTYMEMBER] == FALSE) && (MIS_Addon_Greg_ClearCanyon == LOG_Running) && Npc_KnowsInfo(other,DIA_Addon_Skip_Anheuern))
{
return TRUE;
};
return FALSE;
};
func void DIA_Addon_Skip_ComeOn_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_ComeOn_15_00"); //Pojď se mnou.
if(C_GregsPiratesTooFar() == TRUE)
{
AI_Output(self,other,"DIA_Addon_Skip_ComeOn_08_02"); //Počkej. Nejdřív se vraťme do kaňonu...
AI_StopProcessInfos(self);
}
else
{
AI_Output(self,other,"DIA_Addon_Skip_ComeOn_08_01"); //Jdeme!
if(C_BodyStateContains(self,BS_SIT))
{
AI_Standup(self);
B_TurnToNpc(self,other);
};
AI_StopProcessInfos(self);
B_Addon_PiratesFollowAgain();
Npc_ExchangeRoutine(self,"FOLLOW");
self.aivar[AIV_PARTYMEMBER] = TRUE;
};
};
instance DIA_Addon_Skip_GoHome(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 13;
condition = DIA_Addon_Skip_GoHome_Condition;
information = DIA_Addon_Skip_GoHome_Info;
permanent = TRUE;
description = "Už tě více nepotřebuji.";
};
func int DIA_Addon_Skip_GoHome_Condition()
{
if(self.aivar[AIV_PARTYMEMBER] == TRUE)
{
return TRUE;
};
return FALSE;
};
func void DIA_Addon_Skip_GoHome_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_GoHome_15_00"); //Už tě více nepotřebuji.
AI_Output(self,other,"DIA_Addon_Skip_GoHome_08_01"); //Dobrá, pěkně jsme se provětrali. kdyby něco, najdeš mě v táboře.
self.aivar[AIV_PARTYMEMBER] = FALSE;
Npc_ExchangeRoutine(self,"START");
};
instance DIA_Addon_Skip_TooFar(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 14;
condition = DIA_Addon_Skip_TooFar_Condition;
information = DIA_Addon_Skip_TooFar_Info;
permanent = TRUE;
important = TRUE;
};
func int DIA_Addon_Skip_TooFar_Condition()
{
if((self.aivar[AIV_PARTYMEMBER] == TRUE) && (C_GregsPiratesTooFar() == TRUE))
{
return TRUE;
};
return FALSE;
};
func void DIA_Addon_Skip_TooFar_Info()
{
AI_Output(self,other,"DIA_Addon_Skip_TooFar_08_01"); //To je dost daleko!
if(C_HowManyPiratesInParty() >= 2)
{
AI_Output(self,other,"DIA_Addon_Skip_TooFar_08_02"); //Jestli opravdu chceš jít dál, běž bez nás!
}
else
{
AI_Output(self,other,"DIA_Addon_Skip_TooFar_08_03"); //Jestli opravdu chceš jít dál, běž beze mě!
};
B_Addon_PiratesGoHome();
AI_StopProcessInfos(self);
};
instance DIA_Addon_Skip_Treffpunkt(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 1;
condition = DIA_Addon_Skip_Treffpunkt_Condition;
information = DIA_Addon_Skip_Treffpunkt_Info;
permanent = FALSE;
important = TRUE;
};
func int DIA_Addon_Skip_Treffpunkt_Condition()
{
if((self.aivar[AIV_PARTYMEMBER] == TRUE) && (Npc_GetDistToWP(self,"ADW_CANYON_TELEPORT_PATH_06") <= 800) && (C_AllCanyonRazorDead() == FALSE))
{
return TRUE;
};
return FALSE;
};
func void DIA_Addon_Skip_Treffpunkt_Info()
{
AI_Output(self,other,"DIA_Addon_Skip_Add_08_00"); //Pokud se rozdělíme, setkáme se u tohohle jezírka.
AI_Output(self,other,"DIA_Addon_Skip_Add_08_02"); //Pojďme!
AI_StopProcessInfos(self);
};
instance DIA_Addon_Skip_Orks(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 1;
condition = DIA_Addon_Skip_Orks_Condition;
information = DIA_Addon_Skip_Orks_Info;
permanent = FALSE;
important = TRUE;
};
func int DIA_Addon_Skip_Orks_Condition()
{
if((self.aivar[AIV_PARTYMEMBER] == TRUE) && (Npc_GetDistToWP(self,"ADW_CANYON_PATH_TO_LIBRARY_14") <= 2000))
{
return TRUE;
};
return FALSE;
};
func void DIA_Addon_Skip_Orks_Info()
{
AI_Output(self,other,"DIA_Addon_Skip_Add_08_01"); //Skřeti! Nenávidím tyhle bestie!
AI_StopProcessInfos(self);
};
instance DIA_Addon_Skip_AllRazorsDead(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 1;
condition = DIA_Addon_Skip_AllRazorsDead_Condition;
information = DIA_Addon_Skip_AllRazorsDead_Info;
permanent = FALSE;
important = TRUE;
};
func int DIA_Addon_Skip_AllRazorsDead_Condition()
{
if((self.aivar[AIV_PARTYMEMBER] == TRUE) && (C_AllCanyonRazorDead() == TRUE))
{
return TRUE;
};
return FALSE;
};
func void DIA_Addon_Skip_AllRazorsDead_Info()
{
AI_Output(self,other,"DIA_Addon_Skip_Add_08_03"); //Vypadá to, že jsme dostali všechny břitvy.
AI_Output(self,other,"DIA_Addon_Skip_Add_08_04"); //Můžeme se tu ještě trochu potulovat, jestli chceš.
AI_Output(self,other,"DIA_Addon_Skip_Add_08_05"); //Tak dlouho dokud zůstaneme v kaňonu.
AI_StopProcessInfos(self);
};
//----------------vetka Drakii------------------------------------------
instance DIA_Addon_Skip_TalkAboutElza(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 1;
condition = DIA_Addon_Skip_TalkAboutElza_Condition;
information = DIA_Addon_Skip_TalkAboutElza_Info;
permanent = FALSE;
description = "Greg říkal, že ses pokoušel opravit 'Jednookou Elsu'.";
};
func int DIA_Addon_Skip_TalkAboutElza_Condition()
{
if((MIS_OldElza == LOG_Running) && (ViewElza == TRUE))
{
return TRUE;
};
};
func void DIA_Addon_Skip_TalkAboutElza_Info()
{
B_GivePlayerXP(100);
AI_Output(other,self,"DIA_Addon_Skip_TalkAboutElza_01_00"); //Greg říkal, že si se pokoušel opravit 'Jednookou Elsu'.
AI_Output(self,other,"DIA_Addon_Skip_TalkAboutElza_01_01"); //Jo, zkusil. Ale bylo to k ničemu!
AI_Output(other,self,"DIA_Addon_Skip_TalkAboutElza_01_02"); //Jakto?
AI_Output(self,other,"DIA_Addon_Skip_TalkAboutElza_01_03"); //Praskliny v trupu a velkou díru, která je na přídi lodi si můžeme opravit sami.
AI_Output(self,other,"DIA_Addon_Skip_TalkAboutElza_01_04"); //Ale potřebujeme šikovného tesaře, který by opravil kormidlo. Bez toho bude loď jednoduše neříditelná.
AI_Output(self,other,"DIA_Addon_Skip_TalkAboutElza_01_05"); //A takový, jestli tomu rozumíš, tu není. Jsme piráti k čertu, ne mistři řemeslníci.
};
instance DIA_Addon_Skip_TalkAboutElza_Fix(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 1;
condition = DIA_Addon_Skip_TalkAboutElza_Fix_Condition;
information = DIA_Addon_Skip_TalkAboutElza_Fix_Info;
permanent = FALSE;
description = "Mohl bych se vám po nějakém tesaři podívat.";
};
func int DIA_Addon_Skip_TalkAboutElza_Fix_Condition()
{
if((MIS_OldElza == LOG_Running) && (ViewElza == TRUE) && (Npc_KnowsInfo(other,DIA_Addon_Skip_TalkAboutElza) == TRUE))
{
return TRUE;
};
};
func void DIA_Addon_Skip_TalkAboutElza_Fix_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_TalkAboutElza_Fix_01_01"); //Mohl bych se vám po nějakém tesaři podívat.
AI_Output(self,other,"DIA_Addon_Skip_TalkAboutElza_Fix_01_02"); //Hmmm... můžeš se o to pokusit. Může to být jenom k dobru. Ale kde najít někoho, kdo se bude chtít kamarádíčkovat s piráty?
AI_Output(other,self,"DIA_Addon_Skip_TalkAboutElza_Fix_01_03"); //Nevím. Ale podívat se po někom můžu.
AI_Output(self,other,"DIA_Addon_Skip_TalkAboutElza_Fix_01_04"); //Dobře, pokud náhodou najdeš nějakého mistra, který by pro nás chtěl pracovat, tak tady...
B_GiveInvItems(self,other,ItMi_ShipShceme,1);
AI_Output(other,self,"DIA_Addon_Skip_TalkAboutElza_Fix_01_05"); //Co to je?
AI_Output(self,other,"DIA_Addon_Skip_TalkAboutElza_Fix_01_06"); //Ve volné chvíli jsem načtrl podoby těch součástek, které jsou potřeba vyměnit u 'Elsy'.
AI_Output(self,other,"DIA_Addon_Skip_TalkAboutElza_Fix_01_07"); //Pokud by náhodou nechtěl přijít k nám do tábora, o čemž pochybuji, tak třeba bude souhlasit, že by nám je vyrobil.
AI_Output(self,other,"DIA_Addon_Skip_TalkAboutElza_Fix_01_08"); //O peníze se neboj. Všechny výdaje s tím spojene ti pokryju. Samozřejmě v rozumné míře.
AI_Output(other,self,"DIA_Addon_Skip_TalkAboutElza_Fix_01_09"); //Dobře, uvidím, co půjde dělat.
B_LogEntry(TOPIC_OldElza,"Souhlasil jsem, že se podívám po tesaři, který by pirátům mohl opravit kormidlo na 'Jednooké Else'. Pro tyto účely mi Skip dal náčrty těch součástí, které jsou potřeba udělat.");
};
instance DIA_Addon_Skip_FixShip(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 1;
condition = DIA_Addon_Skip_FixShip_Condition;
information = DIA_Addon_Skip_FixShip_Info;
permanent = FALSE;
description = "Tady jsou všechny díly ke kormidlu.";
};
func int DIA_Addon_Skip_FixShip_Condition()
{
if((MIS_OldElza == LOG_Running) && (Npc_HasItems(other,ItMi_SkipShipPack) >= 1))
{
return TRUE;
};
};
func void DIA_Addon_Skip_FixShip_Info()
{
B_GivePlayerXP(500);
AI_Output(other,self,"DIA_Addon_Skip_FixShip_01_01"); //Tady jsou všechny díly ke kormidlu.
B_GiveInvItems(other,self,ItMi_SkipShipPack,1);
Npc_RemoveInvItems(self,ItMi_SkipShipPack,1);
AI_Output(self,other,"DIA_Addon_Skip_FixShip_01_02"); //No to mě podrž, nevěřím vlastním očím! Opravdu je to vše tu!
AI_Output(other,self,"DIA_Addon_Skip_FixShip_01_03"); //Znamená to, že teď už je možné začít opravovat loď?
AI_Output(self,other,"DIA_Addon_Skip_FixShip_01_04"); //Samo sebou! Hned se o to postarám.
AI_Output(other,self,"DIA_Addon_Skip_FixShip_01_05"); //A jak dlouho to myslíš zabere?
AI_Output(self,other,"DIA_Addon_Skip_FixShip_01_06"); //Hmm... no pokud se nic nepokazí, myslím, že za pár dní by to mohlo být hotové.
AI_Output(self,other,"DIA_Addon_Skip_FixShip_01_07"); //Hlavní je, že ty součástky, které si přinesl, sedí ke kormildlu na 'Else'. Kolik si za ně vlastně zaplatil?
AI_Output(other,self,"DIA_Addon_Skip_FixShip_01_08"); //2000 zlatých.
AI_Output(self,other,"DIA_Addon_Skip_FixShip_01_09"); //Můj ty blázne! To je ale pěkná sumička.
AI_Output(other,self,"DIA_Addon_Skip_FixShip_01_10"); //Nebylo s níma lehké smlouvat.
AI_Output(self,other,"DIA_Addon_Skip_FixShip_01_11"); //Uuuuf... (povzdechne) Dobrá, koneckonců, jsem ti slíbil, že ti zaplatím všechny náklady.
AI_Output(self,other,"DIA_Addon_Skip_FixShip_01_12"); //Ano, a opravit naší loď je teď mnohem důležitější.
AI_Output(self,other,"DIA_Addon_Skip_FixShip_01_13"); //Na, tady si vem peníze. Plus něco víc za tvojí námahu.
B_GiveInvItems(self,other,ItMi_Gold,2000);
AI_Output(other,self,"DIA_Addon_Skip_FixShip_01_14"); //Díky.
SkipShipRepairDay = Wld_GetDay();
SkipShipRepair = TRUE;
B_LogEntry(TOPIC_OldElza,"Dal jsem Skipovi díly na opravu kormidla a slíbil, že začně s opravou co nejdříve.");
AI_StopProcessInfos(self);
};
instance DIA_Addon_Skip_FixShip_Done(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 1;
condition = DIA_Addon_Skip_FixShip_Done_Condition;
information = DIA_Addon_Skip_FixShip_Done_Info;
permanent = FALSE;
description = "Jak to jde s opravou lodi?";
};
func int DIA_Addon_Skip_FixShip_Done_Condition()
{
if((MIS_OldElza == LOG_Running) && (SkipReadySailDrakia == TRUE))
{
return TRUE;
};
};
func void DIA_Addon_Skip_FixShip_Done_Info()
{
B_GivePlayerXP(1000);
AI_Output(other,self,"DIA_Addon_Skip_FixShip_Done_01_01"); //Jak to jde s opravou lodi?
AI_Output(self,other,"DIA_Addon_Skip_FixShip_Done_01_02"); //Skvělé, kamaráde! Díly, které si mi sehnal, zapadly do kormidla 'Elsy' jak ulité a loď je teď velmi plavbyschopná.
AI_Output(self,other,"DIA_Addon_Skip_FixShip_Done_01_03"); //A trhliny a díru na přídi jsem zapravil včera. Jestli chceš, můžeš se sám podívat jak to dopadlo.
AI_Output(other,self,"DIA_Addon_Skip_FixShip_Done_01_04"); //Vypadá to, že už zase můžete na moře?
AI_Output(self,other,"DIA_Addon_Skip_FixShip_Done_01_05"); //No, ne tak úplně... (mrzutě) Je to pořád dost nebezpečné se na ní vydat dál od břehu. I malá bouře by jí poslala ke dnu.
AI_Output(self,other,"DIA_Addon_Skip_FixShip_Done_01_06"); //Neplánovali jsme to udělat. Greg má ale ještě nějaký plán na mysli.
AI_Output(other,self,"DIA_Addon_Skip_FixShip_Done_01_07"); //Jaký plán?
AI_Output(self,other,"DIA_Addon_Skip_FixShip_Done_01_08"); //Hmm... Určitě ti už řekl o té kupě věci, které se nashromáždily v našem táboře a které jsme neměli čas prodat předtím než nám paladinové potopili loď.
AI_Output(self,other,"DIA_Addon_Skip_FixShip_Done_01_09"); //Z větší části jsou tady tyto krámy pěkně drahé, a ve městech je člověk ke koupení jen tak nenajde.
AI_Output(self,other,"DIA_Addon_Skip_FixShip_Done_01_10"); //No a Greg plánoval tyto věci převézt na 'Else' do Drakie. Když bychom měli štěstí a všechny věci tam prodali, klidně bychom si pak mohli koupit novou loď.
AI_Output(other,self,"DIA_Addon_Skip_FixShip_Done_01_11"); //Ale ty si říkal, že není bezpečné vyplout na 'Else' na moře, ne?
AI_Output(self,other,"DIA_Addon_Skip_FixShip_Done_01_12"); //Až do této části ostrova je naše stará galeona schopná se plavit bez problémů. Hlavní je znát kurz a neplavit se daleko od pobřeží.
AI_Output(other,self,"DIA_Addon_Skip_FixShip_Done_01_13"); //A kdy se tam plánujete vydat?
AI_Output(self,other,"DIA_Addon_Skip_FixShip_Done_01_14"); //Hm... tak za pár dní hned co naložíme všechny věci na 'Elsu'. A co ty... (usmívá se) chtěl by ses přidat?
AI_Output(other,self,"DIA_Addon_Skip_FixShip_Done_01_15"); //Nejsem proti se přidat.
AI_Output(self,other,"DIA_Addon_Skip_FixShip_Done_01_16"); //Pravdu říct, a proč ne. Nejsi sice námořník, ale chlapík jsi fajn. Věřím, že ani Greg nebude mít nic proti, když se s náma vydáš.
AI_Output(other,self,"DIA_Addon_Skip_FixShip_Done_01_17"); //Tak já se zastavím později.
AI_Output(self,other,"DIA_Addon_Skip_FixShip_Done_01_18"); //Dobře. Ale pamatuj - jen na tebe čekat nebudeme! Jak se sbalíme, ihned odplouváme.
AI_Output(other,self,"DIA_Addon_Skip_FixShip_Done_01_19"); //Samo sebou.
MIS_OldElza = LOG_SUCCESS;
Log_SetTopicStatus(TOPIC_OldElza,LOG_SUCCESS);
B_LogEntry(TOPIC_OldElza,"Díky mojí pomoci byl Skip schopný opravit 'Jednookou Elsu', ale pravda je taková, že není možné s ní plout moc daleko od pobřeží.");
};
instance DIA_Addon_Skip_DrakiaAway(C_Info)
{
npc = PIR_1355_Addon_Skip;
nr = 1;
condition = DIA_Addon_Skip_DrakiaAway_Condition;
information = DIA_Addon_Skip_DrakiaAway_Info;
permanent = TRUE;
description = "Tak jak, už je loď připravená odeplout?";
};
func int DIA_Addon_Skip_DrakiaAway_Condition()
{
if((MIS_OldElza == LOG_SUCCESS) && (SailAwayDrakia == FALSE))
{
return TRUE;
};
};
func void DIA_Addon_Skip_DrakiaAway_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_DrakiaAway_01_01"); //Tak jak, už je loď připravená odeplout?
AI_Output(self,other,"DIA_Addon_Skip_DrakiaAway_01_02"); //Ještě ne. Zastav se později.
};
|
D
|
/*
TEST_OUTPUT:
---
fail_compilation/diag12487.d(15): Error: recursive expansion of template instance `diag12487.recTemplate!int`
fail_compilation/diag12487.d(25): Error: template instance diag12487.recTemplate!int error instantiating
fail_compilation/diag12487.d(18): Error: function diag12487.recFunction CTFE recursion limit exceeded
fail_compilation/diag12487.d(20): called from here: `recFunction(i)`
fail_compilation/diag12487.d(18): 1000 recursive calls to function `recFunction`
fail_compilation/diag12487.d(27): called from here: `recFunction(0)`
---
*/
template recTemplate(T)
{
enum bool recTemplate = recTemplate!T;
}
bool recFunction(int i)
{
return recFunction(i);
}
void main()
{
enum bool value1 = recTemplate!int;
enum bool value2 = recFunction(0);
}
|
D
|
import std.c.stdio;
class C { }
int ctfe() { return 3; }
template TypeTuple(T...) { alias T TypeTuple; }
/************************************/
void showf(string f)
{
printf("%.*s\n", f.length, f.ptr);
}
/************************************/
void test1()
{
const int* p;
const(int)* cp;
cp = p;
}
/************************************/
void test2()
{
const int i = 3;
const(int) j = 0;
int k;
// j = i;
k = i;
k = j;
// assert(k == 3);
}
/************************************/
void test3()
{
char[3] p;
const(char)[] q;
q = p;
}
/************************************/
void test4()
{
char[] p;
const(char)[] q;
q = p;
}
/************************************/
void test5()
{
const(int**)* p;
const(int)*** cp;
p = cp;
}
/************************************/
void test6()
{
const(int***)[] p;
const(int)***[] cp;
p = cp;
}
/************************************/
class C8 { }
void foo8(const char[] s, const C8 c, const int x)
{
}
void test8()
{
auto p = &foo8;
showf(p.mangleof);
assert(typeof(p).mangleof == "PFxAaxC9testconst2C8xiZv");
assert(p.mangleof == "_D9testconst5test8FZv1pPFxAaxC9testconst2C8xiZv");
}
/************************************/
void test9()
{
int [ const (char[]) ] aa;
int [ char[] ] ab;
int [ const char[] ] ac;
aa["hello"] = 3;
ab["hello"] = 3;
ac["hello"] = 3;
}
/************************************/
void test10()
{
const(int) x = 3;
auto y = x;
//y++;
assert(is(typeof(y) == const(int)));
}
/************************************/
void foo11(in char[] a1)
{
char[3] c;
char[] a2 = c[];
a2[0..2] = a1;
a2[0..2] = 'c';
const char b = 'b';
a2[0..2] = b;
}
void test11()
{
}
/************************************/
void foo12(const char[] a1)
{
}
void test12()
{
foo12("hello");
}
/************************************/
immutable char[16] hexdigits1 = "0123456789ABCDE1";
immutable char[ ] hexdigits2 = "0123456789ABCDE2";
const char[16] hexdigits3 = "0123456789ABCDE3";
const char[ ] hexdigits4 = "0123456789ABCDE4";
void test13()
{
}
/************************************/
void test14()
{
string s;
s = s ~ "hello";
}
/************************************/
class Foo15
{
const string xxxx;
this(immutable char[] aaa)
{
this.xxxx = aaa;
}
}
void test15()
{
}
/************************************/
void test16()
{
auto a = "abc";
immutable char[3] b = "abc";
const char[3] c = "abc";
}
/************************************/
void test17()
{
const(char)[3][] a = (["abc", "def"]);
assert(a[0] == "abc");
assert(a[1] == "def");
}
/************************************/
class C18
{
const(char)[] foo() { return "abc"; }
}
class D18 : C18
{
override char[] foo() { return null; }
}
void test18()
{
}
/************************************/
void test19()
{
char[] s;
if (s == "abc")
s = null;
if (s < "abc")
s = null;
if (s is "abc")
s = null;
}
/************************************/
void test20()
{
string p;
immutable char[] q;
p = p ~ q;
p ~= q;
}
/************************************/
void test21()
{
string s;
char[] p;
p = s.dup;
}
/************************************/
void fill22(const(char)[] s)
{
}
void test22()
{
}
/************************************/
struct S23
{
int x;
int* p;
}
void foo23(const(S23) s, const(int) i)
{
immutable int j = 3;
// j = 4;
// i = 4;
// s.x = 3;
// *s.p = 4;
}
void test23()
{
}
/************************************/
void test24()
{
wchar[] r;
r ~= "\000";
}
/************************************/
void test25()
{
char* p;
if (p == cast(const(char)*)"abc")
{}
}
/************************************/
void test26()
{
struct S
{
char[3] a;
}
static S s = { "abc" };
}
/************************************/
class C27
{
int x;
void foo() { x = 3; }
}
void test27()
{
C27 d = new C27;
d.foo();
}
/************************************/
class C28
{
int x;
void foo() immutable { }
}
void test28()
{
immutable(C28) d = cast(immutable)new C28;
d.foo();
}
/************************************/
struct S29 { }
int foo29(const(S29)* s)
{
S29 s2;
return *s == s2;
}
void test29()
{
}
/************************************/
struct S30
{
int x;
void foo() { x = 3; }
void bar() const
{ //x = 4;
//this.x = 5;
}
}
class C30
{
int x;
void foo() { x = 3; }
void bar() const
{ //x = 4;
//this.x = 5;
}
}
void test30()
{ S30 s;
s.foo();
s.bar();
S30 t;
//t.foo();
t.bar();
C30 c = new C30;
c.foo();
c.bar();
C30 d = new C30;
d.foo();
d.bar();
}
/************************************/
class Foo31
{
int x;
immutable immutable(int)* geti()
{
return &x;
}
const const(int)* getc()
{
return &x;
}
}
void test31()
{
}
/************************************/
int bar32;
struct Foo32
{
int func() immutable
{
return bar32;
}
}
void test32()
{
immutable(Foo32) foo;
printf("%d", foo.func());
printf("%d", foo.func());
}
/************************************/
void test33()
{
string d = "a" ~ "b" ~ (1?"a":"");
assert(d == "aba");
}
/************************************/
struct S34
{
int value;
}
const S34 s34 = { 5 };
const S34 t34 = s34;
const S34 u34 = s34;
void test34()
{
assert(u34.value == 5);
}
/************************************/
const int i35 = 20;
template Foo35(alias bar)
{
}
alias Foo35!(i35) foo35;
void test35()
{
}
/************************************/
immutable char[10] digits = "0123456789"; /// 0..9
immutable char[] octdigits = digits[0 .. 8]; //// 0..7
void test36()
{
}
/************************************/
void test37()
{
int i = 3;
const int x = i;
i++;
assert(x == 3);
}
/************************************/
void test38()
{
static const string s = "hello"[1..$];
assert(s == "ello");
}
/************************************/
static const int x39;
const int y39;
static this()
{
x39 = 3;
y39 = 4;
}
void test39()
{
const int i;
assert(x39 == 3);
assert(y39 == 4);
const p = &x39;
// assert(*p == 3);
}
/************************************/
struct S40
{
int a;
const int b = 3; // shouldn't be allocated
}
void test40()
{
assert(S40.sizeof == 8);
assert(S40.init.b == 3);
}
/************************************/
struct S41
{
int a;
const int b;
static const int c = ctfe() + 1;
}
void test41()
{
assert(S41.sizeof == 8);
S41 s;
assert(s.b == 0);
assert(S41.c == 4);
const(int)*p;
p = &s.b;
assert(*p == 0);
p = &s.c;
assert(*p == 4);
}
/************************************/
class C42
{
int a = ctfe() - 2;
const int b;
const int c = ctfe();
static const int d;
static const int e = ctfe() + 2;
static this()
{
d = 4;
}
this()
{
b = 2;
}
}
void test42()
{
printf("%d\n", C42.classinfo.init.length);
assert(C42.classinfo.init.length == 12 + (void*).sizeof + (void*).sizeof);
C42 c = new C42;
assert(c.a == 1);
assert(c.b == 2);
assert(c.c == 3);
assert(c.d == 4);
assert(c.e == 5);
const(int)*p;
p = &c.b;
assert(*p == 2);
p = &c.c;
assert(*p == 3);
p = &c.d;
assert(*p == 4);
p = &c.e;
assert(*p == 5);
}
/************************************/
template Foo43(T)
{
alias T Foo43;
}
void test43()
{
{
int x;
alias Foo43!(typeof(x)) f;
showf(typeid(f).toString());
assert(is(typeof(x) == int));
assert(is(f == int));
}
{
const int x;
alias Foo43!(typeof(x)) f;
showf(typeid(f).toString());
assert(is(typeof(x) == const(int)));
assert(is(f == const(int)));
}
{
immutable int x;
alias Foo43!(typeof(x)) f;
showf(typeid(f).toString());
assert(is(typeof(x) == immutable(int)));
assert(is(f == immutable(int)));
}
}
/************************************/
template Foo44(T:T)
{
alias T Foo44;
}
void test44()
{
{
int x;
alias Foo44!(typeof(x)) f;
showf(typeid(f).toString());
assert(is(typeof(x) == int));
assert(is(f == int));
}
{
const int x;
alias Foo44!(typeof(x)) f;
showf(typeid(f).toString());
assert(is(typeof(x) == const(int)));
assert(is(f == const(int)));
}
{
immutable int x;
alias Foo44!(typeof(x)) f;
showf(typeid(f).toString());
assert(is(typeof(x) == immutable(int)));
assert(is(f == immutable(int)));
}
}
/************************************/
template Foo45(T:const(T))
{
alias T Foo45;
}
void test45()
{
{
int x;
alias Foo45!(typeof(x)) f;
showf(typeid(f).toString());
assert(is(typeof(x) == int));
assert(is(f == int));
}
{
const int x;
alias Foo45!(typeof(x)) f;
showf(typeid(f).toString());
assert(is(typeof(x) == const(int)));
assert(is(f == int));
}
{
immutable int x;
alias Foo45!(typeof(x)) f;
showf(typeid(f).toString());
assert(is(typeof(x) == immutable(int)));
assert(is(f == int));
}
}
/************************************/
template Foo46(T:immutable(T))
{
alias T Foo46;
}
void test46()
{
{
immutable int x;
alias Foo46!(typeof(x)) f;
showf(typeid(f).toString());
assert(is(typeof(x) == immutable(int)));
assert(is(f == int));
}
}
/************************************/
template Foo47(T:T) { const int Foo47 = 2; }
template Foo47(T:const(T)) { const int Foo47 = 3; }
template Foo47(T:immutable(T)) { const int Foo47 = 4; }
void test47()
{
int x2;
const int x3;
immutable int x4;
printf("%d\n", Foo47!(typeof(x2)));
printf("%d\n", Foo47!(typeof(x3)));
printf("%d\n", Foo47!(typeof(x4)));
assert(Foo47!(typeof(x2)) == 2);
assert(Foo47!(typeof(x3)) == 3);
assert(Foo47!(typeof(x4)) == 4);
}
/************************************/
int foo48(T)(const(T) t) { return 3; }
void test48()
{
const int x = 4;
assert(foo48(x) == 3);
}
/************************************/
void foo49(T)(T[] t)
{
showf(typeid(typeof(t)).toString());
assert(is(T == immutable(char)));
}
void bar49(T)(const T t)
{
showf(typeid(T).toString());
assert(is(T == const(int)) || is(T == immutable(int)) || is(T == int));
}
void test49()
{
string s;
foo49(s);
foo49("hello");
const int c = 1;
bar49(c);
immutable int i = 1;
bar49(i);
bar49(1);
}
/************************************/
void foo50(T)(T t)
{
showf(typeid(typeof(t)).toString());
assert(is(T == C));
}
void baz50(T)(T t)
{
showf(typeid(typeof(t)).toString());
assert(is(T == const(C)));
}
void bar50(T)(const T t)
{
showf(typeid(T).toString());
showf(typeid(typeof(t)).toString());
assert(is(T == C));
assert(is(typeof(t) == const(C)));
}
void abc50(T)(const T t)
{
showf(typeid(T).toString());
showf(typeid(typeof(t)).toString());
assert(is(T == C));
assert(is(typeof(t) == const(C)));
}
void test50()
{
C c = new C;
const(C) d = new C;
foo50(c);
baz50(d);
bar50(c);
abc50(d);
}
/************************************/
void test51()
{
const(C) d = new C;
//d = new C;
}
/************************************/
template isStaticArray(T)
{
const bool isStaticArray = false;
}
template isStaticArray(T : T[N], size_t N)
{
const bool isStaticArray = true;
}
template isDynamicArray(T, U = void)
{
static const isDynamicArray = false;
}
template isDynamicArray(T : U[], U)
{
static const isDynamicArray = !isStaticArray!(T);
}
void test52()
{
immutable(char[5])[int] aa = ([3:"hello", 4:"betty"]);
showf(typeid(typeof(aa.values)).toString());
static assert(isDynamicArray!(typeof(aa.values)));
}
/************************************/
void foo53(string n) { }
void read53(in string name)
{
foo53(name);
}
void test53()
{
read53("hello");
}
/************************************/
void bar54(const(wchar)[] s) { }
void test54()
{
const(wchar)[] fmt;
bar54("Orphan format specifier: %" ~ fmt);
}
/************************************/
struct S55
{
int foo() { return 1; }
int foo() const { return 2; }
int foo() immutable { return 3; }
}
void test55()
{
S55 s1;
auto i = s1.foo();
assert(i == 1);
const S55 s2;
i = s2.foo();
assert(i == 2);
immutable S55 s3;
i = s3.foo();
assert(i == 3);
}
/************************************/
const struct S56 { int a; }
void test56()
{
S56 s;
S56 t;
printf("S56.sizeof = %d\n", S56.sizeof);
//t = s;
}
/************************************/
struct S57
{
const void foo(this T)(int i)
{
showf(typeid(T).toString());
if (i == 1)
assert(is(T == const));
if (i == 2)
assert(!is(T == const));
if (i == 3)
assert(is(T == immutable));
}
}
void test57()
{
const(S57) s;
(&s).foo(1);
S57 s2;
s2.foo(2);
immutable(S57) s3;
s3.foo(3);
}
/************************************/
class C58
{
const(C58) c;
const C58 y;
this()
{
y = null;
c = null;
}
const void foo()
{
//c = null; // should fail
}
void bar()
{
//c = null;
}
}
void test58()
{
}
/************************************/
class A59
{
int[] a;
this() { a.length = 1; }
int* ptr() { return a.ptr; }
const const(int)* ptr() { return a.ptr; }
immutable immutable(int)* ptr() { return a.ptr; }
}
void test59()
{
auto a = new A59;
const b = cast(const)new A59;
immutable c = cast(immutable)new A59;
}
/************************************/
int foo60(int i) { return 1; }
int foo60(const int i) { return 2; }
int foo60(immutable int i) { return 3; }
void test60()
{
int i;
const int j;
immutable int k;
assert(foo60(i) == 1);
assert(foo60(j) == 2);
assert(foo60(k) == 3);
}
/************************************/
void foo61(T)(T arg)
{
alias const(T) CT;
assert(is(const(int) == CT));
//writeln(typeid(const(T)));
//writeln(typeid(CT));
}
void test61()
{
int x = 42;
foo61(x);
}
/************************************/
class Foo62(T) { }
void test62()
{
const(Foo62!(int)) f = new Foo62!(int);
assert(is(typeof(f) == const(Foo62!(int))));
}
/************************************/
struct S63
{
int x;
}
void foo63(const ref S63 scheme)
{
//scheme.x = 3;
}
void test63()
{
S63 scheme;
foo63(scheme);
}
/************************************/
struct S64
{
int a;
long b;
}
void test64()
{
S64 s1 = S64(2,3);
const s2 = S64(2,3);
immutable S64 s3 = S64(2,3);
s1 = s1;
s1 = s2;
s1 = s3;
}
/************************************/
struct S65
{
int a;
long b;
char *p;
}
void test65()
{ char c;
S65 s1 = S65(2,3);
const s2 = S65(2,3);
immutable S65 s3 = S65(2,3);
S65 t1 = S65(2,3,null);
const t2 = S65(2,3,null);
immutable S65 t3 = S65(2,3,null);
}
/************************************/
struct S66
{
int a;
long b;
}
void test66()
{ char c;
S66 s1 = S66(2,3);
const s2 = S66(2,3);
immutable S66 s3 = S66(2,3);
S66 t1 = s1;
S66 t2 = s2;
S66 t3 = s3;
const(S66) u1 = s1;
const(S66) u2 = s2;
const(S66) u3 = s3;
immutable(S66) v1 = s1;
immutable(S66) v2 = s2;
immutable(S66) v3 = s3;
}
/************************************/
struct Foo68
{
int z;
immutable int x;
int y;
}
void test68()
{
Foo68 bar;
bar.y = 2;
}
/************************************/
class C69 {}
struct S69 {}
void test69()
{
immutable(S69)* si;
S69* sm;
bool a = si is sm;
immutable(C69) ci;
const(C69) cm;
bool b = ci is cm;
}
/************************************/
struct S70
{
int i;
}
void test70()
{
S70 s;
const(S70) cs = s;
S70 s1 = cs;
S70 s2 = cast(S70)cs;
}
/************************************/
void test72()
{
int a;
const int b;
enum { int c = 0 };
immutable int d = 0;
assert(__traits(isSame, a, a));
assert(__traits(isSame, b, b));
assert(__traits(isSame, c, c));
assert(__traits(isSame, d, d));
}
/************************************/
void a73(const int [] data...)
{
a73(1);
}
void test73()
{
}
/************************************/
struct S74 { int x; }
const S74 s_const = {0};
S74 s_mutable = s_const;
void test74()
{
}
/************************************/
struct A75 { int x; }
struct B75 { A75 s1; }
const A75 s1_const = {0};
const B75 s2_const = {s1_const};
void test75()
{
}
/************************************/
void test76()
{
int[int] array;
const(int[int]) a = array;
}
/************************************/
void test77()
{
int[][] intArrayArray;
int[][][] intArrayArrayArray;
// const(int)[][] f1 = intArrayArray;
const(int[])[] f2 = intArrayArray;
// const(int)[][][] g1 = intArrayArrayArray;
// const(int[])[][] g2 = intArrayArrayArray;
const(int[][])[] g3 = intArrayArrayArray;
}
/************************************/
void foo78(T)(const(T)[] arg1, const(T)[] arg2) { }
void test78()
{
foo78("hello", "world".dup);
foo78("hello", "world");
foo78("hello".dup, "world".dup);
foo78(cast(const)"hello", cast(const)"world");
}
/************************************/
const bool[string] stopWords79;
static this()
{
stopWords79 = [ "a"[]:1 ];
}
void test79()
{
"abc" in stopWords79;
}
/************************************/
void test80(inout(int) _ = 0)
{
char x;
inout(char) y = x;
const(char)[] c;
immutable(char)[] i;
shared(char)[] s;
const(shared(char))[] sc;
inout(char)[] w;
inout(shared(char))[] sw;
c = c;
c = i;
static assert(!__traits(compiles, c = s));
static assert(!__traits(compiles, c = sc));
c = w;
static assert(!__traits(compiles, c = sw));
static assert(!__traits(compiles, i = c));
i = i;
static assert(!__traits(compiles, i = s));
static assert(!__traits(compiles, i = sc));
static assert(!__traits(compiles, i = w));
static assert(!__traits(compiles, i = sw));
static assert(!__traits(compiles, s = c));
static assert(!__traits(compiles, s = i));
s = s;
static assert(!__traits(compiles, s = sc));
static assert(!__traits(compiles, s = w));
static assert(!__traits(compiles, s = sw));
static assert(!__traits(compiles, sc = c));
sc = i;
sc = s;
sc = sc;
static assert(!__traits(compiles, sc = w));
sc = sw;
static assert(!__traits(compiles, w = c));
static assert(!__traits(compiles, w = i));
static assert(!__traits(compiles, w = s));
static assert(!__traits(compiles, w = sc));
w = w;
static assert(!__traits(compiles, w = sw));
static assert(!__traits(compiles, sw = c));
static assert(!__traits(compiles, sw = i));
static assert(!__traits(compiles, sw = s));
static assert(!__traits(compiles, sw = sc));
static assert(!__traits(compiles, sw = w));
sw = sw;
}
/************************************/
void test81(inout(int) _ = 0)
{
const(char)* c;
immutable(char)* i;
shared(char)* s;
const(shared(char))* sc;
inout(char)* w;
c = c;
c = i;
static assert(!__traits(compiles, c = s));
static assert(!__traits(compiles, c = sc));
c = w;
static assert(!__traits(compiles, i = c));
i = i;
static assert(!__traits(compiles, i = s));
static assert(!__traits(compiles, i = sc));
static assert(!__traits(compiles, i = w));
static assert(!__traits(compiles, s = c));
static assert(!__traits(compiles, s = i));
s = s;
static assert(!__traits(compiles, s = sc));
static assert(!__traits(compiles, s = w));
static assert(!__traits(compiles, sc = c));
sc = i;
sc = s;
sc = sc;
static assert(!__traits(compiles, sc = w));
static assert(!__traits(compiles, w = c));
static assert(!__traits(compiles, w = i));
static assert(!__traits(compiles, w = s));
static assert(!__traits(compiles, w = sc));
w = w;
}
/************************************/
void test82(inout(int) _ = 0)
{
const(immutable(char)*) c;
pragma(msg, typeof(c));
static assert(typeof(c).stringof == "const(immutable(char)*)");
inout(immutable(char)*) d;
pragma(msg, typeof(d));
static assert(typeof(d).stringof == "inout(immutable(char)*)");
inout(const(char)*) e;
pragma(msg, typeof(e));
static assert(is(typeof(e) == inout(const(char)*)));
static assert(typeof(e).stringof == "inout(const(char)*)");
pragma(msg, typeof(*e));
static assert(is(typeof(*e) == const(char)));
static assert(typeof(*e).stringof == "const(char)");
inout const(char)* f;
static assert(is(typeof(e) == typeof(f)));
inout(shared(char)) g;
pragma(msg, typeof(g));
static assert(typeof(g).stringof == "shared(inout(char))");
shared(inout(char)) h;
pragma(msg, typeof(h));
static assert(typeof(h).stringof == "shared(inout(char))");
inout(immutable(char)) i;
pragma(msg, typeof(i));
static assert(typeof(i).stringof == "immutable(char)");
immutable(inout(char)) j;
pragma(msg, typeof(j));
static assert(typeof(j).stringof == "immutable(char)");
inout(const(char)) k;
pragma(msg, typeof(k));
static assert(typeof(k).stringof == "inout(char)");
const(inout(char)) l;
pragma(msg, typeof(l));
static assert(typeof(l).stringof == "const(char)");
shared(const(char)) m;
pragma(msg, typeof(m));
static assert(typeof(m).stringof == "shared(const(char))");
const(shared(char)) n;
pragma(msg, typeof(n));
static assert(typeof(n).stringof == "shared(const(char))");
inout(char*****) o;
pragma(msg, typeof(o));
static assert(typeof(o).stringof == "inout(char*****)");
pragma(msg, typeof(cast()o));
static assert(typeof(cast()o).stringof == "inout(char****)*");
const(char*****) p;
pragma(msg, typeof(p));
static assert(typeof(p).stringof == "const(char*****)");
pragma(msg, typeof(cast()p));
static assert(typeof(cast()p).stringof == "const(char****)*");
immutable(char*****) q;
pragma(msg, typeof(q));
static assert(typeof(q).stringof == "immutable(char*****)");
pragma(msg, typeof(cast()q));
static assert(typeof(cast()q).stringof == "immutable(char****)*");
shared(char*****) r;
pragma(msg, typeof(r));
static assert(typeof(r).stringof == "shared(char*****)");
pragma(msg, typeof(cast()r));
static assert(typeof(cast()r).stringof == "shared(char****)*");
pragma(msg, typeof(cast(const)r));
static assert(typeof(cast(const)r).stringof == "const(shared(char****)*)");
pragma(msg, typeof(cast(const shared)r));
static assert(typeof(cast(const shared)r).stringof == "shared(const(char*****))");
pragma(msg, typeof(cast(shared)r));
static assert(typeof(cast(shared)r).stringof == "shared(char*****)");
pragma(msg, typeof(cast(immutable)r));
static assert(typeof(cast(immutable)r).stringof == "immutable(char*****)");
pragma(msg, typeof(cast(inout)r));
static assert(typeof(cast(inout)r).stringof == "inout(shared(char****)*)");
inout(shared(char**)***) s;
pragma(msg, typeof(s));
static assert(typeof(s).stringof == "inout(shared(char**)***)");
pragma(msg, typeof(***s));
static assert(typeof(***s).stringof == "shared(inout(char**))");
}
/************************************/
void test83(inout(int) _ = 0)
{
static assert( __traits(compiles, typeid(int* function(inout int))));
static assert(!__traits(compiles, typeid(inout(int*) function(int))));
static assert(!__traits(compiles, typeid(inout(int*) function())));
inout(int*) function(inout(int)) fp;
}
/************************************/
inout(char[]) foo84(inout char[] s) { return s; }
void test84()
{
char[] m;
const(char)[] c;
string s;
auto r = foo84(s);
pragma(msg, typeof(r).stringof);
static assert(typeof(r).stringof == "immutable(char[])");
pragma(msg, typeof(foo84(c)).stringof);
static assert(typeof(foo84(c)).stringof == "const(char[])");
pragma(msg, typeof(foo84(m)).stringof);
static assert(typeof(foo84(m)).stringof == "char[]");
}
/************************************/
class foo85 { }
alias shared foo85 Y85;
void test85()
{
pragma(msg, Y85);
shared(foo85) x = new Y85;
}
/************************************/
struct foo87
{
int bar(T)(T t){ return 1; }
int bar(T)(T t) shared { return 2; }
}
void test87()
{
foo87 x;
auto i = x.bar(1);
assert(i == 1);
shared foo87 y;
i = y.bar(1);
assert(i == 2);
}
/************************************/
// 2751
void test88(immutable(int[3]) a)
{
const(char)[26] abc1 = "abcdefghijklmnopqrstuvwxyz";
const(char[26]) abc2 = "abcdefghijklmnopqrstuvwxyz";
immutable(const(char)[26]) abc3 = "abcdefghijklmnopqrstuvwxyz";
const(immutable(char)[26]) abc4 = "abcdefghijklmnopqrstuvwxyz";
auto abc5 = cast()"abcdefghijklmnopqrstuvwxyz";
pragma(msg, typeof(abc1).stringof);
pragma(msg, typeof(abc2).stringof);
pragma(msg, typeof(abc3).stringof);
pragma(msg, typeof(abc4).stringof);
pragma(msg, typeof(abc5).stringof);
static assert(is(typeof(abc1) == typeof(abc2)));
static assert(is(typeof(abc1) == const(char[26])));
static assert(is(typeof(abc3) == typeof(abc4)));
static assert(is(typeof(abc3) == immutable(char[26])));
auto b = cast()a;
pragma(msg, typeof(b).stringof);
static assert(is(typeof(b) == int[3]));
}
/************************************/
// 3748
// version = error8;
// version = error11;
class C3748
{
private int _x;
this(int x) { this._x = x; }
@property inout(int)* xptr() inout { return &_x; }
@property void x(int newval) { _x = newval; }
}
struct S3748
{
int x;
immutable int y = 5;
const int z = 6;
C3748 c;
inout(int)* getX() inout
{
static assert(!__traits(compiles, {
x = 4;
}));
return &x;
}
inout(int)* getCX(C3748 otherc) inout
{
inout(C3748) c2 = c; // typeof(c) == inout(C3748)
static assert(!__traits(compiles, {
inout(C3748) err2 = new C3748(1);
}));
static assert(!__traits(compiles, {
inout(C3748) err3 = otherc;
}));
auto v1 = getLowestXptr(c, otherc);
static assert(is(typeof(v1) == const(int)*));
auto v2 = getLowestXptr(c, c);
static assert(is(typeof(v2) == inout(int)*));
alias typeof(return) R;
static assert(!__traits(compiles, {
c.x = 4;
}));
static assert(!__traits(compiles, {
R r = otherc.xptr;
}));
static assert(!__traits(compiles, {
R r = &y;
}));
static assert(!__traits(compiles, {
R r = &z;
}));
return c2.xptr;
}
version(error8)
inout(int) err8; // see fail_compilation/failinout3748a.d
}
inout(int)* getLowestXptr(inout(C3748) c1, inout(C3748) c2)
{
inout(int)* x1 = c1.xptr;
inout(int)* x2 = c2.xptr;
if(*x1 <= *x2)
return x1;
return x2;
}
ref inout(int) getXRef(inout(C3748) c1, inout(C3748) c2)
{
return *getLowestXptr(c1, c2);
}
void test3748()
{
S3748 s;
s.c = new C3748(1);
const(S3748)* sp = &s;
auto s2 = new S3748;
s2.x = 3;
s2.c = new C3748(2);
auto s3 = cast(immutable(S3748)*) s2;
auto v1 = s.getX;
static assert(is(typeof(v1) == int*));
auto v2 = sp.getX;
static assert(is(typeof(v2) == const(int)*));
auto v3 = s3.getX;
static assert(is(typeof(v3) == immutable(int)*));
static assert(!__traits(compiles, {
int *err9 = sp.getX;
}));
static assert(!__traits(compiles, {
int *err10 = s3.getX;
}));
version(error11)
inout(int)* err11; // see fail_compilation/failinout3748b.d
auto v4 = getLowestXptr(s.c, s3.c);
static assert(is(typeof(v4) == const(int)*));
auto v5 = getLowestXptr(s.c, s.c);
static assert(is(typeof(v5) == int*));
auto v6 = getLowestXptr(s3.c, s3.c);
static assert(is(typeof(v6) == immutable(int)*));
getXRef(s.c, s.c) = 3;
}
/************************************/
// 4968
void test4968()
{
inout(int) f1(inout(int) i) { return i; }
int mi;
const int ci;
immutable int ii;
static assert(is(typeof(f1(mi)) == int));
static assert(is(typeof(f1(ci)) == const(int)));
static assert(is(typeof(f1(ii)) == immutable(int)));
inout(int)* f2(inout(int)* p) { return p; }
int* mp;
const(int)* cp;
immutable(int)* ip;
static assert(is(typeof(f2(mp)) == int*));
static assert(is(typeof(f2(cp)) == const(int)*));
static assert(is(typeof(f2(ip)) == immutable(int)*));
inout(int)[] f3(inout(int)[] a) { return a; }
int[] ma;
const(int)[] ca;
immutable(int)[] ia;
static assert(is(typeof(f3(ma)) == int[]));
static assert(is(typeof(f3(ca)) == const(int)[]));
static assert(is(typeof(f3(ia)) == immutable(int)[]));
inout(int)[1] f4(inout(int)[1] sa) { return sa; }
int[1] msa;
const int[1] csa;
immutable int[1] isa;
static assert(is(typeof(f4(msa)) == int[1]));
static assert(is(typeof(f4(csa)) == const(int)[1]));
static assert(is(typeof(f4(isa)) == immutable(int)[1]));
inout(int)[string] f5(inout(int)[string] aa) { return aa; }
int[string] maa;
const(int)[string] caa;
immutable(int)[string] iaa;
static assert(is(typeof(f5(maa)) == int[string]));
static assert(is(typeof(f5(caa)) == const(int)[string]));
static assert(is(typeof(f5(iaa)) == immutable(int)[string]));
}
/************************************/
// 1961
inout(char)[] strstr(inout(char)[] source, const(char)[] pattern)
{
/*
* this would be an error, as const(char)[] is not implicitly castable to
* inout(char)[]
*/
// return pattern;
for(int i = 0; i + pattern.length <= source.length; i++)
{
inout(char)[] tmp = source[i..pattern.length]; // ok
if (tmp == pattern) // ok, tmp implicitly casts to const(char)[]
return source[i..$]; // implicitly casts back to call-site source
}
return source[$..$]; // to be consistent with strstr.
}
void test1961a()
{
auto a = "hello";
a = strstr(a, "llo"); // cf (constancy factor) == immutable
static assert(!__traits(compiles, { char[] b = strstr(a, "llo"); }));
// error, cannot cast immutable to mutable
char[] b = "hello".dup;
b = strstr(b, "llo"); // cf == mutable (note that "llo" doesn't play a role
// because that parameter is not inout)
const(char)[] c = strstr(b, "llo");
// cf = mutable, ok because mutable
// implicitly casts to const
c = strstr(a, "llo"); // cf = immutable, ok immutable casts to const
}
inout(T) min(T)(inout(T) a, inout(T) b)
{
return a < b ? a : b;
}
void test1961b()
{
immutable(char)[] i = "hello";
const(char)[] c = "there";
char[] m = "Walter".dup;
static assert(!__traits(compiles, { i = min(i, c); }));
// error, since i and c vary in constancy, the result
// is const, and you cannot implicitly cast const to immutable.
c = min(i, c); // ok, cf == const, because not homogeneous
c = min(m, c); // ok, cf == const
c = min(m, i); // ok, cf == const
i = min(i, "blah"); // ok, cf == immutable, homogeneous
static assert(!__traits(compiles, { m = min(m, c); }));
// error, cf == const because not homogeneous.
static assert(!__traits(compiles, { m = min(m, "blah"); }));
// error, cf == const
m = min(m, "blah".dup); // ok
}
inout(T) min2(int i, int j, T)(inout(T) a, inout(T) b)
{
//pragma(msg, "(", i, ", ", j, ") = ", T);
static if (i == 0)
{
static if (j == 0) static assert(is(T == immutable(char)[]));
static if (j == 1) static assert(is(T == immutable(char)[]));
static if (j == 2) static assert(is(T == const(char)[]));
static if (j == 3) static assert(is(T == const(char)[]));
static if (j == 4) static assert(is(T == const(char)[]));
}
static if (i == 1)
{
static if (j == 0) static assert(is(T == immutable(char)[]));
static if (j == 1) static assert(is(T == immutable(char)[]));
static if (j == 2) static assert(is(T == const(char)[]));
static if (j == 3) static assert(is(T == const(char)[]));
static if (j == 4) static assert(is(T == const(char)[]));
}
static if (i == 2)
{
static if (j == 0) static assert(is(T == const(char)[]));
static if (j == 1) static assert(is(T == const(char)[]));
static if (j == 2) static assert(is(T == const(char)[]));
static if (j == 3) static assert(is(T == const(char)[]));
static if (j == 4) static assert(is(T == const(char)[]));
}
static if (i == 3)
{
static if (j == 0) static assert(is(T == const(char)[]));
static if (j == 1) static assert(is(T == const(char)[]));
static if (j == 2) static assert(is(T == const(char)[]));
static if (j == 3) static assert(is(T == const(char)[]));
static if (j == 4) static assert(is(T == const(char)[]));
}
static if (i == 4)
{
static if (j == 0) static assert(is(T == const(char)[]));
static if (j == 1) static assert(is(T == const(char)[]));
static if (j == 2) static assert(is(T == const(char)[]));
static if (j == 3) static assert(is(T == const(char)[]));
static if (j == 4) static assert(is(T == char[]));
}
return a < b ? a : b;
}
template seq(T...){ alias T seq; }
void test1961c()
{
immutable(char[]) iia = "hello1";
immutable(char)[] ima = "hello2";
const(char[]) cca = "there1";
const(char)[] cma = "there2";
char[] mma = "Walter".dup;
foreach (i, x; seq!(iia, ima, cca, cma, mma))
foreach (j, y; seq!(iia, ima, cca, cma, mma))
{
min2!(i, j)(x, y);
//pragma(msg, "x: ",typeof(x), ", y: ",typeof(y), " -> ", typeof(min2(x, y)), " : ", __traits(compiles, min2(x, y)));
/+
x: immutable(char[]) , y: immutable(char[]) -> immutable(char[]) : true
x: immutable(char[]) , y: immutable(char)[] -> const(immutable(char)[]) : true
x: immutable(char[]) , y: const(char[]) -> const(char[]) : true
x: immutable(char[]) , y: const(char)[] -> const(char[]) : true
x: immutable(char[]) , y: char[] -> const(char[]) : true
x: immutable(char)[] , y: immutable(char[]) -> const(immutable(char)[]) : true
x: immutable(char)[] , y: immutable(char)[] -> immutable(char)[] : true
x: immutable(char)[] , y: const(char[]) -> const(char[]) : true
x: immutable(char)[] , y: const(char)[] -> const(char)[] : true
x: immutable(char)[] , y: char[] -> const(char)[] : true
x: const(char[]) , y: immutable(char[]) -> const(char[]) : true
x: const(char[]) , y: immutable(char)[] -> const(char[]) : true
x: const(char[]) , y: const(char[]) -> const(char[]) : true
x: const(char[]) , y: const(char)[] -> const(char[]) : true
x: const(char[]) , y: char[] -> const(char[]) : true
x: const(char)[] , y: immutable(char[]) -> const(char[]) : true
x: const(char)[] , y: immutable(char)[] -> const(char)[] : true
x: const(char)[] , y: const(char[]) -> const(char[]) : true
x: const(char)[] , y: const(char)[] -> const(char)[] : true
x: const(char)[] , y: char[] -> const(char)[] : true
x: char[] , y: immutable(char[]) -> const(char[]) : true
x: char[] , y: immutable(char)[] -> const(char)[] : true
x: char[] , y: const(char[]) -> const(char[]) : true
x: char[] , y: const(char)[] -> const(char)[] : true
x: char[] , y: char[] -> char[] : true
+/
}
}
/************************************/
inout(int) function(inout(int)) notinoutfun1() { return null; }
inout(int) delegate(inout(int)) notinoutfun2() { return null; }
void notinoutfun1(inout(int) function(inout(int)) fn) {}
void notinoutfun2(inout(int) delegate(inout(int)) dg) {}
void test88()
{
inout(int) function(inout(int)) fp;
inout(int) delegate(inout(int)) dg;
static assert(!__traits(compiles, {
inout(int)* p;
}));
}
/************************************/
// 4251
void test4251a()
{
alias int T;
static assert(!is( immutable(T)** : const(T)** )); // NG, tail difference
static assert( is( immutable(T)** : const(T**) )); // OK, tail to const
static assert( is( T *** : T *** )); // OK, tail is same
static assert(!is( T *** : const(T)*** ));
static assert(!is( T *** : const(T*)** ));
static assert( is( T *** : const(T**)* )); // OK, tail to const
static assert( is( T *** : const(T***) )); // OK, tail to const
static assert(!is( T *** : immutable(T)*** ));
static assert(!is( T *** : immutable(T*)** ));
static assert(!is( T *** : immutable(T**)* ));
static assert(!is( T *** : immutable(T***) ));
static assert(!is( const(T)*** : T *** ));
static assert( is( const(T)*** : const(T)*** )); // OK, tail is same
static assert(!is( const(T)*** : const(T*)** ));
static assert( is( const(T)*** : const(T**)* )); // OK, tail to const
static assert( is( const(T)*** : const(T***) )); // OK, tail to const
static assert(!is( const(T)*** : immutable(T)*** ));
static assert(!is( const(T)*** : immutable(T*)** ));
static assert(!is( const(T)*** : immutable(T**)* ));
static assert(!is( const(T)*** : immutable(T***) ));
static assert(!is( const(T*)** : T *** ));
static assert(!is( const(T*)** : const(T)*** ));
static assert( is( const(T*)** : const(T*)** )); // OK, tail is same
static assert( is( const(T*)** : const(T**)* )); // OK, tail to const
static assert( is( const(T*)** : const(T***) )); // OK, tail to const
static assert(!is( const(T*)** : immutable(T)*** ));
static assert(!is( const(T*)** : immutable(T*)** ));
static assert(!is( const(T*)** : immutable(T**)* ));
static assert(!is( const(T*)** : immutable(T***) ));
static assert(!is( const(T**)* : T *** ));
static assert(!is( const(T**)* : const(T)*** ));
static assert(!is( const(T**)* : const(T*)** ));
static assert( is( const(T**)* : const(T**)* )); // OK, tail is same
static assert( is( const(T**)* : const(T***) )); // OK, tail is same
static assert(!is( const(T**)* : immutable(T)*** ));
static assert(!is( const(T**)* : immutable(T*)** ));
static assert(!is( const(T**)* : immutable(T**)* ));
static assert(!is( const(T**)* : immutable(T***) ));
static assert(!is( const(T***) : T *** ));
static assert(!is( const(T***) : const(T)*** ));
static assert(!is( const(T***) : const(T*)** ));
static assert( is( const(T***) : const(T**)* )); // OK, tail is same
static assert( is( const(T***) : const(T***) )); // OK, tail is same
static assert(!is( const(T***) : T *** ));
static assert(!is( const(T***) : immutable(T)*** ));
static assert(!is( const(T***) : immutable(T*)** ));
static assert(!is( const(T***) : immutable(T**)* ));
static assert(!is( const(T***) : immutable(T***) ));
static assert(!is( immutable(T)*** : T *** ));
static assert(!is( immutable(T)*** : const(T)*** ));
static assert(!is( immutable(T)*** : const(T*)** ));
static assert( is( immutable(T)*** : const(T**)* )); // OK, tail to const
static assert( is( immutable(T)*** : const(T***) )); // OK, tail to const
static assert( is( immutable(T)*** : immutable(T)*** )); // OK, tail is same
static assert(!is( immutable(T)*** : immutable(T*)** ));
static assert(!is( immutable(T)*** : immutable(T**)* ));
static assert(!is( immutable(T)*** : immutable(T***) ));
static assert(!is( immutable(T*)** : T *** ));
static assert(!is( immutable(T*)** : const(T)*** ));
static assert(!is( immutable(T*)** : const(T*)** ));
static assert( is( immutable(T*)** : const(T**)* )); // OK, tail to const
static assert( is( immutable(T*)** : const(T***) )); // OK, tail to const
static assert(!is( immutable(T*)** : immutable(T)*** ));
static assert( is( immutable(T*)** : immutable(T*)** )); // OK, tail is same
static assert(!is( immutable(T*)** : immutable(T**)* ));
static assert(!is( immutable(T*)** : immutable(T***) ));
static assert(!is( immutable(T**)* : T *** ));
static assert(!is( immutable(T**)* : const(T)*** ));
static assert(!is( immutable(T**)* : const(T*)** ));
static assert( is( immutable(T**)* : const(T**)* )); // OK, tail to const
static assert( is( immutable(T**)* : const(T***) )); // OK, tail to const
static assert(!is( immutable(T**)* : immutable(T)*** ));
static assert(!is( immutable(T**)* : immutable(T*)** ));
static assert( is( immutable(T**)* : immutable(T**)* )); // OK, tail is same
static assert( is( immutable(T**)* : immutable(T***) )); // OK, tail is same
static assert(!is( immutable(T***) : T *** ));
static assert(!is( immutable(T***) : const(T)*** ));
static assert(!is( immutable(T***) : const(T*)** ));
static assert( is( immutable(T***) : const(T**)* )); // OK, tail to const
static assert( is( immutable(T***) : const(T***) )); // OK, tail to const
static assert(!is( immutable(T***) : immutable(T)*** ));
static assert(!is( immutable(T***) : immutable(T*)** ));
static assert( is( immutable(T***) : immutable(T**)* )); // OK, tail is same
static assert( is( immutable(T***) : immutable(T***) )); // OK, tail is same
static assert( is( immutable(int)** : const(immutable(int)*)* )); // OK, tail to const
// shared level should be same
static assert(!is( shared(T)*** : const(T***) )); // NG, tail to const but shared level is different
static assert( is( shared(T***) : shared(const(T***)) )); // OK, tail to const and shared level is same
// head qualifier difference is ignored
static assert(is( shared(int)* : shared(int*) ));
static assert(is( inout (int)* : inout (int*) ));
//
static assert(!is( T** : T*** ));
static assert(!is( T[]** : T*** ));
}
void test4251b()
{
class C {}
class D : C {}
static assert(!is( C[]* : const(C)[]* ));
static assert( is( C[]* : const(C[])* ));
// derived class to const(base class) in tail
static assert( is( D[] : const(C)[] ));
static assert( is( D[]* : const(C[])* ));
static assert( is( D* : const(C)* ));
static assert( is( D** : const(C*)* ));
// derived class to const(base interface) in tail
interface I {}
class X : I {}
static assert(!is( X[] : const(I)[] ));
// interface to const(base interface) in tail
interface J {}
interface K : I, J {}
static assert( is( K[] : const(I)[] )); // OK, runtime offset is same
static assert(!is( K[] : const(J)[] )); // NG, runtime offset is different
}
/************************************/
// 5473
void test5473()
{
class C
{
int b;
void f(){}
static int x;
static void g(){};
}
struct S
{
int b;
void f(){}
static int x;
static void g(){};
}
void dummy(){}
alias typeof(dummy) VoidFunc;
const C c = new C;
const S s;
foreach (a; TypeTuple!(c, s))
{
alias typeof(a) A;
static assert(is(typeof(a.b) == const int)); // const(int)
static assert(is(typeof(a.f) == VoidFunc));
static assert(is(typeof(a.x) == int));
static assert(is(typeof(a.g) == VoidFunc));
static assert(is(typeof((const A).b) == const int)); // int, should be const(int)
static assert(is(typeof((const A).f) == VoidFunc));
static assert(is(typeof((const A).x) == int));
static assert(is(typeof((const A).g) == VoidFunc));
}
}
/************************************/
// 5493
void test5493()
{
// non template function
void pifun(immutable(char)[]* a) {}
void rifun(ref immutable(char)[] a) {}
void pcfun(const(char)[]* a) {}
void rcfun(ref const(char)[] a) {}
immutable char[] buf1 = "hello";
static assert(!__traits(compiles, pifun(buf1)));
static assert(!__traits(compiles, pcfun(buf1)));
static assert(!__traits(compiles, rifun(buf1)));
static assert(!__traits(compiles, rcfun(buf1)));
immutable char[5] buf2 = "hello";
static assert(!__traits(compiles, pifun(buf2)));
static assert(!__traits(compiles, pcfun(buf2)));
static assert(!__traits(compiles, rifun(buf2)));
static assert(!__traits(compiles, rcfun(buf2)));
const char[] buf3 = "hello";
static assert(!__traits(compiles, pcfun(buf3)));
static assert(!__traits(compiles, rcfun(buf3)));
const char[5] buf4 = "hello";
static assert(!__traits(compiles, pcfun(buf4)));
static assert(!__traits(compiles, rcfun(buf4)));
// template function
void pmesswith(T)(const(T)[]* ts, const(T) t)
{
*ts ~= t;
}
void rmesswith(T)(ref const(T)[] ts, const(T) t)
{
ts ~= t;
}
class C
{
int x;
this(int i) { x = i; }
}
C[] cs;
immutable C ci = new immutable(C)(6);
assert (ci.x == 6);
static assert(!__traits(compiles, pmesswith(&cs,ci)));
static assert(!__traits(compiles, rmesswith(cs,ci)));
//cs[$-1].x = 14;
//assert (ci.x == 14); //whoops.
}
/************************************/
// 5493 + inout
void test5493inout()
{
int m;
const(int) c;
immutable(int) i;
inout(int) ptrfoo(inout(int)** a, inout(int)* b)
{
*a = b;
return 0; // dummy
}
inout(int) reffoo(ref inout(int)* a, inout(int)* b)
{
a = b;
return 0; // dummy
}
// wild matching: inout == mutable
int* pm;
ptrfoo(&pm, &m); assert(pm == &m);
static assert(!__traits(compiles, ptrfoo(&pm, &c)));
static assert(!__traits(compiles, ptrfoo(&pm, &i)));
reffoo( pm, &m); assert(pm == &m);
static assert(!__traits(compiles, reffoo( pm, &c)));
static assert(!__traits(compiles, reffoo( pm, &i)));
// wild matching: inout == const
const(int)* pc;
ptrfoo(&pc, &m); assert(pc == &m);
ptrfoo(&pc, &c); assert(pc == &c);
ptrfoo(&pc, &i); assert(pc == &i);
reffoo( pc, &m); assert(pc == &m);
reffoo( pc, &c); assert(pc == &c);
reffoo( pc, &i); assert(pc == &i);
// wild matching: inout == immutable
immutable(int)* pi;
static assert(!__traits(compiles, ptrfoo(&pi, &m)));
static assert(!__traits(compiles, ptrfoo(&pi, &c)));
ptrfoo(&pi, &i); assert(pi == &i);
static assert(!__traits(compiles, reffoo( pi, &m)));
static assert(!__traits(compiles, reffoo( pi, &c)));
reffoo( pi, &i); assert(pi == &i);
}
/************************************/
// 6782
struct Tuple6782(T...)
{
T field;
alias field this;
}
auto tuple6782(T...)(T field)
{
return Tuple6782!T(field);
}
struct Range6782a
{
int *ptr;
@property inout(int)* front() inout { return ptr; }
@property bool empty() const { return ptr is null; }
void popFront() { ptr = null; }
}
struct Range6782b
{
Tuple6782!(int, int*) e;
@property front() inout { return e; }
@property empty() const { return e[1] is null; }
void popFront() { e[1] = null; }
}
void test6782()
{
int x = 5;
auto r1 = Range6782a(&x);
foreach(p; r1) {}
auto r2 = Range6782b(tuple6782(1, &x));
foreach(i, p; r2) {}
}
/************************************/
// 6864
int fn6864( const int n) { return 1; }
int fn6864(shared int n) { return 2; }
inout(int) fw6864(inout int s) { return 1; }
inout(int) fw6864(shared inout int s) { return 2; }
void test6864()
{
int n;
assert(fn6864(n) == 1);
assert(fw6864(n) == 1);
shared int sn;
assert(fn6864(sn) == 2);
assert(fw6864(sn) == 2);
}
/************************************/
// 6865
shared(inout(int)) foo6865(shared(inout(int)) n){ return n; }
void test6865()
{
shared(const(int)) n;
static assert(is(typeof(foo6865(n)) == shared(const(int))));
}
/************************************/
// 6866
struct S6866
{
const(char)[] val;
alias val this;
}
inout(char)[] foo6866(inout(char)[] s) { return s; }
void test6866()
{
S6866 s;
static assert(is(typeof(foo6866(s)) == const(char)[]));
// Assertion failure: 'targ' on line 2029 in file 'mtype.c'
}
/************************************/
// 6867
inout(char)[] test6867(inout(char)[] a)
{
foreach(dchar d; a) // No error if 'dchar' is removed
{
foreach(c; a) // line 5
{
}
}
return [];
}
/************************************/
// 6870
void test6870()
{
shared(int) x;
static assert(is(typeof(x) == shared(int))); // pass
const(typeof(x)) y;
const(shared(int)) z;
static assert(is(typeof(y) == typeof(z))); // fail!
}
/************************************/
// 6338, 6922
alias int T;
static assert(is( immutable( T ) == immutable(T) ));
static assert(is( immutable( const(T)) == immutable(T) )); // 6922
static assert(is( immutable(shared(T)) == immutable(T) ));
static assert(is( immutable( inout(T)) == immutable(T) ));
static assert(is( immutable(T) == immutable(T) ));
static assert(is( const(immutable(T)) == immutable(T) )); // 6922
static assert(is( shared(immutable(T)) == immutable(T) )); // 6338
static assert(is( inout(immutable(T)) == immutable(T) ));
static assert(is( immutable(shared(const(T))) == immutable(T) ));
static assert(is( immutable(const(shared(T))) == immutable(T) ));
static assert(is( shared(immutable(const(T))) == immutable(T) ));
static assert(is( shared(const(immutable(T))) == immutable(T) ));
static assert(is( const(shared(immutable(T))) == immutable(T) ));
static assert(is( const(immutable(shared(T))) == immutable(T) ));
static assert(is( immutable(shared(inout(T))) == immutable(T) ));
static assert(is( immutable(inout(shared(T))) == immutable(T) ));
static assert(is( shared(immutable(inout(T))) == immutable(T) ));
static assert(is( shared(inout(immutable(T))) == immutable(T) ));
static assert(is( inout(shared(immutable(T))) == immutable(T) ));
static assert(is( inout(immutable(shared(T))) == immutable(T) ));
/************************************/
// 6912
void test6912()
{
// From To
static assert( is( int [] : int [] ));
static assert(!is( inout(int []) : int [] ));
static assert(!is( int [] : inout(int []) ));
static assert( is( inout(int []) : inout(int []) ));
static assert( is( int [] : const(int)[] ));
static assert( is( inout(int []) : const(int)[] ));
static assert(!is( int [] : inout(const(int)[]) ));
static assert( is( inout(int []) : inout(const(int)[]) ));
static assert( is( const(int)[] : const(int)[] ));
static assert( is( inout(const(int)[]) : const(int)[] ));
static assert(!is( const(int)[] : inout(const(int)[]) ));
static assert( is( inout(const(int)[]) : inout(const(int)[]) ));
static assert( is( immutable(int)[] : const(int)[] ));
static assert( is( inout(immutable(int)[]) : const(int)[] ));
static assert( is( immutable(int)[] : inout(const(int)[]) ));
static assert( is( inout(immutable(int)[]) : inout(const(int)[]) ));
static assert( is( immutable(int)[] : immutable(int)[] ));
static assert( is( inout(immutable(int)[]) : immutable(int)[] ));
static assert( is( immutable(int)[] : inout(immutable(int)[]) ));
static assert( is( inout(immutable(int)[]) : inout(immutable(int)[]) ));
static assert( is( inout(int)[] : inout(int)[] ));
static assert( is( inout(inout(int)[]) : inout(int)[] ));
static assert( is( inout(int)[] : inout(inout(int)[]) ));
static assert( is( inout(inout(int)[]) : inout(inout(int)[]) ));
static assert( is( inout(int)[] : const(int)[] ));
static assert( is( inout(inout(int)[]) : const(int)[] ));
static assert( is( inout(int)[] : inout(const(int)[]) ));
static assert( is( inout(inout(int)[]) : inout(const(int)[]) ));
// From To
static assert( is( int [int] : int [int] ));
static assert(!is( inout(int [int]) : int [int] ));
static assert(!is( int [int] : inout(int [int]) ));
static assert( is( inout(int [int]) : inout(int [int]) ));
static assert( is( int [int] : const(int)[int] ));
static assert(!is( inout(int [int]) : const(int)[int] ));
static assert(!is( int [int] : inout(const(int)[int]) ));
static assert( is( inout(int [int]) : inout(const(int)[int]) ));
static assert( is( const(int)[int] : const(int)[int] ));
static assert(!is( inout(const(int)[int]) : const(int)[int] ));
static assert(!is( const(int)[int] : inout(const(int)[int]) ));
static assert( is( inout(const(int)[int]) : inout(const(int)[int]) ));
static assert( is( immutable(int)[int] : const(int)[int] ));
static assert(!is( inout(immutable(int)[int]) : const(int)[int] ));
static assert(!is( immutable(int)[int] : inout(const(int)[int]) ));
static assert( is( inout(immutable(int)[int]) : inout(const(int)[int]) ));
static assert( is( immutable(int)[int] : immutable(int)[int] ));
static assert(!is( inout(immutable(int)[int]) : immutable(int)[int] ));
static assert(!is( immutable(int)[int] : inout(immutable(int)[int]) ));
static assert( is( inout(immutable(int)[int]) : inout(immutable(int)[int]) ));
static assert( is( inout(int)[int] : inout(int)[int] ));
static assert(!is( inout(inout(int)[int]) : inout(int)[int] ));
static assert(!is( inout(int)[int] : inout(inout(int)[int]) ));
static assert( is( inout(inout(int)[int]) : inout(inout(int)[int]) ));
static assert( is( inout(int)[int] : const(int)[int] ));
static assert(!is( inout(inout(int)[int]) : const(int)[int] ));
static assert(!is( inout(int)[int] : inout(const(int)[int]) ));
static assert( is( inout(inout(int)[int]) : inout(const(int)[int]) ));
// Regression check
static assert( is( const(int)[] : const(int[]) ) );
// From To
static assert( is( int * : int * ));
static assert(!is( inout(int *) : int * ));
static assert(!is( int * : inout(int *) ));
static assert( is( inout(int *) : inout(int *) ));
static assert( is( int * : const(int)* ));
static assert( is( inout(int *) : const(int)* ));
static assert(!is( int * : inout(const(int)*) ));
static assert( is( inout(int *) : inout(const(int)*) ));
static assert( is( const(int)* : const(int)* ));
static assert( is( inout(const(int)*) : const(int)* ));
static assert(!is( const(int)* : inout(const(int)*) ));
static assert( is( inout(const(int)*) : inout(const(int)*) ));
static assert( is( immutable(int)* : const(int)* ));
static assert( is( inout(immutable(int)*) : const(int)* ));
static assert( is( immutable(int)* : inout(const(int)*) ));
static assert( is( inout(immutable(int)*) : inout(const(int)*) ));
static assert( is( immutable(int)* : immutable(int)* ));
static assert( is( inout(immutable(int)*) : immutable(int)* ));
static assert( is( immutable(int)* : inout(immutable(int)*) ));
static assert( is( inout(immutable(int)*) : inout(immutable(int)*) ));
static assert( is( inout(int)* : inout(int)* ));
static assert( is( inout(inout(int)*) : inout(int)* ));
static assert( is( inout(int)* : inout(inout(int)*) ));
static assert( is( inout(inout(int)*) : inout(inout(int)*) ));
static assert( is( inout(int)* : const(int)* ));
static assert( is( inout(inout(int)*) : const(int)* ));
static assert( is( inout(int)* : inout(const(int)*) ));
static assert( is( inout(inout(int)*) : inout(const(int)*) ));
}
/************************************/
// 6941
static assert((const(shared(int[])[])).stringof == "const(shared(int[])[])"); // fail
static assert((const(shared(int[])[])).stringof != "const(shared(const(int[]))[])"); // fail
static assert((inout(shared(int[])[])).stringof == "inout(shared(int[])[])"); // fail
static assert((inout(shared(int[])[])).stringof != "inout(shared(inout(int[]))[])"); // fail
/************************************/
// 6872
static assert((shared(inout(int)[])).stringof == "shared(inout(int)[])");
static assert((shared(inout(const(int)[]))).stringof == "shared(inout(const(int)[]))");
static assert((shared(inout(const(int)[])[])).stringof == "shared(inout(const(int)[])[])");
static assert((shared(inout(const(immutable(int)[])[])[])).stringof == "shared(inout(const(immutable(int)[])[])[])");
/************************************/
// 6939
void test6939()
{
shared int* x;
immutable int* y;
const int* z;
static assert( is(typeof(1?x:y) == shared(const(int))*)); // fail
static assert(!is(typeof(1?x:y) == const(int)*)); // fail
static assert(!is(typeof(1?x:z))); // fail
shared int[] a;
immutable int[] b;
const int[] c;
static assert( is(typeof(1?a:b) == shared(const(int))[])); // pass (ok)
static assert(!is(typeof(1?a:b) == const(int)[])); // pass (ok)
static assert(!is(typeof(1?a:c))); // fail
}
/************************************/
// 6940
void test6940()
{
immutable(int*)* x;
int** y;
static assert(is(typeof(x) : const(int*)*)); // ok
static assert(is(typeof(y) : const(int*)*)); // ok
static assert(is(typeof(1?x:y) == const(int*)*));
immutable(int[])[] a;
int[][] b;
static assert(is(typeof(a) : const(int[])[])); // ok
static assert(is(typeof(b) : const(int[])[])); // ok
static assert(is(typeof(1?a:b) == const(int[])[]));
immutable(int)** v;
int** w;
static assert(is(typeof(1?v:w) == const(int*)*));
}
/************************************/
// 6982
void test6982()
{
alias int Bla;
immutable(Bla[string]) ifiles = ["a":1, "b":2, "c":3];
static assert(!__traits(compiles, { immutable(Bla)[string] files = ifiles; })); // (1)
static assert(!__traits(compiles, { ifiles.remove ("a"); })); // (2)
immutable(int)[int] maa;
const(immutable(int)[int]) caa;
immutable( int [int]) iaa;
static assert(!__traits(compiles, { maa = iaa; }));
static assert(!__traits(compiles, { maa = caa; }));
}
/************************************/
// 7038
static assert(!is(S7038 == const));
const struct S7038{ int x; }
static assert(!is(S7038 == const));
static assert(!is(C7038 == const));
const class C7038{ int x; }
static assert(!is(C7038 == const));
void test7038()
{
S7038 s;
static assert(!is(typeof(s) == const));
static assert(is(typeof(s.x) == const int));
C7038 c;
static assert(!is(typeof(c) == const));
static assert(is(typeof(c.x) == const int));
}
/************************************/
// 7105
void copy(inout(int)** tgt, inout(int)* src){ *tgt = src; }
void test7105()
{
int* pm;
int m;
copy(&pm, &m);
assert(pm == &m);
const(int)* pc;
const(int) c;
copy(&pc, &c);
assert(pc == &c);
immutable(int)* pi;
immutable(int) i;
copy(&pi, &i);
assert(pi == &i);
static assert(!__traits(compiles, copy(&pm, &c)));
static assert(!__traits(compiles, copy(&pm, &i)));
copy(&pc, &m);
assert(pc == &m);
copy(&pc, &i);
assert(pc == &i);
static assert(!__traits(compiles, copy(&pi, &m)));
static assert(!__traits(compiles, copy(&pi, &c)));
}
/************************************/
// 7202
void test7202()
{
void writeln(string s) @system { printf("%.*s\n", s.length, s.ptr); }
void delegate() @system x = { writeln("I am @system"); };
void delegate() @safe y = { };
auto px = &x;
auto py = &y;
static assert(!__traits(compiles, px = py)); // accepts-invalid
*px = x;
y(); // "I am @system" -> no output, OK
}
/************************************/
// 7554
T outer7554(T)(immutable T function(T) pure foo) pure {
pure int inner() {
return foo(5);
}
return inner();
}
int sqr7554(int x) pure {
return x * x;
}
void test7554()
{
assert(outer7554(&sqr7554) == 25);
immutable(int function(int) pure) ifp = &sqr7554;
}
/************************************/
bool empty(T)(in T[] a)
{
assert(is(T == shared(string)));
return false;
}
void test7518() {
shared string[] stuff;
stuff.empty();
}
/************************************/
// 7669
shared(inout U)[n] id7669(U, size_t n)( shared(inout U)[n] );
void test7669()
{
static assert(is(typeof( id7669((shared(int)[3]).init)) == shared(int)[3]));
}
/************************************/
// 7757
inout(int) foo7757a(int x, lazy inout(int) def) { return def; }
inout(int)[] foo7757b(int x, lazy inout(int)[] def) { return def; }
inout(int)[int] foo7757c(int x, lazy inout(int)[int] def) { return def; }
inout(T) bar7757a(T)(T x, lazy inout(T) def) { return def; }
inout(T)[] bar7757b(T)(T x, lazy inout(T)[] def) { return def; }
inout(T)[T] bar7757c(T)(T x, lazy inout(T)[T] def) { return def; }
void test7757()
{
int mx1 = foo7757a(1,2);
const(int) cx1 = foo7757a(1,2);
int [] ma1 = foo7757b(1,[2]);
const(int)[] ca1 = foo7757b(1,[2]);
int [int] maa1 = foo7757c(1,[2:3]);
const(int)[int] caa1 = foo7757c(1,[2:3]);
int mx2 = bar7757a(1,2);
const(int) cx2 = bar7757a(1,2);
int [] ma2 = bar7757b(1,[2]);
const(int)[] ca2 = bar7757b(1,[2]);
int [int] maa2 = bar7757c(1,[2:3]);
const(int)[int] caa2 = bar7757c(1,[2:3]);
}
/************************************/
// 8098
class Outer8098
{
int i = 6;
class Inner
{
int y=0;
void foo() const
{
static assert(is(typeof(this.outer) == const(Outer8098)));
static assert(is(typeof(i) == const(int)));
static assert(!__traits(compiles, ++i));
}
}
Inner inner;
this()
{
inner = new Inner;
}
}
void test8098()
{
const(Outer8098) x = new Outer8098();
static assert(is(typeof(x) == const(Outer8098)));
static assert(is(typeof(x.inner) == const(Outer8098.Inner)));
}
/************************************/
// 8099
void test8099()
{
static class Outer
{
class Inner {}
}
auto m = new Outer;
auto c = new const(Outer);
auto i = new immutable(Outer);
auto mm = m.new Inner; // m -> m OK
auto mc = m.new const(Inner); // m -> c OK
static assert(!__traits(compiles, {
auto mi = m.new immutable(Inner); // m -> i bad
}));
static assert(!__traits(compiles, {
auto cm = c.new Inner; // c -> m bad
}));
auto cc = c.new const(Inner); // c -> c OK
static assert(!__traits(compiles, {
auto ci = c.new immutable(Inner); // c -> i bad
}));
static assert(!__traits(compiles, {
auto im = i.new Inner; // i -> m bad
}));
auto ic = i.new const(Inner); // i -> c OK
auto ii = i.new immutable(Inner); // i -> i OK
}
/************************************/
// 8201
void test8201()
{
uint[2] msa;
immutable uint[2] isa = msa;
ubyte[] buffer = [0, 1, 2, 3, 4, 5];
immutable ubyte[4] iArr = buffer[0 .. 4];
}
/************************************/
// 8212
struct S8212 { int x; }
shared S8212 s8212;
shared int x8212;
void test8212()
{
int y = x8212;
S8212 s2 = s8212;
}
/************************************/
// 8366
class B8366
{
bool foo(in Object o) const { return true; }
}
class C8366a : B8366
{
bool foo(in Object o) { return true; }
override
bool foo(in Object o) const { return false; }
bool foo(in Object o) immutable { return true; }
bool foo(in Object o) shared { return true; }
bool foo(in Object o) shared const { return true; }
}
class C8366b : B8366
{
bool foo(in Object o) { return false; }
alias super.foo foo;
bool foo(in Object o) immutable { return false; }
bool foo(in Object o) shared { return false; }
bool foo(in Object o) shared const { return false; }
}
void test8366()
{
{
C8366a mca = new C8366a();
const C8366a cca = new C8366a();
B8366 mb = mca;
const B8366 cb = cca;
assert(mca.foo(null) == true);
assert(cca.foo(null) == false);
assert(mb .foo(null) == false);
assert(cb .foo(null) == false);
}
{
C8366b mcb = new C8366b();
const C8366b ccb = new C8366b();
B8366 mb = mcb;
const B8366 cb = ccb;
assert(mcb.foo(null) == false);
assert(ccb.foo(null) == true);
assert(mb .foo(null) == true);
assert(cb .foo(null) == true);
}
}
/************************************/
// 8408
template hasMutableIndirection8408(T)
{
template Unqual(T)
{
static if (is(T U == shared(const U))) alias U Unqual;
else static if (is(T U == const U )) alias U Unqual;
else static if (is(T U == immutable U )) alias U Unqual;
else static if (is(T U == inout U )) alias U Unqual;
else static if (is(T U == shared U )) alias U Unqual;
else alias T Unqual;
}
enum hasMutableIndirection8408 = !is(typeof({ Unqual!T t = void; immutable T u = t; }));
}
static assert(!hasMutableIndirection8408!(int));
static assert(!hasMutableIndirection8408!(int[3]));
static assert( hasMutableIndirection8408!(Object));
auto dup8408(E)(inout(E)[] arr) pure @trusted
{
static if (hasMutableIndirection8408!E)
{
auto copy = new E[](arr.length);
copy[] = cast(E[])arr[]; // assume constant
return cast(inout(E)[])copy; // assume constant
}
else
{
auto copy = new E[](arr.length);
copy[] = arr[];
return copy;
}
}
void test8408()
{
void test(E, bool constConv)()
{
E[] marr = [E.init, E.init, E.init];
immutable E[] iarr = [E.init, E.init, E.init];
E[] m2m = marr.dup8408(); assert(m2m == marr);
immutable E[] i2i = iarr.dup8408(); assert(i2i == iarr);
static if (constConv)
{ // If dup() hss strong purity, implicit conversion is allowed
immutable E[] m2i = marr.dup8408(); assert(m2i == marr);
E[] i2m = iarr.dup8408(); assert(i2m == iarr);
}
else
{
static assert(!is(typeof({ immutable E[] m2i = marr.dup8408(); })));
static assert(!is(typeof({ E[] i2m = iarr.dup8408(); })));
}
}
class C {}
struct S1 { long n; }
struct S2 { int* p; }
struct T1 { S1 s; }
struct T2 { S2 s; }
struct T3 { S1 s1; S2 s2; }
test!(int , true )();
test!(int[3], true )();
test!(C , false)();
test!(S1 , true )();
test!(S2 , false)();
test!(T1 , true )();
test!(T2 , false)();
test!(T3 , false)();
}
/************************************/
// 8688
void test8688()
{
alias TypeTuple!(int) T;
foreach (i; TypeTuple!(0))
{
alias const(T[i]) X;
static assert(!is(X == int)); // fails
static assert( is(X == const(int))); // fails
}
}
/************************************/
// 9046
void test9046()
{
foreach (T; TypeTuple!(byte, ubyte, short, ushort, int, uint, long, ulong, char, wchar, dchar,
float, double, real, ifloat, idouble, ireal, cfloat, cdouble, creal))
foreach (U; TypeTuple!(T, const T, immutable T, shared T, shared const T, inout T, shared inout T))
{
static assert(is(typeof(U.init) == U));
}
foreach (T; TypeTuple!(int[], const(char)[], immutable(string[]), shared(const(int)[])[],
int[1], const(char)[1], immutable(string[1]), shared(const(int)[1])[],
int[int], const(char)[long], immutable(string[string]), shared(const(int)[double])[]))
foreach (U; TypeTuple!(T, const T, immutable T, shared T, shared const T, inout T, shared inout T))
{
static assert(is(typeof(U.init) == U));
}
int i;
enum E { x, y }
static struct S {}
static class C {}
struct NS { void f(){ i++; } }
class NC { void f(){ i++; } }
foreach (T; TypeTuple!(E, S, C, NS, NC))
foreach (U; TypeTuple!(T, const T, immutable T, shared T, shared const T, inout T, shared inout T))
{
static assert(is(typeof(U.init) == U));
}
alias TL = TypeTuple!(int, string, int[int]);
foreach (U; TypeTuple!(TL, const TL, immutable TL, shared TL, shared const TL, inout TL, shared inout TL))
{
static assert(is(typeof(U.init) == U));
}
}
/************************************/
// 9090
void test9090()
{
void test1(T)(auto ref const T[] val) {}
string a;
test1(a);
}
/************************************/
// 9461
void test9461()
{
class A {}
class B : A {}
void conv(S, T)(ref S x) { T y = x; }
// should be NG
static assert(!__traits(compiles, conv!(inout(B)[], inout(A)[])));
static assert(!__traits(compiles, conv!(int[inout(B)], int[inout(A)])));
static assert(!__traits(compiles, conv!(inout(B)[int], inout(A)[int])));
static assert(!__traits(compiles, conv!(inout(B)*, inout(A)*)));
static assert(!__traits(compiles, conv!(inout(B)[1], inout(A)[])));
// should be OK
static assert( __traits(compiles, conv!(inout(B), inout(A))));
}
/************************************/
int main()
{
test1();
test2();
test3();
test4();
test5();
test6();
test8();
test9();
test10();
test11();
test12();
test13();
test14();
test15();
test16();
test17();
test18();
test19();
test20();
test21();
test22();
test23();
test24();
test25();
test26();
test27();
test28();
test29();
test30();
test31();
test32();
test33();
test34();
test35();
test36();
test37();
test38();
test39();
test40();
test41();
test42();
test43();
test44();
test45();
test46();
test47();
test48();
test49();
test50();
test51();
test52();
test53();
test54();
test55();
test56();
test57();
test58();
test59();
test60();
test61();
test62();
test63();
test64();
test65();
test66();
test68();
test69();
test70();
test72();
test73();
test74();
test75();
test76();
test77();
test78();
test79();
test80();
test81();
test82();
test83();
test84();
test85();
test87();
test4968();
test3748();
test1961a();
test1961b();
test1961c();
test88();
test4251a();
test4251b();
test5473();
test5493();
test5493inout();
test6782();
test6864();
test6865();
test6866();
test6870();
test6912();
test6939();
test6940();
test6982();
test7038();
test7105();
test7202();
test7554();
test7518();
test7669();
test7757();
test8098();
test8099();
test8201();
test8212();
test8366();
test8408();
test8688();
test9046();
test9090();
test9461();
printf("Success\n");
return 0;
}
|
D
|
# FIXED
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/icall/stack/ble_dispatch_JT.c
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/osal/src/inc/osal_snv.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/target/_common/hal_types.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/target/_common/../_common/cc26xx/_hal_types.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/stdint.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/_stdint40.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/sys/stdint.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/sys/cdefs.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/sys/_types.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/machine/_types.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/machine/_stdint.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/sys/_stdint.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/stdbool.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/osal/src/inc/osal_bufmgr.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/target/_common/hal_trng_wrapper.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/target/_common/hal_types.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/inc/hw_types.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/inc/../inc/hw_chip_def.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/trng.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/../inc/hw_trng.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/../inc/hw_memmap.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/../inc/hw_ints.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/debug.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/interrupt.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/../inc/hw_nvic.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/cpu.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/../inc/hw_cpu_scs.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/../driverlib/rom.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/sm.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/bcomdef.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/osal/src/inc/comdef.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/target/_common/hal_types.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/inc/hal_defs.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/osal/src/inc/osal.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/limits.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/osal/src/inc/osal_memory.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/osal/src/inc/osal_timers.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/icall/src/inc/icall.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/stdlib.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/_ti_config.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/linkage.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/inc/hal_assert.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/target/_common/hal_types.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/hci.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/controller/cc26xx_r2/inc/ll_common.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/drivers/rf/RF.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/drivers/dpl/ClockP.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/stddef.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/drivers/dpl/SemaphoreP.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/drivers/utils/List.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/DeviceFamily.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/rf_common_cmd.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/rf_mailbox.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/string.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/rf_prop_cmd.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/rf_ble_cmd.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/target/_common/cc26xx/rf_hal.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/target/_common/hal_types.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/controller/cc26xx_r2/inc/ll.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/controller/cc26xx_r2/inc/ll_scheduler.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/gap.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/gatt.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/att.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/l2cap.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/gatt_uuid.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/hci_tl.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/hci_data.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/hci_event.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/hci_tl.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/linkdb.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/common/cc26xx/npi/stack/npi.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/target/_common/hal_types.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/gattservapp.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/gapgattserver.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/profiles/roles/gapbondmgr.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/icall/inc/icall_ble_apimsg.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/hci_ext.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/gatt_profile_uuid.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/../rom/rom_jt.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/../rom/map_direct.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/icall/inc/ble_dispatch.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/icall/inc/ble_dispatch_lite.h
ICallBLE/ble_dispatch_JT.obj: C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/icall/src/inc/icall_lite_translation.h
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/icall/stack/ble_dispatch_JT.c:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/osal/src/inc/osal_snv.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/target/_common/hal_types.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/target/_common/../_common/cc26xx/_hal_types.h:
C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/stdint.h:
C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/_stdint40.h:
C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/sys/stdint.h:
C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/sys/cdefs.h:
C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/sys/_types.h:
C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/machine/_types.h:
C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/machine/_stdint.h:
C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/sys/_stdint.h:
C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/stdbool.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/osal/src/inc/osal_bufmgr.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/target/_common/hal_trng_wrapper.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/target/_common/hal_types.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/inc/hw_types.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/inc/../inc/hw_chip_def.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/trng.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/../inc/hw_trng.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/../inc/hw_memmap.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/../inc/hw_ints.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/debug.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/interrupt.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/../inc/hw_nvic.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/cpu.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/../inc/hw_cpu_scs.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/../driverlib/rom.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/sm.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/bcomdef.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/osal/src/inc/comdef.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/target/_common/hal_types.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/inc/hal_defs.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/osal/src/inc/osal.h:
C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/limits.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/osal/src/inc/osal_memory.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/osal/src/inc/osal_timers.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/icall/src/inc/icall.h:
C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/stdlib.h:
C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/_ti_config.h:
C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/linkage.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/inc/hal_assert.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/target/_common/hal_types.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/hci.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/controller/cc26xx_r2/inc/ll_common.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/drivers/rf/RF.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/drivers/dpl/ClockP.h:
C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/stddef.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/drivers/dpl/SemaphoreP.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/drivers/utils/List.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/DeviceFamily.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/rf_common_cmd.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/rf_mailbox.h:
C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include/string.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/rf_prop_cmd.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/driverlib/rf_ble_cmd.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/target/_common/cc26xx/rf_hal.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/target/_common/hal_types.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/controller/cc26xx_r2/inc/ll.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/controller/cc26xx_r2/inc/ll_scheduler.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/gap.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/gatt.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/att.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/l2cap.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/gatt_uuid.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/hci_tl.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/hci_data.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/hci_event.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/hci_tl.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/linkdb.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/common/cc26xx/npi/stack/npi.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/hal/src/target/_common/hal_types.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/gattservapp.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/gapgattserver.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/profiles/roles/gapbondmgr.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/icall/inc/icall_ble_apimsg.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/hci_ext.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/gatt_profile_uuid.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/../rom/rom_jt.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/inc/../rom/map_direct.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/icall/inc/ble_dispatch.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/icall/inc/ble_dispatch_lite.h:
C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/blestack/icall/src/inc/icall_lite_translation.h:
|
D
|
// Written in the D programming language.
/*
* dmd 2.070.0
*
* Copyright Seiji Fujita 2016.
* Distributed under the Boost Software License, Version 1.0.
* http://www.boost.org/LICENSE_1_0.txt
*/
module SelectDirectoryDialog;
import org.eclipse.swt.all;
//import java.lang.all;
import std.file;
import std.path;
import std.string;
import dlsbuffer;
class SelectDirectoryDialog : Dialog
{
private:
Shell shell;
Text text;
Tree tree;
string selectDirectoryPath;
bool dialogResult;
public:
this(Shell parent) {
super(parent, checkStyle(parent, SWT.APPLICATION_MODAL));
}
string open(string selectdir = null) {
setDirectoryPath(selectdir);
createContents();
shell.open();
// shell.layout();
Display display = getParent().getDisplay();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
if (dialogResult) {
return selectDirectoryPath;
}
return null;
}
void setDirectoryPath(string newdir) {
if (newdir !is null && newdir.length > 0 && newdir.exists() && newdir.isDir()) {
selectDirectoryPath = buildNormalizedPath(newdir);
} else {
selectDirectoryPath = getcwd();
}
}
void createContents() {
shell = new Shell(getParent(), getStyle() | SWT.DIALOG_TRIM | SWT.RESIZE);
// shell = new Shell(getParent(), getStyle() | SWT.RESIZE | SWT.BORDER | SWT.TITLE | SWT.MIN | SWT.MAX | SWT.CLOSE | SWT.APPLICATION_MODAL);
shell.setSize(400, 500);
shell.setText("Select Directory");
shell.setLayout(new GridLayout(1, false));
//
Composite comp = new Composite(shell, SWT.NONE);
GridData gdata = new GridData(GridData.FILL_BOTH);
comp.setLayoutData(gdata);
comp.setLayout(new GridLayout(1, false));
createLabel(comp, "Select Directory:");
createEditBox(comp);
createTreeView(comp);
createHorizotalLine(shell);
// ok, cancel bottom
Composite bottom = createRightAlignmentComposite();
Button okBtn = createButton(bottom, SWT.PUSH, "OK", BUTTON_WIDTH);
void onSelection_okBtn(SelectionEvent e) {
dialogResult = true;
shell.close();
}
okBtn.addSelectionListener(
dgSelectionListener(SelectionListener.SELECTION, &onSelection_okBtn)
);
Button cancelBtn = createButton(bottom, SWT.PUSH, "キャンセル", BUTTON_WIDTH);
void onSelection_canselBtn(SelectionEvent e) {
dialogResult = false;
shell.close();
}
cancelBtn.addSelectionListener(
dgSelectionListener(SelectionListener.SELECTION, &onSelection_canselBtn)
);
}
//-----------------------------------------
void createEditBox(Composite parent) {
Composite c = new Composite(parent, SWT.NONE);
GridData gdata = new GridData(GridData.FILL_HORIZONTAL);
c.setLayoutData(gdata);
c.setLayout(new GridLayout(2, false));
text = new Text(c, SWT.SINGLE | SWT.BORDER);
gdata = new GridData(GridData.FILL_HORIZONTAL);
text.setLayoutData(gdata);
text.setText(selectDirectoryPath);
Button updir = createButton(c, SWT.PUSH, "←", 30);
void onSelection_updir(SelectionEvent e) {
dlog("onSelection_updir.text.getText() = ", text.getText());
string newdir = buildNormalizedPath(dirName(text.getText()));
dlog("onSelection_updir.newdir = ", newdir);
text.setText(newdir);
folderUpdate();
}
updir.addSelectionListener(
dgSelectionListener(SelectionListener.SELECTION, &onSelection_updir)
);
}
//-----------------------------------------
void createTreeView(Composite parent) {
Composite c = new Composite(parent, SWT.NONE);
GridData gdata = new GridData(GridData.FILL_BOTH);
c.setLayoutData(gdata);
c.setLayout(new GridLayout(2, false));
tree = new Tree(c, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.SINGLE);
tree.setLayoutData(new GridData(GridData.FILL_BOTH));
// tree.setLinesVisible(true);
tree.addListener(SWT.MouseUp, new class Listener {
public void handleEvent(Event event) {
if (event.button == 1) { // mouse left button
// Point point = new Point(event.x, event.y);
// TreeFolderItem item = cast(TreeFolderItem)tree.getItem(point);
auto items = cast(TreeFolderItem[])tree.getSelection();
if (items !is null && items.length >= 1) {
dlog("MouseUp: ", items[0].getfullPath());
if (items[0].getfullPath().length != 0) {
text.setText(items[0].getfullPath());
folderUpdate();
}
}
}
}
});
version (none) {
tree.addListener(SWT.MouseDoubleClick, new class Listener {
public void handleEvent(Event event) {
if (event.button == 1) { // mouse left button
// Point point = new Point(event.x, event.y);
// TreeFolderItem item = cast(TreeFolderItem)tree.getItem(point);
auto items = cast(TreeFolderItem[])tree.getSelection();
if (items !is null && items.length >= 1) {
dlog("MouseDoubleClick: ", items[0].getfullPath());
text.setText(items[0].getfullPath());
folderUpdate();
}
}
}
});
}
version (none) {
tree.addTreeListener(new class TreeAdapter {
override void treeExpanded(TreeEvent event) {
/* TreeItem item = (TreeItem) event.item;
Image image = (Image) item.getData(TREEITEMDATA_IMAGEEXPANDED);
if (image != null)
item.setImage(image);
treeExpandItem(item);
*/
}
override void treeCollapsed(TreeEvent event) {
/* TreeItem item = (TreeItem) event.item;
Image image = (Image) item.getData(TREEITEMDATA_IMAGECOLLAPSED);
if (image != null)
item.setImage(image);
*/
}
});
} // version (none)
// createTreeDragSource(tree);
// createTreeDropTarget(tree);
folderUpdate();
}
void folderUpdate() {
setDirectoryPath(text.getText());
setFolder(tree, selectDirectoryPath);
}
void setFolder(Tree node, string path) {
node.removeAll();
TreeFolderItem item = new TreeFolderItem(node, SWT.NONE);
item.setText(path);
foreach (DirEntry e; dirEntries(path, SpanMode.shallow)) {
if (e.isDir()) {
item.addPath(item, e.name);
}
}
item.setExpanded(true);
}
class TreeFolderItem : TreeItem
{
private string fullPath;
this(TreeFolderItem parentItem, int style) {
super(parentItem, style);
}
this(Tree parent, int style) {
super(parent, style);
}
string getfullPath() {
return fullPath;
}
TreeFolderItem setPath(TreeFolderItem node, string path) {
TreeFolderItem newNode = new TreeFolderItem(node, SWT.NULL);
newNode.addPath(path);
return newNode;
}
void addPath(string path) {
fullPath = path;
setText(path[std.string.lastIndexOf(path, "\\") + 1 .. $]);
}
void addPath(TreeFolderItem node, string path) {
TreeFolderItem rootNode = setPath(node, path);
string[] fnode = scanDirs(path);
if (fnode.length) {
// In Directory
foreach (i; 0 .. fnode.length) {
// recursive mode
// addPath(rootNode, fnode[i]);
setPath(rootNode, fnode[i]);
}
}
}
string[] scanDirs(string nextDirs) {
string[] fnode;
try {
foreach (DirEntry f; dirEntries(nextDirs, SpanMode.shallow)) {
if (f.isDir()) {
fnode ~= f.name;
}
}
}
catch (Exception ex) {
}
return fnode;
}
}
//-----------------------------------------
enum BUTTON_WIDTH = 70;
enum HORIZONTAL_SPACING = 3;
enum MARGIN_WIDTH = 0;
enum MARGIN_HEIGHT = 2;
Label createHorizotalLine(Composite c)
{
Label line = new Label(c, SWT.SEPARATOR | SWT.HORIZONTAL);
GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
line.setLayoutData(data);
return line;
}
Composite createRightAlignmentComposite()
{
Composite c = new Composite(shell, SWT.NONE);
GridLayout layout = new GridLayout(2, false);
layout.horizontalSpacing = HORIZONTAL_SPACING;
layout.marginWidth = MARGIN_WIDTH;
layout.marginHeight = MARGIN_HEIGHT;
c.setLayout(layout);
GridData data = new GridData(GridData.HORIZONTAL_ALIGN_END);
c.setLayoutData(data);
return c;
}
Button createButton(Composite c, int style, string name, int minWidth)
{
Button b = new Button(c, style);
b.setText(name);
GridData d = new GridData();
int w = b.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
if (w < minWidth) {
d.widthHint = minWidth;
} else {
d.widthHint = w;
}
b.setLayoutData(d);
return b;
}
Label createLabel(Composite c, string text, int style = SWT.NONE) {
Label l = new Label(c, style);
l.setText(text);
return l;
}
}
|
D
|
instance VLK_4131_Engrom (Npc_Default)
{
// ------ NSC ------
name = "Engrom";
guild = GIL_OUT;
id = 4131;
voice = 12;
flags = 0; //NPC_FLAG_IMMORTAL oder 0
npctype = NPCTYPE_MAIN;
// ------ Attribute ------
B_SetAttributesToChapter (self, 3); //setzt Attribute und LEVEL entsprechend dem angegebenen Kapitel (1-6)
// ------ Kampf-Taktik ------
fight_tactic = FAI_HUMAN_STRONG; // MASTER / STRONG / COWARD
// ------ Equippte Waffen ------ //Munition wird automatisch generiert, darf aber angegeben werden
EquipItem (self, ItMw_1h_VLK_Axe);
EquipItem (self, ItRW_MIL_Crossbow);
// ------ Inventory ------
B_CreateAmbientInv (self);
// ------ visuals ------ //Muss NACH Attributen kommen, weil in B_SetNpcVisual die Breite abh. v. STR skaliert wird
B_SetNpcVisual (self, MALE, "Hum_Head_Bald", Face_N_NormalBart20, BodyTex_N, ITAR_Leather_L);
Mdl_SetModelFatness (self, 1);
Mdl_ApplyOverlayMds (self, "Humans_Relaxed.mds"); // Tired / Militia / Mage / Arrogance / Relaxed
// ------ NSC-relevante Talente vergeben ------
B_GiveNpcTalents (self);
// ------ Kampf-Talente ------ //Der enthaltene B_AddFightSkill setzt Talent-Ani abhängig von TrefferChance% - alle Kampftalente werden gleichhoch gesetzt
B_SetFightSkills (self, 45); //Grenzen für Talent-Level liegen bei 30 und 60
// ------ TA anmelden ------
daily_routine = Rtn_Start_4131;
};
FUNC VOID Rtn_Start_4131 ()
{
TA_Sit_Campfire (08,00,23,00,"SPAWN_TALL_PATH_BANDITOS2_03");
TA_Sit_Campfire (23,00,08,00,"SPAWN_TALL_PATH_BANDITOS2_03");
};
FUNC VOID Rtn_Obsessed_4131 ()
{
TA_Stand_ArmsCrossed (08,00,23,00,"OW_SAWHUT_MOLERAT_MOVEMENT");
TA_Stand_ArmsCrossed (23,00,08,00,"OW_SAWHUT_MOLERAT_MOVEMENT");
};
|
D
|
// Copyright © 2013, Bernard Helyer. All rights reserved.
// See copyright notice in src/volt/license.d (BOOST ver. 1.0).
module volt.semantic.overload;
import watt.algorithm;
import ir = volt.ir.ir;
import volt.ir.util;
import volt.errors;
import volt.interfaces;
import volt.token.location;
import volt.semantic.util;
import volt.semantic.typer;
import volt.semantic.context;
import volt.semantic.classify;
import volt.semantic.implicit;
/**
* Okay, so here's a rough description of how function overload resolution
* is supposed to work. No doubt there will be discrepancies between this
* description and the implementation proper. We in the business call those
* 'bugs'.
*
* For all functions of a given name, first those without the correct number
* of parameters are culled.
*
* Then of that list, a match level is generated for each function, the match
* level is the lowest of
*
* 4 - Exact match
* 3 - Exact match with conversion to const
* 2 - Match with implicit conversion
* 1 - No match
*
* Then the list is culled down to only functions of the highest match level.
* If the list has only one element, it is chosen, otherwise the functions
* are sorted by their specialisation: a function is more specialised than
* another function if its parameters can be given to the other but the other's
* cannot be given to it.
*
* For example, foo(ChildClass) is more specialised than foo(Object), as ChildClass
* can be passed as an Object, but not the other way around.
*
* If after this, there is a function that is more specialised than the next in the
* list, it is chosen, otherwise an error is generated.
*/
enum ThrowOnError = true;
enum DoNotThrow = false;
ir.Function selectFunction(ir.Function[] functions, ir.Exp[] arguments, Location location, bool throwOnError = ThrowOnError)
{
ir.Type[] types;
foreach (arg; arguments) {
types ~= getExpType(arg);
}
return selectFunction(functions, types, arguments, location, throwOnError);
}
ir.Function selectFunction(ir.FunctionSet fset, ir.Exp[] arguments, Location location, bool throwOnError = ThrowOnError)
{
ir.Type[] types;
foreach (arg; arguments) {
types ~= getExpType(arg);
}
return selectFunction(fset, types, arguments, location, throwOnError);
}
ir.Function selectFunction(ir.FunctionSet fset, ir.Variable[] arguments, Location location, bool throwOnError = ThrowOnError)
{
ir.Type[] types;
foreach (arg; arguments) {
types ~= arg.type;
}
return selectFunction(fset, types, [], location, throwOnError);
}
ir.Function selectFunction(ir.Function[] functions, ir.Variable[] arguments, Location location, bool throwOnError)
{
ir.Type[] types;
foreach (arg; arguments) {
types ~= arg.type;
}
return selectFunction(functions, types, [], location, throwOnError);
}
int matchLevel(bool homogenous, ir.Type argument, ir.Type parameter, ir.Exp exp=null)
{
if (typesEqual(argument, parameter)) {
return 4;
}
if (typesEqual(argument, parameter, IgnoreStorage)) {
return 3;
}
auto prim = cast(ir.PrimitiveType) parameter;
if (prim !is null && exp !is null && fitsInPrimitive(prim, exp)) {
return 3;
}
auto oldConst = argument.isConst;
argument.isConst = true;
auto equalAsConst = typesEqual(argument, parameter);
argument.isConst = oldConst;
if (equalAsConst) {
return 3;
}
if (willConvert(argument, parameter)) {
return 2;
} else {
auto pArray = cast(ir.ArrayType) realType(parameter);
auto aArray = cast(ir.ArrayType) realType(argument);
if (pArray !is null && aArray !is null && isVoid(aArray.base)) {
return 2;
}
if (homogenous) {
if (pArray !is null && willConvert(argument, pArray.base)) {
return matchLevel(homogenous, argument, pArray.base);
}
}
return 1;
}
version (Volt) assert(false); // If
}
bool specialisationComparison(object.Object ao, object.Object bo)
{
auto a = cast(ir.Function) ao;
auto b = cast(ir.Function) bo;
assert(a !is null && b !is null);
if (a.type.params.length != b.type.params.length) {
return false;
}
bool atob = true, btoa = true;
for (size_t i = 0; i < a.type.params.length; ++i) {
auto at = a.params[i].type;
auto bt = b.params[i].type;
if (!willConvert(at, bt)) {
atob = false;
}
if (!willConvert(bt, at)) {
btoa = false;
}
}
return atob && !btoa;
}
ir.Function selectFunction(ir.FunctionSet fset, ir.Type[] arguments, Location location, bool throwOnError = ThrowOnError)
{
return selectFunction(fset, arguments, [], location, throwOnError);
}
ir.Function selectFunction(ir.FunctionSet fset, ir.Type[] arguments, ir.Exp[] exps, Location location, bool throwOnError = ThrowOnError)
{
auto func = selectFunction(fset.functions, arguments, exps, location, throwOnError);
if (func is null) {
return null;
}
return fset.resolved(func);
}
ir.Function selectFunction(ir.Function[] functions, ir.Type[] arguments, Location location, bool throwOnError = ThrowOnError)
{
return selectFunction(functions, arguments, [], location, throwOnError);
}
ir.Function selectFunction(ir.Function[] functions, ir.Type[] arguments, ir.Exp[] exps, Location location, bool throwOnError = ThrowOnError)
{
assert(functions.length > 0);
bool correctNumberOfArguments(ir.Function func, out int defaultArguments)
{
foreach (i, param; func.params) {
if (param.assign !is null && i >= arguments.length) {
defaultArguments++;
}
}
return func.type.params.length == arguments.length;
}
int matchLevel(ir.Function func)
{
if (arguments.length > func.type.params.length) {
assert(func.type.homogenousVariadic);
} else {
assert(func.type.params.length >= arguments.length);
}
if (func.type.params.length == 0) {
return 4;
}
int[] matchLevels;
foreach (i, param; func.type.params) {
if (i >= arguments.length && !func.type.homogenousVariadic) {
assert(func.params[i].assign !is null);
matchLevels ~= 4;
} else {
bool homogenous = func.type.homogenousVariadic && i == func.type.params.length - 1;
auto exp = i < exps.length ? exps[i] : null;
if (homogenous && i >= arguments.length) {
panicAssert(func, i == func.params.length - 1);
matchLevels ~= 3;
break;
} else {
matchLevels ~= .matchLevel(homogenous, arguments[i], param, exp);
}
}
}
if (func.type.homogenousVariadic && arguments.length >= func.params.length) {
matchLevels = matchLevels[0 .. $ - 1];
auto toCheck = arguments[func.type.params.length - 1 .. $];
auto arr = cast(ir.ArrayType) realType(func.type.params[$-1]);
assert(arr !is null);
foreach (arg; toCheck) {
auto atype = cast(ir.ArrayType) arg;
if (atype !is null && isVoid(atype.base)) {
matchLevels ~= 2;
} else {
auto ml1 = .matchLevel(true, arg, arr.base);
auto ml2 = .matchLevel(true, arg, arr);
matchLevels ~= ml1 > ml2 ? ml1 : ml2;
// Given foo(T[]...) and foo(T) passing a T, the latter should be preferred.
if (matchLevels[$-1] == 4) {
matchLevels[$-1] = 3;
}
}
}
}
int _matchLevel = int.max;
foreach (l; matchLevels) {
if (l <= _matchLevel) {
_matchLevel = l;
}
}
panicAssert(func, _matchLevel < int.max);
return _matchLevel;
}
ir.Function[] outFunctions;
foreach (func; functions) {
int defaultArguments;
if (correctNumberOfArguments(func, defaultArguments)) {
outFunctions ~= func;
} else if (func.params.length == arguments.length + cast(size_t)defaultArguments) {
outFunctions ~= func;
} else if (func.type.homogenousVariadic && arguments.length >= (func.params.length - 1)) {
panicAssert(func, func.params.length > 0);
outFunctions ~= func;
}
}
if (outFunctions.length == 0) {
if (throwOnError) {
throw makeNoValidFunction(location, functions[0].name, arguments);
} else {
return null;
}
}
int[] matchLevels;
foreach (func; outFunctions) {
matchLevels ~= matchLevel(func);
}
int highestMatchLevel = -1;
while (matchLevels.length > 0) {
if (matchLevels[0] >= highestMatchLevel) {
highestMatchLevel = matchLevels[0];
}
matchLevels = matchLevels[1 .. $];
}
assert(highestMatchLevel >= 0);
ir.Function[] matchedFunctions;
foreach (func; outFunctions) {
if (matchLevel(func) >= highestMatchLevel) {
matchedFunctions ~= func;
}
}
version (Volt) {
bool cmp(size_t ia, size_t ib)
{
return specialisationComparison(matchedFunctions[ia],
matchedFunctions[ib]);
}
void swap(size_t ia, size_t ib)
{
ir.Function tmp = matchedFunctions[ia];
matchedFunctions[ia] = matchedFunctions[ib];
matchedFunctions[ib] = tmp;
}
runSort(matchedFunctions.length, cmp, swap);
} else {
sort(cast(object.Object[])matchedFunctions, &specialisationComparison);
}
if (matchedFunctions.length == 1 || specialisationComparison(matchedFunctions[0], matchedFunctions[1]) > 0) {
if (highestMatchLevel > 1) {
return matchedFunctions[0];
}
}
if (throwOnError) {
if (matchedFunctions.length > 1 && highestMatchLevel > 1) {
throw makeMultipleFunctionsMatch(location, matchedFunctions);
} else {
throw makeCannotDisambiguate(location, matchedFunctions, arguments);
}
} else {
return null;
}
version (Volt) assert(false); // If
}
|
D
|
/* Converted to D from D:\dev\projects\DWindowsProgramming\Samples\Chap15\DibConv\resource.h by htod */
module resource;
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by DibConv.rc
//
//C #define IDM_FILE_OPEN 40001
const IDM_FILE_OPEN = 40001;
// Next default values for new objects
//
//C #ifdef APSTUDIO_INVOKED
//C #ifndef APSTUDIO_READONLY_SYMBOLS
//C #define _APS_NEXT_RESOURCE_VALUE 102
//C #define _APS_NEXT_COMMAND_VALUE 40002
//C #define _APS_NEXT_CONTROL_VALUE 1000
//C #define _APS_NEXT_SYMED_VALUE 101
//C #endif
//C #endif
|
D
|
import hunt.framework;
void main(string[] args)
{
app().run(args);
}
|
D
|
// D import file generated from 'derelict\allegro\ttf.d'
module derelict.allegro.ttf;
private
{
import derelict.allegro.allegrotypes;
import derelict.allegro.font;
import derelict.util.compat;
import derelict.util.loader;
}
enum
{
ALLEGRO_TTF_NO_KERNING = 1,
ALLEGRO_TTF_MONOCHROME = 2,
}
extern (C)
{
alias ALLEGRO_FONT* function(in char*, int, int) da_al_load_ttf_font;
alias ALLEGRO_FONT* function(ALLEGRO_FILE*, in char*, int, int) da_al_load_ttf_font_f;
alias bool function() da_al_init_ttf_addon;
alias void function() da_al_shutdown_ttf_addon;
alias uint function() da_al_get_allegro_ttf_version;
}
mixin(gsharedString!() ~ "\x0ada_al_load_ttf_font al_load_ttf_font;\x0ada_al_load_ttf_font_f al_load_ttf_font_f;\x0ada_al_init_ttf_addon al_init_ttf_addon;\x0ada_al_shutdown_ttf_addon al_shutdown_ttf_addon;\x0ada_al_get_allegro_ttf_version al_get_allegro_ttf_version;\x0a");
class DerelictAllegroTTFLoader : SharedLibLoader
{
public
{
this()
{
super("allegro_ttf-5.0.5-mt.dll,allegro_ttf-5.0.4-mt.dll,allegro_ttf-5.0.3-mt.dll,allegro_ttf-5.0.2-mt.dll,allegro_ttf-5.0.1-mt.dll,allegro_ttf-5.0.0-mt.dll","liballegro_ttf-5.0.5.so,liballegro_ttf-5.0.so","../Frameworks/Allegrottf-5.0.framework,/Library/Frameworks/AllegroTTF-5.0.framwork,liballegro_ttf-5.0.5.dylib,liballegro_ttf-5.0.dylib");
}
protected override void loadSymbols()
{
bindFunc(cast(void**)&al_load_ttf_font,"al_load_ttf_font");
bindFunc(cast(void**)&al_load_ttf_font_f,"al_load_ttf_font_f");
bindFunc(cast(void**)&al_init_ttf_addon,"al_init_ttf_addon");
bindFunc(cast(void**)&al_shutdown_ttf_addon,"al_shutdown_ttf_addon");
bindFunc(cast(void**)&al_get_allegro_ttf_version,"al_get_allegro_ttf_version");
}
}
}
DerelictAllegroTTFLoader DerelictAllegroTTF;
static this();
|
D
|
/++
Auto-generated Linux syscall constants for SPARC
+/
module mir.linux.arch.sparc.uapi._asm.unistd;
version(LDC) pragma(LDC_no_moduleinfo);
enum NR_restart_syscall = 0;
enum NR_exit = 1;
enum NR_fork = 2;
enum NR_read = 3;
enum NR_write = 4;
enum NR_open = 5;
enum NR_close = 6;
enum NR_wait4 = 7;
enum NR_creat = 8;
enum NR_link = 9;
enum NR_unlink = 10;
enum NR_execv = 11;
enum NR_chdir = 12;
enum NR_chown = 13;
enum NR_mknod = 14;
enum NR_chmod = 15 /* Common */;
enum NR_lchown = 16 /* Common */;
enum NR_brk = 17 /* Common */;
enum NR_perfctr = 18 /* Performance counter operations */;
enum NR_lseek = 19 /* Common */;
enum NR_getpid = 20 /* Common */;
enum NR_capget = 21 /* Linux Specific */;
enum NR_capset = 22 /* Linux Specific */;
enum NR_setuid = 23 /* Implemented via setreuid in SunOS */;
enum NR_getuid = 24 /* Common */;
enum NR_vmsplice = 25 /* ENOSYS under SunOS */;
enum NR_ptrace = 26 /* Common */;
enum NR_alarm = 27 /* Implemented via setitimer in SunOS */;
enum NR_sigaltstack = 28 /* Common */;
enum NR_pause = 29 /* Is sigblock(0)->sigpause() in SunOS */;
enum NR_utime = 30 /* Implemented via utimes() under SunOS */;
static if (size_t.sizeof == 4) enum NR_lchown32 = 31 /* Linux sparc32 specific */;
static if (size_t.sizeof == 4) enum NR_fchown32 = 32 /* Linux sparc32 specific */;
enum NR_access = 33 /* Common */;
enum NR_nice = 34 /* Implemented via get/setpriority() in SunOS */;
static if (size_t.sizeof == 4) enum NR_chown32 = 35 /* Linux sparc32 specific */;
enum NR_sync = 36 /* Common */;
enum NR_kill = 37 /* Common */;
enum NR_stat = 38 /* Common */;
enum NR_sendfile = 39 /* Linux Specific */;
enum NR_lstat = 40 /* Common */;
enum NR_dup = 41 /* Common */;
enum NR_pipe = 42 /* Common */;
enum NR_times = 43 /* Implemented via getrusage() in SunOS */;
static if (size_t.sizeof == 4) enum NR_getuid32 = 44 /* Linux sparc32 specific */;
enum NR_umount2 = 45 /* Linux Specific */;
enum NR_setgid = 46 /* Implemented via setregid() in SunOS */;
enum NR_getgid = 47 /* Common */;
enum NR_signal = 48 /* Implemented via sigvec() in SunOS */;
enum NR_geteuid = 49 /* SunOS calls getuid() */;
enum NR_getegid = 50 /* SunOS calls getgid() */;
enum NR_acct = 51 /* Common */;
static if (size_t.sizeof == 4) enum NR_getgid32 = 53 /* Linux sparc32 specific */;
static if (size_t.sizeof == 8) enum NR_memory_ordering = 52 /* Linux Specific */;
enum NR_ioctl = 54 /* Common */;
enum NR_reboot = 55 /* Common */;
static if (size_t.sizeof == 4) enum NR_mmap2 = 56 /* Linux sparc32 Specific */;
enum NR_symlink = 57 /* Common */;
enum NR_readlink = 58 /* Common */;
enum NR_execve = 59 /* Common */;
enum NR_umask = 60 /* Common */;
enum NR_chroot = 61 /* Common */;
enum NR_fstat = 62 /* Common */;
enum NR_fstat64 = 63 /* Linux Specific */;
enum NR_getpagesize = 64 /* Common */;
enum NR_msync = 65 /* Common in newer 1.3.x revs... */;
enum NR_vfork = 66 /* Common */;
enum NR_pread64 = 67 /* Linux Specific */;
enum NR_pwrite64 = 68 /* Linux Specific */;
static if (size_t.sizeof == 4) enum NR_geteuid32 = 69 /* Linux sparc32, sbrk under SunOS */;
static if (size_t.sizeof == 4) enum NR_getegid32 = 70 /* Linux sparc32, sstk under SunOS */;
enum NR_mmap = 71 /* Common */;
static if (size_t.sizeof == 4) enum NR_setreuid32 = 72 /* Linux sparc32, vadvise under SunOS */;
enum NR_munmap = 73 /* Common */;
enum NR_mprotect = 74 /* Common */;
enum NR_madvise = 75 /* Common */;
enum NR_vhangup = 76 /* Common */;
static if (size_t.sizeof == 4) enum NR_truncate64 = 77 /* Linux sparc32 Specific */;
enum NR_mincore = 78 /* Common */;
enum NR_getgroups = 79 /* Common */;
enum NR_setgroups = 80 /* Common */;
enum NR_getpgrp = 81 /* Common */;
static if (size_t.sizeof == 4) enum NR_setgroups32 = 82 /* Linux sparc32, setpgrp under SunOS */;
enum NR_setitimer = 83 /* Common */;
static if (size_t.sizeof == 4) enum NR_ftruncate64 = 84 /* Linux sparc32 Specific */;
enum NR_swapon = 85 /* Common */;
enum NR_getitimer = 86 /* Common */;
static if (size_t.sizeof == 4) enum NR_setuid32 = 87 /* Linux sparc32, gethostname under SunOS */;
enum NR_sethostname = 88 /* Common */;
static if (size_t.sizeof == 4) enum NR_setgid32 = 89 /* Linux sparc32, getdtablesize under SunOS */;
enum NR_dup2 = 90 /* Common */;
static if (size_t.sizeof == 4) enum NR_setfsuid32 = 91 /* Linux sparc32, getdopt under SunOS */;
enum NR_fcntl = 92 /* Common */;
enum NR_select = 93 /* Common */;
static if (size_t.sizeof == 4) enum NR_setfsgid32 = 94 /* Linux sparc32, setdopt under SunOS */;
enum NR_fsync = 95 /* Common */;
enum NR_setpriority = 96 /* Common */;
enum NR_socket = 97 /* Common */;
enum NR_connect = 98 /* Common */;
enum NR_accept = 99 /* Common */;
enum NR_getpriority = 100 /* Common */;
enum NR_rt_sigreturn = 101 /* Linux Specific */;
enum NR_rt_sigaction = 102 /* Linux Specific */;
enum NR_rt_sigprocmask = 103 /* Linux Specific */;
enum NR_rt_sigpending = 104 /* Linux Specific */;
enum NR_rt_sigtimedwait = 105 /* Linux Specific */;
enum NR_rt_sigqueueinfo = 106 /* Linux Specific */;
enum NR_rt_sigsuspend = 107 /* Linux Specific */;
static if (size_t.sizeof == 4) enum NR_setresuid32 = 108 /* Linux Specific, sigvec under SunOS */;
static if (size_t.sizeof == 4) enum NR_getresuid32 = 109 /* Linux Specific, sigblock under SunOS */;
static if (size_t.sizeof == 4) enum NR_setresgid32 = 110 /* Linux Specific, sigsetmask under SunOS */;
static if (size_t.sizeof == 4) enum NR_getresgid32 = 111 /* Linux Specific, sigpause under SunOS */;
static if (size_t.sizeof == 4) enum NR_setregid32 = 112 /* Linux sparc32, sigstack under SunOS */;
static if (size_t.sizeof == 8) enum NR_setresuid = 108 /* Linux Specific, sigvec under SunOS */;
static if (size_t.sizeof == 8) enum NR_getresuid = 109 /* Linux Specific, sigblock under SunOS */;
static if (size_t.sizeof == 8) enum NR_setresgid = 110 /* Linux Specific, sigsetmask under SunOS */;
static if (size_t.sizeof == 8) enum NR_getresgid = 111 /* Linux Specific, sigpause under SunOS */;
enum NR_recvmsg = 113 /* Common */;
enum NR_sendmsg = 114 /* Common */;
static if (size_t.sizeof == 4) enum NR_getgroups32 = 115 /* Linux sparc32, vtrace under SunOS */;
enum NR_gettimeofday = 116 /* Common */;
enum NR_getrusage = 117 /* Common */;
enum NR_getsockopt = 118 /* Common */;
enum NR_getcwd = 119 /* Linux Specific */;
enum NR_readv = 120 /* Common */;
enum NR_writev = 121 /* Common */;
enum NR_settimeofday = 122 /* Common */;
enum NR_fchown = 123 /* Common */;
enum NR_fchmod = 124 /* Common */;
enum NR_recvfrom = 125 /* Common */;
enum NR_setreuid = 126 /* Common */;
enum NR_setregid = 127 /* Common */;
enum NR_rename = 128 /* Common */;
enum NR_truncate = 129 /* Common */;
enum NR_ftruncate = 130 /* Common */;
enum NR_flock = 131 /* Common */;
enum NR_lstat64 = 132 /* Linux Specific */;
enum NR_sendto = 133 /* Common */;
enum NR_shutdown = 134 /* Common */;
enum NR_socketpair = 135 /* Common */;
enum NR_mkdir = 136 /* Common */;
enum NR_rmdir = 137 /* Common */;
enum NR_utimes = 138 /* SunOS Specific */;
enum NR_stat64 = 139 /* Linux Specific */;
enum NR_sendfile64 = 140 /* adjtime under SunOS */;
enum NR_getpeername = 141 /* Common */;
enum NR_futex = 142 /* gethostid under SunOS */;
enum NR_gettid = 143 /* ENOSYS under SunOS */;
enum NR_getrlimit = 144 /* Common */;
enum NR_setrlimit = 145 /* Common */;
enum NR_pivot_root = 146 /* Linux Specific, killpg under SunOS */;
enum NR_prctl = 147 /* ENOSYS under SunOS */;
enum NR_pciconfig_read = 148 /* ENOSYS under SunOS */;
enum NR_pciconfig_write = 149 /* ENOSYS under SunOS */;
enum NR_getsockname = 150 /* Common */;
enum NR_inotify_init = 151 /* Linux specific */;
enum NR_inotify_add_watch = 152 /* Linux specific */;
enum NR_poll = 153 /* Common */;
enum NR_getdents64 = 154 /* Linux specific */;
static if (size_t.sizeof == 4) enum NR_fcntl64 = 155 /* Linux sparc32 Specific */;
enum NR_inotify_rm_watch = 156 /* Linux specific */;
enum NR_statfs = 157 /* Common */;
enum NR_fstatfs = 158 /* Common */;
enum NR_umount = 159 /* Common */;
enum NR_sched_set_affinity = 160 /* Linux specific, async_daemon under SunOS */;
enum NR_sched_get_affinity = 161 /* Linux specific, getfh under SunOS */;
enum NR_getdomainname = 162 /* SunOS Specific */;
enum NR_setdomainname = 163 /* Common */;
static if (size_t.sizeof == 8) enum NR_utrap_install = 164 /* SYSV ABI/v9 required */;
enum NR_quotactl = 165 /* Common */;
enum NR_set_tid_address = 166 /* Linux specific, exportfs under SunOS */;
enum NR_mount = 167 /* Common */;
enum NR_ustat = 168 /* Common */;
enum NR_setxattr = 169 /* SunOS: semsys */;
enum NR_lsetxattr = 170 /* SunOS: msgsys */;
enum NR_fsetxattr = 171 /* SunOS: shmsys */;
enum NR_getxattr = 172 /* SunOS: auditsys */;
enum NR_lgetxattr = 173 /* SunOS: rfssys */;
enum NR_getdents = 174 /* Common */;
enum NR_setsid = 175 /* Common */;
enum NR_fchdir = 176 /* Common */;
enum NR_fgetxattr = 177 /* SunOS: fchroot */;
enum NR_listxattr = 178 /* SunOS: vpixsys */;
enum NR_llistxattr = 179 /* SunOS: aioread */;
enum NR_flistxattr = 180 /* SunOS: aiowrite */;
enum NR_removexattr = 181 /* SunOS: aiowait */;
enum NR_lremovexattr = 182 /* SunOS: aiocancel */;
enum NR_sigpending = 183 /* Common */;
enum NR_query_module = 184 /* Linux Specific */;
enum NR_setpgid = 185 /* Common */;
enum NR_fremovexattr = 186 /* SunOS: pathconf */;
enum NR_tkill = 187 /* SunOS: fpathconf */;
enum NR_exit_group = 188 /* Linux specific, sysconf undef SunOS */;
enum NR_uname = 189 /* Linux Specific */;
enum NR_init_module = 190 /* Linux Specific */;
enum NR_personality = 191 /* Linux Specific */;
enum NR_remap_file_pages = 192 /* Linux Specific */;
enum NR_epoll_create = 193 /* Linux Specific */;
enum NR_epoll_ctl = 194 /* Linux Specific */;
enum NR_epoll_wait = 195 /* Linux Specific */;
enum NR_ioprio_set = 196 /* Linux Specific */;
enum NR_getppid = 197 /* Linux Specific */;
enum NR_sigaction = 198 /* Linux Specific */;
enum NR_sgetmask = 199 /* Linux Specific */;
enum NR_ssetmask = 200 /* Linux Specific */;
enum NR_sigsuspend = 201 /* Linux Specific */;
enum NR_oldlstat = 202 /* Linux Specific */;
enum NR_uselib = 203 /* Linux Specific */;
enum NR_readdir = 204 /* Linux Specific */;
enum NR_readahead = 205 /* Linux Specific */;
enum NR_socketcall = 206 /* Linux Specific */;
enum NR_syslog = 207 /* Linux Specific */;
enum NR_lookup_dcookie = 208 /* Linux Specific */;
enum NR_fadvise64 = 209 /* Linux Specific */;
enum NR_fadvise64_64 = 210 /* Linux Specific */;
enum NR_tgkill = 211 /* Linux Specific */;
enum NR_waitpid = 212 /* Linux Specific */;
enum NR_swapoff = 213 /* Linux Specific */;
enum NR_sysinfo = 214 /* Linux Specific */;
enum NR_ipc = 215 /* Linux Specific */;
enum NR_sigreturn = 216 /* Linux Specific */;
enum NR_clone = 217 /* Linux Specific */;
enum NR_ioprio_get = 218 /* Linux Specific */;
enum NR_adjtimex = 219 /* Linux Specific */;
enum NR_sigprocmask = 220 /* Linux Specific */;
enum NR_create_module = 221 /* Linux Specific */;
enum NR_delete_module = 222 /* Linux Specific */;
enum NR_get_kernel_syms = 223 /* Linux Specific */;
enum NR_getpgid = 224 /* Linux Specific */;
enum NR_bdflush = 225 /* Linux Specific */;
enum NR_sysfs = 226 /* Linux Specific */;
enum NR_afs_syscall = 227 /* Linux Specific */;
enum NR_setfsuid = 228 /* Linux Specific */;
enum NR_setfsgid = 229 /* Linux Specific */;
enum NR__newselect = 230 /* Linux Specific */;
static if (size_t.sizeof == 4) enum NR_time = 231 /* Linux Specific */;
enum NR_splice = 232 /* Linux Specific */;
enum NR_stime = 233 /* Linux Specific */;
enum NR_statfs64 = 234 /* Linux Specific */;
enum NR_fstatfs64 = 235 /* Linux Specific */;
enum NR__llseek = 236 /* Linux Specific */;
enum NR_mlock = 237;
enum NR_munlock = 238;
enum NR_mlockall = 239;
enum NR_munlockall = 240;
enum NR_sched_setparam = 241;
enum NR_sched_getparam = 242;
enum NR_sched_setscheduler = 243;
enum NR_sched_getscheduler = 244;
enum NR_sched_yield = 245;
enum NR_sched_get_priority_max = 246;
enum NR_sched_get_priority_min = 247;
enum NR_sched_rr_get_interval = 248;
enum NR_nanosleep = 249;
enum NR_mremap = 250;
enum NR__sysctl = 251;
enum NR_getsid = 252;
enum NR_fdatasync = 253;
enum NR_nfsservctl = 254;
enum NR_sync_file_range = 255;
enum NR_clock_settime = 256;
enum NR_clock_gettime = 257;
enum NR_clock_getres = 258;
enum NR_clock_nanosleep = 259;
enum NR_sched_getaffinity = 260;
enum NR_sched_setaffinity = 261;
enum NR_timer_settime = 262;
enum NR_timer_gettime = 263;
enum NR_timer_getoverrun = 264;
enum NR_timer_delete = 265;
enum NR_timer_create = 266;
enum NR_io_setup = 268;
enum NR_io_destroy = 269;
enum NR_io_submit = 270;
enum NR_io_cancel = 271;
enum NR_io_getevents = 272;
enum NR_mq_open = 273;
enum NR_mq_unlink = 274;
enum NR_mq_timedsend = 275;
enum NR_mq_timedreceive = 276;
enum NR_mq_notify = 277;
enum NR_mq_getsetattr = 278;
enum NR_waitid = 279;
enum NR_tee = 280;
enum NR_add_key = 281;
enum NR_request_key = 282;
enum NR_keyctl = 283;
enum NR_openat = 284;
enum NR_mkdirat = 285;
enum NR_mknodat = 286;
enum NR_fchownat = 287;
enum NR_futimesat = 288;
enum NR_fstatat64 = 289;
enum NR_unlinkat = 290;
enum NR_renameat = 291;
enum NR_linkat = 292;
enum NR_symlinkat = 293;
enum NR_readlinkat = 294;
enum NR_fchmodat = 295;
enum NR_faccessat = 296;
enum NR_pselect6 = 297;
enum NR_ppoll = 298;
enum NR_unshare = 299;
enum NR_set_robust_list = 300;
enum NR_get_robust_list = 301;
enum NR_migrate_pages = 302;
enum NR_mbind = 303;
enum NR_get_mempolicy = 304;
enum NR_set_mempolicy = 305;
enum NR_kexec_load = 306;
enum NR_move_pages = 307;
enum NR_getcpu = 308;
enum NR_epoll_pwait = 309;
enum NR_utimensat = 310;
enum NR_signalfd = 311;
enum NR_timerfd_create = 312;
enum NR_eventfd = 313;
enum NR_fallocate = 314;
enum NR_timerfd_settime = 315;
enum NR_timerfd_gettime = 316;
enum NR_signalfd4 = 317;
enum NR_eventfd2 = 318;
enum NR_epoll_create1 = 319;
enum NR_dup3 = 320;
enum NR_pipe2 = 321;
enum NR_inotify_init1 = 322;
enum NR_accept4 = 323;
enum NR_preadv = 324;
enum NR_pwritev = 325;
enum NR_rt_tgsigqueueinfo = 326;
enum NR_perf_event_open = 327;
enum NR_recvmmsg = 328;
enum NR_fanotify_init = 329;
enum NR_fanotify_mark = 330;
enum NR_prlimit64 = 331;
enum NR_name_to_handle_at = 332;
enum NR_open_by_handle_at = 333;
enum NR_clock_adjtime = 334;
enum NR_syncfs = 335;
enum NR_sendmmsg = 336;
enum NR_setns = 337;
enum NR_process_vm_readv = 338;
enum NR_process_vm_writev = 339;
enum NR_kern_features = 340;
enum NR_kcmp = 341;
enum NR_finit_module = 342;
enum NR_sched_setattr = 343;
enum NR_sched_getattr = 344;
enum NR_renameat2 = 345;
enum NR_seccomp = 346;
enum NR_getrandom = 347;
enum NR_memfd_create = 348;
enum NR_bpf = 349;
enum NR_execveat = 350;
enum NR_membarrier = 351;
enum NR_userfaultfd = 352;
enum NR_bind = 353;
enum NR_listen = 354;
enum NR_setsockopt = 355;
enum NR_mlock2 = 356;
enum NR_copy_file_range = 357;
enum NR_preadv2 = 358;
enum NR_pwritev2 = 359;
enum NR_statx = 360;
|
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) 2013-2014, Maxime Chevalier-Boisvert. All rights reserved.
*
* This software is licensed under the following license (Modified BSD
* License):
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
module ir.inlining;
import std.stdio;
import std.string;
import std.stdint;
import std.algorithm;
import ir.ir;
import ir.ops;
import ir.ast;
import runtime.vm;
import runtime.layout;
import runtime.object;
import util.bitset;
import options;
/**
Selectively inline callees into a function
*/
void inlinePass(VM vm, IRFunction caller)
{
static bool funHasLoop(IRFunction fun)
{
for (auto block = fun.firstBlock; block !is null; block = block.next)
if (block.name.startsWith("for") ||
block.name.startsWith("while") ||
block.name.startsWith("do"))
return true;
return false;
}
// If inlining is disabled, do nothing
if (opts.noinline)
return;
//bool isUnit = caller.isUnit;
//bool hasLoop = funHasLoop(caller);
//writeln("inlinePass for ", caller.getName);
// For each block of the caller function
for (auto block = caller.firstBlock; block !is null; block = block.next)
{
if (block.lastInstr is null)
continue;
// If this is not a primitive call, skip it
if (block.lastInstr.opcode !is &CALL_PRIM)
continue;
auto callSite = block.lastInstr;
// Get the function name string (D string)
auto strArg = cast(IRString)callSite.getArg(0);
assert (strArg !is null);
auto nameStr = strArg.str;
// Get the primitve function from the global object
auto closVal = getProp(vm, vm.globalObj, nameStr);
assert (
closVal.tag is Tag.CLOSURE ||
(caller.isUnit() && caller.getName.canFind("runtime")),
format(
"cannot inline non-closure \"%s\" in \"%s\"",
nameStr,
caller.getName
)
);
// If the closure is not available, skip it
if (closVal.tag !is Tag.CLOSURE)
continue;
assert (closVal.word.ptrVal !is null);
auto callee = getFunPtr(closVal.word.ptrVal);
// If this combination is not inlinable, skip it
if (inlinable(callSite, callee) is false)
continue;
if (caller is callee)
continue;
if (callee.entryBlock is null)
{
astToIR(vm, callee.ast, callee);
}
auto name = callee.getName();
if (callee.numBlocks > 4
&& !name.startsWith("$rt_valIsObj")
&& !name.startsWith("$rt_minus")
&& !name.startsWith("$rt_addInt")
&& !name.startsWith("$rt_addIntFloat")
&& !name.startsWith("$rt_subInt")
&& !name.startsWith("$rt_subIntFloat")
&& !name.startsWith("$rt_mulIntFloat")
&& !name.startsWith("$rt_divIntFloat")
&& !name.startsWith("$rt_modInt")
&& !name.startsWith("$rt_and")
&& !name.startsWith("$rt_or")
&& !name.startsWith("$rt_xor")
&& !name.startsWith("$rt_lsft")
&& !name.startsWith("$rt_rsft")
&& !name.startsWith("$rt_ursft")
&& !name.startsWith("$rt_ltIntFloat")
&& !name.startsWith("$rt_leIntFloat")
&& !name.startsWith("$rt_gtIntFloat")
&& !name.startsWith("$rt_geIntFloat")
&& !name.startsWith("$rt_eqInt")
&& !name.startsWith("$rt_eqNull")
&& !name.startsWith("$rt_getPropField")
&& !name.startsWith("$rt_getStrMethod")
&& !name.startsWith("$rt_getPropElem")
&& !name.startsWith("$rt_getPropLength")
&& !name.startsWith("$rt_setPropField")
&& !name.startsWith("$rt_setPropElem")
&& !name.startsWith("$rt_setArrElemNoCheck")
&& !name.startsWith("$rt_setProto")
&& !name.startsWith("$rt_newObj")
&& !name.startsWith("$rt_ctorNewThis")
&& !name.startsWith("$rt_getGlobalInl")
&& !name.startsWith("$rt_setGlobalInl")
)
continue;
if (name.startsWith("$rt_throw"))
continue;
// If this is a global property read
if (name.startsWith("$rt_getGlobalInl"))
{
auto propName = callSite.getArgStrCst(1);
assert (propName !is null);
auto globalObj = vm.globalObj.word.ptrVal;
auto objShape = cast(ObjShape)obj_get_shape(globalObj);
auto defShape = objShape.getDefShape(propName);
// If the property is defined and is a constant
if (defShape && !defShape.writable && !defShape.configurable)
{
auto val = getProp(vm, vm.globalObj, propName);
IRConst newVal;
if (val.tag is Tag.INT32)
newVal = IRConst.int32Cst(val.word.int32Val);
else if (val.tag is Tag.FLOAT64)
newVal = IRConst.float64Cst(val.word.floatVal);
else if (val is UNDEF)
newVal = IRConst.undefCst;
if (newVal)
{
// Replace uses of the call by the constant
callSite.replUses(newVal);
// Replace the getGlobal call by a direct jump
auto desc = callSite.getTarget(0);
auto jump = block.addInstr(new IRInstr(&JUMP));
auto newDesc = jump.setTarget(0, desc.target);
foreach (arg; desc.args)
newDesc.setPhiArg(cast(PhiNode)arg.owner, arg.value);
block.delInstr(callSite);
continue;
}
}
}
//writefln("inlining %s in %s (%s blocks)", name, caller.getName, callee.numBlocks);
// Inline the callee
inlineCall(callSite, callee);
//writefln(" inlined");
}
//writeln("inlinePass done");
}
/**
Test if a function is inlinable at a call site
*/
bool inlinable(IRInstr callSite, IRFunction callee)
{
auto caller = callSite.block.fun;
// Not support for new for now, avoids complicated return logic
if (callSite.opcode !is &CALL &&
callSite.opcode !is &CALL_PRIM)
return false;
// No support for inlining within try blocks for now
if (callSite.getTarget(1) !is null)
return false;
// No support for functions using the "arguments" object
if (callee.ast.usesArguments == true)
return false;
// No support for argument count mismatch
auto numArgs = callSite.numArgs;
if ((callSite.opcode is &CALL && numArgs - 2 != callee.numParams) ||
(callSite.opcode is &CALL_PRIM && numArgs - 1 != callee.numParams))
return false;
// Inlining is possible
return true;
}
/**
Inline a callee function at a call site
*/
PhiNode inlineCall(IRInstr callSite, IRFunction callee)
{
// Ensure that this inlining is possible
assert (inlinable(callSite, callee));
// Get the caller function
auto caller = callSite.block.fun;
assert (caller !is null);
// Get the number of visible arguments passed at the call site
size_t numArgs;
if (callSite.opcode is &CALL_PRIM)
numArgs = callSite.numArgs - 1;
else if (callSite.opcode is &CALL)
numArgs = callSite.numArgs - 2;
else
assert (false);
// Get the call continuation branch and successor block
auto contBranch = callSite.getTarget(0);
auto contBlock = contBranch.target;
// Create a block for the return value merging
auto mergeBlock = caller.newBlock("call_merge");
// Create a phi node in the call continuation for the return value
auto retPhi = mergeBlock.addPhi(new PhiNode());
// Jump to the call continuation block
auto jumpInstr = mergeBlock.addInstr(new IRInstr(&JUMP));
auto jumpDesc = jumpInstr.setTarget(0, contBlock);
// Copy arguments from the call continuation jump
foreach (arg; contBranch.args)
jumpDesc.setPhiArg(cast(PhiNode)arg.owner, arg.value);
//
// Callee basic block copying and translation
//
// Map of callee blocks to copies
IRBlock[IRBlock] blockMap;
// Map of callee instructions and phi nodes to copies
IRValue[IRValue] valMap;
// Map the hidden argument values to call site parameters
valMap[callee.raVal] = IRConst.nullCst;
valMap[callee.closVal] = callSite.getArg(0);
valMap[callee.thisVal] = (callSite.opcode is &CALL)? callSite.getArg(1):IRConst.nullCst;
valMap[callee.argcVal] = IRConst.int32Cst(cast(int32_t)numArgs);
// Map the visible parameters to call site parameters
foreach (param; callee.paramMap)
{
auto argIdx = param.idx - NUM_HIDDEN_ARGS;
if (argIdx < numArgs)
valMap[param] = callSite.getArg(callSite.numArgs - numArgs + argIdx);
else
valMap[param] = IRConst.undefCst;
}
// For each callee block
auto lastBlock = callee.lastBlock;
for (auto block = callee.firstBlock;; block = block.next)
{
assert (
block !is null,
"null block"
);
// Copy the block and add it to the caller
auto newBlock = caller.newBlock(block.name);
blockMap[block] = newBlock;
// For each phi node
for (auto phi = block.firstPhi; phi !is null; phi = phi.next)
{
// If this not a function parameter
if (cast(FunParam)phi is null)
{
// Create a new phi node (copy)
valMap[phi] = newBlock.addPhi(new PhiNode());
}
}
// For each instruction
for (auto instr = block.firstInstr; instr !is null; instr = instr.next)
{
// If this is the global value
if (instr is callee.globalVal)
{
// Map it to the caller global value
valMap[callee.globalVal] = caller.globalVal;
}
else
{
// Create a new instruction (copy)
auto newInstr = newBlock.addInstr(
new IRInstr(instr.opcode, instr.numArgs)
);
valMap[instr] = newInstr;
}
}
// If this is the last block to inline, stop
if (block is lastBlock)
break;
}
// For each block
foreach (oldBlock, newBlock; blockMap)
{
// For each instruction
for (auto oldInstr = oldBlock.firstInstr; oldInstr !is null; oldInstr = oldInstr.next)
{
// Get the corresponding copied instruction
auto newInstr = cast(IRInstr)valMap.get(oldInstr, null);
assert (newInstr !is null);
assert (newInstr.block is newBlock || newInstr is caller.globalVal);
if (oldInstr.srcPos)
newInstr.srcPos = callSite.srcPos;
// Translate the instruction arguments
for (size_t aIdx = 0; aIdx < oldInstr.numArgs; ++aIdx)
{
auto arg = oldInstr.getArg(aIdx);
assert (arg in valMap || cast(IRDstValue)arg is null);
auto newArg = valMap.get(arg, arg);
newInstr.setArg(aIdx, newArg);
}
// Translate the branch targets
for (size_t tIdx = 0; tIdx < oldInstr.MAX_TARGETS; ++tIdx)
{
auto desc = oldInstr.getTarget(tIdx);
if (desc is null)
continue;
auto newTarget = blockMap[desc.target];
auto newBranch = newInstr.setTarget(tIdx, newTarget);
foreach (arg; desc.args)
{
auto newPhi = cast(PhiNode)valMap.get(arg.owner, null);
auto newArg = valMap.get(arg.value, arg.value);
newBranch.setPhiArg(newPhi, newArg);
}
}
/*
// If this is a call instruction
if (newInstr.opcode.isCall)
{
// Add the callee function to the list of
// inlined functions at this call site
caller.inlineMap[newInstr] ~= callee.inlineMap.get(oldInstr, []) ~ callee;
// Copy the call profiles from the callee
caller.callCounts[newInstr] = callee.callCounts.get(
oldInstr,
uint64_t[IRFunction].init
);
}
*/
// If this is a return instruction
if (newInstr.opcode == &RET)
{
// Get the return value
auto retVal = newInstr.getArg(0);
// Remove the return instruction
newBlock.delInstr(newInstr);
// Jump to the merge block
auto jump = newBlock.addInstr(new IRInstr(&JUMP));
auto desc = jump.setTarget(0, mergeBlock);
// Set the return phi argument
desc.setPhiArg(retPhi, retVal);
}
}
}
//
// Callee test and call patching
//
// Get the block the call site belongs to
auto callBlock = callSite.block;
// Get the inlined entry block for the callee function
auto entryBlock = blockMap[callee.entryBlock];
// Replace uses of the call instruction by uses of the return phi
callSite.replUses(retPhi);
// If this is a static primitive call
if (callSite.opcode is &CALL_PRIM)
{
// Remove the original call instruction
callBlock.delInstr(callSite);
// Add a direct jump to the callee entry block
auto jump = callBlock.addInstr(new IRInstr(&JUMP));
jump.setTarget(0, entryBlock);
}
else
{
assert (false);
/*
// Move the call instruction to a new basic block,
// This will be our fallback (uninlined call)
auto regCallBlock = caller.newBlock("call_reg");
callBlock.moveInstr(callSite, regCallBlock);
// Make the regular call continue to the call merge block
auto regCallDesc = callSite.setTarget(0, mergeBlock);
regCallDesc.setPhiArg(retPhi, callSite);
// Create a function pointer for the callee function
auto ptrConst = new IRFunPtr(callee);
// If the function pointer matches, jump to the callee's entry
auto ifInstr = callBlock.addInstr(
new IRInstr(
&IF_EQ_FUN,
callSite.getArg(0),
ptrConst
)
);
ifInstr.setTarget(0, blockMap[callee.entryBlock]);
ifInstr.setTarget(1, regCallBlock);
*/
}
// Return the return merge phi node
return retPhi;
}
|
D
|
/*
* Hunt - a framework for web and console application based on Collie using Dlang development
*
* Copyright (C) 2015-2017 Shanghai Putao Technology Co., Ltd
*
* Developer: HuntLabs
*
* Licensed under the Apache-2.0 License.
*
*/
module hunt.application.model;
version (WITH_ENTITY) :
public import entity;
import std.string;
import ddbc.all;
private __gshared static EntityMetaData _g_schema;
private __gshared string _g_driver;
private __gshared string _g_url;
private __gshared string[string] _g_params;
private __gshared int _g_maxPoolSize;
private __gshared int _g_timeToLive;
private __gshared int _g_waitTimeOut;
private __gshared string _g_tablePrefix;
void initDB(string driver,string url, string[string]params = null, int maxPoolSize = 2, int timeToLive = 600, int waitTimeOut = 30)
{
_g_driver = driver;
_g_url = url;
_g_params = params;
_g_maxPoolSize = maxPoolSize;
_g_timeToLive = timeToLive;
_g_waitTimeOut = waitTimeOut;
if(params !is null && "prefix" in params)
{
_g_schema.tablePrefix = params["prefix"];
}
}
final class HuntEntity
{
static HuntEntity _entity;
private EntityManagerFactory _entityManagerFactory;
private Dialect _dialect;
private DataSource _dataSource;
private Driver _driver;
static @property getInstance()
{
if(_entity is null)
{
_entity = new HuntEntity();
}
return _entity;
}
void initDB(string driver,string url, string[string]params = null, int maxPoolSize = 2, int timeToLive = 600, int waitTimeOut = 30)
{
import std.experimental.logger;
driver = toLower(driver);
if(driver == "mysql")
{
version(USE_MYSQL)
{
_dialect = new MySQLDialect();
_driver = new MySQLDriver();
}
}
else if(driver == "postgresql")
{
version(USE_PGSQL)
{
_dialect = new PGSQLDialect();
_driver = new PGSQLDriver();
}
}
else if(driver == "")
{
version(USE_SQLITE)
{
_dialect = new SQLiteDialect();
_driver = new SQLITEDriver();
}
}
if(_dialect is null || _driver is null)
{
assert(false, "not support dialect " ~ driver);
}
_dataSource = new ConnectionPoolDataSourceImpl(_driver, url, params, maxPoolSize, timeToLive, waitTimeOut);
_entityManagerFactory = new EntityManagerFactory(_g_schema, _dialect, _dataSource);
}
@property EntityManagerFactory entityManagerFactory()
{
if(_entityManagerFactory is null)
{
this.initDB(_g_driver,_g_url, _g_params, _g_maxPoolSize, _g_timeToLive, _g_waitTimeOut);
}
return _entityManagerFactory;
}
}
@property static EntityManagerFactory entityManagerFactory()
{
return HuntEntity.getInstance.entityManagerFactory;
}
void registerEntity(T...)()
{
_g_schema = new SchemaInfoImpl!(T);
}
|
D
|
/Users/Nobuyuki/Desktop/Git/SolarSystem/Build/Intermediates/SolarSystem.build/Debug-iphonesimulator/SolarSystemTests.build/Objects-normal/x86_64/SolarSystemTests.o : /Users/Nobuyuki/Desktop/Git/SolarSystem/SolarSystemTests/SolarSystemTests.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Security.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/XCTest.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestSuiteRun.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestSuite.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestProbe.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestObserver.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestLog.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestErrors.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestRun.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestCaseRun.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestCase+AsynchronousTesting.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestDefines.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestCase.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestAssertionsImpl.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestAssertions.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCAbstractTest.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTest.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/module.map
/Users/Nobuyuki/Desktop/Git/SolarSystem/Build/Intermediates/SolarSystem.build/Debug-iphonesimulator/SolarSystemTests.build/Objects-normal/x86_64/SolarSystemTests~partial.swiftmodule : /Users/Nobuyuki/Desktop/Git/SolarSystem/SolarSystemTests/SolarSystemTests.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Security.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/XCTest.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestSuiteRun.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestSuite.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestProbe.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestObserver.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestLog.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestErrors.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestRun.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestCaseRun.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestCase+AsynchronousTesting.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestDefines.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestCase.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestAssertionsImpl.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestAssertions.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCAbstractTest.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTest.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/module.map
/Users/Nobuyuki/Desktop/Git/SolarSystem/Build/Intermediates/SolarSystem.build/Debug-iphonesimulator/SolarSystemTests.build/Objects-normal/x86_64/SolarSystemTests~partial.swiftdoc : /Users/Nobuyuki/Desktop/Git/SolarSystem/SolarSystemTests/SolarSystemTests.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Security.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/XCTest.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestSuiteRun.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestSuite.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestProbe.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestObserver.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestLog.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestErrors.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestRun.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestCaseRun.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestCase+AsynchronousTesting.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestDefines.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestCase.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestAssertionsImpl.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestAssertions.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCAbstractTest.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTest.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/module.map
|
D
|
module android.java.android.renderscript.ScriptIntrinsicBLAS;
public import android.java.android.renderscript.ScriptIntrinsicBLAS_d_interface;
import arsd.jni : ImportExportImpl;
mixin ImportExportImpl!ScriptIntrinsicBLAS;
import import8 = android.java.java.lang.Class;
import import0 = android.java.android.renderscript.ScriptIntrinsicBLAS;
|
D
|
only partly in existence
|
D
|
///
module arsd.color;
@safe:
// importing phobos explodes the size of this code 10x, so not doing it.
private {
real toInternal(T)(string s) {
real accumulator = 0.0;
size_t i = s.length;
foreach(idx, c; s) {
if(c >= '0' && c <= '9') {
accumulator *= 10;
accumulator += c - '0';
} else if(c == '.') {
i = idx + 1;
break;
} else
throw new Exception("bad char to make real from " ~ s);
}
real accumulator2 = 0.0;
real count = 1;
foreach(c; s[i .. $]) {
if(c >= '0' && c <= '9') {
accumulator2 *= 10;
accumulator2 += c - '0';
count *= 10;
} else
throw new Exception("bad char to make real from " ~ s);
}
return accumulator + accumulator2 / count;
}
@trusted
string toInternal(T)(int a) {
if(a == 0)
return "0";
char[] ret;
while(a) {
ret ~= (a % 10) + '0';
a /= 10;
}
for(int i = 0; i < ret.length / 2; i++) {
char c = ret[i];
ret[i] = ret[$ - i - 1];
ret[$ - i - 1] = c;
}
return cast(string) ret;
}
string toInternal(T)(real a) {
// a simplifying assumption here is the fact that we only use this in one place: toInternal!string(cast(real) a / 255)
// thus we know this will always be between 0.0 and 1.0, inclusive.
if(a <= 0.0)
return "0.0";
if(a >= 1.0)
return "1.0";
string ret = "0.";
// I wonder if I can handle round off error any better. Phobos does, but that isn't worth 100 KB of code.
int amt = cast(int)(a * 1000);
return ret ~ toInternal!string(amt);
}
nothrow @safe @nogc pure
real absInternal(real a) { return a < 0 ? -a : a; }
nothrow @safe @nogc pure
real minInternal(real a, real b, real c) {
auto m = a;
if(b < m) m = b;
if(c < m) m = c;
return m;
}
nothrow @safe @nogc pure
real maxInternal(real a, real b, real c) {
auto m = a;
if(b > m) m = b;
if(c > m) m = c;
return m;
}
nothrow @safe @nogc pure
bool startsWithInternal(string a, string b) {
return (a.length >= b.length && a[0 .. b.length] == b);
}
string[] splitInternal(string a, char c) {
string[] ret;
size_t previous = 0;
foreach(i, char ch; a) {
if(ch == c) {
ret ~= a[previous .. i];
previous = i + 1;
}
}
if(previous != a.length)
ret ~= a[previous .. $];
return ret;
}
nothrow @safe @nogc pure
string stripInternal(string s) {
foreach(i, char c; s)
if(c != ' ' && c != '\t' && c != '\n') {
s = s[i .. $];
break;
}
for(int a = cast(int)(s.length - 1); a > 0; a--) {
char c = s[a];
if(c != ' ' && c != '\t' && c != '\n') {
s = s[0 .. a + 1];
break;
}
}
return s;
}
}
// done with mini-phobos
/// Represents an RGBA color
struct Color {
@system static Color fromJsVar(T)(T v) { // it is a template so i don't have to actually import arsd.jsvar...
return Color.fromString(v.get!string);
}
@safe:
/++
The color components are available as a static array, individual bytes, and a uint inside this union.
Since it is anonymous, you can use the inner members' names directly.
+/
union {
ubyte[4] components; /// [r, g, b, a]
/// Holder for rgba individual components.
struct {
ubyte r; /// red
ubyte g; /// green
ubyte b; /// blue
ubyte a; /// alpha. 255 == opaque
}
uint asUint; /// The components as a single 32 bit value (beware of endian issues!)
}
/++
Like the constructor, but this makes sure they are in range before casting. If they are out of range, it saturates: anything less than zero becomes zero and anything greater than 255 becomes 255.
+/
nothrow pure
static Color fromIntegers(int red, int green, int blue, int alpha = 255) {
return Color(clampToByte(red), clampToByte(green), clampToByte(blue), clampToByte(alpha));
}
/// Construct a color with the given values. They should be in range 0 <= x <= 255, where 255 is maximum intensity and 0 is minimum intensity.
nothrow pure @nogc
this(int red, int green, int blue, int alpha = 255) {
this.r = cast(ubyte) red;
this.g = cast(ubyte) green;
this.b = cast(ubyte) blue;
this.a = cast(ubyte) alpha;
}
/// Static convenience functions for common color names
nothrow pure @nogc
static Color transparent() { return Color(0, 0, 0, 0); }
/// Ditto
nothrow pure @nogc
static Color white() { return Color(255, 255, 255); }
/// Ditto
nothrow pure @nogc
static Color gray() { return Color(128, 128, 128); }
/// Ditto
nothrow pure @nogc
static Color black() { return Color(0, 0, 0); }
/// Ditto
nothrow pure @nogc
static Color red() { return Color(255, 0, 0); }
/// Ditto
nothrow pure @nogc
static Color green() { return Color(0, 255, 0); }
/// Ditto
nothrow pure @nogc
static Color blue() { return Color(0, 0, 255); }
/// Ditto
nothrow pure @nogc
static Color yellow() { return Color(255, 255, 0); }
/// Ditto
nothrow pure @nogc
static Color teal() { return Color(0, 255, 255); }
/// Ditto
nothrow pure @nogc
static Color purple() { return Color(255, 0, 255); }
/// Ditto
nothrow pure @nogc
static Color brown() { return Color(128, 64, 0); }
/*
ubyte[4] toRgbaArray() {
return [r,g,b,a];
}
*/
/// Return black-and-white color
Color toBW() () {
int intens = clampToByte(cast(int)(0.2126*r+0.7152*g+0.0722*b));
return Color(intens, intens, intens, a);
}
/// Makes a string that matches CSS syntax for websites
string toCssString() const {
if(a == 255)
return "#" ~ toHexInternal(r) ~ toHexInternal(g) ~ toHexInternal(b);
else {
return "rgba("~toInternal!string(r)~", "~toInternal!string(g)~", "~toInternal!string(b)~", "~toInternal!string(cast(real)a / 255.0)~")";
}
}
/// Makes a hex string RRGGBBAA (aa only present if it is not 255)
string toString() const {
if(a == 255)
return toCssString()[1 .. $];
else
return toRgbaHexString();
}
/// returns RRGGBBAA, even if a== 255
string toRgbaHexString() const {
return toHexInternal(r) ~ toHexInternal(g) ~ toHexInternal(b) ~ toHexInternal(a);
}
/// Gets a color by name, iff the name is one of the static members listed above
static Color fromNameString(string s) {
Color c;
foreach(member; __traits(allMembers, Color)) {
static if(__traits(compiles, c = __traits(getMember, Color, member))) {
if(s == member)
return __traits(getMember, Color, member);
}
}
throw new Exception("Unknown color " ~ s);
}
/// Reads a CSS style string to get the color. Understands #rrggbb, rgba(), hsl(), and rrggbbaa
static Color fromString(string s) {
s = s.stripInternal();
Color c;
c.a = 255;
// trying named colors via the static no-arg methods here
foreach(member; __traits(allMembers, Color)) {
static if(__traits(compiles, c = __traits(getMember, Color, member))) {
if(s == member)
return __traits(getMember, Color, member);
}
}
// try various notations borrowed from CSS (though a little extended)
// hsl(h,s,l,a) where h is degrees and s,l,a are 0 >= x <= 1.0
if(s.startsWithInternal("hsl(") || s.startsWithInternal("hsla(")) {
assert(s[$-1] == ')');
s = s[s.startsWithInternal("hsl(") ? 4 : 5 .. $ - 1]; // the closing paren
real[3] hsl;
ubyte a = 255;
auto parts = s.splitInternal(',');
foreach(i, part; parts) {
if(i < 3)
hsl[i] = toInternal!real(part.stripInternal);
else
a = clampToByte(cast(int) (toInternal!real(part.stripInternal) * 255));
}
c = .fromHsl(hsl);
c.a = a;
return c;
}
// rgb(r,g,b,a) where r,g,b are 0-255 and a is 0-1.0
if(s.startsWithInternal("rgb(") || s.startsWithInternal("rgba(")) {
assert(s[$-1] == ')');
s = s[s.startsWithInternal("rgb(") ? 4 : 5 .. $ - 1]; // the closing paren
auto parts = s.splitInternal(',');
foreach(i, part; parts) {
// lol the loop-switch pattern
auto v = toInternal!real(part.stripInternal);
switch(i) {
case 0: // red
c.r = clampToByte(cast(int) v);
break;
case 1:
c.g = clampToByte(cast(int) v);
break;
case 2:
c.b = clampToByte(cast(int) v);
break;
case 3:
c.a = clampToByte(cast(int) (v * 255));
break;
default: // ignore
}
}
return c;
}
// otherwise let's try it as a hex string, really loosely
if(s.length && s[0] == '#')
s = s[1 .. $];
// not a built in... do it as a hex string
if(s.length >= 2) {
c.r = fromHexInternal(s[0 .. 2]);
s = s[2 .. $];
}
if(s.length >= 2) {
c.g = fromHexInternal(s[0 .. 2]);
s = s[2 .. $];
}
if(s.length >= 2) {
c.b = fromHexInternal(s[0 .. 2]);
s = s[2 .. $];
}
if(s.length >= 2) {
c.a = fromHexInternal(s[0 .. 2]);
s = s[2 .. $];
}
return c;
}
/// from hsl
static Color fromHsl(real h, real s, real l) {
return .fromHsl(h, s, l);
}
// this is actually branch-less for ints on x86, and even for longs on x86_64
static ubyte clampToByte(T) (T n) pure nothrow @safe @nogc if (__traits(isIntegral, T)) {
static if (__VERSION__ > 2067) pragma(inline, true);
static if (T.sizeof == 2 || T.sizeof == 4) {
static if (__traits(isUnsigned, T)) {
return cast(ubyte)(n&0xff|(255-((-cast(int)(n < 256))>>24)));
} else {
n &= -cast(int)(n >= 0);
return cast(ubyte)(n|((255-cast(int)n)>>31));
}
} else static if (T.sizeof == 1) {
static assert(__traits(isUnsigned, T), "clampToByte: signed byte? no, really?");
return cast(ubyte)n;
} else static if (T.sizeof == 8) {
static if (__traits(isUnsigned, T)) {
return cast(ubyte)(n&0xff|(255-((-cast(long)(n < 256))>>56)));
} else {
n &= -cast(long)(n >= 0);
return cast(ubyte)(n|((255-cast(long)n)>>63));
}
} else {
static assert(false, "clampToByte: integer too big");
}
}
/** this mixin can be used to alphablend two `uint` colors;
* `colu32name` is variable that holds color to blend,
* `destu32name` is variable that holds "current" color (from surface, for example).
* alpha value of `destu32name` doesn't matter.
* alpha value of `colu32name` means: 255 for replace color, 0 for keep `destu32name`.
*
* WARNING! This function does blending in RGB space, and RGB space is not linear!
*/
public enum ColorBlendMixinStr(string colu32name, string destu32name) = "{
immutable uint a_tmp_ = (256-(255-(("~colu32name~")>>24)))&(-(1-(((255-(("~colu32name~")>>24))+1)>>8))); // to not loose bits, but 255 should become 0
immutable uint dc_tmp_ = ("~destu32name~")&0xffffff;
immutable uint srb_tmp_ = (("~colu32name~")&0xff00ff);
immutable uint sg_tmp_ = (("~colu32name~")&0x00ff00);
immutable uint drb_tmp_ = (dc_tmp_&0xff00ff);
immutable uint dg_tmp_ = (dc_tmp_&0x00ff00);
immutable uint orb_tmp_ = (drb_tmp_+(((srb_tmp_-drb_tmp_)*a_tmp_+0x800080)>>8))&0xff00ff;
immutable uint og_tmp_ = (dg_tmp_+(((sg_tmp_-dg_tmp_)*a_tmp_+0x008000)>>8))&0x00ff00;
("~destu32name~") = (orb_tmp_|og_tmp_)|0xff000000; /*&0xffffff;*/
}";
/// Perform alpha-blending of `fore` to this color, return new color.
/// WARNING! This function does blending in RGB space, and RGB space is not linear!
Color alphaBlend (Color fore) const pure nothrow @trusted @nogc {
static if (__VERSION__ > 2067) pragma(inline, true);
Color res;
res.asUint = asUint;
mixin(ColorBlendMixinStr!("fore.asUint", "res.asUint"));
return res;
}
}
nothrow @safe
private string toHexInternal(ubyte b) {
string s;
if(b < 16)
s ~= '0';
else {
ubyte t = (b & 0xf0) >> 4;
if(t >= 10)
s ~= 'A' + t - 10;
else
s ~= '0' + t;
b &= 0x0f;
}
if(b >= 10)
s ~= 'A' + b - 10;
else
s ~= '0' + b;
return s;
}
nothrow @safe @nogc pure
private ubyte fromHexInternal(string s) {
int result = 0;
int exp = 1;
//foreach(c; retro(s)) { // FIXME: retro doesn't work right in dtojs
foreach_reverse(c; s) {
if(c >= 'A' && c <= 'F')
result += exp * (c - 'A' + 10);
else if(c >= 'a' && c <= 'f')
result += exp * (c - 'a' + 10);
else if(c >= '0' && c <= '9')
result += exp * (c - '0');
else
// throw new Exception("invalid hex character: " ~ cast(char) c);
return 0;
exp *= 16;
}
return cast(ubyte) result;
}
/// Converts hsl to rgb
Color fromHsl(real[3] hsl) {
return fromHsl(hsl[0], hsl[1], hsl[2]);
}
/// Converts hsl to rgb
Color fromHsl(real h, real s, real l, real a = 255) {
h = h % 360;
real C = (1 - absInternal(2 * l - 1)) * s;
real hPrime = h / 60;
real X = C * (1 - absInternal(hPrime % 2 - 1));
real r, g, b;
if(h is real.nan)
r = g = b = 0;
else if (hPrime >= 0 && hPrime < 1) {
r = C;
g = X;
b = 0;
} else if (hPrime >= 1 && hPrime < 2) {
r = X;
g = C;
b = 0;
} else if (hPrime >= 2 && hPrime < 3) {
r = 0;
g = C;
b = X;
} else if (hPrime >= 3 && hPrime < 4) {
r = 0;
g = X;
b = C;
} else if (hPrime >= 4 && hPrime < 5) {
r = X;
g = 0;
b = C;
} else if (hPrime >= 5 && hPrime < 6) {
r = C;
g = 0;
b = X;
}
real m = l - C / 2;
r += m;
g += m;
b += m;
return Color(
cast(int)(r * 255),
cast(int)(g * 255),
cast(int)(b * 255),
cast(int)(a));
}
/// Converts an RGB color into an HSL triplet. useWeightedLightness will try to get a better value for luminosity for the human eye, which is more sensitive to green than red and more to red than blue. If it is false, it just does average of the rgb.
real[3] toHsl(Color c, bool useWeightedLightness = false) {
real r1 = cast(real) c.r / 255;
real g1 = cast(real) c.g / 255;
real b1 = cast(real) c.b / 255;
real maxColor = maxInternal(r1, g1, b1);
real minColor = minInternal(r1, g1, b1);
real L = (maxColor + minColor) / 2 ;
if(useWeightedLightness) {
// the colors don't affect the eye equally
// this is a little more accurate than plain HSL numbers
L = 0.2126*r1 + 0.7152*g1 + 0.0722*b1;
}
real S = 0;
real H = 0;
if(maxColor != minColor) {
if(L < 0.5) {
S = (maxColor - minColor) / (maxColor + minColor);
} else {
S = (maxColor - minColor) / (2.0 - maxColor - minColor);
}
if(r1 == maxColor) {
H = (g1-b1) / (maxColor - minColor);
} else if(g1 == maxColor) {
H = 2.0 + (b1 - r1) / (maxColor - minColor);
} else {
H = 4.0 + (r1 - g1) / (maxColor - minColor);
}
}
H = H * 60;
if(H < 0){
H += 360;
}
return [H, S, L];
}
/// .
Color lighten(Color c, real percentage) {
auto hsl = toHsl(c);
hsl[2] *= (1 + percentage);
if(hsl[2] > 1)
hsl[2] = 1;
return fromHsl(hsl);
}
/// .
Color darken(Color c, real percentage) {
auto hsl = toHsl(c);
hsl[2] *= (1 - percentage);
return fromHsl(hsl);
}
/// for light colors, call darken. for dark colors, call lighten.
/// The goal: get toward center grey.
Color moderate(Color c, real percentage) {
auto hsl = toHsl(c);
if(hsl[2] > 0.5)
hsl[2] *= (1 - percentage);
else {
if(hsl[2] <= 0.01) // if we are given black, moderating it means getting *something* out
hsl[2] = percentage;
else
hsl[2] *= (1 + percentage);
}
if(hsl[2] > 1)
hsl[2] = 1;
return fromHsl(hsl);
}
/// the opposite of moderate. Make darks darker and lights lighter
Color extremify(Color c, real percentage) {
auto hsl = toHsl(c, true);
if(hsl[2] < 0.5)
hsl[2] *= (1 - percentage);
else
hsl[2] *= (1 + percentage);
if(hsl[2] > 1)
hsl[2] = 1;
return fromHsl(hsl);
}
/// Move around the lightness wheel, trying not to break on moderate things
Color oppositeLightness(Color c) {
auto hsl = toHsl(c);
auto original = hsl[2];
if(original > 0.4 && original < 0.6)
hsl[2] = 0.8 - original; // so it isn't quite the same
else
hsl[2] = 1 - original;
return fromHsl(hsl);
}
/// Try to determine a text color - either white or black - based on the input
Color makeTextColor(Color c) {
auto hsl = toHsl(c, true); // give green a bonus for contrast
if(hsl[2] > 0.71)
return Color(0, 0, 0);
else
return Color(255, 255, 255);
}
// These provide functional access to hsl manipulation; useful if you need a delegate
Color setLightness(Color c, real lightness) {
auto hsl = toHsl(c);
hsl[2] = lightness;
return fromHsl(hsl);
}
///
Color rotateHue(Color c, real degrees) {
auto hsl = toHsl(c);
hsl[0] += degrees;
return fromHsl(hsl);
}
///
Color setHue(Color c, real hue) {
auto hsl = toHsl(c);
hsl[0] = hue;
return fromHsl(hsl);
}
///
Color desaturate(Color c, real percentage) {
auto hsl = toHsl(c);
hsl[1] *= (1 - percentage);
return fromHsl(hsl);
}
///
Color saturate(Color c, real percentage) {
auto hsl = toHsl(c);
hsl[1] *= (1 + percentage);
if(hsl[1] > 1)
hsl[1] = 1;
return fromHsl(hsl);
}
///
Color setSaturation(Color c, real saturation) {
auto hsl = toHsl(c);
hsl[1] = saturation;
return fromHsl(hsl);
}
/*
void main(string[] args) {
auto color1 = toHsl(Color(255, 0, 0));
auto color = fromHsl(color1[0] + 60, color1[1], color1[2]);
writefln("#%02x%02x%02x", color.r, color.g, color.b);
}
*/
/* Color algebra functions */
/* Alpha putpixel looks like this:
void putPixel(Image i, Color c) {
Color b;
b.r = i.data[(y * i.width + x) * bpp + 0];
b.g = i.data[(y * i.width + x) * bpp + 1];
b.b = i.data[(y * i.width + x) * bpp + 2];
b.a = i.data[(y * i.width + x) * bpp + 3];
float ca = cast(float) c.a / 255;
i.data[(y * i.width + x) * bpp + 0] = alpha(c.r, ca, b.r);
i.data[(y * i.width + x) * bpp + 1] = alpha(c.g, ca, b.g);
i.data[(y * i.width + x) * bpp + 2] = alpha(c.b, ca, b.b);
i.data[(y * i.width + x) * bpp + 3] = alpha(c.a, ca, b.a);
}
ubyte alpha(ubyte c1, float alpha, ubyte onto) {
auto got = (1 - alpha) * onto + alpha * c1;
if(got > 255)
return 255;
return cast(ubyte) got;
}
So, given the background color and the resultant color, what was
composited on to it?
*/
///
ubyte unalpha(ubyte colorYouHave, float alpha, ubyte backgroundColor) {
// resultingColor = (1-alpha) * backgroundColor + alpha * answer
auto resultingColorf = cast(float) colorYouHave;
auto backgroundColorf = cast(float) backgroundColor;
auto answer = (resultingColorf - backgroundColorf + alpha * backgroundColorf) / alpha;
return Color.clampToByte(cast(int) answer);
}
///
ubyte makeAlpha(ubyte colorYouHave, ubyte backgroundColor/*, ubyte foreground = 0x00*/) {
//auto foregroundf = cast(float) foreground;
auto foregroundf = 0.00f;
auto colorYouHavef = cast(float) colorYouHave;
auto backgroundColorf = cast(float) backgroundColor;
// colorYouHave = backgroundColorf - alpha * backgroundColorf + alpha * foregroundf
auto alphaf = 1 - colorYouHave / backgroundColorf;
alphaf *= 255;
return Color.clampToByte(cast(int) alphaf);
}
int fromHex(string s) {
int result = 0;
int exp = 1;
// foreach(c; retro(s)) {
foreach_reverse(c; s) {
if(c >= 'A' && c <= 'F')
result += exp * (c - 'A' + 10);
else if(c >= 'a' && c <= 'f')
result += exp * (c - 'a' + 10);
else if(c >= '0' && c <= '9')
result += exp * (c - '0');
else
throw new Exception("invalid hex character: " ~ cast(char) c);
exp *= 16;
}
return result;
}
///
Color colorFromString(string s) {
if(s.length == 0)
return Color(0,0,0,255);
if(s[0] == '#')
s = s[1..$];
assert(s.length == 6 || s.length == 8);
Color c;
c.r = cast(ubyte) fromHex(s[0..2]);
c.g = cast(ubyte) fromHex(s[2..4]);
c.b = cast(ubyte) fromHex(s[4..6]);
if(s.length == 8)
c.a = cast(ubyte) fromHex(s[6..8]);
else
c.a = 255;
return c;
}
/*
import browser.window;
import std.conv;
void main() {
import browser.document;
foreach(ele; document.querySelectorAll("input")) {
ele.addEventListener("change", {
auto h = toInternal!real(document.querySelector("input[name=h]").value);
auto s = toInternal!real(document.querySelector("input[name=s]").value);
auto l = toInternal!real(document.querySelector("input[name=l]").value);
Color c = Color.fromHsl(h, s, l);
auto e = document.getElementById("example");
e.style.backgroundColor = c.toCssString();
// JSElement __js_this;
// __js_this.style.backgroundColor = c.toCssString();
}, false);
}
}
*/
/**
This provides two image classes and a bunch of functions that work on them.
Why are they separate classes? I think the operations on the two of them
are necessarily different. There's a whole bunch of operations that only
really work on truecolor (blurs, gradients), and a few that only work
on indexed images (palette swaps).
Even putpixel is pretty different. On indexed, it is a palette entry's
index number. On truecolor, it is the actual color.
A greyscale image is the weird thing in the middle. It is truecolor, but
fits in the same size as indexed. Still, I'd say it is a specialization
of truecolor.
There is a subset that works on both
*/
/// An image in memory
interface MemoryImage {
//IndexedImage convertToIndexedImage() const;
//TrueColorImage convertToTrueColor() const;
/// gets it as a TrueColorImage. May return this or may do a conversion and return a new image
TrueColorImage getAsTrueColorImage();
/// Image width, in pixels
int width() const;
/// Image height, in pixels
int height() const;
/// Get image pixel. Slow, but returns valid RGBA color (completely transparent for off-image pixels).
Color getPixel(int x, int y) const;
/// Set image pixel.
void setPixel(int x, int y, in Color clr);
/// Returns a copy of the image
MemoryImage clone() const;
/// Load image from file. This will import arsd.image to do the actual work, and cost nothing if you don't use it.
static MemoryImage fromImage(T : const(char)[]) (T filename) @trusted {
static if (__traits(compiles, (){import arsd.image;})) {
// yay, we have image loader here, try it!
import arsd.image;
return loadImageFromFile(filename);
} else {
static assert(0, "please provide 'arsd.image' to load images!");
}
}
// ***This method is deliberately not publicly documented.***
// What it does is unconditionally frees internal image storage, without any sanity checks.
// If you will do this, make sure that you have no references to image data left (like
// slices of [data] array, for example). Those references will become invalid, and WILL
// lead to Undefined Behavior.
// tl;dr: IF YOU HAVE *ANY* QUESTIONS REGARDING THIS COMMENT, DON'T USE THIS!
// Note to implementors: it is safe to simply do nothing in this method.
// Also, it should be safe to call this method twice or more.
void clearInternal () nothrow @system;// @nogc; // nogc is commented right now just because GC.free is only @nogc in newest dmd and i want to stay compatible a few versions back too. it can be added later
/// Convenient alias for `fromImage`
alias fromImageFile = fromImage;
}
/// An image that consists of indexes into a color palette. Use [getAsTrueColorImage]() if you don't care about palettes
class IndexedImage : MemoryImage {
bool hasAlpha;
/// .
Color[] palette;
/// the data as indexes into the palette. Stored left to right, top to bottom, no padding.
ubyte[] data;
override void clearInternal () nothrow @system {// @nogc {
import core.memory : GC;
// it is safe to call [GC.free] with `null` pointer.
GC.free(palette.ptr); palette = null;
GC.free(data.ptr); data = null;
_width = _height = 0;
}
/// .
override int width() const {
return _width;
}
/// .
override int height() const {
return _height;
}
/// .
override IndexedImage clone() const {
auto n = new IndexedImage(width, height);
n.data[] = this.data[]; // the data member is already there, so array copy
n.palette = this.palette.dup; // and here we need to allocate too, so dup
n.hasAlpha = this.hasAlpha;
return n;
}
override Color getPixel(int x, int y) const @trusted {
if (x >= 0 && y >= 0 && x < _width && y < _height) {
uint pos = y*_width+x;
if (pos >= data.length) return Color(0, 0, 0, 0);
ubyte b = data.ptr[pos];
if (b >= palette.length) return Color(0, 0, 0, 0);
return palette.ptr[b];
} else {
return Color(0, 0, 0, 0);
}
}
override void setPixel(int x, int y, in Color clr) @trusted {
if (x >= 0 && y >= 0 && x < _width && y < _height) {
uint pos = y*_width+x;
if (pos >= data.length) return;
ubyte pidx = findNearestColor(palette, clr);
if (palette.length < 255 &&
(palette.ptr[pidx].r != clr.r || palette.ptr[pidx].g != clr.g || palette.ptr[pidx].b != clr.b || palette.ptr[pidx].a != clr.a)) {
// add new color
pidx = addColor(clr);
}
data.ptr[pos] = pidx;
}
}
private int _width;
private int _height;
/// .
this(int w, int h) {
_width = w;
_height = h;
data = new ubyte[w*h];
}
/*
void resize(int w, int h, bool scale) {
}
*/
/// returns a new image
override TrueColorImage getAsTrueColorImage() {
return convertToTrueColor();
}
/// Creates a new TrueColorImage based on this data
TrueColorImage convertToTrueColor() const {
auto tci = new TrueColorImage(width, height);
foreach(i, b; data) {
/*
if(b >= palette.length) {
string fuckyou;
fuckyou ~= b + '0';
fuckyou ~= " ";
fuckyou ~= palette.length + '0';
assert(0, fuckyou);
}
*/
tci.imageData.colors[i] = palette[b];
}
return tci;
}
/// Gets an exact match, if possible, adds if not. See also: the findNearestColor free function.
ubyte getOrAddColor(Color c) {
foreach(i, co; palette) {
if(c == co)
return cast(ubyte) i;
}
return addColor(c);
}
/// Number of colors currently in the palette (note: palette entries are not necessarily used in the image data)
int numColors() const {
return cast(int) palette.length;
}
/// Adds an entry to the palette, returning its inded
ubyte addColor(Color c) {
assert(palette.length < 256);
if(c.a != 255)
hasAlpha = true;
palette ~= c;
return cast(ubyte) (palette.length - 1);
}
}
/// An RGBA array of image data. Use the free function quantize() to convert to an IndexedImage
class TrueColorImage : MemoryImage {
// bool hasAlpha;
// bool isGreyscale;
//ubyte[] data; // stored as rgba quads, upper left to right to bottom
/// .
struct Data {
ubyte[] bytes; /// the data as rgba bytes. Stored left to right, top to bottom, no padding.
// the union is no good because the length of the struct is wrong!
/// the same data as Color structs
@trusted // the cast here is typically unsafe, but it is ok
// here because I guarantee the layout, note the static assert below
@property inout(Color)[] colors() inout {
return cast(inout(Color)[]) bytes;
}
static assert(Color.sizeof == 4);
}
/// .
Data imageData;
alias imageData.bytes data;
int _width;
int _height;
override void clearInternal () nothrow @system {// @nogc {
import core.memory : GC;
// it is safe to call [GC.free] with `null` pointer.
GC.free(imageData.bytes.ptr); imageData.bytes = null;
_width = _height = 0;
}
/// .
override TrueColorImage clone() const {
auto n = new TrueColorImage(width, height);
n.imageData.bytes[] = this.imageData.bytes[]; // copy into existing array ctor allocated
return n;
}
/// .
override int width() const { return _width; }
///.
override int height() const { return _height; }
override Color getPixel(int x, int y) const @trusted {
if (x >= 0 && y >= 0 && x < _width && y < _height) {
uint pos = y*_width+x;
return imageData.colors.ptr[pos];
} else {
return Color(0, 0, 0, 0);
}
}
override void setPixel(int x, int y, in Color clr) @trusted {
if (x >= 0 && y >= 0 && x < _width && y < _height) {
uint pos = y*_width+x;
if (pos < imageData.bytes.length/4) imageData.colors.ptr[pos] = clr;
}
}
/// .
this(int w, int h) {
_width = w;
_height = h;
imageData.bytes = new ubyte[w*h*4];
}
/// Creates with existing data. The data pointer is stored here.
this(int w, int h, ubyte[] data) {
_width = w;
_height = h;
assert(data.length == w * h * 4);
imageData.bytes = data;
}
/// Returns this
override TrueColorImage getAsTrueColorImage() {
return this;
}
}
/// Converts true color to an indexed image. It uses palette as the starting point, adding entries
/// until maxColors as needed. If palette is null, it creates a whole new palette.
///
/// After quantizing the image, it applies a dithering algorithm.
///
/// This is not written for speed.
IndexedImage quantize(in TrueColorImage img, Color[] palette = null, in int maxColors = 256)
// this is just because IndexedImage assumes ubyte palette values
in { assert(maxColors <= 256); }
body {
int[Color] uses;
foreach(pixel; img.imageData.colors) {
if(auto i = pixel in uses) {
(*i)++;
} else {
uses[pixel] = 1;
}
}
struct ColorUse {
Color c;
int uses;
//string toString() { import std.conv; return c.toCssString() ~ " x " ~ to!string(uses); }
int opCmp(ref const ColorUse co) const {
return co.uses - uses;
}
}
ColorUse[] sorted;
foreach(color, count; uses)
sorted ~= ColorUse(color, count);
uses = null;
//version(no_phobos)
//sorted = sorted.sort;
//else {
import std.algorithm : sort;
sort(sorted);
//}
ubyte[Color] paletteAssignments;
foreach(idx, entry; palette)
paletteAssignments[entry] = cast(ubyte) idx;
// For the color assignments from the image, I do multiple passes, decreasing the acceptable
// distance each time until we're full.
// This is probably really slow.... but meh it gives pretty good results.
auto ddiff = 32;
outer: for(int d1 = 128; d1 >= 0; d1 -= ddiff) {
auto minDist = d1*d1;
if(d1 <= 64)
ddiff = 16;
if(d1 <= 32)
ddiff = 8;
foreach(possibility; sorted) {
if(palette.length == maxColors)
break;
if(palette.length) {
auto co = palette[findNearestColor(palette, possibility.c)];
auto pixel = possibility.c;
auto dr = cast(int) co.r - pixel.r;
auto dg = cast(int) co.g - pixel.g;
auto db = cast(int) co.b - pixel.b;
auto dist = dr*dr + dg*dg + db*db;
// not good enough variety to justify an allocation yet
if(dist < minDist)
continue;
}
paletteAssignments[possibility.c] = cast(ubyte) palette.length;
palette ~= possibility.c;
}
}
// Final pass: just fill in any remaining space with the leftover common colors
while(palette.length < maxColors && sorted.length) {
if(sorted[0].c !in paletteAssignments) {
paletteAssignments[sorted[0].c] = cast(ubyte) palette.length;
palette ~= sorted[0].c;
}
sorted = sorted[1 .. $];
}
bool wasPerfect = true;
auto newImage = new IndexedImage(img.width, img.height);
newImage.palette = palette;
foreach(idx, pixel; img.imageData.colors) {
if(auto p = pixel in paletteAssignments)
newImage.data[idx] = *p;
else {
// gotta find the closest one...
newImage.data[idx] = findNearestColor(palette, pixel);
wasPerfect = false;
}
}
if(!wasPerfect)
floydSteinbergDither(newImage, img);
return newImage;
}
/// Finds the best match for pixel in palette (currently by checking for minimum euclidean distance in rgb colorspace)
ubyte findNearestColor(in Color[] palette, in Color pixel) {
int best = 0;
int bestDistance = int.max;
foreach(pe, co; palette) {
auto dr = cast(int) co.r - pixel.r;
auto dg = cast(int) co.g - pixel.g;
auto db = cast(int) co.b - pixel.b;
int dist = dr*dr + dg*dg + db*db;
if(dist < bestDistance) {
best = cast(int) pe;
bestDistance = dist;
}
}
return cast(ubyte) best;
}
/+
// Quantizing and dithering test program
void main( ){
/*
auto img = new TrueColorImage(256, 32);
foreach(y; 0 .. img.height) {
foreach(x; 0 .. img.width) {
img.imageData.colors[x + y * img.width] = Color(x, y * (255 / img.height), 0);
}
}
*/
TrueColorImage img;
{
import arsd.png;
struct P {
ubyte[] range;
void put(ubyte[] a) { range ~= a; }
}
P range;
import std.algorithm;
import std.stdio;
writePngLazy(range, pngFromBytes(File("/home/me/nyesha.png").byChunk(4096)).byRgbaScanline.map!((line) {
foreach(ref pixel; line.pixels) {
continue;
auto sum = cast(int) pixel.r + pixel.g + pixel.b;
ubyte a = cast(ubyte)(sum / 3);
pixel.r = a;
pixel.g = a;
pixel.b = a;
}
return line;
}));
img = imageFromPng(readPng(range.range)).getAsTrueColorImage;
}
auto qimg = quantize(img, null, 2);
import arsd.simpledisplay;
auto win = new SimpleWindow(img.width, img.height * 3);
auto painter = win.draw();
painter.drawImage(Point(0, 0), Image.fromMemoryImage(img));
painter.drawImage(Point(0, img.height), Image.fromMemoryImage(qimg));
floydSteinbergDither(qimg, img);
painter.drawImage(Point(0, img.height * 2), Image.fromMemoryImage(qimg));
win.eventLoop(0);
}
+/
/+
/// If the background is transparent, it simply erases the alpha channel.
void removeTransparency(IndexedImage img, Color background)
+/
/// Perform alpha-blending of `fore` to this color, return new color.
/// WARNING! This function does blending in RGB space, and RGB space is not linear!
Color alphaBlend(Color foreground, Color background) pure nothrow @safe @nogc {
static if (__VERSION__ > 2067) pragma(inline, true);
return background.alphaBlend(foreground);
}
/*
/// Reduces the number of colors in a palette.
void reducePaletteSize(IndexedImage img, int maxColors = 16) {
}
*/
// I think I did this wrong... but the results aren't too bad so the bug can't be awful.
/// Dithers img in place to look more like original.
void floydSteinbergDither(IndexedImage img, in TrueColorImage original) {
assert(img.width == original.width);
assert(img.height == original.height);
auto buffer = new Color[](original.imageData.colors.length);
int x, y;
foreach(idx, c; original.imageData.colors) {
auto n = img.palette[img.data[idx]];
int errorR = cast(int) c.r - n.r;
int errorG = cast(int) c.g - n.g;
int errorB = cast(int) c.b - n.b;
void doit(int idxOffset, int multiplier) {
// if(idx + idxOffset < buffer.length)
buffer[idx + idxOffset] = Color.fromIntegers(
c.r + multiplier * errorR / 16,
c.g + multiplier * errorG / 16,
c.b + multiplier * errorB / 16,
c.a
);
}
if((x+1) != original.width)
doit(1, 7);
if((y+1) != original.height) {
if(x != 0)
doit(-1 + img.width, 3);
doit(img.width, 5);
if(x+1 != original.width)
doit(1 + img.width, 1);
}
img.data[idx] = findNearestColor(img.palette, buffer[idx]);
x++;
if(x == original.width) {
x = 0;
y++;
}
}
}
// these are just really useful in a lot of places where the color/image functions are used,
// so I want them available with Color
///
struct Point {
int x; ///
int y; ///
pure const nothrow @safe:
Point opBinary(string op)(in Point rhs) {
return Point(mixin("x" ~ op ~ "rhs.x"), mixin("y" ~ op ~ "rhs.y"));
}
Point opBinary(string op)(int rhs) {
return Point(mixin("x" ~ op ~ "rhs"), mixin("y" ~ op ~ "rhs"));
}
}
///
struct Size {
int width; ///
int height; ///
}
///
struct Rectangle {
int left; ///
int top; ///
int right; ///
int bottom; ///
pure const nothrow @safe:
///
this(int left, int top, int right, int bottom) {
this.left = left;
this.top = top;
this.right = right;
this.bottom = bottom;
}
///
this(in Point upperLeft, in Point lowerRight) {
this(upperLeft.x, upperLeft.y, lowerRight.x, lowerRight.y);
}
///
this(in Point upperLeft, in Size size) {
this(upperLeft.x, upperLeft.y, upperLeft.x + size.width, upperLeft.y + size.height);
}
///
@property Point upperLeft() {
return Point(left, top);
}
///
@property Point lowerRight() {
return Point(right, bottom);
}
///
@property Size size() {
return Size(width, height);
}
///
@property int width() {
return right - left;
}
///
@property int height() {
return bottom - top;
}
/// Returns true if this rectangle entirely contains the other
bool contains(in Rectangle r) {
return contains(r.upperLeft) && contains(r.lowerRight);
}
/// ditto
bool contains(in Point p) {
return (p.x >= left && p.y < right && p.y >= top && p.y < bottom);
}
/// Returns true of the two rectangles at any point overlap
bool overlaps(in Rectangle r) {
// the -1 in here are because right and top are exclusive
return !((right-1) < r.left || (r.right-1) < left || (bottom-1) < r.top || (r.bottom-1) < top);
}
}
/++
Implements a flood fill algorithm, like the bucket tool in
MS Paint.
Params:
what = the canvas to work with, arranged as top to bottom, left to right elements
width = the width of the canvas
height = the height of the canvas
target = the type to replace. You may pass the existing value if you want to do what Paint does
replacement = the replacement value
x = the x-coordinate to start the fill (think of where the user clicked in Paint)
y = the y-coordinate to start the fill
additionalCheck = A custom additional check to perform on each square before continuing. Returning true means keep flooding, returning false means stop.
+/
void floodFill(T)(
T[] what, int width, int height, // the canvas to inspect
T target, T replacement, // fill params
int x, int y, bool delegate(int x, int y) @safe additionalCheck) // the node
{
T node = what[y * width + x];
if(target == replacement) return;
if(node != target) return;
if(additionalCheck is null)
additionalCheck = (int, int) => true;
if(!additionalCheck(x, y))
return;
what[y * width + x] = replacement;
if(x)
floodFill(what, width, height, target, replacement,
x - 1, y, additionalCheck);
if(x != width - 1)
floodFill(what, width, height, target, replacement,
x + 1, y, additionalCheck);
if(y)
floodFill(what, width, height, target, replacement,
x, y - 1, additionalCheck);
if(y != height - 1)
floodFill(what, width, height, target, replacement,
x, y + 1, additionalCheck);
}
// for scripting, so you can tag it without strictly needing to import arsd.jsvar
enum arsd_jsvar_compatible = "arsd_jsvar_compatible";
|
D
|
/**
High level stream manipulation functions.
Copyright: © 2012-2013 Sönke Ludwig
License: Subject to the terms of the MIT license, as written in the included LICENSE.txt file.
Authors: Sönke Ludwig
*/
module vibe.stream.operations;
public import vibe.core.stream;
import vibe.core.log;
import vibe.core.core;
import vibe.stream.memory;
import std.algorithm;
import std.array;
import std.datetime.date;
import std.datetime.interval;
import std.datetime.stopwatch;
import std.exception;
import std.range : isOutputRange;
import std.typecons;
import memutils.utils;
import memutils.unique;
import memutils.scoped;
import memutils.vector;
/**************************************************************************************************/
/* Public functions */
/**************************************************************************************************/
/**
Reads and returns a single line from the stream.
Throws:
An exception if either the stream end was hit without hitting a newline first, or
if more than max_bytes have been read from the stream.
*/
ubyte[] readLine(ALLOC = PoolStack)(InputStream stream, size_t max_bytes = size_t.max, string linesep = "\r\n") /*@ufcs*/
{
return readUntil!ALLOC(stream, cast(const(ubyte)[])linesep, max_bytes);
}
/// ditto
void readLine()(InputStream stream, OutputStream dst, size_t max_bytes = size_t.max, string linesep = "\r\n")
{
readUntil(stream, dst, max_bytes, linesep);
}
/// ditto
void readLine(R)(InputStream stream, ref R dst, size_t max_bytes = size_t.max, string linesep = "\r\n")
if (isOutputRange!(R, ubyte))
{
readUntil(stream, dst, max_bytes, linesep);
}
/**
Reads all data of a stream until the specified end marker is detected.
Params:
stream = The input stream which is searched for end_marker
end_marker = The byte sequence which is searched in the stream
max_bytes = An optional limit of how much data is to be read from the
input stream; if the limit is reaached before hitting the end
marker, an exception is thrown.
alloc = An optional allocator that is used to build the result string
in the string variant of this function
dst = The output stream, to which the prefix to the end marker of the
input stream is written
Returns:
The string variant of this function returns the complete prefix to the
end marker of the input stream, excluding the end marker itself.
Throws:
An exception if either the stream end was hit without hitting a marker
first, or if more than max_bytes have been read from the stream in
case of max_bytes != 0.
Remarks:
This function uses an algorithm inspired by the
$(LINK2 http://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string_search_algorithm,
Boyer-Moore string search algorithm). However, contrary to the original
algorithm, it will scan the whole input string exactly once, without
jumping over portions of it. This allows the algorithm to work with
constant memory requirements and without the memory copies that would
be necessary for streams that do not hold their complete data in
memory.
The current implementation has a run time complexity of O(n*m+m²) and
O(n+m) in typical cases, with n being the length of the scanned input
string and m the length of the marker.
*/
ubyte[] readUntil(ALLOC = PoolStack)(InputStream stream, in ubyte[] end_marker, size_t max_bytes = size_t.max) /*@ufcs*/
{
auto output = scoped!(MemoryOutputStream!ALLOC)();
scope(exit) output.destroy();
output.reserve(max_bytes < 64 ? max_bytes : 64);
readUntil(stream, output, end_marker, max_bytes);
return output.data();
}
/// ditto
void readUntil()(InputStream stream, OutputStream dst, in ubyte[] end_marker, ulong max_bytes = ulong.max) /*@ufcs*/
{
import vibe.stream.wrapper;
auto dstrng = StreamOutputRange(dst);
scope(exit) dstrng.destroy();
readUntil(stream, dstrng, end_marker, max_bytes);
}
/// ditto
void readUntil(R)(InputStream stream, ref R dst, in ubyte[] end_marker, ulong max_bytes = ulong.max) /*@ufcs*/
if (isOutputRange!(R, ubyte))
{
mixin(Trace);
enforce(stream !is null, "Null stream in readUntil");
assert(max_bytes > 0 && end_marker.length > 0);
// allocate internal jump table to optimize the number of comparisons
size_t[8] nmatchoffsetbuffer = void;
size_t[] nmatchoffset;
if (end_marker.length <= nmatchoffsetbuffer.length) nmatchoffset = nmatchoffsetbuffer[0 .. end_marker.length];
else nmatchoffset = new size_t[end_marker.length];
// precompute the jump table
nmatchoffset[0] = 0;
foreach( i; 1 .. end_marker.length ){
nmatchoffset[i] = i;
foreach_reverse( j; 1 .. i )
if( end_marker[j .. i] == end_marker[0 .. i-j] ){
nmatchoffset[i] = i-j;
break;
}
assert(nmatchoffset[i] > 0 && nmatchoffset[i] <= i);
}
size_t nmatched = 0;
ubyte[] buf = ThreadMem.alloc!(ubyte[])(8192);
scope(exit) ThreadMem.free(buf);
ulong bytes_read = 0;
void skip(size_t nbytes)
{
bytes_read += nbytes;
while( nbytes > 0 ){
auto n = min(nbytes, buf.length);
stream.read(buf[0 .. n]);
nbytes -= n;
}
}
while( !stream.empty ){
enforce(bytes_read < max_bytes, "Reached byte limit before reaching end marker.");
// try to get as much data as possible, either by peeking into the stream or
// by reading as much as isguaranteed to not exceed the end marker length
// the block size is also always limited by the max_bytes parameter.
size_t nread = 0;
auto least_size = stream.leastSize(); // NOTE: blocks until data is available
auto max_read = max_bytes - bytes_read;
auto str = stream.peek(); // try to get some data for free
if( str.length == 0 ){ // if not, read as much as possible without reading past the end
nread = min(least_size, end_marker.length-nmatched, buf.length, max_read);
stream.read(buf[0 .. nread]);
str = buf[0 .. nread];
bytes_read += nread;
} else if( str.length > max_read ){
str.length = cast(size_t)max_read;
}
// remember how much of the marker was already matched before processing the current block
size_t nmatched_start = nmatched;
// go through the current block trying to match the marker
size_t i = 0;
for( i = 0; i < str.length; i++ ){
auto ch = str[i];
// if we have a mismatch, use the jump table to try other possible prefixes
// of the marker
while( nmatched > 0 && ch != end_marker[nmatched] )
nmatched -= nmatchoffset[nmatched];
// if we then have a match, increase the match count and test for full match
if( ch == end_marker[nmatched] ){
if( ++nmatched == end_marker.length ){
// in case of a full match skip data in the stream until the end of
// the marker
skip(++i - nread);
break;
}
}
}
// write out any false match part of previous blocks
if( nmatched_start > 0 ){
if( nmatched <= i ) dst.put(end_marker[0 .. nmatched_start]);
else dst.put(end_marker[0 .. nmatched_start-nmatched+i]);
}
// write out any unmatched part of the current block
if( nmatched < i ) dst.put(str[0 .. i-nmatched]);
// got a full, match => out
if( nmatched >= end_marker.length ) return;
// otherwise skip this block in the stream
skip(str.length - nread);
}
enforce(false, "Reached EOF before reaching end marker.");
}
unittest {
import vibe.stream.memory;
auto text = "1231234123111223123334221111112221231333123123123123123213123111111111114";
auto stream = new MemoryStream(cast(ubyte[])text);
void test(string s, size_t expected){
stream.seek(0);
auto result = cast(string)readUntil(stream, cast(ubyte[])s);
assert(result.length == expected, "Wrong result index");
assert(result == text[0 .. result.length], "Wrong result contents: "~result~" vs "~text[0 .. result.length]);
assert(stream.leastSize() == stream.size() - expected - s.length, "Wrong number of bytes left in stream");
}
foreach( i; 0 .. text.length ){
stream.peekWindow = i;
test("1", 0);
test("2", 1);
test("3", 2);
test("12", 0);
test("23", 1);
test("31", 2);
test("123", 0);
test("231", 1);
test("1231", 0);
test("3123", 2);
test("11223", 11);
test("11222", 28);
test("114", 70);
test("111111111114", 61);
}
// TODO: test
}
/**
Reads the complete contents of a stream, optionally limited by max_bytes.
Throws:
An exception is thrown if the stream contains more than max_bytes data.
*/
ubyte[] readAll(Stream)(Stream stream, size_t max_bytes = size_t.max, size_t reserve_bytes = 64, Duration max_wait = Duration.zero) /*@ufcs*/
{
mixin(Trace);
enforce(stream !is null, "Null stream in readAll");
if (max_bytes == 0) logDebug("Deprecated behavior: readAll() called with max_bytes==0, use max_bytes==size_t.max instead.");
// prepare output buffer
auto dst = Vector!(ubyte, PoolStack)();
import std.traits : hasMember;
static if (hasMember!(Stream, "waitForData"))
if (max_wait > Duration.zero)
enforce!TimeoutException(stream.waitForData(max_wait));
dst.reserve( max(reserve_bytes, min(max_bytes, stream.leastSize) ));
ubyte[] buffer = ThreadMem.alloc!(ubyte[])(64*1024);
scope(exit) ThreadMem.free(buffer);
size_t n = 0;
while (!stream.empty) {
static if (hasMember!(Stream, "waitForData"))
if (max_wait > Duration.zero)
enforce!TimeoutException(stream.waitForData(max_wait));
size_t chunk = cast(size_t)min(stream.leastSize, buffer.length);
n += chunk;
enforce(!max_bytes || n <= max_bytes, "Input data too long!");
stream.read(buffer[0 .. chunk]);
dst.put(buffer[0 .. chunk]);
}
return dst[].copy();
}
/**
Reads the complete contents of a stream, optionally limited by max_bytes.
Throws:
An exception is thrown if the stream contains more than max_bytes data.
*/
void readAll(Stream, R)(Stream stream, ref R dst, size_t max_bytes = size_t.max, size_t reserve_bytes = 64, Duration max_wait = Duration.zero) /*@ufcs*/
if (isOutputRange!(R, ubyte))
{
mixin(Trace);
enforce(stream !is null, "Null stream in readAll");
if (max_bytes == 0) logDebug("Deprecated behavior: readAll() called with max_bytes==0, use max_bytes==size_t.max instead.");
import std.traits : hasMember;
static if (hasMember!(Stream, "waitForData"))
if (max_wait > Duration.zero)
enforce!TimeoutException(stream.waitForData(max_wait));
dst.reserve( max(reserve_bytes, min(max_bytes, stream.leastSize) ));
ubyte[] buffer = ThreadMem.alloc!(ubyte[])(64*1024);
scope(exit) ThreadMem.free(buffer);
size_t n = 0;
while (!stream.empty) {
static if (hasMember!(Stream, "waitForData"))
if (max_wait > Duration.zero)
enforce!TimeoutException(stream.waitForData(max_wait));
size_t chunk = cast(size_t)min(stream.leastSize, buffer.length);
n += chunk;
enforce(!max_bytes || n <= max_bytes, "Input data too long!");
stream.read(buffer[0 .. chunk]);
dst.put(buffer[0 .. chunk]);
}
}
/**
Reads the complete contents of a stream, assuming UTF-8 encoding.
Params:
stream = Specifies the stream from which to read.
sanitize = If true, the input data will not be validated but will instead be made valid UTF-8.
max_bytes = Optional size limit of the data that is read.
Returns:
The full contents of the stream, excluding a possible BOM, are returned as a UTF-8 string.
Throws:
An exception is thrown if max_bytes != 0 and the stream contains more than max_bytes data.
If the sanitize parameter is fals and the stream contains invalid UTF-8 code sequences,
a UTFException is thrown.
*/
string readAllUTF8(InputStream stream, bool sanitize = true, size_t max_bytes = size_t.max)
{
mixin(Trace);
import std.utf;
import vibe.utils.string;
auto data = readAll(stream, max_bytes);
if( sanitize ) return stripUTF8Bom(sanitizeUTF8(data));
else {
validate(cast(string)data);
return stripUTF8Bom(cast(string)data);
}
}
// ditto
void readAllUTF8(R)(InputStream stream, ref R dst, bool sanitize = true, size_t max_bytes = size_t.max)
if (isOutputRange!(R, char))
{
mixin(Trace);
import std.utf;
import vibe.utils.string;
ubyte[] data;
{
auto temp = appender!(ubyte[])();
readAll(stream, temp, max_bytes);
data = temp.data;
}
if( sanitize ) {
auto temp2 = appender!string();
temp2.reserve(data.length);
sanitizeUTF8(data, temp2);
dst.put(stripUTF8Bom(temp2.data));
}
else {
validate(cast(string)data);
dst.put(stripUTF8Bom(cast(string)data));
}
}
/**
Pipes a stream to another while keeping the latency within the specified threshold.
Params:
destination = The destination stram to pipe into
source = The source stream to read data from
nbytes = Number of bytes to pipe through. The default of zero means to pipe
the whole input stream.
max_latency = The maximum time before data is flushed to destination. The default value
of 0 s will flush after each chunk of data read from source.
See_also: OutputStream.write
*/
void pipeRealtime(OutputStream destination, ConnectionStream source, ulong nbytes = 0, Duration max_latency = 0.seconds)
{
ubyte[] buffer = ThreadMem.alloc!(ubyte[])(64*1024);
scope(exit) ThreadMem.free(buffer);
//logTrace("default write %d bytes, empty=%s", nbytes, stream.empty);
auto least_size = source.leastSize;
StopWatch sw;
sw.start();
while (nbytes > 0 || least_size > 0) {
size_t chunk = min(nbytes > 0 ? nbytes : ulong.max, least_size, buffer.length);
assert(chunk > 0, "leastSize returned zero for non-empty stream.");
//logTrace("read pipe chunk %d", chunk);
source.read(buffer[0 .. chunk]);
destination.write(buffer[0 .. chunk]);
if (nbytes > 0) nbytes -= chunk;
if (max_latency <= 0.seconds || cast(Duration)sw.peek() >= max_latency || !source.waitForData(max_latency)) {
logTrace("pipeRealtime flushing.");
destination.flush();
sw.reset();
} else {
logTrace("pipeRealtime not flushing.");
}
least_size = source.leastSize;
if (!least_size) {
enforce(nbytes == 0, "Reading past end of input.");
break;
}
}
destination.flush();
}
/**
Consumes `bytes.length` bytes of the stream and determines if the contents
match up.
Returns: True $(I iff) the consumed bytes equal the passed array.
Throws: Throws an exception if reading from the stream fails.
*/
bool skipBytes(InputStream stream, const(ubyte)[] bytes)
{
bool matched = true;
ubyte[128] buf = void;
while (bytes.length) {
auto len = min(buf.length, bytes.length);
stream.read(buf[0 .. len]);
if (buf[0 .. len] != bytes[0 .. len]) matched = false;
bytes = bytes[len .. $];
}
return matched;
}
|
D
|
module viz.structs;
import winapi, sys.DStructs, viz.control;
alias typeof(""c[]) Ткст;
alias typeof(""c.ptr) Ткст0;
alias typeof(" "c[0]) Сим;
alias typeof(""w[]) Шткст;
alias typeof(""w.ptr) Шткст0;
alias typeof(" "w[0]) Шим;
alias typeof(""d[]) Дткст;
alias typeof(""d.ptr) Дткст0;
alias typeof(" "d[0]) Дим;
export extern(D):
struct ШрифтЛога
{
export:
union
{
LOGFONTW шлш;
LOGFONTA шла;
}
alias шлш шл;
Ткст имяФаса;
}
struct КлассОкна
{
export:
union
{
WNDCLASSW кош;
WNDCLASSA коа;
}
alias кош ко;
Ткст имяКласса;
}
struct ДанныеВызова
{
export:
Объект delegate(Объект[]) дг;
Объект[] арги;
Объект результат;
Объект исключение = пусто;
}
struct ПарамВызоваВиз
{
export:
проц function(УпрЭлт, т_мера[]) fp;
т_мера nparams;
т_мера[1] params;
}
struct ПростыеДанныеВызова
{
export:
проц delegate() дг;
Объект исключение = пусто;
}
struct Сообщение
{
export:
union
{
struct
{
УОК уок;
бцел сооб;
бцел парам1;
цел парам2;
}
package СООБ _винСооб;
}
цел результат;
static Сообщение opCall(УОК уок, бцел сооб, бцел парам1, цел парам2)
{
Сообщение m;
m.уок = уок;
m.сооб = сооб;
m.парам1 = парам1;
m.парам2 = парам2;
m.результат = 0;
return m;
}
}
/// X and Y coordinate.
struct Точка
{
export:
union
{
struct
{
цел ш;
цел в;
}
ТОЧКА точка;
}
/// Construct а new Точка.
static Точка opCall(цел ш, цел в)
{
Точка тчк;
тчк.ш = ш;
тчк.в = в;
return тчк;
}
static Точка opCall()
{
Точка тчк;
return тчк;
}
т_рав opEquals(Точка тчк)
{
return ш == тчк.ш && в == тчк.в;
}
Точка opAdd(Размер разм)
{
Точка результат;
результат.ш = ш + разм.ширина;
результат.в = в + разм.высота;
return результат;
}
Точка opSub(Размер разм)
{
Точка результат;
результат.ш = ш - разм.ширина;
результат.в = в - разм.высота;
return результат;
}
проц opAddAssign(Размер разм)
{
ш += разм.ширина;
в += разм.высота;
}
проц opSubAssign(Размер разм)
{
ш -= разм.ширина;
в -= разм.высота;
}
Точка opNeg()
{
return Точка(-ш, -в);
}
}
/// ширина и высота.
struct Размер
{
export:
union
{
struct
{
цел ширина;
цел высота;
}
РАЗМЕР размер;
}
/// Construct а new Размер.
static Размер opCall(цел ширина, цел высота)
{
Размер разм;
разм.ширина = ширина;
разм.высота = высота;
return разм;
}
static Размер opCall()
{
Размер разм;
return разм;
}
т_рав opEquals(Размер разм)
{
return ширина == разм.ширина && высота == разм.высота;
}
Размер opAdd(Размер разм)
{
Размер результат;
результат.ширина = ширина + разм.ширина;
результат.высота = высота + разм.высота;
return результат;
}
Размер opSub(Размер разм)
{
Размер результат;
результат.ширина = ширина - разм.ширина;
результат.высота = высота - разм.высота;
return результат;
}
проц opAddAssign(Размер разм)
{
ширина += разм.ширина;
высота += разм.высота;
}
проц opSubAssign(Размер разм)
{
ширина -= разм.ширина;
высота -= разм.высота;
}
}
/// X, Y, ширина and высота rectangle dimensions.
struct Прям // docmain
{
export:
цел ш, в, ширина, высота;
// Used internally.
проц дайПрям(ПРЯМ* к) // package
{
к.лево = ш;
к.право = ш + ширина;
к.верх = в;
к.низ = в + высота;
}
Точка положение() // getter
{
return Точка(ш, в);
}
проц положение(Точка тчк) // setter
{
ш = тчк.ш;
в = тчк.в;
}
Размер размер() //getter
{
return Размер(ширина, высота);
}
проц размер(Размер разм) // setter
{
ширина = разм.ширина;
высота = разм.высота;
}
цел право() // getter
{
return ш + ширина;
}
цел низ() // getter
{
return в + высота;
}
/// Construct а new Прям.
static Прям opCall(цел ш, цел в, цел ширина, цел высота)
{
Прям к;
к.ш = ш;
к.в = в;
к.ширина = ширина;
к.высота = высота;
return к;
}
static Прям opCall(Точка положение, Размер размер)
{
Прям к;
к.ш = положение.ш;
к.в = положение.в;
к.ширина = размер.ширина;
к.высота = размер.высота;
return к;
}
static Прям opCall()
{
Прям к;
return к;
}
// Used internally.
static Прям opCall(ПРЯМ* прям) // package
{
Прям к;
к.ш = прям.лево;
к.в = прям.верх;
к.ширина = прям.право - прям.лево;
к.высота = прям.низ - прям.верх;
return к;
}
/// Construct а new Прям from лево, верх, право and верх values.
static Прям изЛВПН(цел лево, цел верх, цел право, цел низ)
{
Прям к;
к.ш = лево;
к.в = верх;
к.ширина = право - лево;
к.высота = низ - верх;
return к;
}
т_рав opEquals(Прям к)
{
return ш == к.ш && в == к.в &&
ширина == к.ширина && высота == к.высота;
}
бул содержит(цел c_x, цел c_y)
{
if(c_x >= ш && c_y >= в)
{
if(c_x <= право && c_y <= низ)
return да;
}
return нет;
}
бул содержит(Точка поз)
{
return содержит(поз.ш, поз.в);
}
// Contained entirely within -this-.
бул содержит(Прям к)
{
if(к.ш >= ш && к.в >= в)
{
if(к.право <= право && к.низ <= низ)
return да;
}
return нет;
}
проц инфлируй(цел i_width, цел i_height)
{
ш -= i_width;
ширина += i_width * 2;
в -= i_height;
высота += i_height * 2;
}
проц инфлируй(Размер insz)
{
инфлируй(insz.ширина, insz.высота);
}
// Just tests if there's an intersection.
бул пересекаетсяС(Прям к)
{
if(к.право >= ш && к.низ >= в)
{
if(к.в <= низ && к.ш <= право)
return да;
}
return нет;
}
проц смещение(цел ш, цел в)
{
this.ш += ш;
this.в += в;
}
проц смещение(Точка тчк)
{
//return смещение(тчк.ш, тчк.в);
this.ш += тчк.ш;
this.в += тчк.в;
}
/+
// Modify -this- to include only the intersection
// of -this- and -к-.
проц intersect(Прям к)
{
}
+/
// проц смещение(Точка), проц смещение(цел, цел)
// static Прям union(Прям, Прям)
}
unittest
{
Прям к = Прям(3, 3, 3, 3);
assert(к.содержит(3, 3));
assert(!к.содержит(3, 2));
assert(к.содержит(6, 6));
assert(!к.содержит(6, 7));
assert(к.содержит(к));
assert(к.содержит(Прям(4, 4, 2, 2)));
assert(!к.содержит(Прям(2, 4, 4, 2)));
assert(!к.содержит(Прям(4, 3, 2, 4)));
к.инфлируй(2, 1);
assert(к.ш == 1);
assert(к.право == 8);
assert(к.в == 2);
assert(к.низ == 7);
к.инфлируй(-2, -1);
assert(к == Прям(3, 3, 3, 3));
assert(к.пересекаетсяС(Прям(4, 4, 2, 9)));
assert(к.пересекаетсяС(Прям(3, 3, 1, 1)));
assert(к.пересекаетсяС(Прям(0, 3, 3, 0)));
assert(к.пересекаетсяС(Прям(3, 2, 0, 1)));
assert(!к.пересекаетсяС(Прям(3, 1, 0, 1)));
assert(к.пересекаетсяС(Прям(5, 6, 1, 1)));
assert(!к.пересекаетсяС(Прям(7, 6, 1, 1)));
assert(!к.пересекаетсяС(Прям(6, 7, 1, 1)));
}
/// Цвет значение representation
struct Цвет // docmain
{
export:
/// Red, зелёный, синий and альфа channel цвет values.
ббайт к() // getter
{ оцениЦвет(); return цвет.красный; }
ббайт з() // getter
{ оцениЦвет(); return цвет.зелёный; }
ббайт с() // getter
{ оцениЦвет(); return цвет.синий; }
ббайт а() // getter
{ /+ оцениЦвет(); +/ return цвет.альфа; }
/// Return the numeric цвет значение.
ЦВПредст вАкзс()
{
оцениЦвет();
return цвет.цпредст;
}
/// Return the numeric красный, зелёный and синий цвет значение.
ЦВПредст вКзс()
{
оцениЦвет();
return цвет.цпредст & 0x00FFFFFF;
}
// Used internally.
УКисть создайКисть() // package
{
УКисть hbr;
if(_systemColorIndex == Цвет.ИНДЕКС_НЕВЕРНОГО_СИСТЕМНОГО_ЦВЕТА)
hbr = cast(УКисть) CreateSolidBrush(cast(COLORREF) вКзс());
else
hbr = cast(УКисть) GetSysColorBrush(_systemColorIndex);
return hbr;
}
deprecated static Цвет opCall(ЦВПредст argb)
{
Цвет nc;
nc.цвет.цпредст = argb;
return nc;
}
/// Construct а new цвет.
static Цвет opCall(ббайт альфа, Цвет ктрл)
{
Цвет nc;
nc.цвет.синий = ктрл.цвет.синий;
nc.цвет.зелёный = ктрл.цвет.зелёный;
nc.цвет.красный = ктрл.цвет.красный;
nc.цвет.альфа = альфа;
return nc;
}
static Цвет opCall(ббайт красный, ббайт зелёный, ббайт синий)
{
Цвет nc;
nc.цвет.синий = синий;
nc.цвет.зелёный = зелёный;
nc.цвет.красный = красный;
nc.цвет.альфа = 0xFF;
return nc;
}
static Цвет opCall(ббайт альфа, ббайт красный, ббайт зелёный, ббайт синий)
{
return изАкзс(альфа, красный, зелёный, синий);
}
//alias opCall изАкзс;
static Цвет изАкзс(ббайт альфа, ббайт красный, ббайт зелёный, ббайт синий)
{
Цвет nc;
nc.цвет.синий = синий;
nc.цвет.зелёный = зелёный;
nc.цвет.красный = красный;
nc.цвет.альфа = альфа;
return nc;
}
static Цвет изКзс(ЦВПредст кзс)
{
if(CLR_NONE == кзс)
return пуст;
Цвет nc;
nc.цвет.цпредст = кзс;
nc.цвет.альфа = 0xFF;
return nc;
}
static Цвет изКзс(ббайт альфа, ЦВПредст кзс)
{
Цвет nc;
nc.цвет.цпредст = кзс | ((cast(ЦВПредст)альфа) << 24);
return nc;
}
static Цвет пуст() // getter
{
return Цвет(0, 0, 0, 0);
}
/// Return а completely прозрачный цвет значение.
static Цвет прозрачный() // getter
{
return Цвет.изАкзс(0, 0xFF, 0xFF, 0xFF);
}
/// Blend colors; альфа channels are ignored.
// Blends the цвет channels half way.
// Does not consider альфа channels and discards them.
// The new blended цвет is returned; -this- Цвет is not изменён.
Цвет смешайСЦветом(Цвет ко)
{
if(*this == Цвет.пуст)
return ко;
if(ко == Цвет.пуст)
return *this;
оцениЦвет();
ко.оцениЦвет();
return Цвет((cast(бцел)цвет.красный + cast(бцел)ко.цвет.красный) >> 1,
(cast(бцел)цвет.зелёный + cast(бцел)ко.цвет.зелёный) >> 1,
(cast(бцел)цвет.синий + cast(бцел)ко.цвет.синий) >> 1);
}
/// Alpha blend this цвет with а background цвет to return а solid цвет (100% opaque).
// Blends with цветФона if this цвет has непрозрачность to produce а solid цвет.
// Returns the new solid цвет, or the original цвет if нет непрозрачность.
// If цветФона has непрозрачность, it is ignored.
// The new blended цвет is returned; -this- Цвет is not изменён.
Цвет плотныйЦвет(Цвет цветФона)
{
//if(0x7F == this.цвет.альфа)
// return смешайСЦветом(цветФона);
//if(*this == Цвет.пуст) // Checked if(0 == this.цвет.альфа)
// return цветФона;
if(0 == this.цвет.альфа)
return цветФона;
if(цветФона == Цвет.пуст)
return *this;
if(0xFF == this.цвет.альфа)
return *this;
оцениЦвет();
цветФона.оцениЦвет();
float fa, ba;
fa = cast(float)цвет.альфа / 255.0;
ba = 1.0 - fa;
Цвет результат;
результат.цвет.альфа = 0xFF;
результат.цвет.красный = cast(ббайт)(this.цвет.красный * fa + цветФона.цвет.красный * ba);
результат.цвет.зелёный = cast(ббайт)(this.цвет.зелёный * fa + цветФона.цвет.зелёный * ba);
результат.цвет.синий = cast(ббайт)(this.цвет.синий * fa + цветФона.цвет.синий * ba);
return результат;
}
package static Цвет системныйЦвет(цел индексЦвета)
{
Цвет ктрл;
ктрл.sysIndex = индексЦвета;
ктрл.цвет.альфа = 0xFF;
return ктрл;
}
// Gets цвет индекс or ИНДЕКС_НЕВЕРНОГО_СИСТЕМНОГО_ЦВЕТА.
package цел _systemColorIndex() // getter
{
return sysIndex;
}
package const ббайт ИНДЕКС_НЕВЕРНОГО_СИСТЕМНОГО_ЦВЕТА = ббайт.max;
private:
union _цвет
{
struct
{
align(1):
ббайт красный;
ббайт зелёный;
ббайт синий;
ббайт альфа;
}
ЦВПредст цпредст;
}
static assert(_цвет.sizeof == бцел.sizeof);
_цвет цвет;
ббайт sysIndex = ИНДЕКС_НЕВЕРНОГО_СИСТЕМНОГО_ЦВЕТА;
проц оцениЦвет()
{
if(sysIndex != ИНДЕКС_НЕВЕРНОГО_СИСТЕМНОГО_ЦВЕТА)
{
цвет.цпредст = GetSysColor(sysIndex);
//цвет.альфа = 0xFF; // Should already be установи.
}
}
}
/// УпрЭлт creation parameters.
struct ПарамыСозд
{
export:
Ткст имяКласса;
Ткст заглавие;
ук парам;
УОК родитель;
HMENU меню;
экз экземп;
цел ш;
цел в;
цел ширина;
цел высота;
DWORD стильКласса;
DWORD допСтиль;
DWORD стиль;
}
|
D
|
module actions.move;
import actions.action;
import std.stdio;
import types.menus;
class Move : Action {
this() {
name = "Move";
}
override void onExecute (State* state) {
state.selectedAction = 0;
state.menu = Menus.move;
}
}
|
D
|
module xf.loader.scene.model.Camera;
private {
import xf.loader.scene.model.WorldEntity;
}
class Camera : WorldEntity {
}
|
D
|
module wyld.format;
import std.array: appender;
import std.format: formattedWrite;
string format(Char, Args...)(in Char[] fmt, Args args) {
auto w = appender!(string)();
formattedWrite(w, fmt, args);
return w.data;
}
|
D
|
/Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/HTTP.build/Message/URL+HTTP.swift.o : /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Utilities/RFC1123.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/URL+HTTP.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Utilities/HTTPHeaders+Basic.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/Forwarded.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/MediaTypePreference.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Body/HTTPBodyStorage.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/HTTPMessage.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Body/HTTPBodyRepresentable.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/HTTPHeaderName.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Responder/HTTPScheme.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/HTTPResponse.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Cookies/HTTPCookieValue.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Body/HTTPChunkedStream.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Responder/HTTPClientProtocolUpgrader.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Responder/HTTPServerResponder.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Codable/HTTPMessageCoder.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Utilities/HTTPHeaders+Bearer.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Responder/HTTPServer.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Utilities/HTTPError.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Cookies/HTTPCookies.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/HTTPHeaders.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Exports.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Responder/HTTPClient.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/HTTPRequest.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Body/HTTPBody.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIOHTTP1.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIOOpenSSL.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIOTLS.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /usr/local/Cellar/libressl/2.7.4/include/openssl/asn1.h /usr/local/Cellar/libressl/2.7.4/include/openssl/tls1.h /usr/local/Cellar/libressl/2.7.4/include/openssl/dtls1.h /usr/local/Cellar/libressl/2.7.4/include/openssl/pkcs12.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ssl2.h /usr/local/Cellar/libressl/2.7.4/include/openssl/pem2.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ssl23.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ssl3.h /usr/local/Cellar/libressl/2.7.4/include/openssl/x509v3.h /usr/local/Cellar/libressl/2.7.4/include/openssl/md5.h /usr/local/Cellar/libressl/2.7.4/include/openssl/pkcs7.h /usr/local/Cellar/libressl/2.7.4/include/openssl/x509.h /usr/local/Cellar/libressl/2.7.4/include/openssl/sha.h /usr/local/Cellar/libressl/2.7.4/include/openssl/dsa.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ecdsa.h /usr/local/Cellar/libressl/2.7.4/include/openssl/rsa.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOZlib/include/c_nio_zlib.h /usr/local/Cellar/libressl/2.7.4/include/openssl/obj_mac.h /usr/local/Cellar/libressl/2.7.4/include/openssl/hmac.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ec.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOAtomics/include/cpp_magic.h /usr/local/Cellar/libressl/2.7.4/include/openssl/rand.h /usr/local/Cellar/libressl/2.7.4/include/openssl/conf.h /usr/local/Cellar/libressl/2.7.4/include/openssl/opensslconf.h /usr/local/Cellar/libressl/2.7.4/include/openssl/dh.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ecdh.h /usr/local/Cellar/libressl/2.7.4/include/openssl/lhash.h /usr/local/Cellar/libressl/2.7.4/include/openssl/stack.h /usr/local/Cellar/libressl/2.7.4/include/openssl/safestack.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ssl.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio-ssl.git--4203122085816746094/Sources/CNIOOpenSSL/include/c_nio_openssl.h /usr/local/Cellar/libressl/2.7.4/include/openssl/pem.h /usr/local/Cellar/libressl/2.7.4/include/openssl/bn.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIODarwin/include/c_nio_darwin.h /usr/local/Cellar/libressl/2.7.4/include/openssl/bio.h /usr/local/Cellar/libressl/2.7.4/include/openssl/crypto.h /usr/local/Cellar/libressl/2.7.4/include/openssl/srtp.h /usr/local/Cellar/libressl/2.7.4/include/openssl/evp.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/2.7.4/include/openssl/buffer.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOHTTPParser/include/c_nio_http_parser.h /usr/local/Cellar/libressl/2.7.4/include/openssl/err.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOAtomics/include/c-atomics.h /usr/local/Cellar/libressl/2.7.4/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/2.7.4/include/openssl/objects.h /usr/local/Cellar/libressl/2.7.4/include/openssl/opensslv.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOLinux/include/c_nio_linux.h /usr/local/Cellar/libressl/2.7.4/include/openssl/x509_vfy.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio-zlib-support.git--4783613459776704231/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio-ssl-support.git--7591788603050871532/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/HTTP.build/URL+HTTP~partial.swiftmodule : /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Utilities/RFC1123.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/URL+HTTP.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Utilities/HTTPHeaders+Basic.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/Forwarded.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/MediaTypePreference.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Body/HTTPBodyStorage.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/HTTPMessage.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Body/HTTPBodyRepresentable.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/HTTPHeaderName.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Responder/HTTPScheme.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/HTTPResponse.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Cookies/HTTPCookieValue.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Body/HTTPChunkedStream.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Responder/HTTPClientProtocolUpgrader.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Responder/HTTPServerResponder.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Codable/HTTPMessageCoder.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Utilities/HTTPHeaders+Bearer.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Responder/HTTPServer.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Utilities/HTTPError.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Cookies/HTTPCookies.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/HTTPHeaders.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Exports.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Responder/HTTPClient.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/HTTPRequest.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Body/HTTPBody.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIOHTTP1.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIOOpenSSL.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIOTLS.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /usr/local/Cellar/libressl/2.7.4/include/openssl/asn1.h /usr/local/Cellar/libressl/2.7.4/include/openssl/tls1.h /usr/local/Cellar/libressl/2.7.4/include/openssl/dtls1.h /usr/local/Cellar/libressl/2.7.4/include/openssl/pkcs12.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ssl2.h /usr/local/Cellar/libressl/2.7.4/include/openssl/pem2.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ssl23.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ssl3.h /usr/local/Cellar/libressl/2.7.4/include/openssl/x509v3.h /usr/local/Cellar/libressl/2.7.4/include/openssl/md5.h /usr/local/Cellar/libressl/2.7.4/include/openssl/pkcs7.h /usr/local/Cellar/libressl/2.7.4/include/openssl/x509.h /usr/local/Cellar/libressl/2.7.4/include/openssl/sha.h /usr/local/Cellar/libressl/2.7.4/include/openssl/dsa.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ecdsa.h /usr/local/Cellar/libressl/2.7.4/include/openssl/rsa.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOZlib/include/c_nio_zlib.h /usr/local/Cellar/libressl/2.7.4/include/openssl/obj_mac.h /usr/local/Cellar/libressl/2.7.4/include/openssl/hmac.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ec.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOAtomics/include/cpp_magic.h /usr/local/Cellar/libressl/2.7.4/include/openssl/rand.h /usr/local/Cellar/libressl/2.7.4/include/openssl/conf.h /usr/local/Cellar/libressl/2.7.4/include/openssl/opensslconf.h /usr/local/Cellar/libressl/2.7.4/include/openssl/dh.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ecdh.h /usr/local/Cellar/libressl/2.7.4/include/openssl/lhash.h /usr/local/Cellar/libressl/2.7.4/include/openssl/stack.h /usr/local/Cellar/libressl/2.7.4/include/openssl/safestack.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ssl.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio-ssl.git--4203122085816746094/Sources/CNIOOpenSSL/include/c_nio_openssl.h /usr/local/Cellar/libressl/2.7.4/include/openssl/pem.h /usr/local/Cellar/libressl/2.7.4/include/openssl/bn.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIODarwin/include/c_nio_darwin.h /usr/local/Cellar/libressl/2.7.4/include/openssl/bio.h /usr/local/Cellar/libressl/2.7.4/include/openssl/crypto.h /usr/local/Cellar/libressl/2.7.4/include/openssl/srtp.h /usr/local/Cellar/libressl/2.7.4/include/openssl/evp.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/2.7.4/include/openssl/buffer.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOHTTPParser/include/c_nio_http_parser.h /usr/local/Cellar/libressl/2.7.4/include/openssl/err.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOAtomics/include/c-atomics.h /usr/local/Cellar/libressl/2.7.4/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/2.7.4/include/openssl/objects.h /usr/local/Cellar/libressl/2.7.4/include/openssl/opensslv.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOLinux/include/c_nio_linux.h /usr/local/Cellar/libressl/2.7.4/include/openssl/x509_vfy.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio-zlib-support.git--4783613459776704231/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio-ssl-support.git--7591788603050871532/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/HTTP.build/URL+HTTP~partial.swiftdoc : /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Utilities/RFC1123.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/URL+HTTP.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Utilities/HTTPHeaders+Basic.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/Forwarded.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/MediaTypePreference.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Body/HTTPBodyStorage.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/HTTPMessage.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Body/HTTPBodyRepresentable.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/HTTPHeaderName.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Responder/HTTPScheme.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/HTTPResponse.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Cookies/HTTPCookieValue.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Body/HTTPChunkedStream.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Responder/HTTPClientProtocolUpgrader.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Responder/HTTPServerResponder.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Codable/HTTPMessageCoder.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Utilities/HTTPHeaders+Bearer.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Responder/HTTPServer.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Utilities/HTTPError.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Cookies/HTTPCookies.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/HTTPHeaders.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Exports.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Responder/HTTPClient.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Message/HTTPRequest.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/http.git--6227123644269730208/Sources/HTTP/Body/HTTPBody.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIOHTTP1.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIOOpenSSL.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIOTLS.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /usr/local/Cellar/libressl/2.7.4/include/openssl/asn1.h /usr/local/Cellar/libressl/2.7.4/include/openssl/tls1.h /usr/local/Cellar/libressl/2.7.4/include/openssl/dtls1.h /usr/local/Cellar/libressl/2.7.4/include/openssl/pkcs12.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ssl2.h /usr/local/Cellar/libressl/2.7.4/include/openssl/pem2.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ssl23.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ssl3.h /usr/local/Cellar/libressl/2.7.4/include/openssl/x509v3.h /usr/local/Cellar/libressl/2.7.4/include/openssl/md5.h /usr/local/Cellar/libressl/2.7.4/include/openssl/pkcs7.h /usr/local/Cellar/libressl/2.7.4/include/openssl/x509.h /usr/local/Cellar/libressl/2.7.4/include/openssl/sha.h /usr/local/Cellar/libressl/2.7.4/include/openssl/dsa.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ecdsa.h /usr/local/Cellar/libressl/2.7.4/include/openssl/rsa.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOZlib/include/c_nio_zlib.h /usr/local/Cellar/libressl/2.7.4/include/openssl/obj_mac.h /usr/local/Cellar/libressl/2.7.4/include/openssl/hmac.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ec.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOAtomics/include/cpp_magic.h /usr/local/Cellar/libressl/2.7.4/include/openssl/rand.h /usr/local/Cellar/libressl/2.7.4/include/openssl/conf.h /usr/local/Cellar/libressl/2.7.4/include/openssl/opensslconf.h /usr/local/Cellar/libressl/2.7.4/include/openssl/dh.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ecdh.h /usr/local/Cellar/libressl/2.7.4/include/openssl/lhash.h /usr/local/Cellar/libressl/2.7.4/include/openssl/stack.h /usr/local/Cellar/libressl/2.7.4/include/openssl/safestack.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ssl.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio-ssl.git--4203122085816746094/Sources/CNIOOpenSSL/include/c_nio_openssl.h /usr/local/Cellar/libressl/2.7.4/include/openssl/pem.h /usr/local/Cellar/libressl/2.7.4/include/openssl/bn.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIODarwin/include/c_nio_darwin.h /usr/local/Cellar/libressl/2.7.4/include/openssl/bio.h /usr/local/Cellar/libressl/2.7.4/include/openssl/crypto.h /usr/local/Cellar/libressl/2.7.4/include/openssl/srtp.h /usr/local/Cellar/libressl/2.7.4/include/openssl/evp.h /usr/local/Cellar/libressl/2.7.4/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/2.7.4/include/openssl/buffer.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOHTTPParser/include/c_nio_http_parser.h /usr/local/Cellar/libressl/2.7.4/include/openssl/err.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOAtomics/include/c-atomics.h /usr/local/Cellar/libressl/2.7.4/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/2.7.4/include/openssl/objects.h /usr/local/Cellar/libressl/2.7.4/include/openssl/opensslv.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOLinux/include/c_nio_linux.h /usr/local/Cellar/libressl/2.7.4/include/openssl/x509_vfy.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio-zlib-support.git--4783613459776704231/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio-ssl-support.git--7591788603050871532/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
/*******************************************************************************
* Copyright (c) 2000, 2003 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 dwt.ole.win32.OleParameterDescription;
import dwt.dwthelper.utils;
public class OleParameterDescription {
public String name;
public short flags;
public short type;
}
|
D
|
//https://rosettacode.org/wiki/Sum_to_100
import std.stdio;
void main() {
import std.algorithm : each, max, reduce, sort;
import std.range : take;
Stat stat = new Stat();
comment("Show all solutions that sum to 100");
immutable givenSum = 100;
print(givenSum);
comment("Show the sum that has the maximum number of solutions");
const int maxCount = reduce!max(stat.sumCount.keys);
int maxSum;
foreach(key, entry; stat.sumCount[maxCount]) {
if (key >= 0) {
maxSum = key;
break;
}
}
writeln(maxSum, " has ", maxCount, " solutions");
comment("Show the lowest positive number that can't be expressed");
int value = 0;
while (value in stat.countSum) {
value++;
}
writeln(value);
comment("Show the ten highest numbers that can be expressed");
const int n = stat.countSum.keys.length;
auto sums = stat.countSum.keys;
sums.sort!"a>b"
.take(10)
.each!print;
}
void comment(string commentString) {
writeln();
writeln(commentString);
writeln();
}
void print(int givenSum) {
Expression expression = new Expression();
for (int i=0; i<Expression.NUMBER_OF_EXPRESSIONS; i++, expression.next()) {
if (expression.toInt() == givenSum) {
expression.print();
}
}
}
class Expression {
private enum NUMBER_OF_DIGITS = 9;
private enum ADD = 0;
private enum SUB = 1;
private enum JOIN = 2;
enum NUMBER_OF_EXPRESSIONS = 2 * 3 * 3 * 3 * 3 * 3 * 3 * 3 * 3;
byte[NUMBER_OF_DIGITS] code;
Expression next() {
for (int i=0; i<NUMBER_OF_DIGITS; i++) {
if (++code[i] > JOIN) {
code[i] = ADD;
} else {
break;
}
}
return this;
}
int toInt() {
int value = 0;
int number = 0;
int sign = (+1);
for (int digit=1; digit<=9; digit++) {
switch (code[NUMBER_OF_DIGITS - digit]) {
case ADD:
value += sign * number;
number = digit;
sign = (+1);
break;
case SUB:
value += sign * number;
number = digit;
sign = (-1);
break;
case JOIN:
number = 10 * number + digit;
break;
default:
assert(false);
}
}
return value + sign * number;
}
void toString(scope void delegate(const(char)[]) sink) const {
import std.conv : to;
import std.format : FormatSpec, formatValue;
import std.range : put;
auto fmt = FormatSpec!char("s");
for (int digit=1; digit<=NUMBER_OF_DIGITS; digit++) {
switch (code[NUMBER_OF_DIGITS - digit]) {
case ADD:
if (digit > 1) {
put(sink, '+');
}
break;
case SUB:
put(sink, '-');
break;
default:
break;
}
formatValue(sink, digit, fmt);
}
}
void print() {
print(stdout);
}
void print(File printStream) {
printStream.writefln("%9d = %s", toInt(), this);
}
}
class Stat {
int[int] countSum;
bool[int][int] sumCount;
this() {
Expression expression = new Expression();
for (int i=0; i<Expression.NUMBER_OF_EXPRESSIONS; i++, expression.next()) {
int sum = expression.toInt();
countSum[sum]++;
}
foreach (key, entry; countSum) {
bool[int] set;
if (entry in sumCount) {
set = sumCount[entry];
} else {
set.clear();
}
set[key] = true;
sumCount[entry] = set;
}
}
}
|
D
|
module global;
import orm;
static class WGlobal
{
public static WQueries wQ;
public static WDatabase wDb;
//-----------------------------------------------------
// Singleton getters
public static WDatabase * GetDatabase()
{
if (this.wDb !is null)
{
return &wDb;
}
else
{
// TODO: These should be fetched from environment variables.
wDb = new WDatabase("devtest", "testdev123123", "localhost", "5432", "wiltdev");
return &wDb;
}
}
public static WQueries * GetQueries()
{
if (this.wQ !is null)
{
return &wQ;
}
else
{
wQ = new WQueries();
return &wQ;
}
}
}
|
D
|
import std.stdio;
import std.socket;
import std.datetime;
void main() {
ushort port = 19863;
Socket connection = new UdpSocket();
writefln("Local Host: %s", Socket.hostName());
write("Address: ");
string address = readln();
InternetAddress inet = new InternetAddress(address, port);
writeln(inet);
byte[2] header = [cast(byte)0xFF, cast(byte)0xFF];
writeln("binding");
connection.bind(new InternetAddress(InternetAddress.PORT_ANY));
StopWatch sw = StopWatch(AutoStart.yes);
sw.start();
connection.sendTo(header ~ [cast(byte)0x01], new InternetAddress(address, port));
byte[100] buffer;
Address ASender;
InternetAddress IASender;
bool recieved = false;
while (recieved == false) {
long result = connection.receiveFrom(buffer, ASender);
if (result == 0 || result == Socket.ERROR) continue;
IASender = cast(InternetAddress)ASender;
if (IASender.port != inet.port || IASender.addr != inet.addr) continue;
if (buffer[0..3] == [cast(byte)0xFF, cast(byte)0xFF, cast(byte)0x01]) recieved = true;
}
sw.stop();
writeln(sw.peek().msecs);
}
|
D
|
// ****************
// SPL_PalRepelEvil
// ****************
const int SPL_Cost_PalRepelEvil = 15;
const int SPL_Damage_PalRepelEvil = 300;
INSTANCE Spell_PalRepelEvil (C_Spell_Proto)
{
time_per_mana = 0;
damage_per_level = SPL_DAMAGE_PalRepelEvil;
canTurnDuringInvest = TRUE;
canChangeTargetDuringInvest = TRUE;
};
func int Spell_Logic_PalRepelEvil (var int manaInvested)
{
if (Npc_GetActiveSpellIsScroll(self) && (self.attribute[ATR_MANA] >= SPL_Cost_Scroll))
{
return SPL_SENDCAST;
}
else if (self.attribute[ATR_MANA] >= SPL_Cost_PalRepelEvil)
{
return SPL_SENDCAST;
}
else //nicht genug Mana
{
return SPL_SENDSTOP;
};
};
func void Spell_Cast_PalRepelEvil()
{
if (Npc_GetActiveSpellIsScroll(self))
{
self.attribute[ATR_MANA] = self.attribute[ATR_MANA] - SPL_Cost_Scroll;
}
else
{
self.attribute[ATR_MANA] = self.attribute[ATR_MANA] - SPL_Cost_PalRepelEvil;
};
B_PrismaAdd(SPL_Damage_PalRepelEvil);
self.aivar[AIV_SelectSpell] += 1;
};
|
D
|
/**
* Functions related to UTF encoding.
*
* Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
* Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/utf.d, _utf.d)
* Documentation: https://dlang.org/phobos/dmd_utf.html
* Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/utf.d
*/
module dmd.utf;
nothrow pure @nogc:
/// The Unicode code space is the range of code points [0x000000,0x10FFFF]
/// except the UTF-16 surrogate pairs in the range [0xD800,0xDFFF]
bool utf_isValidDchar(dchar c)
{
// TODO: Whether non-char code points should be rejected is pending review.
// 0xFFFE and 0xFFFF are valid for internal use, like Phobos std.utf.isValidDChar
// See also https://issues.dlang.org/show_bug.cgi?id=1357
if (c < 0xD800) // Almost all characters in a typical document.
return true;
if (c > 0xDFFF && c <= 0x10FFFF)
return true;
return false;
}
/*******************************
* Return !=0 if unicode alpha.
* Use table from C99 Appendix D.
*/
bool isUniAlpha(dchar c)
{
static immutable wchar[2][] ALPHA_TABLE =
[
[0x00AA, 0x00AA],
[0x00B5, 0x00B5],
[0x00B7, 0x00B7],
[0x00BA, 0x00BA],
[0x00C0, 0x00D6],
[0x00D8, 0x00F6],
[0x00F8, 0x01F5],
[0x01FA, 0x0217],
[0x0250, 0x02A8],
[0x02B0, 0x02B8],
[0x02BB, 0x02BB],
[0x02BD, 0x02C1],
[0x02D0, 0x02D1],
[0x02E0, 0x02E4],
[0x037A, 0x037A],
[0x0386, 0x0386],
[0x0388, 0x038A],
[0x038C, 0x038C],
[0x038E, 0x03A1],
[0x03A3, 0x03CE],
[0x03D0, 0x03D6],
[0x03DA, 0x03DA],
[0x03DC, 0x03DC],
[0x03DE, 0x03DE],
[0x03E0, 0x03E0],
[0x03E2, 0x03F3],
[0x0401, 0x040C],
[0x040E, 0x044F],
[0x0451, 0x045C],
[0x045E, 0x0481],
[0x0490, 0x04C4],
[0x04C7, 0x04C8],
[0x04CB, 0x04CC],
[0x04D0, 0x04EB],
[0x04EE, 0x04F5],
[0x04F8, 0x04F9],
[0x0531, 0x0556],
[0x0559, 0x0559],
[0x0561, 0x0587],
[0x05B0, 0x05B9],
[0x05BB, 0x05BD],
[0x05BF, 0x05BF],
[0x05C1, 0x05C2],
[0x05D0, 0x05EA],
[0x05F0, 0x05F2],
[0x0621, 0x063A],
[0x0640, 0x0652],
[0x0660, 0x0669],
[0x0670, 0x06B7],
[0x06BA, 0x06BE],
[0x06C0, 0x06CE],
[0x06D0, 0x06DC],
[0x06E5, 0x06E8],
[0x06EA, 0x06ED],
[0x06F0, 0x06F9],
[0x0901, 0x0903],
[0x0905, 0x0939],
[0x093D, 0x094D],
[0x0950, 0x0952],
[0x0958, 0x0963],
[0x0966, 0x096F],
[0x0981, 0x0983],
[0x0985, 0x098C],
[0x098F, 0x0990],
[0x0993, 0x09A8],
[0x09AA, 0x09B0],
[0x09B2, 0x09B2],
[0x09B6, 0x09B9],
[0x09BE, 0x09C4],
[0x09C7, 0x09C8],
[0x09CB, 0x09CD],
[0x09DC, 0x09DD],
[0x09DF, 0x09E3],
[0x09E6, 0x09F1],
[0x0A02, 0x0A02],
[0x0A05, 0x0A0A],
[0x0A0F, 0x0A10],
[0x0A13, 0x0A28],
[0x0A2A, 0x0A30],
[0x0A32, 0x0A33],
[0x0A35, 0x0A36],
[0x0A38, 0x0A39],
[0x0A3E, 0x0A42],
[0x0A47, 0x0A48],
[0x0A4B, 0x0A4D],
[0x0A59, 0x0A5C],
[0x0A5E, 0x0A5E],
[0x0A66, 0x0A6F],
[0x0A74, 0x0A74],
[0x0A81, 0x0A83],
[0x0A85, 0x0A8B],
[0x0A8D, 0x0A8D],
[0x0A8F, 0x0A91],
[0x0A93, 0x0AA8],
[0x0AAA, 0x0AB0],
[0x0AB2, 0x0AB3],
[0x0AB5, 0x0AB9],
[0x0ABD, 0x0AC5],
[0x0AC7, 0x0AC9],
[0x0ACB, 0x0ACD],
[0x0AD0, 0x0AD0],
[0x0AE0, 0x0AE0],
[0x0AE6, 0x0AEF],
[0x0B01, 0x0B03],
[0x0B05, 0x0B0C],
[0x0B0F, 0x0B10],
[0x0B13, 0x0B28],
[0x0B2A, 0x0B30],
[0x0B32, 0x0B33],
[0x0B36, 0x0B39],
[0x0B3D, 0x0B43],
[0x0B47, 0x0B48],
[0x0B4B, 0x0B4D],
[0x0B5C, 0x0B5D],
[0x0B5F, 0x0B61],
[0x0B66, 0x0B6F],
[0x0B82, 0x0B83],
[0x0B85, 0x0B8A],
[0x0B8E, 0x0B90],
[0x0B92, 0x0B95],
[0x0B99, 0x0B9A],
[0x0B9C, 0x0B9C],
[0x0B9E, 0x0B9F],
[0x0BA3, 0x0BA4],
[0x0BA8, 0x0BAA],
[0x0BAE, 0x0BB5],
[0x0BB7, 0x0BB9],
[0x0BBE, 0x0BC2],
[0x0BC6, 0x0BC8],
[0x0BCA, 0x0BCD],
[0x0BE7, 0x0BEF],
[0x0C01, 0x0C03],
[0x0C05, 0x0C0C],
[0x0C0E, 0x0C10],
[0x0C12, 0x0C28],
[0x0C2A, 0x0C33],
[0x0C35, 0x0C39],
[0x0C3E, 0x0C44],
[0x0C46, 0x0C48],
[0x0C4A, 0x0C4D],
[0x0C60, 0x0C61],
[0x0C66, 0x0C6F],
[0x0C82, 0x0C83],
[0x0C85, 0x0C8C],
[0x0C8E, 0x0C90],
[0x0C92, 0x0CA8],
[0x0CAA, 0x0CB3],
[0x0CB5, 0x0CB9],
[0x0CBE, 0x0CC4],
[0x0CC6, 0x0CC8],
[0x0CCA, 0x0CCD],
[0x0CDE, 0x0CDE],
[0x0CE0, 0x0CE1],
[0x0CE6, 0x0CEF],
[0x0D02, 0x0D03],
[0x0D05, 0x0D0C],
[0x0D0E, 0x0D10],
[0x0D12, 0x0D28],
[0x0D2A, 0x0D39],
[0x0D3E, 0x0D43],
[0x0D46, 0x0D48],
[0x0D4A, 0x0D4D],
[0x0D60, 0x0D61],
[0x0D66, 0x0D6F],
[0x0E01, 0x0E3A],
[0x0E40, 0x0E5B],
[0x0E81, 0x0E82],
[0x0E84, 0x0E84],
[0x0E87, 0x0E88],
[0x0E8A, 0x0E8A],
[0x0E8D, 0x0E8D],
[0x0E94, 0x0E97],
[0x0E99, 0x0E9F],
[0x0EA1, 0x0EA3],
[0x0EA5, 0x0EA5],
[0x0EA7, 0x0EA7],
[0x0EAA, 0x0EAB],
[0x0EAD, 0x0EAE],
[0x0EB0, 0x0EB9],
[0x0EBB, 0x0EBD],
[0x0EC0, 0x0EC4],
[0x0EC6, 0x0EC6],
[0x0EC8, 0x0ECD],
[0x0ED0, 0x0ED9],
[0x0EDC, 0x0EDD],
[0x0F00, 0x0F00],
[0x0F18, 0x0F19],
[0x0F20, 0x0F33],
[0x0F35, 0x0F35],
[0x0F37, 0x0F37],
[0x0F39, 0x0F39],
[0x0F3E, 0x0F47],
[0x0F49, 0x0F69],
[0x0F71, 0x0F84],
[0x0F86, 0x0F8B],
[0x0F90, 0x0F95],
[0x0F97, 0x0F97],
[0x0F99, 0x0FAD],
[0x0FB1, 0x0FB7],
[0x0FB9, 0x0FB9],
[0x10A0, 0x10C5],
[0x10D0, 0x10F6],
[0x1E00, 0x1E9B],
[0x1EA0, 0x1EF9],
[0x1F00, 0x1F15],
[0x1F18, 0x1F1D],
[0x1F20, 0x1F45],
[0x1F48, 0x1F4D],
[0x1F50, 0x1F57],
[0x1F59, 0x1F59],
[0x1F5B, 0x1F5B],
[0x1F5D, 0x1F5D],
[0x1F5F, 0x1F7D],
[0x1F80, 0x1FB4],
[0x1FB6, 0x1FBC],
[0x1FBE, 0x1FBE],
[0x1FC2, 0x1FC4],
[0x1FC6, 0x1FCC],
[0x1FD0, 0x1FD3],
[0x1FD6, 0x1FDB],
[0x1FE0, 0x1FEC],
[0x1FF2, 0x1FF4],
[0x1FF6, 0x1FFC],
[0x203F, 0x2040],
[0x207F, 0x207F],
[0x2102, 0x2102],
[0x2107, 0x2107],
[0x210A, 0x2113],
[0x2115, 0x2115],
[0x2118, 0x211D],
[0x2124, 0x2124],
[0x2126, 0x2126],
[0x2128, 0x2128],
[0x212A, 0x2131],
[0x2133, 0x2138],
[0x2160, 0x2182],
[0x3005, 0x3007],
[0x3021, 0x3029],
[0x3041, 0x3093],
[0x309B, 0x309C],
[0x30A1, 0x30F6],
[0x30FB, 0x30FC],
[0x3105, 0x312C],
[0x4E00, 0x9FA5],
[0xAC00, 0xD7A3]
];
size_t high = ALPHA_TABLE.length - 1;
// Shortcut search if c is out of range
size_t low = (c < ALPHA_TABLE[0][0] || ALPHA_TABLE[high][1] < c) ? high + 1 : 0;
// Binary search
while (low <= high)
{
size_t mid = (low + high) >> 1;
if (c < ALPHA_TABLE[mid][0])
high = mid - 1;
else if (ALPHA_TABLE[mid][1] < c)
low = mid + 1;
else
{
assert(ALPHA_TABLE[mid][0] <= c && c <= ALPHA_TABLE[mid][1]);
return true;
}
}
return false;
}
/**
* Returns the code length of c in code units.
*/
int utf_codeLengthChar(dchar c)
{
if (c <= 0x7F)
return 1;
if (c <= 0x7FF)
return 2;
if (c <= 0xFFFF)
return 3;
if (c <= 0x10FFFF)
return 4;
assert(false);
}
int utf_codeLengthWchar(dchar c)
{
return c <= 0xFFFF ? 1 : 2;
}
/**
* Returns the code length of c in code units for the encoding.
* sz is the encoding: 1 = utf8, 2 = utf16, 4 = utf32.
*/
int utf_codeLength(int sz, dchar c)
{
if (sz == 1)
return utf_codeLengthChar(c);
if (sz == 2)
return utf_codeLengthWchar(c);
assert(sz == 4);
return 1;
}
void utf_encodeChar(char* s, dchar c)
{
assert(s !is null);
assert(utf_isValidDchar(c));
if (c <= 0x7F)
{
s[0] = cast(char)c;
}
else if (c <= 0x07FF)
{
s[0] = cast(char)(0xC0 | (c >> 6));
s[1] = cast(char)(0x80 | (c & 0x3F));
}
else if (c <= 0xFFFF)
{
s[0] = cast(char)(0xE0 | (c >> 12));
s[1] = cast(char)(0x80 | ((c >> 6) & 0x3F));
s[2] = cast(char)(0x80 | (c & 0x3F));
}
else if (c <= 0x10FFFF)
{
s[0] = cast(char)(0xF0 | (c >> 18));
s[1] = cast(char)(0x80 | ((c >> 12) & 0x3F));
s[2] = cast(char)(0x80 | ((c >> 6) & 0x3F));
s[3] = cast(char)(0x80 | (c & 0x3F));
}
else
assert(0);
}
void utf_encodeWchar(wchar* s, dchar c)
{
assert(s !is null);
assert(utf_isValidDchar(c));
if (c <= 0xFFFF)
{
s[0] = cast(wchar)c;
}
else
{
s[0] = cast(wchar)((((c - 0x010000) >> 10) & 0x03FF) + 0xD800);
s[1] = cast(wchar)(((c - 0x010000) & 0x03FF) + 0xDC00);
}
}
void utf_encode(int sz, void* s, dchar c)
{
if (sz == 1)
utf_encodeChar(cast(char*)s, c);
else if (sz == 2)
utf_encodeWchar(cast(wchar*)s, c);
else
{
assert(sz == 4);
*(cast(dchar*)s) = c;
}
}
/********************************************
* Decode a UTF-8 sequence as a single UTF-32 code point.
* Params:
* s = UTF-8 sequence
* ridx = starting index in s[], updated to reflect number of code units decoded
* rresult = set to character decoded
* Returns:
* null on success, otherwise error message string
*/
string utf_decodeChar(const(char)[] s, ref size_t ridx, out dchar rresult)
{
// UTF-8 decoding errors
static immutable string UTF8_DECODE_OK = null; // no error
static immutable string UTF8_DECODE_OUTSIDE_CODE_SPACE = "Outside Unicode code space";
static immutable string UTF8_DECODE_TRUNCATED_SEQUENCE = "Truncated UTF-8 sequence";
static immutable string UTF8_DECODE_OVERLONG = "Overlong UTF-8 sequence";
static immutable string UTF8_DECODE_INVALID_TRAILER = "Invalid trailing code unit";
static immutable string UTF8_DECODE_INVALID_CODE_POINT = "Invalid code point decoded";
/* The following encodings are valid, except for the 5 and 6 byte
* combinations:
* 0xxxxxxx
* 110xxxxx 10xxxxxx
* 1110xxxx 10xxxxxx 10xxxxxx
* 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
* 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
* 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
*/
static immutable ubyte[256] UTF8_STRIDE =
[
1,1,1,1, 1,1,1,1,
1,1,1,1, 1,1,1,1,
1,1,1,1, 1,1,1,1,
1,1,1,1, 1,1,1,1,
1,1,1,1, 1,1,1,1,
1,1,1,1, 1,1,1,1,
1,1,1,1, 1,1,1,1,
1,1,1,1, 1,1,1,1,
1,1,1,1, 1,1,1,1,
1,1,1,1, 1,1,1,1,
1,1,1,1, 1,1,1,1,
1,1,1,1, 1,1,1,1,
1,1,1,1, 1,1,1,1,
1,1,1,1, 1,1,1,1,
1,1,1,1, 1,1,1,1,
1,1,1,1, 1,1,1,1,
0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,
2,2,2,2, 2,2,2,2,
2,2,2,2, 2,2,2,2,
2,2,2,2, 2,2,2,2,
2,2,2,2, 2,2,2,2,
3,3,3,3, 3,3,3,3,
3,3,3,3, 3,3,3,3,
4,4,4,4, 4,4,4,4,
5,5,5,5, 6,6,0xFF,0xFF
];
assert(s !is null);
size_t i = ridx++;
const char u = s[i];
// Pre-stage results for ASCII and error cases
rresult = u;
//printf("utf_decodeChar(s = %02x, %02x, %02x len = %d)\n", u, s[1], s[2], len);
// Get expected sequence length
const size_t n = UTF8_STRIDE[u];
switch (n)
{
case 1:
// ASCII
return UTF8_DECODE_OK;
case 2:
case 3:
case 4:
// multi-byte UTF-8
break;
default:
// 5- or 6-byte sequence
return UTF8_DECODE_OUTSIDE_CODE_SPACE;
}
if (s.length < i + n) // source too short
return UTF8_DECODE_TRUNCATED_SEQUENCE;
// Pick off 7 - n low bits from first code unit
dchar c = u & ((1 << (7 - n)) - 1);
/* The following combinations are overlong, and illegal:
* 1100000x (10xxxxxx)
* 11100000 100xxxxx (10xxxxxx)
* 11110000 1000xxxx (10xxxxxx 10xxxxxx)
* 11111000 10000xxx (10xxxxxx 10xxxxxx 10xxxxxx)
* 11111100 100000xx (10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx)
*/
const char u2 = s[++i];
// overlong combination
if ((u & 0xFE) == 0xC0 || (u == 0xE0 && (u2 & 0xE0) == 0x80) || (u == 0xF0 && (u2 & 0xF0) == 0x80) || (u == 0xF8 && (u2 & 0xF8) == 0x80) || (u == 0xFC && (u2 & 0xFC) == 0x80))
return UTF8_DECODE_OVERLONG;
// Decode remaining bits
for (const m = n + i - 1; i != m; ++i)
{
const u3 = s[i];
if ((u3 & 0xC0) != 0x80) // trailing bytes are 10xxxxxx
return UTF8_DECODE_INVALID_TRAILER;
c = (c << 6) | (u3 & 0x3F);
}
if (!utf_isValidDchar(c))
return UTF8_DECODE_INVALID_CODE_POINT;
ridx = i;
rresult = c;
return UTF8_DECODE_OK;
}
/********************************************
* Decode a UTF-16 sequence as a single UTF-32 code point.
* Params:
* s = UTF-16 sequence
* ridx = starting index in s[], updated to reflect number of code units decoded
* rresult = set to character decoded
* Returns:
* null on success, otherwise error message string
*/
string utf_decodeWchar(const(wchar)[] s, ref size_t ridx, out dchar rresult)
{
// UTF-16 decoding errors
static immutable string UTF16_DECODE_OK = null; // no error
static immutable string UTF16_DECODE_TRUNCATED_SEQUENCE = "Truncated UTF-16 sequence";
static immutable string UTF16_DECODE_INVALID_SURROGATE = "Invalid low surrogate";
static immutable string UTF16_DECODE_UNPAIRED_SURROGATE = "Unpaired surrogate";
static immutable string UTF16_DECODE_INVALID_CODE_POINT = "Invalid code point decoded";
assert(s !is null);
size_t i = ridx++;
// Pre-stage results for single wchar and error cases
dchar u = rresult = s[i];
if (u < 0xD800) // Single wchar codepoint
return UTF16_DECODE_OK;
if (0xD800 <= u && u <= 0xDBFF) // Surrogate pair
{
if (s.length <= i + 1)
return UTF16_DECODE_TRUNCATED_SEQUENCE;
wchar u2 = s[i + 1];
if (u2 < 0xDC00 || 0xDFFF < u)
return UTF16_DECODE_INVALID_SURROGATE;
u = ((u - 0xD7C0) << 10) + (u2 - 0xDC00);
++ridx;
}
else if (0xDC00 <= u && u <= 0xDFFF)
return UTF16_DECODE_UNPAIRED_SURROGATE;
if (!utf_isValidDchar(u))
return UTF16_DECODE_INVALID_CODE_POINT;
rresult = u;
return UTF16_DECODE_OK;
}
|
D
|
module tests.cut;
interface IDependency { }
class Dependency : IDependency { }
interface IService { }
class Service: IService { }
class ServiceA: IService { }
class ServiceB: IService { }
class AnotherService : IService { }
class ServiceWithDependency : IService {
private IDependency _dependency;
@property IDependency dependency() { return _dependency; }
this(IDependency dependency) {
_dependency = dependency;
}
}
class AnotherServiceWithDependency : IService {
private IDependency _dependency;
@property IDependency dependency() { return _dependency; }
this(IDependency dependency) {
_dependency = dependency;
}
}
class ServiceWithArrayDependencies: IService {
private IDependency[] _foos;
@property IDependency[] foos() { return _foos; }
public this(IDependency[] foos) {
_foos = foos;
}
}
interface ITransientService { }
interface ISingletonService { }
class ServiceWithMultipleCostructors {
this(ISingletonService singleton) {
_singletonService = singleton;
}
this(ITransientService transient) {
_transientService = transient;
}
private ITransientService _transientService;
@property ITransientService transientService() { return _transientService; }
private ISingletonService _singletonService;
@property ISingletonService singletonService() { return _singletonService; }
}
class ServiceWithoutPublicConstructor {
private this() { }
}
class ServiceWithTwoParametersBothDependentOnSameService {
private ServiceWithDependency _one;
@property ServiceWithDependency one() { return _one; }
private AnotherServiceWithDependency _another;
@property AnotherServiceWithDependency another() { return _another; }
this(ServiceWithDependency one, AnotherServiceWithDependency another) {
_one = one;
_another = another;
}
}
|
D
|
/Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevComponents.build/NibView.swift.o : /Users/abuzeid/workspace/DevPods/DevComponents/TextAreas/TextArea.swift /Users/abuzeid/workspace/DevPods/DevComponents/PaddingLabel.swift /Users/abuzeid/workspace/DevPods/DevComponents/SnackBar/SnackBarViewModel.swift /Users/abuzeid/workspace/DevPods/DevComponents/Tooltip/TooltipConfigurationProtocol.swift /Users/abuzeid/workspace/DevPods/DevComponents/TabBar.swift /Users/abuzeid/workspace/DevPods/DevComponents/RatingBar.swift /Users/abuzeid/workspace/DevPods/DevComponents/Tooltip/TooltipHeader.swift /Users/abuzeid/workspace/DevPods/DevComponents/SnackBar/SnackBarPresenter.swift /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevComponents.build/DerivedSources/resource_bundle_accessor.swift /Users/abuzeid/workspace/DevPods/DevComponents/UIView+Constrains.swift /Users/abuzeid/workspace/DevPods/DevComponents/NibView.swift /Users/abuzeid/workspace/DevPods/DevComponents/ContentSizeTableView.swift /Users/abuzeid/workspace/DevPods/DevComponents/SnackBar/SnackBarView.swift /Users/abuzeid/workspace/DevPods/DevComponents/MessageTextView.swift /Users/abuzeid/workspace/DevPods/DevComponents/TextAreas/ResizableTextView.swift /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 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/dyld.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevTag.build/module.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevNetwork.build/module.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevPlayer.build/module.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevExtensions.build/module.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevComponents.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.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/MacOSX11.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevComponents.build/NibView~partial.swiftmodule : /Users/abuzeid/workspace/DevPods/DevComponents/TextAreas/TextArea.swift /Users/abuzeid/workspace/DevPods/DevComponents/PaddingLabel.swift /Users/abuzeid/workspace/DevPods/DevComponents/SnackBar/SnackBarViewModel.swift /Users/abuzeid/workspace/DevPods/DevComponents/Tooltip/TooltipConfigurationProtocol.swift /Users/abuzeid/workspace/DevPods/DevComponents/TabBar.swift /Users/abuzeid/workspace/DevPods/DevComponents/RatingBar.swift /Users/abuzeid/workspace/DevPods/DevComponents/Tooltip/TooltipHeader.swift /Users/abuzeid/workspace/DevPods/DevComponents/SnackBar/SnackBarPresenter.swift /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevComponents.build/DerivedSources/resource_bundle_accessor.swift /Users/abuzeid/workspace/DevPods/DevComponents/UIView+Constrains.swift /Users/abuzeid/workspace/DevPods/DevComponents/NibView.swift /Users/abuzeid/workspace/DevPods/DevComponents/ContentSizeTableView.swift /Users/abuzeid/workspace/DevPods/DevComponents/SnackBar/SnackBarView.swift /Users/abuzeid/workspace/DevPods/DevComponents/MessageTextView.swift /Users/abuzeid/workspace/DevPods/DevComponents/TextAreas/ResizableTextView.swift /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 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/dyld.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevTag.build/module.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevNetwork.build/module.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevPlayer.build/module.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevExtensions.build/module.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevComponents.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.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/MacOSX11.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevComponents.build/NibView~partial.swiftdoc : /Users/abuzeid/workspace/DevPods/DevComponents/TextAreas/TextArea.swift /Users/abuzeid/workspace/DevPods/DevComponents/PaddingLabel.swift /Users/abuzeid/workspace/DevPods/DevComponents/SnackBar/SnackBarViewModel.swift /Users/abuzeid/workspace/DevPods/DevComponents/Tooltip/TooltipConfigurationProtocol.swift /Users/abuzeid/workspace/DevPods/DevComponents/TabBar.swift /Users/abuzeid/workspace/DevPods/DevComponents/RatingBar.swift /Users/abuzeid/workspace/DevPods/DevComponents/Tooltip/TooltipHeader.swift /Users/abuzeid/workspace/DevPods/DevComponents/SnackBar/SnackBarPresenter.swift /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevComponents.build/DerivedSources/resource_bundle_accessor.swift /Users/abuzeid/workspace/DevPods/DevComponents/UIView+Constrains.swift /Users/abuzeid/workspace/DevPods/DevComponents/NibView.swift /Users/abuzeid/workspace/DevPods/DevComponents/ContentSizeTableView.swift /Users/abuzeid/workspace/DevPods/DevComponents/SnackBar/SnackBarView.swift /Users/abuzeid/workspace/DevPods/DevComponents/MessageTextView.swift /Users/abuzeid/workspace/DevPods/DevComponents/TextAreas/ResizableTextView.swift /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 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/dyld.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevTag.build/module.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevNetwork.build/module.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevPlayer.build/module.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevExtensions.build/module.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevComponents.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.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/MacOSX11.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevComponents.build/NibView~partial.swiftsourceinfo : /Users/abuzeid/workspace/DevPods/DevComponents/TextAreas/TextArea.swift /Users/abuzeid/workspace/DevPods/DevComponents/PaddingLabel.swift /Users/abuzeid/workspace/DevPods/DevComponents/SnackBar/SnackBarViewModel.swift /Users/abuzeid/workspace/DevPods/DevComponents/Tooltip/TooltipConfigurationProtocol.swift /Users/abuzeid/workspace/DevPods/DevComponents/TabBar.swift /Users/abuzeid/workspace/DevPods/DevComponents/RatingBar.swift /Users/abuzeid/workspace/DevPods/DevComponents/Tooltip/TooltipHeader.swift /Users/abuzeid/workspace/DevPods/DevComponents/SnackBar/SnackBarPresenter.swift /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevComponents.build/DerivedSources/resource_bundle_accessor.swift /Users/abuzeid/workspace/DevPods/DevComponents/UIView+Constrains.swift /Users/abuzeid/workspace/DevPods/DevComponents/NibView.swift /Users/abuzeid/workspace/DevPods/DevComponents/ContentSizeTableView.swift /Users/abuzeid/workspace/DevPods/DevComponents/SnackBar/SnackBarView.swift /Users/abuzeid/workspace/DevPods/DevComponents/MessageTextView.swift /Users/abuzeid/workspace/DevPods/DevComponents/TextAreas/ResizableTextView.swift /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 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/dyld.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevTag.build/module.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevNetwork.build/module.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevPlayer.build/module.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevExtensions.build/module.modulemap /Users/abuzeid/workspace/DevPods/.build/x86_64-apple-macosx/debug/DevComponents.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.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/MacOSX11.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
an enclosure made or wire or metal bars in which birds or animals can be kept
something that restricts freedom as a cage restricts movement
United States composer of avant-garde music (1912-1992)
the net that is the goal in ice hockey
a movable screen placed behind home base to catch balls during batting practice
confine in a cage
|
D
|
module api.c;
import api.util;
import asdf;
struct Function
{
string name;
string return_type;
string[2][] arguments; // type, name
@serializationIgnore:
}
struct API
{
APIPart core;
APIPart[string] extensions;
@serializationIgnore:
string source()
{
string ret = "module godot.c.api;\n\n";
ret ~= "import godot.c.core;\n\n";
foreach(k, v; extensions) ret ~= "import godot.c." ~ k ~ ";\n";
ret ~= "import core.stdc.stdint;\nimport core.stdc.stddef : wchar_t;\n\n";
ret ~= q{
extern(C) struct godot_gdnative_api_version
{
uint major, minor;
}
mixin template ApiStructHeader()
{
uint type;
godot_gdnative_api_version ver;
const godot_gdnative_api_struct *next;
}
extern(C) struct godot_gdnative_api_struct
{
mixin ApiStructHeader;
}
};
ret ~= "enum GDNATIVE_API_TYPES : uint {\n";
ret ~= "\tGDNATIVE_" ~ core.type ~ ",\n";
foreach(k, v; extensions) ret ~= "\tGDNATIVE_EXT_" ~ v.type ~ ",\n";
ret ~= "}\n";
ret ~= core.source("core");
foreach(k, v; extensions) ret ~= v.source(k);
ret ~= q{
@nogc nothrow
void godot_gdnative_api_struct_init(in godot_gdnative_core_api_struct* s)
{
import std.traits : EnumMembers;
if(!s) assert(0, "godot_gdnative_core_api_struct is null");
if(_godot_api) return; // already initialized
_godot_api = s;
foreach(ext; s.extensions[0..s.num_extensions])
{
// check the actual extension type at runtime, instead of relying on the order in the JSON
if(ext.type == 0) continue; // core? should never happen
if(ext.type >= EnumMembers!GDNATIVE_API_TYPES.length)
{
continue; // unknown extension type
}
ApiTypeSwitch: final switch(cast(GDNATIVE_API_TYPES)ext.type)
{
foreach(E; EnumMembers!GDNATIVE_API_TYPES)
{
case E:
apiStruct!E = cast(typeof(apiStruct!E))(cast(void*)ext);
break ApiTypeSwitch;
}
}
}
}
};
return ret;
}
}
struct APIPart
{
string type;
Function[] api;
@serializationIgnore:
string source(string name)
{
bool core = name == "core";
string ret;
ret ~= "private extern(C) @nogc nothrow\n{\n";
foreach(const ref f; api)
{
ret ~= "\talias da_" ~ f.name ~ " = " ~ f.return_type.escapeCType ~ " function(";
foreach(ai, const ref a; f.arguments)
{
if(ai != 0) ret ~= ", ";
ret ~= a[0].escapeCType ~ " " ~ a[1].escapeD;
}
ret ~= ");\n";
}
ret ~= "}\n";
ret ~= "public extern(C) struct "~name.structName~"\n{\n";
if(core) ret ~= q{
mixin ApiStructHeader;
uint num_extensions;
const godot_gdnative_api_struct **extensions;
};
else ret ~= q{
mixin ApiStructHeader;
};
foreach(const ref f; api)
{
ret ~= "\tda_" ~ f.name ~ " " ~ f.name.escapeD ~ ";\n";
}
ret ~= "}\n";
ret ~= "__gshared const("~name.structName~")* "~name.globalVarName~" = null;\n";
ret ~= "private alias apiStruct(GDNATIVE_API_TYPES t : GDNATIVE_API_TYPES." ~ name.enumName(type) ~ ") = ";
ret ~= name.globalVarName ~ ";\n";
ret ~= "\n";
return ret;
}
}
string enumName(string name, string type)
{
return (name=="core")?("GDNATIVE_" ~ type):("GDNATIVE_EXT_" ~ type);
}
string structName(string name)
{
return (name=="core")?"godot_gdnative_core_api_struct":("godot_gdnative_ext_"~name~"_api_struct");
}
string globalVarName(string name)
{
return (name=="core")?"_godot_api":("_godot_"~name~"_api");
}
string escapeCType(string cType)
{
import std.algorithm, std.string;
cType = cType.chompPrefix("signed ");
if(cType.canFind("godot_object") && cType.endsWith("*"))
return cType[0..$-1];
else return cType;
}
|
D
|
/Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/Build/Intermediates.noindex/PKHUD.build/Debug-iphonesimulator/PKHUD.build/Objects-normal/x86_64/PKHUDAnimation.o : /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/HUD.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUD.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDAnimating.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDAnimation.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/WindowRootViewController.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/Build/Intermediates.noindex/PKHUD.build/Debug-iphonesimulator/PKHUD.build/DerivedSources/resource_bundle_accessor.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDAssets.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDRotatingImageView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/FrameView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDWideBaseView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDSquareBaseView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDErrorView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDSystemActivityIndicatorView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDSuccessView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDProgressView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDTextView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/Window.swift /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/mach-o/dyld.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/Build/Intermediates.noindex/PKHUD.build/Debug-iphonesimulator/PKHUD.build/Objects-normal/x86_64/PKHUDAnimation~partial.swiftmodule : /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/HUD.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUD.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDAnimating.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDAnimation.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/WindowRootViewController.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/Build/Intermediates.noindex/PKHUD.build/Debug-iphonesimulator/PKHUD.build/DerivedSources/resource_bundle_accessor.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDAssets.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDRotatingImageView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/FrameView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDWideBaseView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDSquareBaseView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDErrorView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDSystemActivityIndicatorView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDSuccessView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDProgressView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDTextView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/Window.swift /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/mach-o/dyld.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/Build/Intermediates.noindex/PKHUD.build/Debug-iphonesimulator/PKHUD.build/Objects-normal/x86_64/PKHUDAnimation~partial.swiftdoc : /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/HUD.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUD.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDAnimating.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDAnimation.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/WindowRootViewController.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/Build/Intermediates.noindex/PKHUD.build/Debug-iphonesimulator/PKHUD.build/DerivedSources/resource_bundle_accessor.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDAssets.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDRotatingImageView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/FrameView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDWideBaseView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDSquareBaseView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDErrorView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDSystemActivityIndicatorView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDSuccessView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDProgressView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDTextView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/Window.swift /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/mach-o/dyld.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/Build/Intermediates.noindex/PKHUD.build/Debug-iphonesimulator/PKHUD.build/Objects-normal/x86_64/PKHUDAnimation~partial.swiftsourceinfo : /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/HUD.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUD.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDAnimating.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDAnimation.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/WindowRootViewController.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/Build/Intermediates.noindex/PKHUD.build/Debug-iphonesimulator/PKHUD.build/DerivedSources/resource_bundle_accessor.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDAssets.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDRotatingImageView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/FrameView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDWideBaseView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDSquareBaseView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDErrorView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDSystemActivityIndicatorView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDSuccessView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDProgressView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/PKHUDTextView.swift /Users/hazuki/Desktop/13/la/lifeistech/SwiftPMApp/DerivedData/SwiftPMApp/SourcePackages/checkouts/PKHUD/PKHUD/Window.swift /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/14.5/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/mach-o/dyld.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
/** DGui project file.
Copyright: Trogu Antonio Davide 2011-2013
License: $(HTTP boost.org/LICENSE_1_0.txt, Boost License 1.0).
Authors: Trogu Antonio Davide
*/
module dgui.canvas;
import std.conv : to;
import std.path;
import std.string;
import core.memory;
import dgui.core.interfaces.idisposable;
import dgui.core.charset;
import dgui.core.winapi;
import dgui.core.exception;
import dgui.core.handle;
import dgui.core.utils;
public import dgui.core.geometry;
/**
Enum that contain the font style of a Font Object.
*/
enum FontStyle: ubyte
{
normal = 0, /// Normal Font Style
bold = 1, /// Bold Font Style
italic = 2, /// Italic Font Style
underline = 4, /// Underline Font Style
strikeout = 8, /// Strikeout Font Style
}
/**
Enum that contain the image type (useful in order to identify a Image object).
*/
enum ImageType
{
bitmap = 0, /// Bitmap Image
iconOrCursor = 1, /// Icon or Cursor
}
/**
Enum that specify the fill mode of a gradient.
*/
enum GradientFillRectMode
{
horizontal = 0, /// Horizontal Fill
vertical = 1, /// Vertical Fill
}
/**
Enum that specify the border type (used in a Canvas.drawEdge() call).
*/
enum EdgeType: uint
{
raisedOuter = BDR_RAISEDOUTER, /// Raised Outer Edge
raisedInner = BDR_RAISEDINNER, /// Raised Innter Edge
sunkenOuter = BDR_SUNKENOUTER, /// Sunken Outer Edge
sunkenInner = BDR_SUNKENINNER, /// Sunken Inner Edge
bump = EDGE_BUMP, /// Bump Edge
etched = EDGE_ETCHED, /// Etched Edge
raised = EDGE_RAISED, /// Edge Raised Edge
sunken = EDGE_SUNKEN, /// Sunken Edge
}
enum FrameType: uint
{
button = DFC_BUTTON,
caption = DFC_CAPTION,
menu = DFC_MENU,
popupMenu = DFC_POPUPMENU,
scroll = DFC_SCROLL,
}
enum FrameMode: uint
{
button3state = DFCS_BUTTON3STATE,
buttonCheck = DFCS_BUTTONCHECK,
buttonPush = DFCS_BUTTONPUSH,
buttonRadio = DFCS_BUTTONRADIO,
buttonRadioImage = DFCS_BUTTONRADIOIMAGE,
buttonRadioMask = DFCS_BUTTONRADIOMASK,
captionClose = DFCS_CAPTIONCLOSE,
captionHelp = DFCS_CAPTIONHELP,
captionMax = DFCS_CAPTIONMAX,
captionMin = DFCS_CAPTIONMIN,
captionRestore = DFCS_CAPTIONRESTORE,
menuArrow = DFCS_MENUARROW,
menuArrowRight = DFCS_MENUARROWRIGHT,
menuBullet = DFCS_MENUBULLET,
menuCheck = DFCS_MENUCHECK,
scrollComboBox = DFCS_SCROLLCOMBOBOX,
scrollDown = DFCS_SCROLLDOWN,
scrollLeft = DFCS_SCROLLLEFT,
scrollRight = DFCS_SCROLLRIGHT,
scrollSizeGrip = DFCS_SCROLLSIZEGRIP,
scrollSizeGripRight = DFCS_SCROLLSIZEGRIPRIGHT,
scrollUp = DFCS_SCROLLUP,
checked = DFCS_CHECKED,
flat = DFCS_FLAT,
hot = DFCS_HOT,
inactive = DFCS_INACTIVE,
mono = DFCS_MONO,
pushed = DFCS_PUSHED,
transparent = DFCS_TRANSPARENT,
}
/**
Enum that specify the draw border mode (used in a Canvas.drawEdge() call).
*/
enum EdgeMode: uint
{
adjust = BF_ADJUST, /// Shrink the rectangle in order to exlude the edges that were drawn.
diagonal = BF_DIAGONAL, /// Diagonal Border.
flat = BF_FLAT, /// Flat Border.
left = BF_LEFT, /// Left Border Only.
top = BF_TOP, /// Top Border Only.
right = BF_RIGHT, /// Right Border Only.
bottom = BF_BOTTOM, /// Bottom Border Only.
internal = BF_MIDDLE, /// Internal Border will be filled.
mono = BF_MONO, /// One Dimensional Border.
rect = BF_RECT, /// Fills the entire border of the rectangle.
//SOFT = BF_SOFT,
}
/**
Enum that specify the style of a Hatch Brush object
*/
enum HatchStyle: int
{
horizontal = HS_HORIZONTAL, /// The brush has horizontal stripes.
vertical = HS_VERTICAL, /// The brush has vertical stripes.
degree45Upward = HS_BDIAGONAL, /// The brush has 45° degree rising stripes.
degree45Downward = HS_FDIAGONAL, /// The brush has 45° degree falling stripes.
cross = HS_CROSS, /// The brush has crossed stripes.
diagonalCross = HS_DIAGCROSS, /// The brush has diagonal crossed stripes.
}
/**
Enum that specify the style of a Pen object.
*/
enum PenStyle: uint
{
solid = PS_SOLID, /// Solid Pen (Standard).
dash = PS_DASH, /// Dashed Pen.
dot = PS_DOT, /// Dotted Pen.
dashDot = PS_DASHDOT, /// Dash-Dotted Pen.
dashDotDot = PS_DASHDOTDOT, /// Dashed-Dotted-Dotted Pen.
null_ = PS_NULL, /// Invisible Pen.
insideFrame = PS_INSIDEFRAME, /// Solid Pen (line are drown inside the border of a closed shape).
}
/**
Enum that specify the style of a text in a drawText() call
*/
enum TextFormatFlags: uint
{
noPrefix = DT_NOPREFIX, /// Turn of processing of prefix characters (like '&', character that it will be not displayed underline).
wordBreak = DT_WORDBREAK, /// Break the line if a carriage return is found or the selected rectangle is too small.
singleLine = DT_SINGLELINE, /// The text is draw in one single line.
lineLimit = DT_EDITCONTROL, /// Duplicate the text displaying of a multiline control.
noClip = DT_NOCLIP, /// The text is not clipped.
//DIRECTION_RIGHT_TO_LEFT = DT_RTLREADING,
}
/**
Enum that specify the style of a text alignment in a drawText() call
*/
enum TextAlignment: uint
{
left = DT_LEFT, /// Text is left aligned.
right = DT_RIGHT, /// Text is right aligned.
center = DT_CENTER, /// Text is centred horizontally.
top = DT_TOP, /// Text is top aligned.
bottom = DT_BOTTOM, /// Text is bottom aligned.
middle = DT_VCENTER, /// Text is centred vertically.
}
/**
Enum that specify the trimming of a text alignment in a drawText() call
*/
enum TextTrimming: uint
{
none = 0, /// No Trimming.
ellipsis = DT_END_ELLIPSIS, /// If the text is too long, it will be replaced with end ellipsis (like: ellips...).
ellipsisPath = DT_PATH_ELLIPSIS, /// If the text is too long, it will be replaces with middle ellipsis (like: texttr...ing).
}
/**
Specify the copy mode of a Bitmap
*/
enum BitmapCopyMode
{
normal = SRCCOPY, /// Standard Copy.
invert = SRCINVERT, /// Copy Inverted.
and = SRCAND, /// Copy using _AND operator (Source _AND Destination).
or = SRCPAINT, /// Copy using _OR operator (Source _OR Destination).
}
/**
It rappresentes a color of a bitmap.
*/
struct BitmapBit
{
union
{
ubyte rgbBlue;
ubyte blue; /// Blue color.
}
union
{
ubyte rgbGreen;
ubyte green; /// Green color.
}
union
{
ubyte rgbRed;
ubyte red; /// Red color.
}
union
{
ubyte rgbReserved;
ubyte alpha; /// Alpha channel (if available).
}
}
/**
This structure allows direct modification of a bitmap
*/
struct BitmapData
{
BITMAPINFO* info; /// BITMAPINFO structure (usually, it is used internally).
uint imageSize; /// The size of the _Bitmap.
uint bitsCount; /// Number of BitmapBits structure of the _Bitmap (is the _Bits field length).
BitmapBit* bits; /// Pointer to the _Bitmap's bits (it allows direct modification of the colors)
}
/**
A _Color in ARGB format (compatible with COLORREF win32 type)
*/
struct Color
{
private bool _valid = false; // Check if it was assigned a value
public union
{
align(1) struct
{
ubyte red = 0x00;
ubyte green = 0x00;
ubyte blue = 0x00;
ubyte alpha = 0x00; //0x00: Transparent (or Don't Care), 0xFF: Opaque
}
COLORREF colorref; /// Compatibility with COLORREF type
}
/// Checks if the color information is _valid.
@property public final bool valid()
{
return this._valid;
}
public static Color opCall(ubyte r, ubyte g, ubyte b)
{
return Color(0x00, r, g, b);
}
public static Color opCall(ubyte a, ubyte r, ubyte g, ubyte b)
{
Color color = void; //Inializzata sotto;
color._valid = true;
color.alpha = a;
color.red = r;
color.green = g;
color.blue = b;
return color;
}
/// Returns an invalid color
public static Color invalid()
{
static Color color;
//color._valid = false; //Set valid to false (false = default value)
return color;
}
/// Given a COLORREF, it returns a _Color object
public static Color fromCOLORREF(COLORREF cref)
{
Color color = void;
color._valid = true;
color.colorref = cref;
return color;
}
}
struct FontMetrics
{
int height;
int ascent;
int descent;
int internalLeading;
int externalLeading;
int averageCharWidth;
int maxCharWidth;
}
/**
The _Canvas object is the DGui's rappresentation of a Device Context (Screen DC, Memory DC and Printer DC)
$(DDOC_BLANKLINE)
$(B Note): Printer DC is not implemented
*/
class Canvas: Handle!(HDC), IDisposable
{
private alias extern(Windows) BOOL function(HDC, int, int, int, int, HDC, int, int, int, int, UINT) GdiTransparentBltProc;
private alias extern(Windows) BOOL function(HDC, int, int, int, int, HDC, int, int, int, int, BLENDFUNCTION) GdiAlphaBlendProc;
private alias extern(Windows) BOOL function(HDC, TRIVERTEX*, ULONG, void*, ULONG, ULONG) GdiGradientFillProc;
private static GdiTransparentBltProc _gdiTransparentBlt = null;
private static GdiAlphaBlendProc _gdiAlphaBlend = null;
private static GdiGradientFillProc _gdiGradientFill = null;
private enum CanvasType: ubyte
{
normal = 0,
fromControl = 1,
inMemory = 2,
}
private CanvasType _canvasType = CanvasType.normal;
private HBITMAP _hBitmap;
private bool _owned;
protected this(HDC hdc, bool owned, CanvasType type)
{
this._handle = hdc;
this._owned = owned;
this._canvasType = type;
}
public ~this()
{
this.dispose();
}
public void copyTo(Canvas c, BitmapCopyMode bcm, Rect destRect, Point posSrc)
{
BITMAP bmp;
if(!destRect.width && destRect.height)
{
GetObjectW(GetCurrentObject(this._handle, OBJ_BITMAP), BITMAP.sizeof, &bmp);
}
BitBlt(c.handle, destRect.x, destRect.y,
destRect.width ? destRect.width : bmp.bmWidth,
destRect.height ? destRect.height : bmp.bmHeight,
this._handle, posSrc.x, posSrc.y, bcm);
}
public void copyTo(Canvas c, Rect destRect, Point posSrc)
{
this.copyTo(c, BitmapCopyMode.normal, destRect, posSrc);
}
public void copyTo(Canvas c, BitmapCopyMode bcm, Rect destRect)
{
this.copyTo(c, bcm, destRect, nullPoint);
}
public void copyTo(Canvas c, BitmapCopyMode bcm)
{
this.copyTo(c, bcm, nullRect, nullPoint);
}
public void copyTo(Canvas c)
{
this.copyTo(c, BitmapCopyMode.normal);
}
public void copyTransparent(Canvas c, Color transpColor)
{
this.copyTransparent(c, transpColor, nullRect);
}
public void copyTransparent(Canvas c, Color transpColor, Rect r)
{
if(!_gdiTransparentBlt)
{
_gdiTransparentBlt = cast(GdiTransparentBltProc)GetProcAddress(getModuleHandle("gdi32.dll"), toStringz("GdiTransparentBlt"));
}
BITMAP bmp;
HBITMAP hBitmap = GetCurrentObject(this._handle, OBJ_BITMAP);
GetObjectW(hBitmap, BITMAP.sizeof, &bmp);
if(r.empty)
{
r = Rect(0, 0, bmp.bmWidth, bmp.bmHeight);
}
_gdiTransparentBlt(c.handle, r.x, r.y, r.width, r.height, this._handle, 0, 0, bmp.bmWidth, bmp.bmHeight, transpColor.colorref);
}
public void dispose()
{
if(this._handle && this._owned)
{
switch(this._canvasType)
{
case CanvasType.fromControl:
ReleaseDC(WindowFromDC(this._handle), this._handle);
break;
case CanvasType.inMemory:
DeleteObject(this._hBitmap);
DeleteDC(this._handle);
break;
default:
break;
}
this._handle = null;
}
}
public static Size measureString(string s, Canvas c, Font f)
{
Size sz;
HFONT hOldFont = f ? SelectObject(c.handle, f.handle) : null;
GetTextExtentPoint32W(c.handle, toUTFz!(wchar*)(s), s.length, &sz.size);
if(f)
{
SelectObject(c.handle, hOldFont);
}
return sz;
}
public static Size measureString(string s, Canvas c)
{
return Canvas.measureString(s, c, null);
}
public static Size measureString(string s, Font f)
{
scope Canvas c = Screen.canvas;
return Canvas.measureString(s, c, f);
}
public static Size measureString(string s)
{
scope Canvas c = Screen.canvas;
return Canvas.measureString(s, c, SystemFonts.windowsFont);
}
public final void fillRectGradient(Rect r, Color startColor, Color endColor, GradientFillRectMode gfrm)
{
if(!_gdiGradientFill)
{
_gdiGradientFill = cast(GdiGradientFillProc)GetProcAddress(getModuleHandle("gdi32.dll"), toStringz("GdiGradientFill"));
}
TRIVERTEX[2] tv;
static GRADIENT_RECT gr = {UpperLeft: 0, LowerRight: 1};
tv[0].x = r.left;
tv[0].y = r.top;
tv[0].Red = startColor.red << 8;
tv[0].Green = startColor.green << 8;
tv[0].Blue = startColor.blue << 8;
tv[0].Alpha = startColor.alpha << 8;
tv[1].x = r.right;
tv[1].y = r.bottom;
tv[1].Red = endColor.red << 8;
tv[1].Green = endColor.green << 8;
tv[1].Blue = endColor.blue << 8;
tv[1].Alpha = endColor.alpha << 8;
_gdiGradientFill(this._handle, tv.ptr, 2, &gr, 1, gfrm);
}
public final void fillTriangleGradient(int x1, int y1, int x2, int y2, int x3, int y3, Color color1, Color color2, Color color3)
{
this.fillTriangleGradient(Point(x1, y1), Point(x2, y2), Point(x3, y3), color1, color2, color3);
}
public final void fillTriangleGradient(Point pt1, Point pt2, Point pt3, Color color1, Color color2, Color color3)
{
if(!_gdiGradientFill)
{
_gdiGradientFill = cast(GdiGradientFillProc)GetProcAddress(getModuleHandle("gdi32.dll"), toStringz("GdiGradientFill"));
}
TRIVERTEX[3] tv;
static GRADIENT_TRIANGLE gt = {Vertex1: 0, Vertex2: 1, Vertex3: 2};
tv[0].x = pt1.x;
tv[0].y = pt1.y;
tv[0].Red = color1.red << 8;
tv[0].Green = color1.green << 8;
tv[0].Blue = color1.blue << 8;
tv[0].Alpha = color1.alpha << 8;
tv[1].x = pt2.x;
tv[1].y = pt2.y;
tv[1].Red = color2.red << 8;
tv[1].Green = color2.green << 8;
tv[1].Blue = color2.blue << 8;
tv[1].Alpha = color2.alpha << 8;
tv[2].x = pt3.x;
tv[2].y = pt3.y;
tv[2].Red = color3.red << 8;
tv[2].Green = color3.green << 8;
tv[2].Blue = color3.blue << 8;
tv[2].Alpha = color3.alpha << 8;
_gdiGradientFill(this._handle, tv.ptr, 3, >, 1, 2 /* GRADIENT_FILL_TRIANGLE */);
}
public final void drawImage(Image img, Point upLeft, Point upRight, Point lowLeft)
{
this.drawImage(img, 0, 0, upLeft, upRight, lowLeft);
}
public final void drawImage(Image img, int x, int y, Point upLeft, Point upRight, Point lowLeft)
{
POINT[3] pts;
pts[0] = upLeft.point;
pts[1] = upRight.point;
pts[2] = lowLeft.point;
Size sz = img.size;
HDC hdc = CreateCompatibleDC(this._handle);
HBITMAP hOldBitmap = SelectObject(hdc, img.handle);
PlgBlt(this._handle, pts.ptr, hdc, x, y, sz.width, sz.height, null, 0, 0);
SelectObject(hdc, hOldBitmap);
DeleteDC(hdc);
}
public final void drawImage(Image img, int x, int y)
{
Size sz = img.size;
switch(img.type)
{
case ImageType.bitmap:
HDC hdc = CreateCompatibleDC(this._handle);
HBITMAP hOldBitmap = SelectObject(hdc, img.handle);
BitBlt(this._handle, x, y, sz.width, sz.height, hdc, 0, 0, SRCCOPY);
SelectObject(hdc, hOldBitmap);
DeleteDC(hdc);
break;
case ImageType.iconOrCursor:
DrawIconEx(this._handle, x, y, img.handle, sz.width, sz.height, 0, null, DI_NORMAL);
break;
default:
break;
}
}
public final void drawImage(Image img, Rect r)
{
Size sz = img.size;
switch(img.type)
{
case ImageType.bitmap:
HDC hdc = CreateCompatibleDC(this._handle);
HBITMAP hOldBitmap = SelectObject(hdc, img.handle);
StretchBlt(this._handle, r.x, r.y, r.width, r.height, hdc, 0, 0, sz.width, sz.height, SRCCOPY);
SelectObject(hdc, hOldBitmap);
DeleteDC(hdc);
break;
case ImageType.iconOrCursor:
DrawIconEx(this._handle, r.x, r.y, img.handle, r.width, r.height, 0, null, DI_NORMAL);
break;
default:
break;
}
}
public final void drawFrameControl(Rect r, FrameType frameType, FrameMode frameMode)
{
DrawFrameControl(this._handle, &r.rect, frameType, frameMode);
}
public final void drawEdge(Rect r, EdgeType edgeType, EdgeMode edgeMode)
{
DrawEdge(this._handle, &r.rect, edgeType, edgeMode);
}
public final void drawText(string text, Rect r, Color foreColor, Font font, TextFormat textFormat)
{
DRAWTEXTPARAMS dtp;
dtp.cbSize = DRAWTEXTPARAMS.sizeof;
dtp.iLeftMargin = textFormat.leftMargin;
dtp.iRightMargin = textFormat.rightMargin;
dtp.iTabLength = textFormat.tabLength;
HFONT hOldFont = SelectObject(this._handle, font.handle);
COLORREF oldColorRef = SetTextColor(this._handle, foreColor.colorref);
int oldBkMode = SetBkMode(this._handle, TRANSPARENT);
drawTextEx(this._handle, text, &r.rect,
DT_EXPANDTABS | DT_TABSTOP | textFormat.formatFlags | textFormat.alignment | textFormat.trimming,
&dtp);
SetBkMode(this._handle, oldBkMode);
SetTextColor(this._handle, oldColorRef);
SelectObject(this._handle, hOldFont);
}
public final void drawText(string text, Rect r, Color foreColor, Font font)
{
scope TextFormat tf = new TextFormat(TextFormatFlags.noPrefix | TextFormatFlags.wordBreak |
TextFormatFlags.noClip | TextFormatFlags.lineLimit);
tf.trimming = TextTrimming.none;
this.drawText(text, r, foreColor, font, tf);
}
public final void drawText(string text, Rect r, Color foreColor)
{
scope Font f = Font.fromHFONT(GetCurrentObject(this._handle, OBJ_FONT), false);
this.drawText(text, r, foreColor, f);
}
public final void drawText(string text, Rect r, Font f, TextFormat tf)
{
this.drawText(text, r, Color.fromCOLORREF(GetTextColor(this._handle)), f, tf);
}
public final void drawText(string text, Rect r, TextFormat tf)
{
scope Font f = Font.fromHFONT(GetCurrentObject(this._handle, OBJ_FONT), false);
this.drawText(text, r, Color.fromCOLORREF(GetTextColor(this._handle)), f, tf);
}
public final void drawText(string text, Rect r, Font f)
{
this.drawText(text, r, Color.fromCOLORREF(GetTextColor(this._handle)), f);
}
public final void drawText(string text, Rect r)
{
scope Font f = Font.fromHFONT(GetCurrentObject(this._handle, OBJ_FONT), false);
this.drawText(text, r, Color.fromCOLORREF(GetTextColor(this._handle)), f);
}
public final void drawLine(Pen p, int x1, int y1, int x2, int y2)
{
HPEN hOldPen = SelectObject(this._handle, p.handle);
MoveToEx(this._handle, x1, y1, null);
LineTo(this._handle, x2, y2);
SelectObject(this._handle, hOldPen);
}
public final void drawEllipse(Pen pen, Brush fill, Rect r)
{
HPEN hOldPen;
HBRUSH hOldBrush;
if(pen)
{
hOldPen = SelectObject(this._handle, pen.handle);
}
if(fill)
{
hOldBrush = SelectObject(this._handle, fill.handle);
}
Ellipse(this._handle, r.left, r.top, r.right, r.bottom);
if(hOldBrush)
{
SelectObject(this._handle, hOldBrush);
}
if(hOldPen)
{
SelectObject(this._handle, hOldPen);
}
}
public final void drawEllipse(Pen pen, Rect r)
{
this.drawEllipse(pen, SystemBrushes.nullBrush, r);
}
public final void drawRectangle(Pen pen, Brush fill, Rect r)
{
HPEN hOldPen;
HBRUSH hOldBrush;
if(pen)
{
hOldPen = SelectObject(this._handle, pen.handle);
}
if(fill)
{
hOldBrush = SelectObject(this._handle, fill.handle);
}
Rectangle(this._handle, r.left, r.top, r.right, r.bottom);
if(hOldBrush)
{
SelectObject(this._handle, hOldBrush);
}
if(hOldPen)
{
SelectObject(this._handle, hOldPen);
}
}
public final void drawRectangle(Pen pen, Rect r)
{
this.drawRectangle(pen, SystemBrushes.nullBrush, r);
}
public final void fillRectangle(Brush b, Rect r)
{
FillRect(this._handle, &r.rect, b.handle);
}
public final void fillEllipse(Brush b, Rect r)
{
this.drawEllipse(SystemPens.nullPen, b, r);
}
public final Canvas createInMemory(Bitmap b)
{
HDC hdc = CreateCompatibleDC(this._handle);
Canvas c = new Canvas(hdc, true, CanvasType.inMemory);
if(!b)
{
Rect r;
HWND hWnd = WindowFromDC(this._handle);
if(hWnd)
{
GetClientRect(hWnd, &r.rect);
}
else // Try with bitmap's size
{
BITMAP bmp;
HBITMAP hOrgBitmap = GetCurrentObject(this._handle, OBJ_BITMAP);
GetObjectW(hOrgBitmap, BITMAP.sizeof, &bmp);
assert(bmp.bmWidth > 0 && bmp.bmHeight > 0, "Bitmap zero size");
r = Rect(0, 0, bmp.bmWidth, bmp.bmHeight);
}
HBITMAP hBitmap = CreateCompatibleBitmap(this._handle, r.width, r.height);
c._hBitmap = hBitmap;
SelectObject(hdc, hBitmap); // Destroyed by Mem Canvas Object
}
else
{
SelectObject(hdc, b.handle); // This bitmap is not destroyed because the Bitmap object own his HBITMAP
}
return c;
}
public final Canvas createInMemory()
{
return this.createInMemory(null);
}
public static Canvas fromHDC(HDC hdc, bool owned = true)
{
return new Canvas(hdc, owned, CanvasType.fromControl);
}
}
abstract class GraphicObject: Handle!(HGDIOBJ), IDisposable
{
protected bool _owned;
protected this()
{
}
protected this(HGDIOBJ hGdiObj, bool owned)
{
this._handle = hGdiObj;
this._owned = owned;
}
public ~this()
{
this.dispose();
}
protected static int getInfo(T)(HGDIOBJ hGdiObj, ref T t)
{
return GetObjectW(hGdiObj, T.sizeof, &t);
}
public void dispose()
{
if(this._handle && this._owned)
{
DeleteObject(this._handle);
this._handle = null;
}
}
}
abstract class Image: GraphicObject
{
protected this()
{
}
@property public abstract Size size();
@property public abstract ImageType type();
protected this(HGDIOBJ hGdiObj, bool owned)
{
super(hGdiObj, owned);
}
}
class Bitmap: Image
{
public this(Size sz)
{
HBITMAP hBitmap = this.createBitmap(sz.width, sz.height, RGB(0xFF, 0xFF, 0xFF));
super(hBitmap, true);
}
public this(Size sz, Color bc)
{
HBITMAP hBitmap = this.createBitmap(sz.width, sz.height, bc.colorref);
super(hBitmap, true);
}
public this(int w, int h)
{
HBITMAP hBitmap = this.createBitmap(w, h, RGB(0xFF, 0xFF, 0xFF));
super(hBitmap, true);
}
public this(int w, int h, Color bc)
{
HBITMAP hBitmap = this.createBitmap(w, h, bc.colorref);
super(hBitmap, true);
}
protected this(HBITMAP hBitmap, bool owned)
{
super(hBitmap, owned);
}
protected this(string fileName)
{
HBITMAP hBitmap = loadImage(null, fileName, IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR | LR_DEFAULTSIZE | LR_LOADFROMFILE);
if(!hBitmap)
{
throwException!(Win32Exception)("Cannot load Bitmap From File: '%s'", fileName);
}
super(hBitmap, true);
}
private static HBITMAP createBitmap(int w, int h, COLORREF backColor)
{
Rect r = Rect(0, 0, w, h);
HDC hdc = GetWindowDC(null);
HDC hcdc = CreateCompatibleDC(hdc);
HBITMAP hBitmap = CreateCompatibleBitmap(hdc, w, h);
HBITMAP hOldBitmap = SelectObject(hcdc, hBitmap);
HBRUSH hBrush = CreateSolidBrush(backColor);
FillRect(hcdc, &r.rect, hBrush);
DeleteObject(hBrush);
SelectObject(hcdc, hOldBitmap);
DeleteDC(hcdc);
ReleaseDC(null, hdc);
return hBitmap;
}
/*
* !!! Is this procedure useful? !!!
*
public Bitmap alphaBlend(ubyte alpha)
{
if(!_gdiAlphaBlend)
{
_gdiAlphaBlend = cast(GdiAlphaBlendProc)GetProcAddress(getModuleHandle("gdi32.dll"), toStringz("GdiAlphaBlend"));
}
BITMAP b;
getInfo!(BITMAP)(this._handle, b);
HDC hdc = GetWindowDC(null);
HDC hdc1 = CreateCompatibleDC(hdc);
HDC hdc2 = CreateCompatibleDC(hdc);
HBITMAP hBitmap = CreateCompatibleBitmap(hdc, b.bmWidth, b.bmHeight);
HBITMAP hOldBitmap1 = SelectObject(hdc1, hBitmap);
HBITMAP hOldBitmap2 = SelectObject(hdc2, this._handle);
BLENDFUNCTION bf;
bf.BlendOp = 0; // AC_SRC_OVER
bf.SourceConstantAlpha = alpha;
if(b.bmBitsPixel == 32) // Premultiply bits if Bitmap's bpp = 32bpp
{
BitmapData bd;
Bitmap.getData(hBitmap, bd);
for(int i = 0; i < bd.bitsCount; i++)
{
bd.bits[i].red = cast(ubyte)(bd.bits[i].red * (alpha / 0xFF));
bd.bits[i].green = cast(ubyte)(bd.bits[i].green * (alpha / 0xFF));
bd.bits[i].blue = cast(ubyte)(bd.bits[i].blue * (alpha / 0xFF));
}
Bitmap.setData(hBitmap, bd);
bf.AlphaFormat = 1; // AC_SRC_ALPHA
}
_gdiAlphaBlend(hdc1, 0, 0, b.bmWidth, b.bmHeight, hdc2, 0, 0, b.bmWidth, b.bmHeight, bf);
SelectObject(hdc2, hOldBitmap2);
SelectObject(hdc1, hOldBitmap1);
DeleteDC(hdc2);
DeleteDC(hdc1);
ReleaseDC(null, hdc);
return Bitmap.fromHBITMAP(hBitmap);
}
*/
public Bitmap clone()
{
BITMAP b;
getInfo!(BITMAP)(this._handle, b);
HDC hdc = GetDC(null);
HDC hcdc1 = CreateCompatibleDC(hdc); // Contains this bitmap
HDC hcdc2 = CreateCompatibleDC(hdc); // The Bitmap will be copied here
HBITMAP hBitmap = CreateCompatibleBitmap(hdc, b.bmWidth, b.bmHeight); //Don't delete it, it will be deleted by the class Bitmap
HBITMAP hOldBitmap1 = SelectObject(hcdc1, this._handle);
HBITMAP hOldBitmap2 = SelectObject(hcdc2, hBitmap);
BitBlt(hcdc2, 0, 0, b.bmWidth, b.bmHeight, hcdc1, 0, 0, SRCCOPY);
SelectObject(hcdc2, hOldBitmap2);
SelectObject(hcdc1, hOldBitmap1);
DeleteDC(hcdc2);
DeleteDC(hcdc1);
ReleaseDC(null, hdc);
Bitmap bmp = new Bitmap(hBitmap, true);
return bmp;
}
public static void getData(HBITMAP hBitmap, ref BitmapData bd)
{
BITMAPINFO bi;
bi.bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bi.bmiHeader.biBitCount = 0;
HDC hdc = GetWindowDC(null);
GetDIBits(hdc, hBitmap, 0, 0, null, &bi, DIB_RGB_COLORS); // Get Bitmap Info
bd.imageSize = bi.bmiHeader.biSizeImage;
bd.bitsCount = bi.bmiHeader.biSizeImage / RGBQUAD.sizeof;
bd.bits = cast(BitmapBit*)GC.malloc(bi.bmiHeader.biSizeImage);
switch(bi.bmiHeader.biBitCount) // Calculate color table size (if needed)
{
case 24:
bd.info = cast(BITMAPINFO*)GC.malloc(bi.bmiHeader.biSize);
break;
case 16, 32:
bd.info = cast(BITMAPINFO*)GC.malloc(bi.bmiHeader.biSize + uint.sizeof * 3); // Needs Investigation
break;
default:
bd.info = cast(BITMAPINFO*)GC.malloc(bi.bmiHeader.biSize + RGBQUAD.sizeof * (1 << bi.bmiHeader.biBitCount));
break;
}
bd.info.bmiHeader = bi.bmiHeader;
GetDIBits(hdc, hBitmap, 0, bd.info.bmiHeader.biHeight, cast(RGBQUAD*)bd.bits, bd.info, DIB_RGB_COLORS);
ReleaseDC(null, hdc);
}
public void getData(ref BitmapData bd)
{
return Bitmap.getData(this._handle, bd);
}
private static void setData(HBITMAP hBitmap, ref BitmapData bd)
{
HDC hdc = GetWindowDC(null);
SetDIBits(hdc, hBitmap, 0, bd.info.bmiHeader.biHeight, cast(RGBQUAD*)bd.bits, bd.info, DIB_RGB_COLORS);
ReleaseDC(null, hdc);
Bitmap.freeData(bd);
}
public void setData(ref BitmapData bd)
{
setData(this._handle, bd);
}
public static void freeData(ref BitmapData bd)
{
GC.free(bd.bits);
GC.free(bd.info);
}
@property public override Size size()
{
BITMAP bmp = void; //Inizializzata da getInfo()
getInfo!(BITMAP)(this._handle, bmp);
return Size(bmp.bmWidth, bmp.bmHeight);
}
@property public override ImageType type()
{
return ImageType.bitmap;
}
public static Bitmap fromHBITMAP(HBITMAP hBitmap, bool owned = true)
{
return new Bitmap(hBitmap, owned);
}
public static Bitmap fromFile(string fileName)
{
return new Bitmap(fileName);
}
}
class Icon: Image
{
protected this(HICON hIcon, bool owned)
{
super(hIcon, owned);
}
protected this(string fileName)
{
HICON hIcon;
if(!icmp(std.path.extension(fileName), ".ico"))
{
hIcon = loadImage(null, fileName, IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR | LR_DEFAULTSIZE | LR_LOADFROMFILE);
}
else
{
ushort dummy = 0;
hIcon = extractAssociatedIcon(fileName, &dummy);
}
if(!hIcon)
{
throwException!(Win32Exception)("Cannot load Icon From File: '%s'", fileName);
}
super(hIcon, true);
}
public override void dispose()
{
if(this._handle && this._owned)
{
DestroyIcon(this._handle); // Use DestroyIcon() not DestroyObject()
}
}
@property public override Size size()
{
ICONINFO ii = void; //Inizializzata da GetIconInfo()
BITMAP bmp = void; //Inizializzata da getInfo()
Size sz = void; //Inizializzata sotto.
if(!GetIconInfo(this._handle, &ii))
{
throwException!(Win32Exception)("Unable to get information from Icon");
}
if(ii.hbmColor) //Exists: Icon Color Bitmap
{
if(!getInfo!(BITMAP)(ii.hbmColor, bmp))
{
throwException!(Win32Exception)("Unable to get Icon Color Bitmap");
}
sz.width = bmp.bmWidth;
sz.height = bmp.bmHeight;
DeleteObject(ii.hbmColor);
}
else
{
if(!getInfo!(BITMAP)(ii.hbmMask, bmp))
{
throwException!(Win32Exception)("Unable to get Icon Mask");
}
sz.width = bmp.bmWidth;
sz.height = bmp.bmHeight / 2;
}
DeleteObject(ii.hbmMask);
return sz;
}
@property public override ImageType type()
{
return ImageType.iconOrCursor;
}
public Bitmap toBitmap(Size sz)
{
HDC hwdc = GetWindowDC(null);
HDC hdc1 = CreateCompatibleDC(hwdc);
HBITMAP hBitmap = CreateCompatibleBitmap(hwdc, sz.width, sz.height);
HBITMAP hOldBitmap = SelectObject(hdc1, hBitmap);
Rect r = Rect(nullPoint, sz);
HBRUSH hBrush = CreateSolidBrush(RGB(255, 255, 255));
FillRect(hdc1, &r.rect, hBrush);
DeleteObject(hBrush);
DrawIconEx(hdc1, 0, 0, this._handle, sz.width, sz.height, 0, null, DI_NORMAL);
SelectObject(hdc1, hOldBitmap);
DeleteDC(hdc1);
ReleaseDC(null, hwdc);
return Bitmap.fromHBITMAP(hBitmap);
}
public Bitmap toBitmap()
{
Size sz = this.size;
return this.toBitmap(sz);
}
public static Icon fromHICON(HICON hIcon, bool owned = true)
{
return new Icon(hIcon, owned);
}
public static Icon fromFile(string fileName)
{
return new Icon(fileName);
}
}
final class Cursor: Icon
{
protected this(HCURSOR hCursor, bool owned)
{
super(hCursor, owned);
}
public override void dispose()
{
if(this._handle && this._owned)
{
DestroyCursor(this._handle); // Use DestroyCursor() not DestroyObject()
}
}
@property public static Point position()
{
Point pt;
GetCursorPos(&pt.point);
return pt;
}
public static Cursor fromHCURSOR(HCURSOR hCursor, bool owned = true)
{
return new Cursor(hCursor, owned);
}
}
final class Font: GraphicObject
{
private static int _logPixelSY = 0;
private bool _metricsDone = false;
private FontMetrics _metrics;
private this(HFONT hFont, bool owned)
{
super(hFont, owned);
}
private static void initLogPixelSY()
{
if(!_logPixelSY)
{
HDC hdc = GetWindowDC(null);
_logPixelSY = GetDeviceCaps(hdc, LOGPIXELSY);
ReleaseDC(null, hdc);
}
}
public this(string name, int h, FontStyle style = FontStyle.normal)
{
Font.initLogPixelSY();
LOGFONTW lf;
lf.lfHeight = -MulDiv(h, _logPixelSY, 72);
doStyle(style, lf);
this._handle = createFontIndirect(name, &lf);
}
public this(Font f, FontStyle fs)
{
LOGFONTW lf;
getInfo!(LOGFONTW)(f.handle, lf);
doStyle(fs, lf);
this._handle = createFontIndirect(&lf);
}
@property public string name()
{
LOGFONTW lf;
getInfo!(LOGFONTW)(this._handle, lf);
int idx = indexOf(lf.lfFaceName, '\0');
return to!(string)(lf.lfFaceName[0..idx]);
}
@property public int height()
{
LOGFONTW lf;
Font.initLogPixelSY();
getInfo!(LOGFONTW)(this._handle, lf);
return -MulDiv(72, lf.lfHeight, _logPixelSY);
}
@property public FontMetrics metrics()
{
if(!this._metricsDone)
{
TEXTMETRICW tm;
HDC hdc = CreateCompatibleDC(null);
HFONT hOldFont = SelectObject(hdc, this._handle);
GetTextMetricsW(hdc, &tm);
SelectObject(hdc, hOldFont);
DeleteDC(hdc);
this._metrics.height = tm.tmHeight;
this._metrics.ascent = tm.tmAscent;
this._metrics.descent = tm.tmDescent;
this._metrics.internalLeading = tm.tmInternalLeading;
this._metrics.externalLeading = tm.tmExternalLeading;
this._metrics.averageCharWidth = tm.tmAveCharWidth;
this._metrics.maxCharWidth = tm.tmMaxCharWidth;
this._metricsDone = true;
}
return this._metrics;
}
private static void doStyle(FontStyle style, ref LOGFONTW lf)
{
lf.lfCharSet = DEFAULT_CHARSET;
lf.lfWeight = FW_NORMAL;
//lf.lfItalic = FALSE; Inizializzata dal compilatore
//lf.lfStrikeOut = FALSE; Inizializzata dal compilatore
//lf.lfUnderline = FALSE; Inizializzata dal compilatore
if(style & FontStyle.bold)
{
lf.lfWeight = FW_BOLD;
}
if(style & FontStyle.italic)
{
lf.lfItalic = 1;
}
if(style & FontStyle.strikeout)
{
lf.lfStrikeOut = 1;
}
if(style & FontStyle.underline)
{
lf.lfUnderline = 1;
}
}
public static Font fromHFONT(HFONT hFont, bool owned = true)
{
return new Font(hFont, owned);
}
}
abstract class Brush: GraphicObject
{
protected this(HBRUSH hBrush, bool owned)
{
super(hBrush, owned);
}
}
class SolidBrush: Brush
{
private Color _color;
protected this(HBRUSH hBrush, bool owned)
{
super(hBrush, owned);
}
public this(Color color)
{
this._color = color;
super(CreateSolidBrush(color.colorref), true);
}
@property public final Color color()
{
return this._color;
}
public static SolidBrush fromHBRUSH(HBRUSH hBrush, bool owned = true)
{
return new SolidBrush(hBrush, owned);
}
}
class HatchBrush: Brush
{
private Color _color;
private HatchStyle _style;
protected this(HBRUSH hBrush, bool owned)
{
super(hBrush, owned);
}
public this(Color color, HatchStyle style)
{
this._color = color;
this._style = style;
super(CreateHatchBrush(style, color.colorref), true);
}
@property public final Color color()
{
return this._color;
}
@property public final HatchStyle style()
{
return this._style;
}
public static HatchBrush fromHBRUSH(HBRUSH hBrush, bool owned = true)
{
return new HatchBrush(hBrush, owned);
}
}
class PatternBrush: Brush
{
private Bitmap _bmp;
protected this(HBRUSH hBrush, bool owned)
{
super(hBrush, owned);
}
public this(Bitmap bmp)
{
this._bmp = bmp;
super(CreatePatternBrush(bmp.handle), true);
}
@property public final Bitmap bitmap()
{
return this._bmp;
}
public static PatternBrush fromHBRUSH(HBRUSH hBrush, bool owned = true)
{
return new PatternBrush(hBrush, owned);
}
}
final class Pen: GraphicObject
{
private PenStyle _style;
private Color _color;
private int _width;
protected this(HPEN hPen, bool owned)
{
super(hPen, owned);
}
public this(Color color, int width = 1, PenStyle style = PenStyle.solid)
{
this._color = color;
this._width = width;
this._style = style;
this._handle = CreatePen(style, width, color.colorref);
super(this._handle, true);
}
@property public PenStyle style()
{
return this._style;
}
@property public int width()
{
return this._width;
}
@property public Color color()
{
return this._color;
}
public static Pen fromHPEN(HPEN hPen, bool owned = true)
{
return new Pen(hPen, owned);
}
}
final class SystemPens
{
@property public static Pen nullPen()
{
return Pen.fromHPEN(GetStockObject(NULL_PEN), false);
}
@property public static Pen blackPen()
{
return Pen.fromHPEN(GetStockObject(BLACK_PEN), false);
}
@property public static Pen whitePen()
{
return Pen.fromHPEN(GetStockObject(WHITE_PEN), false);
}
}
final class SystemIcons
{
@property public static Icon application()
{
static Icon ico;
if(!ico)
{
HICON hIco = loadImage(null, cast(wchar*)IDI_APPLICATION, IMAGE_ICON, 0, 0, LR_SHARED | LR_DEFAULTCOLOR | LR_DEFAULTSIZE);
ico = Icon.fromHICON(hIco);
}
return ico;
}
@property public static Icon asterisk()
{
static Icon ico;
if(!ico)
{
HICON hIco = loadImage(null, IDI_ASTERISK, IMAGE_ICON, 0, 0, LR_SHARED | LR_DEFAULTCOLOR | LR_DEFAULTSIZE);
ico = Icon.fromHICON(hIco);
}
return ico;
}
@property public static Icon error()
{
static Icon ico;
if(!ico)
{
HICON hIco = loadImage(null, IDI_ERROR, IMAGE_ICON, 0, 0, LR_SHARED | LR_DEFAULTCOLOR | LR_DEFAULTSIZE);
ico = Icon.fromHICON(hIco);
}
return ico;
}
@property public static Icon question()
{
static Icon ico;
if(!ico)
{
HICON hIco = loadImage(null, IDI_QUESTION, IMAGE_ICON, 0, 0, LR_SHARED | LR_DEFAULTCOLOR | LR_DEFAULTSIZE);
ico = Icon.fromHICON(hIco);
}
return ico;
}
@property public static Icon warning()
{
static Icon ico;
if(!ico)
{
HICON hIco = loadImage(null, IDI_WARNING, IMAGE_ICON, 0, 0, LR_SHARED | LR_DEFAULTCOLOR | LR_DEFAULTSIZE);
ico = Icon.fromHICON(hIco);
}
return ico;
}
}
final class SystemBrushes
{
@property public static SolidBrush blackBrush()
{
return SolidBrush.fromHBRUSH(GetStockObject(BLACK_BRUSH), false);
}
@property public static SolidBrush darkGrayBrush()
{
return SolidBrush.fromHBRUSH(GetStockObject(DKGRAY_BRUSH), false);
}
@property public static SolidBrush grayBrush()
{
return SolidBrush.fromHBRUSH(GetStockObject(GRAY_BRUSH), false);
}
@property public static SolidBrush lightGrayBrush()
{
return SolidBrush.fromHBRUSH(GetStockObject(LTGRAY_BRUSH), false);
}
@property public static SolidBrush nullBrush()
{
return SolidBrush.fromHBRUSH(GetStockObject(NULL_BRUSH), false);
}
@property public static SolidBrush whiteBrush()
{
return SolidBrush.fromHBRUSH(GetStockObject(WHITE_BRUSH), false);
}
@property public static SolidBrush brush3DDarkShadow()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_3DDKSHADOW), false);
}
@property public static SolidBrush brush3DFace()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_3DFACE), false);
}
@property public static SolidBrush brushButtonFace()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_BTNFACE), false);
}
@property public static SolidBrush brush3DLight()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_3DLIGHT), false);
}
@property public static SolidBrush brush3DShadow()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_3DSHADOW), false);
}
@property public static SolidBrush brushActiveBorder()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_ACTIVEBORDER), false);
}
@property public static SolidBrush brushActiveCaption()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_3DLIGHT), false);
}
@property public static SolidBrush brushAppWorkspace()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_APPWORKSPACE), false);
}
@property public static SolidBrush brushBackground()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_BACKGROUND), false);
}
@property public static SolidBrush brushButtonText()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_BTNTEXT), false);
}
@property public static SolidBrush brushCaptionText()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_CAPTIONTEXT), false);
}
@property public static SolidBrush brushGrayText()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_GRAYTEXT), false);
}
@property public static SolidBrush brushHighlight()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_HIGHLIGHT), false);
}
@property public static SolidBrush brushHighlightText()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_HIGHLIGHTTEXT), false);
}
@property public static SolidBrush brushInactiveBorder()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_INACTIVEBORDER), false);
}
@property public static SolidBrush brushInactiveCaption()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_INACTIVECAPTION), false);
}
@property public static SolidBrush brushInactiveCaptionText()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_INACTIVECAPTIONTEXT), false);
}
@property public static SolidBrush brushInfo()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_INFOBK), false);
}
@property public static SolidBrush brushInfoText()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_INFOTEXT), false);
}
@property public static SolidBrush brushMenu()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_MENU), false);
}
@property public static SolidBrush brushMenuText()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_MENUTEXT), false);
}
@property public static SolidBrush brushScrollBar()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_SCROLLBAR), false);
}
@property public static SolidBrush brushWindow()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_WINDOW), false);
}
@property public static SolidBrush brushWindowFrame()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_WINDOW), false);
}
@property public static SolidBrush brushWindowText()
{
return SolidBrush.fromHBRUSH(GetSysColorBrush(COLOR_WINDOWTEXT), false);
}
}
final class SystemFonts
{
@property public static Font windowsFont()
{
static Font f;
if(!f)
{
NONCLIENTMETRICSW ncm = void; //La inizializza sotto.
ncm.cbSize = NONCLIENTMETRICSW.sizeof;
if(SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, NONCLIENTMETRICSW.sizeof, &ncm, 0))
{
f = Font.fromHFONT(createFontIndirect(&ncm.lfMessageFont), false);
}
else
{
f = SystemFonts.ansiVarFont;
}
}
return f;
}
@property public static Font ansiFixedFont()
{
static Font f;
if(!f)
{
f = Font.fromHFONT(GetStockObject(ANSI_FIXED_FONT), false);
}
return f;
}
@property public static Font ansiVarFont()
{
static Font f;
if(!f)
{
f = Font.fromHFONT(GetStockObject(ANSI_VAR_FONT), false);
}
return f;
}
@property public static Font deviceDefaultFont()
{
static Font f;
if(!f)
{
f = Font.fromHFONT(GetStockObject(DEVICE_DEFAULT_FONT), false);
}
return f;
}
@property public static Font oemFixedFont()
{
static Font f;
if(!f)
{
f = Font.fromHFONT(GetStockObject(OEM_FIXED_FONT), false);
}
return f;
}
@property public static Font systemFont()
{
static Font f;
if(!f)
{
f = Font.fromHFONT(GetStockObject(SYSTEM_FONT), false);
}
return f;
}
@property public static Font systemFixedFont()
{
static Font f;
if(!f)
{
f = Font.fromHFONT(GetStockObject(SYSTEM_FIXED_FONT), false);
}
return f;
}
}
final class SystemCursors
{
@property public static Cursor appStarting()
{
static Cursor c;
if(!c)
{
c = Cursor.fromHCURSOR(loadImage(getHInstance(), IDC_APPSTARTING, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_DEFAULTCOLOR | LR_SHARED), false);
}
return c;
}
@property public static Cursor arrow()
{
static Cursor c;
if(!c)
{
c = Cursor.fromHCURSOR(loadImage(null, IDC_ARROW, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_DEFAULTCOLOR | LR_SHARED), false);
}
return c;
}
@property public static Cursor cross()
{
static Cursor c;
if(!c)
{
c = Cursor.fromHCURSOR(loadImage(null, cast(wchar*)IDC_CROSS, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_DEFAULTCOLOR | LR_SHARED), false);
}
return c;
}
@property public static Cursor iBeam()
{
static Cursor c;
if(!c)
{
c = Cursor.fromHCURSOR(loadImage(null, IDC_IBEAM, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_DEFAULTCOLOR | LR_SHARED), false);
}
return c;
}
@property public static Cursor icon()
{
static Cursor c;
if(!c)
{
c = Cursor.fromHCURSOR(loadImage(null, IDC_ICON, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_DEFAULTCOLOR | LR_SHARED), false);
}
return c;
}
@property public static Cursor no()
{
static Cursor c;
if(!c)
{
c = Cursor.fromHCURSOR(loadImage(null, IDC_NO, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_DEFAULTCOLOR | LR_SHARED), false);
}
return c;
}
@property public static Cursor sizeAll()
{
static Cursor c;
if(!c)
{
c = Cursor.fromHCURSOR(loadImage(null, IDC_SIZEALL, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_DEFAULTCOLOR | LR_SHARED), false);
}
return c;
}
@property public static Cursor sizeNESW()
{
static Cursor c;
if(!c)
{
c = Cursor.fromHCURSOR(loadImage(null, IDC_SIZENESW, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_DEFAULTCOLOR | LR_SHARED), false);
}
return c;
}
@property public static Cursor sizeNS()
{
static Cursor c;
if(!c)
{
c = Cursor.fromHCURSOR(loadImage(null, IDC_SIZENS, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_DEFAULTCOLOR | LR_SHARED), false);
}
return c;
}
@property public static Cursor sizeNWSE()
{
static Cursor c;
if(!c)
{
c = Cursor.fromHCURSOR(loadImage(null, IDC_SIZENWSE, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_DEFAULTCOLOR | LR_SHARED), false);
}
return c;
}
@property public static Cursor sizeWE()
{
static Cursor c;
if(!c)
{
c = Cursor.fromHCURSOR(loadImage(null, IDC_SIZEWE, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_DEFAULTCOLOR | LR_SHARED), false);
}
return c;
}
@property public static Cursor upArrow()
{
static Cursor c;
if(!c)
{
c = Cursor.fromHCURSOR(loadImage(null, IDC_UPARROW, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_DEFAULTCOLOR | LR_SHARED), false);
}
return c;
}
@property public static Cursor wait()
{
static Cursor c;
if(!c)
{
c = Cursor.fromHCURSOR(loadImage(null, IDC_WAIT, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_DEFAULTCOLOR | LR_SHARED), false);
}
return c;
}
}
final class SystemColors
{
@property public static Color red()
{
return Color(0xFF, 0x00, 0x00);
}
@property public static Color green()
{
return Color(0x00, 0xFF, 0x00);
}
@property public static Color blue()
{
return Color(0x00, 0x00, 0xFF);
}
@property public static Color black()
{
return Color(0x00, 0x00, 0x00);
}
@property public static Color white()
{
return Color(0xFF, 0xFF, 0xFF);
}
@property public static Color yellow()
{
return Color(0xFF, 0xFF, 0x00);
}
@property public static Color magenta()
{
return Color(0xFF, 0x00, 0xFF);
}
@property public static Color magicPink()
{
return SystemColors.magenta; //Is 'Magic Pink'
}
@property public static Color cyan()
{
return Color(0x00, 0xFF, 0xFF);
}
@property public static Color darkGray()
{
return Color(0xA9, 0xA9, 0xA9);
}
@property public static Color lightGray()
{
return Color(0xD3, 0xD3, 0xD3);
}
@property public static Color darkRed()
{
return Color(0x8B, 0x00, 0x00);
}
@property public static Color darkGreen()
{
return Color(0x00, 0x64, 0x00);
}
@property public static Color darkBlue()
{
return Color(0x00, 0x00, 0x8B);
}
@property public static Color darkYellow()
{
return Color(0x00, 0x80, 0x80);
}
@property public static Color darkMagenta()
{
return Color(0x80, 0x00, 0x80);
}
@property public static Color darkCyan()
{
return Color(0x80, 0x80, 0x00);
}
@property public static Color transparent()
{
return Color(0x00, 0x00, 0x00, 0x00);
}
@property public static Color color3DDarkShadow()
{
return Color.fromCOLORREF(GetSysColor(COLOR_3DDKSHADOW));
}
@property public static Color color3DFace()
{
return Color.fromCOLORREF(GetSysColor(COLOR_3DFACE));
}
@property public static Color colorButtonFace()
{
return Color.fromCOLORREF(GetSysColor(COLOR_BTNFACE));
}
@property public static Color color3DLight()
{
return Color.fromCOLORREF(GetSysColor(COLOR_3DLIGHT));
}
@property public static Color color3DShadow()
{
return Color.fromCOLORREF(GetSysColor(COLOR_3DSHADOW));
}
@property public static Color colorActiveBorder()
{
return Color.fromCOLORREF(GetSysColor(COLOR_ACTIVEBORDER));
}
@property public static Color colorActiveCaption()
{
return Color.fromCOLORREF(GetSysColor(COLOR_3DLIGHT));
}
@property public static Color colorAppWorkspace()
{
return Color.fromCOLORREF(GetSysColor(COLOR_APPWORKSPACE));
}
@property public static Color colorBackground()
{
return Color.fromCOLORREF(GetSysColor(COLOR_BACKGROUND));
}
@property public static Color colorButtonText()
{
return Color.fromCOLORREF(GetSysColor(COLOR_BTNTEXT));
}
@property public static Color colorCaptionText()
{
return Color.fromCOLORREF(GetSysColor(COLOR_CAPTIONTEXT));
}
@property public static Color colorGrayText()
{
return Color.fromCOLORREF(GetSysColor(COLOR_GRAYTEXT));
}
@property public static Color colorHighlight()
{
return Color.fromCOLORREF(GetSysColor(COLOR_HIGHLIGHT));
}
@property public static Color colorHighlightText()
{
return Color.fromCOLORREF(GetSysColor(COLOR_HIGHLIGHTTEXT));
}
@property public static Color colorInactiveBorder()
{
return Color.fromCOLORREF(GetSysColor(COLOR_INACTIVEBORDER));
}
@property public static Color colorInactiveCaption()
{
return Color.fromCOLORREF(GetSysColor(COLOR_INACTIVECAPTION));
}
@property public static Color colorInactiveCaptionText()
{
return Color.fromCOLORREF(GetSysColor(COLOR_INACTIVECAPTIONTEXT));
}
@property public static Color colorInfo()
{
return Color.fromCOLORREF(GetSysColor(COLOR_INFOBK));
}
@property public static Color colorInfoText()
{
return Color.fromCOLORREF(GetSysColor(COLOR_INFOTEXT));
}
@property public static Color colorMenu()
{
return Color.fromCOLORREF(GetSysColor(COLOR_MENU));
}
@property public static Color colorMenuText()
{
return Color.fromCOLORREF(GetSysColor(COLOR_MENUTEXT));
}
@property public static Color colorScrollBar()
{
return Color.fromCOLORREF(GetSysColor(COLOR_SCROLLBAR));
}
@property public static Color colorWindow()
{
return Color.fromCOLORREF(GetSysColor(COLOR_WINDOW));
}
@property public static Color colorWindowFrame()
{
return Color.fromCOLORREF(GetSysColor(COLOR_WINDOW));
}
@property public static Color colorWindowText()
{
return Color.fromCOLORREF(GetSysColor(COLOR_WINDOWTEXT));
}
}
final class TextFormat
{
private TextTrimming _trim = TextTrimming.none; // TextTrimming.CHARACTER.
private TextFormatFlags _flags = TextFormatFlags.noPrefix | TextFormatFlags.wordBreak;
private TextAlignment _align = TextAlignment.left;
private DRAWTEXTPARAMS _params = {DRAWTEXTPARAMS.sizeof, 8, 0, 0};
public this()
{
}
public this(TextFormat tf)
{
this._trim = tf._trim;
this._flags = tf._flags;
this._align = tf._align;
this._params = tf._params;
}
public this(TextFormatFlags tff)
{
this._flags = tff;
}
@property public TextAlignment alignment()
{
return this._align;
}
@property public void alignment(TextAlignment ta)
{
this._align = ta;
}
@property public void formatFlags(TextFormatFlags tff)
{
this._flags = tff;
}
@property public TextFormatFlags formatFlags()
{
return this._flags;
}
@property public void trimming(TextTrimming tt)
{
this._trim = tt;
}
@property public TextTrimming trimming()
{
return this._trim;
}
@property public int tabLength()
{
return _params.iTabLength;
}
@property public void tabLength(int tablen)
{
this._params.iTabLength = tablen;
}
@property public int leftMargin()
{
return this._params.iLeftMargin;
}
@property public void leftMargin(int sz)
{
this._params.iLeftMargin = sz;
}
@property public int rightMargin()
{
return this._params.iRightMargin;
}
@property public void rightMargin(int sz)
{
this._params.iRightMargin = sz;
}
}
final class Screen
{
@property public static Size size()
{
Size sz = void; //Inizializzata sotto
sz.width = GetSystemMetrics(SM_CXSCREEN);
sz.height = GetSystemMetrics(SM_CYSCREEN);
return sz;
}
@property public static Rect workArea()
{
Rect r = void; //Inizializzata sotto
SystemParametersInfoW(SPI_GETWORKAREA, 0, &r.rect, 0);
return r;
}
@property public static Canvas canvas()
{
return Canvas.fromHDC(GetWindowDC(null));
}
}
|
D
|
/*
TEST_OUTPUT:
---
fail_compilation/diag9191.d(16): Error: function `void diag9191.C1.aaa()` does not override any function, did you mean to override `void diag9191.B1.aa()`?
fail_compilation/diag9191.d(21): Error: function `diag9191.C2.aaa` does not override any function
fail_compilation/diag9191.d(31): Error: function `void diag9191.C3.foo()` does not override any function, did you mean to override `void diag9191.B2._foo()`?
fail_compilation/diag9191.d(36): Error: function `void diag9191.C4.toStringa()` does not override any function, did you mean to override `string object.Object.toString()`?
---
*/
interface I1 { void a(); }
class B1 { void aa(); }
class C1 : B1, I1
{
override void aaa();
}
class C2 : I1
{
override void aaa();
}
class B2
{
void _foo(){}
}
class C3 : B2
{
override void foo(){}
}
class C4
{
override void toStringa(){}
}
void main()
{
}
|
D
|
module krepel.scene.test;
unittest
{
import krepel.scene;
import krepel.memory;
import krepel.container;
import krepel.math;
import krepel.string;
auto Allocator = CreateTestAllocator();
SceneGraph Graph = Allocator.New!SceneGraph(Allocator);
GameObject GO = Graph.CreateDefaultGameObject(UString("TestObject", Allocator));
assert(Graph.GameObjects.Count == 1);
assert(GO.Name == "TestObject");
assert(GO.RootComponent !is null);
assert(GO.RootComponent.Name == "Scene Component");
assert(GO.Components.Count == 1);
assert(GO.GetWorldTransform() == Transform.Identity);
Graph.DestroyGameObject(GO);
assert(Graph.GameObjects.Count == 0);
}
|
D
|
// Written in the D programming language.
/++
Encode and decode UTF-8, UTF-16 and UTF-32 strings.
UTF character support is restricted to
$(D '\u0000' <= character <= '\U0010FFFF').
See_Also:
$(LINK2 http://en.wikipedia.org/wiki/Unicode, Wikipedia)<br>
$(LINK http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8)<br>
$(LINK http://anubis.dkuug.dk/JTC1/SC2/WG2/docs/n1335)
Macros:
WIKI = Phobos/StdUtf
Copyright: Copyright Digital Mars 2000 - 2010.
License: $(WEB www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
Authors: $(WEB digitalmars.com, Walter Bright) and Jonathan M Davis
Source: $(PHOBOSSRC std/_utf.d)
+/
module std.utf;
import std.conv; // to, assumeUnique
import std.exception; // enforce, assumeUnique
import std.range; // walkLength
import std.traits; // isSomeChar, isSomeString
import std.typetuple; // TypeTuple
//debug=utf; // uncomment to turn on debugging printf's
debug (utf) import core.stdc.stdio : printf;
version(unittest)
{
import core.exception;
import std.string;
}
/++
Exception thrown on errors in std.utf functions.
+/
class UTFException : Exception
{
uint[4] sequence;
size_t len;
UTFException setSequence(uint[] data...) @safe pure nothrow
{
import std.algorithm;
assert(data.length <= 4);
len = min(data.length, 4);
sequence[0 .. len] = data[0 .. len];
return this;
}
this(string msg, string file = __FILE__, size_t line = __LINE__, Throwable next = null)
{
super(msg, file, line, next);
}
this(string msg, size_t index, string file = __FILE__, size_t line = __LINE__, Throwable next = null)
{
import std.string;
super(msg ~ format(" (at index %s)", index), file, line, next);
}
override string toString()
{
import std.string;
if(len == 0)
return super.toString();
string result = "Invalid UTF sequence:";
foreach(i; sequence[0 .. len])
result ~= format(" %02x", i);
if(super.msg.length > 0)
{
result ~= " - ";
result ~= super.msg;
}
return result;
}
}
/++
$(RED Deprecated. It will be removed in January 2013.
Please use $(LREF UTFException) instead.)
+/
deprecated alias UTFException UtfException;
/++
Returns whether $(D c) is a valid UTF-32 character.
$(D '\uFFFE') and $(D '\uFFFF') are considered valid by $(D isValidDchar),
as they are permitted for internal use by an application, but they are
not allowed for interchange by the Unicode standard.
+/
@safe
pure nothrow bool isValidDchar(dchar c)
{
/* Note: FFFE and FFFF are specifically permitted by the
* Unicode standard for application internal use, but are not
* allowed for interchange.
* (thanks to Arcane Jill)
*/
return c < 0xD800 ||
(c > 0xDFFF && c <= 0x10FFFF /*&& c != 0xFFFE && c != 0xFFFF*/);
}
unittest
{
debug(utf) printf("utf.isValidDchar.unittest\n");
assert(isValidDchar(cast(dchar)'a') == true);
assert(isValidDchar(cast(dchar)0x1FFFFF) == false);
assert(!isValidDchar(cast(dchar)0x00D800));
assert(!isValidDchar(cast(dchar)0x00DBFF));
assert(!isValidDchar(cast(dchar)0x00DC00));
assert(!isValidDchar(cast(dchar)0x00DFFF));
assert(isValidDchar(cast(dchar)0x00FFFE));
assert(isValidDchar(cast(dchar)0x00FFFF));
assert(isValidDchar(cast(dchar)0x01FFFF));
assert(isValidDchar(cast(dchar)0x10FFFF));
assert(!isValidDchar(cast(dchar)0x110000));
}
/++
$(D stride) returns the length of the UTF-8 sequence starting at $(D index)
in $(D str).
Returns:
The number of bytes in the UTF-8 sequence.
Throws:
$(D UTFException) if $(D str[index]) is not the start of a valid UTF-8
sequence.
+/
uint stride(S)(in S str, size_t index) @safe pure
if (is(S : const(char[])))
{
immutable c = str[index];
if (c < 0x80)
return 1;
else
return strideImpl(c, index);
}
private uint strideImpl(char c, size_t index) @trusted pure
in { assert(c & 0x80); }
body
{
static if (__traits(compiles, {import core.bitop; bsr(1);}))
{
import core.bitop;
immutable msbs = 7 - bsr(~c);
if (msbs >= 2 && msbs <= 6) return msbs;
}
else
{
if (!(c & 0x40)) goto Lerr;
if (!(c & 0x20)) return 2;
if (!(c & 0x10)) return 3;
if (!(c & 0x08)) return 4;
if (!(c & 0x04)) return 5;
if (!(c & 0x02)) return 6;
}
Lerr:
throw new UTFException("Invalid UTF-8 sequence", index);
}
@trusted unittest
{
static void test(string s, dchar c, size_t i = 0, size_t line = __LINE__)
{
enforce(stride(s, i) == codeLength!char(c),
new AssertError(format("Unit test failure: %s", s), __FILE__, line));
}
test("a", 'a');
test(" ", ' ');
test("\u2029", '\u2029'); //paraSep
test("\u0100", '\u0100');
test("\u0430", '\u0430');
test("\U00010143", '\U00010143');
test("abcdefcdef", 'a');
test("hello\U00010143\u0100\U00010143", 'h', 0);
test("hello\U00010143\u0100\U00010143", 'e', 1);
test("hello\U00010143\u0100\U00010143", 'l', 2);
test("hello\U00010143\u0100\U00010143", 'l', 3);
test("hello\U00010143\u0100\U00010143", 'o', 4);
test("hello\U00010143\u0100\U00010143", '\U00010143', 5);
test("hello\U00010143\u0100\U00010143", '\u0100', 9);
test("hello\U00010143\u0100\U00010143", '\U00010143', 11);
}
/++
$(D strideBack) returns the length of the UTF-8 sequence ending one code
unit before $(D index) in $(D str).
Returns:
The number of bytes in the UTF-8 sequence.
Throws:
$(D UTFException) if $(D str[index]) is not one past the end of a valid
UTF-8 sequence.
+/
uint strideBack(in char[] str, size_t index) @safe pure
{
if (index >= 1 && (str[index-1] & 0b1100_0000) != 0b1000_0000)
return 1;
else if (index >= 2 && (str[index-2] & 0b1100_0000) != 0b1000_0000)
return 2;
else if (index >= 3 && (str[index-3] & 0b1100_0000) != 0b1000_0000)
return 3;
else if (index >= 4 && (str[index-4] & 0b1100_0000) != 0b1000_0000)
return 4;
else
throw new UTFException("Not the end of the UTF sequence", index);
}
unittest
{
static void test(string s, dchar c, size_t i = size_t.max, size_t line = __LINE__)
{
enforce(strideBack(s, i == size_t.max ? s.length : i) == codeLength!char(c),
new AssertError(format("Unit test failure: %s", s), __FILE__, line));
}
test("a", 'a');
test(" ", ' ');
test("\u2029", '\u2029'); //paraSep
test("\u0100", '\u0100');
test("\u0430", '\u0430');
test("\U00010143", '\U00010143');
test("abcdefcdef", 'f');
test("\U00010143\u0100\U00010143hello", 'o', 15);
test("\U00010143\u0100\U00010143hello", 'l', 14);
test("\U00010143\u0100\U00010143hello", 'l', 13);
test("\U00010143\u0100\U00010143hello", 'e', 12);
test("\U00010143\u0100\U00010143hello", 'h', 11);
test("\U00010143\u0100\U00010143hello", '\U00010143', 10);
test("\U00010143\u0100\U00010143hello", '\u0100', 6);
test("\U00010143\u0100\U00010143hello", '\U00010143', 4);
}
/++
$(D stride) returns the length of the UTF-16 sequence starting at $(D index)
in $(D str).
Returns:
The number of bytes in the UTF-16 sequence.
+/
uint stride(S)(in S str, size_t index) @safe pure nothrow
if (is(S : const(wchar[])))
{
immutable uint u = str[index];
return 1 + (u >= 0xD800 && u <= 0xDBFF);
}
@trusted unittest
{
static void test(wstring s, dchar c, size_t i = 0, size_t line = __LINE__)
{
enforce(stride(s, i) == codeLength!wchar(c),
new AssertError(format("Unit test failure: %s", s), __FILE__, line));
}
test("a", 'a');
test(" ", ' ');
test("\u2029", '\u2029'); //paraSep
test("\u0100", '\u0100');
test("\u0430", '\u0430');
test("\U00010143", '\U00010143');
test("abcdefcdef", 'a');
test("hello\U00010143\u0100\U00010143", 'h', 0);
test("hello\U00010143\u0100\U00010143", 'e', 1);
test("hello\U00010143\u0100\U00010143", 'l', 2);
test("hello\U00010143\u0100\U00010143", 'l', 3);
test("hello\U00010143\u0100\U00010143", 'o', 4);
test("hello\U00010143\u0100\U00010143", '\U00010143', 5);
test("hello\U00010143\u0100\U00010143", '\u0100', 7);
test("hello\U00010143\u0100\U00010143", '\U00010143', 8);
}
/++
$(D strideBack) returns the length of the UTF-16 sequence ending one code
unit before $(D index) in $(D str).
Returns:
The number of bytes in the UTF-16 sequence.
Throws:
$(D UTFException) if $(D str[index]) is not one past the end of a valid
UTF-16 sequence.
+/
uint strideBack(in wchar[] str, size_t index) @safe pure
{
enforce(index != 0 && (str[index-1] < 0xD800 || str[index-1] > 0xDBFF),
new UTFException("Not the end of the UTF-16 sequence", index));
if (index <= 1)
return 1;
immutable c = str[index - 2];
return 1 + (c >= 0xD800 && c <= 0xDBFF);
}
unittest
{
static void test(wstring s, dchar c, size_t i = size_t.max, size_t line = __LINE__)
{
enforce(strideBack(s, i == size_t.max ? s.length : i) == codeLength!wchar(c),
new AssertError(format("Unit test failure: %s", s), __FILE__, line));
}
test("a", 'a');
test(" ", ' ');
test("\u2029", '\u2029'); //paraSep
test("\u0100", '\u0100');
test("\u0430", '\u0430');
test("\U00010143", '\U00010143');
test("abcdefcdef", 'f');
test("\U00010143\u0100\U00010143hello", 'o', 10);
test("\U00010143\u0100\U00010143hello", 'l', 9);
test("\U00010143\u0100\U00010143hello", 'l', 8);
test("\U00010143\u0100\U00010143hello", 'e', 7);
test("\U00010143\u0100\U00010143hello", 'h', 6);
test("\U00010143\u0100\U00010143hello", '\U00010143', 5);
test("\U00010143\u0100\U00010143hello", '\u0100', 3);
test("\U00010143\u0100\U00010143hello", '\U00010143', 2);
}
/++
$(D stride) returns the length of the UTF-32 sequence starting at $(D index)
in $(D str).
Returns:
The number of bytes in the UTF-32 sequence (always $(D 1)).
+/
uint stride(S)(in S str, size_t index) @safe pure nothrow
if (is(S : const(dchar[])))
{
assert(index < str.length);
return 1;
}
unittest
{
static void test(dstring s, dchar c, size_t i = 0, size_t line = __LINE__)
{
enforce(stride(s, i) == codeLength!dchar(c),
new AssertError(format("Unit test failure: %s", s), __FILE__, line));
}
test("a", 'a');
test(" ", ' ');
test("\u2029", '\u2029'); //paraSep
test("\u0100", '\u0100');
test("\u0430", '\u0430');
test("\U00010143", '\U00010143');
test("abcdefcdef", 'a');
test("hello\U00010143\u0100\U00010143", 'h', 0);
test("hello\U00010143\u0100\U00010143", 'e', 1);
test("hello\U00010143\u0100\U00010143", 'l', 2);
test("hello\U00010143\u0100\U00010143", 'l', 3);
test("hello\U00010143\u0100\U00010143", 'o', 4);
test("hello\U00010143\u0100\U00010143", '\U00010143', 5);
test("hello\U00010143\u0100\U00010143", '\u0100', 6);
test("hello\U00010143\u0100\U00010143", '\U00010143', 7);
}
/++
$(D strideBack) returns the length of the UTF-32 sequence ending one code
unit before $(D index) in $(D str).
Returns:
The number of bytes in the UTF-32 sequence (always $(D 1)).
+/
uint strideBack(in dchar[] str, size_t index) @safe pure nothrow
{
assert(index <= str.length);
return 1;
}
unittest
{
static void test(dstring s, dchar c, size_t i = size_t.max, size_t line = __LINE__)
{
enforce(strideBack(s, i == size_t.max ? s.length : i) == codeLength!dchar(c),
new AssertError(format("Unit test failure: %s", s), __FILE__, line));
}
test("a", 'a');
test(" ", ' ');
test("\u2029", '\u2029'); //paraSep
test("\u0100", '\u0100');
test("\u0430", '\u0430');
test("\U00010143", '\U00010143');
test("abcdefcdef", 'f');
test("\U00010143\u0100\U00010143hello", 'o', 8);
test("\U00010143\u0100\U00010143hello", 'l', 7);
test("\U00010143\u0100\U00010143hello", 'l', 6);
test("\U00010143\u0100\U00010143hello", 'e', 5);
test("\U00010143\u0100\U00010143hello", 'h', 4);
test("\U00010143\u0100\U00010143hello", '\U00010143', 3);
test("\U00010143\u0100\U00010143hello", '\u0100', 2);
test("\U00010143\u0100\U00010143hello", '\U00010143', 1);
}
/++
Given $(D index) into $(D str) and assuming that $(D index) is at the start
of a UTF sequence, $(D toUCSindex) determines the number of UCS characters
up to $(D index). So, $(D index) is the index of a code unit at the
beginning of a code point, and the return value is how many code points into
the string that that code point is.
Examples:
--------------------
assert(toUCSindex(`hello world`, 7) == 7);
assert(toUCSindex(`hello world`w, 7) == 7);
assert(toUCSindex(`hello world`d, 7) == 7);
assert(toUCSindex(`Ma Chérie`, 7) == 6);
assert(toUCSindex(`Ma Chérie`w, 7) == 7);
assert(toUCSindex(`Ma Chérie`d, 7) == 7);
assert(toUCSindex(`さいごの果実 / ミツバチと科学者`, 9) == 3);
assert(toUCSindex(`さいごの果実 / ミツバチと科学者`w, 9) == 9);
assert(toUCSindex(`さいごの果実 / ミツバチと科学者`d, 9) == 9);
--------------------
+/
size_t toUCSindex(C)(const(C)[] str, size_t index) @safe pure
if(isSomeChar!C)
{
static if(is(Unqual!C == dchar))
return index;
else
{
size_t n = 0;
size_t j = 0;
for(; j < index; ++n)
j += stride(str, j);
if(j > index)
{
static if(is(Unqual!C == char))
throw new UTFException("Invalid UTF-8 sequence", index);
else
throw new UTFException("Invalid UTF-16 sequence", index);
}
return n;
}
}
unittest
{
assert(toUCSindex(`hello world`, 7) == 7);
assert(toUCSindex(`hello world`w, 7) == 7);
assert(toUCSindex(`hello world`d, 7) == 7);
assert(toUCSindex(`Ma Chérie`, 7) == 6);
assert(toUCSindex(`Ma Chérie`w, 7) == 7);
assert(toUCSindex(`Ma Chérie`d, 7) == 7);
assert(toUCSindex(`さいごの果実 / ミツバチと科学者`, 9) == 3);
assert(toUCSindex(`さいごの果実 / ミツバチと科学者`w, 9) == 9);
assert(toUCSindex(`さいごの果実 / ミツバチと科学者`d, 9) == 9);
}
/++
Given a UCS index $(D n) into $(D str), returns the UTF index.
So, $(D n) is how many code points into the string the code point is, and
the array index of the code unit is returned.
Examples:
--------------------
assert(toUTFindex(`hello world`, 7) == 7);
assert(toUTFindex(`hello world`w, 7) == 7);
assert(toUTFindex(`hello world`d, 7) == 7);
assert(toUTFindex(`Ma Chérie`, 6) == 7);
assert(toUTFindex(`Ma Chérie`w, 7) == 7);
assert(toUTFindex(`Ma Chérie`d, 7) == 7);
assert(toUTFindex(`さいごの果実 / ミツバチと科学者`, 3) == 9);
assert(toUTFindex(`さいごの果実 / ミツバチと科学者`w, 9) == 9);
assert(toUTFindex(`さいごの果実 / ミツバチと科学者`d, 9) == 9);
--------------------
+/
size_t toUTFindex(in char[] str, size_t n) @safe pure
{
size_t i;
while (n--)
i += stride(str, i);
return i;
}
/// ditto
size_t toUTFindex(in wchar[] str, size_t n) @safe pure nothrow
{
size_t i;
while (n--)
{
wchar u = str[i];
i += 1 + (u >= 0xD800 && u <= 0xDBFF);
}
return i;
}
/// ditto
size_t toUTFindex(in dchar[] str, size_t n) @safe pure nothrow
{
return n;
}
/* =================== Decode ======================= */
/++
Decodes and returns the character starting at $(D str[index]). $(D index)
is advanced to one past the decoded character. If the character is not
well-formed, then a $(D UTFException) is thrown and $(D index) remains
unchanged.
Throws:
$(D UTFException) if $(D str[index]) is not the start of a valid UTF
sequence.
+/
dchar decode(S)(in S str, ref size_t index) @trusted pure
if(is(S : const(char[])))
in
{
assert(index < str.length, "Attempted to decode past the end of a string");
}
out (result)
{
assert(isValidDchar(result));
}
body
{
if (str[index] < 0x80)
return str[index++];
else
return decodeImpl(str.ptr + index, str.length - index, index);
}
/*
* This function does it's own bounds checking to give a more useful
* error message when attempting to decode past the end of a string.
* Subsequently it uses a pointer instead of an array to avoid
* redundant bounds checking.
*/
private dchar decodeImpl(const(char)* pstr, size_t length, ref size_t index) @trusted pure
in
{
assert(pstr[0] & 0x80);
}
body
{
/* The following encodings are valid, except for the 5 and 6 byte
* combinations:
* 0xxxxxxx
* 110xxxxx 10xxxxxx
* 1110xxxx 10xxxxxx 10xxxxxx
* 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
* 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
* 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
*/
/* Dchar bitmask for different numbers of UTF-8 code units.
*/
enum bitMask = [(1 << 7) - 1, (1 << 11) - 1, (1 << 16) - 1, (1 << 21) - 1];
ubyte fst = pstr[0], tmp=void;
dchar d = fst; // upper control bits are masked out later
fst <<= 1;
foreach(i; TypeTuple!(1, 2, 3))
{
if (i == length)
goto Ebounds;
tmp = pstr[i];
if ((tmp & 0xC0) != 0x80)
goto Eutf;
d = (d << 6) | (tmp & 0x3F);
fst <<= 1;
if (!(fst & 0x80)) // no more bytes
{
d &= bitMask[i]; // mask out control bits
// overlong, could have been encoded with i bytes
if ((d & ~bitMask[i - 1]) == 0)
goto Eutf;
// check for surrogates only needed for 3 bytes
static if (i == 2)
{
if (!isValidDchar(d))
goto Eutf;
}
index += i + 1;
return d;
}
}
static UTFException exception(in char[] str, string msg)
{
uint[4] sequence = void;
size_t i;
do
{
sequence[i] = str[i];
} while (++i < str.length && i < 4 && (str[i] & 0xC0) == 0x80);
return (new UTFException(msg, i)).setSequence(sequence[0 .. i]);
}
Eutf:
throw exception(pstr[0 .. length], "Invalid UTF-8 sequence");
Ebounds:
throw exception(pstr[0 .. length], "Attempted to decode past the end of a string");
}
unittest
{
size_t i;
dchar c;
debug(utf) printf("utf.decode.unittest\n");
static string s1 = "abcd";
i = 0;
c = decode(s1, i);
assert(c == cast(dchar)'a');
assert(i == 1);
c = decode(s1, i);
assert(c == cast(dchar)'b');
assert(i == 2);
static string s2 = "\xC2\xA9";
i = 0;
c = decode(s2, i);
assert(c == cast(dchar)'\u00A9');
assert(i == 2);
static string s3 = "\xE2\x89\xA0";
i = 0;
c = decode(s3, i);
assert(c == cast(dchar)'\u2260');
assert(i == 3);
static string[] s4 = [
"\xE2\x89", // too short
"\xC0\x8A",
"\xE0\x80\x8A",
"\xF0\x80\x80\x8A",
"\xF8\x80\x80\x80\x8A",
"\xFC\x80\x80\x80\x80\x8A",
];
for (int j = 0; j < s4.length; j++)
{
try
{
i = 0;
c = decode(s4[j], i);
assert(0);
}
catch (UTFException u)
{
i = 23;
delete u;
}
assert(i == 23);
}
}
unittest
{
size_t i;
i = 0; assert(decode("\xEF\xBF\xBE"c, i) == cast(dchar)0xFFFE);
i = 0; assert(decode("\xEF\xBF\xBF"c, i) == cast(dchar)0xFFFF);
i = 0;
assertThrown!UTFException(decode("\xED\xA0\x80"c, i));
assertThrown!UTFException(decode("\xED\xAD\xBF"c, i));
assertThrown!UTFException(decode("\xED\xAE\x80"c, i));
assertThrown!UTFException(decode("\xED\xAF\xBF"c, i));
assertThrown!UTFException(decode("\xED\xB0\x80"c, i));
assertThrown!UTFException(decode("\xED\xBE\x80"c, i));
assertThrown!UTFException(decode("\xED\xBF\xBF"c, i));
}
/// ditto
dchar decode(S)(in S str, ref size_t index) @trusted pure
if(is(S : const(wchar[])))
in
{
assert(index < str.length, "Attempted to decode past the end of a string");
}
out (result)
{
assert(isValidDchar(result));
}
body
{
if (str[index] < 0xD800)
return str[index++];
else
return decodeImpl(str.ptr + index, str.length - index, index);
}
/// ditto
private dchar decodeImpl(const(wchar)* pstr, size_t length, ref size_t index) @trusted pure
in
{
assert(pstr[0] >= 0xD800);
}
body
{
string msg;
uint u = pstr[0];
if (u >= 0xD800 && u <= 0xDBFF)
{
if (length == 1)
{
msg = "surrogate UTF-16 high value past end of string";
goto Lerr;
}
immutable uint u2 = pstr[1];
if (u2 < 0xDC00 || u2 > 0xDFFF)
{
msg = "surrogate UTF-16 low value out of range";
goto Lerr;
}
u = ((u - 0xD7C0) << 10) + (u2 - 0xDC00);
index += 2;
}
else if (u >= 0xDC00 && u <= 0xDFFF)
{
msg = "unpaired surrogate UTF-16 value";
goto Lerr;
}
else
++index;
// Note: u+FFFE and u+FFFF are specifically permitted by the
// Unicode standard for application internal use (see isValidDchar)
return cast(dchar)u;
Lerr:
throw (new UTFException(msg)).setSequence(pstr[0]);
}
unittest
{
size_t i;
i = 0; assert(decode([ cast(wchar)0xFFFE ], i) == cast(dchar)0xFFFE && i == 1);
i = 0; assert(decode([ cast(wchar)0xFFFF ], i) == cast(dchar)0xFFFF && i == 1);
}
/// ditto
dchar decode(S)(in S str, ref size_t index) @safe pure
if(is(S : const(dchar[])))
in
{
assert(index < str.length, "Attempted to decode past the end of a string");
}
body
{
if (str[index] < 0xD800)
return str[index++];
else
return decodeImpl(str, index);
}
/// ditto
private dchar decodeImpl(in dchar[] str, ref size_t index) @safe pure
{
if (!isValidDchar(str[index]))
throw (new UTFException("Invalid UTF-32 value")).setSequence(str[index]);
return str[index++];
}
/* =================== Encode ======================= */
/++
Encodes $(D c) into the static array, $(D buf), and returns the actual
length of the encoded character (a number between $(D 1) and $(D 4) for
$(D char[4]) buffers and a number between $(D 1) and $(D 2) for
$(D wchar[2]) buffers.
Throws:
$(D UTFException) if $(D c) is not a valid UTF code point.
+/
size_t encode(ref char[4] buf, dchar c) @safe pure
{
if (c <= 0x7F)
{
assert(isValidDchar(c));
buf[0] = cast(char)c;
return 1;
}
if (c <= 0x7FF)
{
assert(isValidDchar(c));
buf[0] = cast(char)(0xC0 | (c >> 6));
buf[1] = cast(char)(0x80 | (c & 0x3F));
return 2;
}
if (c <= 0xFFFF)
{
if (0xD800 <= c && c <= 0xDFFF)
throw (new UTFException("Encoding a surrogate code point in UTF-8")).setSequence(c);
assert(isValidDchar(c));
buf[0] = cast(char)(0xE0 | (c >> 12));
buf[1] = cast(char)(0x80 | ((c >> 6) & 0x3F));
buf[2] = cast(char)(0x80 | (c & 0x3F));
return 3;
}
if (c <= 0x10FFFF)
{
assert(isValidDchar(c));
buf[0] = cast(char)(0xF0 | (c >> 18));
buf[1] = cast(char)(0x80 | ((c >> 12) & 0x3F));
buf[2] = cast(char)(0x80 | ((c >> 6) & 0x3F));
buf[3] = cast(char)(0x80 | (c & 0x3F));
return 4;
}
assert(!isValidDchar(c));
throw (new UTFException("Encoding an invalid code point in UTF-8")).setSequence(c);
}
unittest
{
char[4] buf;
assert(encode(buf, '\u0000') == 1 && buf[0 .. 1] == "\u0000");
assert(encode(buf, '\u007F') == 1 && buf[0 .. 1] == "\u007F");
assert(encode(buf, '\u0080') == 2 && buf[0 .. 2] == "\u0080");
assert(encode(buf, '\u07FF') == 2 && buf[0 .. 2] == "\u07FF");
assert(encode(buf, '\u0800') == 3 && buf[0 .. 3] == "\u0800");
assert(encode(buf, '\uD7FF') == 3 && buf[0 .. 3] == "\uD7FF");
assert(encode(buf, '\uE000') == 3 && buf[0 .. 3] == "\uE000");
assert(encode(buf, 0xFFFE) == 3 && buf[0 .. 3] == "\xEF\xBF\xBE");
assert(encode(buf, 0xFFFF) == 3 && buf[0 .. 3] == "\xEF\xBF\xBF");
assert(encode(buf, '\U00010000') == 4 && buf[0 .. 4] == "\U00010000");
assert(encode(buf, '\U0010FFFF') == 4 && buf[0 .. 4] == "\U0010FFFF");
assertThrown!UTFException(encode(buf, cast(dchar)0xD800));
assertThrown!UTFException(encode(buf, cast(dchar)0xDBFF));
assertThrown!UTFException(encode(buf, cast(dchar)0xDC00));
assertThrown!UTFException(encode(buf, cast(dchar)0xDFFF));
assertThrown!UTFException(encode(buf, cast(dchar)0x110000));
}
/// Ditto
size_t encode(ref wchar[2] buf, dchar c) @safe pure
{
if (c <= 0xFFFF)
{
if (0xD800 <= c && c <= 0xDFFF)
throw (new UTFException("Encoding an isolated surrogate code point in UTF-16")).setSequence(c);
assert(isValidDchar(c));
buf[0] = cast(wchar)c;
return 1;
}
if (c <= 0x10FFFF)
{
assert(isValidDchar(c));
buf[0] = cast(wchar)((((c - 0x10000) >> 10) & 0x3FF) + 0xD800);
buf[1] = cast(wchar)(((c - 0x10000) & 0x3FF) + 0xDC00);
return 2;
}
assert(!isValidDchar(c));
throw (new UTFException("Encoding an invalid code point in UTF-16")).setSequence(c);
}
unittest
{
wchar[2] buf;
assert(encode(buf, '\u0000') == 1 && buf[0 .. 1] == "\u0000");
assert(encode(buf, '\uD7FF') == 1 && buf[0 .. 1] == "\uD7FF");
assert(encode(buf, '\uE000') == 1 && buf[0 .. 1] == "\uE000");
assert(encode(buf, 0xFFFE) == 1 && buf[0] == 0xFFFE);
assert(encode(buf, 0xFFFF) == 1 && buf[0] == 0xFFFF);
assert(encode(buf, '\U00010000') == 2 && buf[0 .. 2] == "\U00010000");
assert(encode(buf, '\U0010FFFF') == 2 && buf[0 .. 2] == "\U0010FFFF");
assertThrown!UTFException(encode(buf, cast(dchar)0xD800));
assertThrown!UTFException(encode(buf, cast(dchar)0xDBFF));
assertThrown!UTFException(encode(buf, cast(dchar)0xDC00));
assertThrown!UTFException(encode(buf, cast(dchar)0xDFFF));
assertThrown!UTFException(encode(buf, cast(dchar)0x110000));
}
/++
Encodes $(D c) in $(D str)'s encoding and appends it to $(D str).
Throws:
$(D UTFException) if $(D c) is not a valid UTF code point.
+/
void encode(ref char[] str, dchar c) @safe pure
{
char[] r = str;
if (c <= 0x7F)
{
assert(isValidDchar(c));
r ~= cast(char)c;
}
else
{
char[4] buf;
uint L;
if (c <= 0x7FF)
{
assert(isValidDchar(c));
buf[0] = cast(char)(0xC0 | (c >> 6));
buf[1] = cast(char)(0x80 | (c & 0x3F));
L = 2;
}
else if (c <= 0xFFFF)
{
if (0xD800 <= c && c <= 0xDFFF)
throw (new UTFException("Encoding a surrogate code point in UTF-8")).setSequence(c);
assert(isValidDchar(c));
buf[0] = cast(char)(0xE0 | (c >> 12));
buf[1] = cast(char)(0x80 | ((c >> 6) & 0x3F));
buf[2] = cast(char)(0x80 | (c & 0x3F));
L = 3;
}
else if (c <= 0x10FFFF)
{
assert(isValidDchar(c));
buf[0] = cast(char)(0xF0 | (c >> 18));
buf[1] = cast(char)(0x80 | ((c >> 12) & 0x3F));
buf[2] = cast(char)(0x80 | ((c >> 6) & 0x3F));
buf[3] = cast(char)(0x80 | (c & 0x3F));
L = 4;
}
else
{
assert(!isValidDchar(c));
throw (new UTFException("Encoding an invalid code point in UTF-8")).setSequence(c);
}
r ~= buf[0 .. L];
}
str = r;
}
unittest
{
debug(utf) printf("utf.encode.unittest\n");
char[] s = "abcd".dup;
encode(s, cast(dchar)'a');
assert(s.length == 5);
assert(s == "abcda");
encode(s, cast(dchar)'\u00A9');
assert(s.length == 7);
assert(s == "abcda\xC2\xA9");
//assert(s == "abcda\u00A9"); // BUG: fix compiler
encode(s, cast(dchar)'\u2260');
assert(s.length == 10);
assert(s == "abcda\xC2\xA9\xE2\x89\xA0");
}
unittest
{
char[] buf;
encode(buf, '\u0000'); assert(buf[0 .. $] == "\u0000");
encode(buf, '\u007F'); assert(buf[1 .. $] == "\u007F");
encode(buf, '\u0080'); assert(buf[2 .. $] == "\u0080");
encode(buf, '\u07FF'); assert(buf[4 .. $] == "\u07FF");
encode(buf, '\u0800'); assert(buf[6 .. $] == "\u0800");
encode(buf, '\uD7FF'); assert(buf[9 .. $] == "\uD7FF");
encode(buf, '\uE000'); assert(buf[12 .. $] == "\uE000");
encode(buf, 0xFFFE); assert(buf[15 .. $] == "\xEF\xBF\xBE");
encode(buf, 0xFFFF); assert(buf[18 .. $] == "\xEF\xBF\xBF");
encode(buf, '\U00010000'); assert(buf[21 .. $] == "\U00010000");
encode(buf, '\U0010FFFF'); assert(buf[25 .. $] == "\U0010FFFF");
assertThrown!UTFException(encode(buf, cast(dchar)0xD800));
assertThrown!UTFException(encode(buf, cast(dchar)0xDBFF));
assertThrown!UTFException(encode(buf, cast(dchar)0xDC00));
assertThrown!UTFException(encode(buf, cast(dchar)0xDFFF));
assertThrown!UTFException(encode(buf, cast(dchar)0x110000));
}
/// ditto
void encode(ref wchar[] str, dchar c) @safe pure
{
wchar[] r = str;
if (c <= 0xFFFF)
{
if (0xD800 <= c && c <= 0xDFFF)
throw (new UTFException("Encoding an isolated surrogate code point in UTF-16")).setSequence(c);
assert(isValidDchar(c));
r ~= cast(wchar)c;
}
else if (c <= 0x10FFFF)
{
wchar[2] buf;
assert(isValidDchar(c));
buf[0] = cast(wchar)((((c - 0x10000) >> 10) & 0x3FF) + 0xD800);
buf[1] = cast(wchar)(((c - 0x10000) & 0x3FF) + 0xDC00);
r ~= buf;
}
else
{
assert(!isValidDchar(c));
throw (new UTFException("Encoding an invalid code point in UTF-16")).setSequence(c);
}
str = r;
}
unittest
{
wchar[] buf;
encode(buf, '\u0000'); assert(buf[0] == '\u0000');
encode(buf, '\uD7FF'); assert(buf[1] == '\uD7FF');
encode(buf, '\uE000'); assert(buf[2] == '\uE000');
encode(buf, 0xFFFE); assert(buf[3] == 0xFFFE);
encode(buf, 0xFFFF); assert(buf[4] == 0xFFFF);
encode(buf, '\U00010000'); assert(buf[5 .. $] == "\U00010000");
encode(buf, '\U0010FFFF'); assert(buf[7 .. $] == "\U0010FFFF");
assertThrown!UTFException(encode(buf, cast(dchar)0xD800));
assertThrown!UTFException(encode(buf, cast(dchar)0xDBFF));
assertThrown!UTFException(encode(buf, cast(dchar)0xDC00));
assertThrown!UTFException(encode(buf, cast(dchar)0xDFFF));
assertThrown!UTFException(encode(buf, cast(dchar)0x110000));
}
/// ditto
void encode(ref dchar[] str, dchar c) @safe pure
{
if ((0xD800 <= c && c <= 0xDFFF) || 0x10FFFF < c)
throw (new UTFException("Encoding an invalid code point in UTF-32")).setSequence(c);
assert(isValidDchar(c));
str ~= c;
}
unittest
{
dchar[] buf;
encode(buf, '\u0000'); assert(buf[0] == '\u0000');
encode(buf, '\uD7FF'); assert(buf[1] == '\uD7FF');
encode(buf, '\uE000'); assert(buf[2] == '\uE000');
encode(buf, 0xFFFE ); assert(buf[3] == 0xFFFE);
encode(buf, 0xFFFF ); assert(buf[4] == 0xFFFF);
encode(buf, '\U0010FFFF'); assert(buf[5] == '\U0010FFFF');
assertThrown!UTFException(encode(buf, cast(dchar)0xD800));
assertThrown!UTFException(encode(buf, cast(dchar)0xDBFF));
assertThrown!UTFException(encode(buf, cast(dchar)0xDC00));
assertThrown!UTFException(encode(buf, cast(dchar)0xDFFF));
assertThrown!UTFException(encode(buf, cast(dchar)0x110000));
}
/++
Returns the number of code units that are required to encode the code point
$(D c) when $(D C) is the character type used to encode it.
Examples:
------
assert(codeLength!char('a') == 1);
assert(codeLength!wchar('a') == 1);
assert(codeLength!dchar('a') == 1);
assert(codeLength!char('\U0010FFFF') == 4);
assert(codeLength!wchar('\U0010FFFF') == 2);
assert(codeLength!dchar('\U0010FFFF') == 1);
------
+/
ubyte codeLength(C)(dchar c) @safe pure nothrow
if(isSomeChar!C)
{
static if (C.sizeof == 1)
{
return
c <= 0x7F ? 1
: c <= 0x7FF ? 2
: c <= 0xFFFF ? 3
: c <= 0x10FFFF ? 4
: (assert(false), 6);
}
else static if (C.sizeof == 2)
{
return c <= 0xFFFF ? 1 : 2;
}
else
{
static assert(C.sizeof == 4);
return 1;
}
}
//Verify Examples.
unittest
{
assert(codeLength!char('a') == 1);
assert(codeLength!wchar('a') == 1);
assert(codeLength!dchar('a') == 1);
assert(codeLength!char('\U0010FFFF') == 4);
assert(codeLength!wchar('\U0010FFFF') == 2);
assert(codeLength!dchar('\U0010FFFF') == 1);
}
/++
Returns the number of code units that are required to encode $(D str)
in a string whose character type is $(D C). This is particularly useful
when slicing one string with the length of another and the two string
types use different character types.
Examples:
------
assert(codeLength!char("hello world") ==
to!string("hello world").length);
assert(codeLength!wchar("hello world") ==
to!wstring("hello world").length);
assert(codeLength!dchar("hello world") ==
to!dstring("hello world").length);
assert(codeLength!char(`プログラミング`) ==
to!string(`プログラミング`).length);
assert(codeLength!wchar(`プログラミング`) ==
to!wstring(`プログラミング`).length);
assert(codeLength!dchar(`プログラミング`) ==
to!dstring(`プログラミング`).length);
string haystack = `Être sans la verité, ça, ce ne serait pas bien.`;
wstring needle = `Être sans la verité`;
assert(haystack[codeLength!char(needle) .. $] ==
`, ça, ce ne serait pas bien.`);
------
+/
size_t codeLength(C1, C2)(C2[] str) @safe pure
if(isSomeChar!C1 && isSomeChar!C2)
{
static if(is(Unqual!C1 == Unqual!C2))
return str.length;
else
{
size_t total = 0;
foreach(dchar c; str)
total += codeLength!C1(c);
return total;
}
}
//Verify Examples.
unittest
{
assert(codeLength!char("hello world") ==
to!string("hello world").length);
assert(codeLength!wchar("hello world") ==
to!wstring("hello world").length);
assert(codeLength!dchar("hello world") ==
to!dstring("hello world").length);
assert(codeLength!char(`プログラミング`) ==
to!string(`プログラミング`).length);
assert(codeLength!wchar(`プログラミング`) ==
to!wstring(`プログラミング`).length);
assert(codeLength!dchar(`プログラミング`) ==
to!dstring(`プログラミング`).length);
string haystack = `Être sans la verité, ça, ce ne serait pas bien.`;
wstring needle = `Être sans la verité`;
assert(haystack[codeLength!char(needle) .. $] ==
`, ça, ce ne serait pas bien.`);
}
unittest
{
foreach(S; TypeTuple!(char[], const char[], string,
wchar[], const wchar[], wstring,
dchar[], const dchar[], dstring))
{
foreach(C; TypeTuple!(char, wchar, dchar))
{
assert(codeLength!C(to!S("Walter Bright")) == to!(C[])("Walter Bright").length);
assert(codeLength!C(to!S(`言語`)) == to!(C[])(`言語`).length);
assert(codeLength!C(to!S(`ウェブサイト@La_Verité.com`)) ==
to!(C[])(`ウェブサイト@La_Verité.com`).length);
}
}
}
/* =================== Validation ======================= */
/++
Checks to see if $(D str) is well-formed unicode or not.
Throws:
$(D UTFException) if $(D str) is not well-formed.
+/
void validate(S)(in S str) @safe pure
if(isSomeString!S)
{
immutable len = str.length;
for (size_t i = 0; i < len; )
{
decode(str, i);
}
}
/* =================== Conversion to UTF8 ======================= */
pure
{
char[] toUTF8(out char[4] buf, dchar c) nothrow @safe
in
{
assert(isValidDchar(c));
}
body
{
if (c <= 0x7F)
{
buf[0] = cast(char)c;
return buf[0 .. 1];
}
else if (c <= 0x7FF)
{
buf[0] = cast(char)(0xC0 | (c >> 6));
buf[1] = cast(char)(0x80 | (c & 0x3F));
return buf[0 .. 2];
}
else if (c <= 0xFFFF)
{
buf[0] = cast(char)(0xE0 | (c >> 12));
buf[1] = cast(char)(0x80 | ((c >> 6) & 0x3F));
buf[2] = cast(char)(0x80 | (c & 0x3F));
return buf[0 .. 3];
}
else if (c <= 0x10FFFF)
{
buf[0] = cast(char)(0xF0 | (c >> 18));
buf[1] = cast(char)(0x80 | ((c >> 12) & 0x3F));
buf[2] = cast(char)(0x80 | ((c >> 6) & 0x3F));
buf[3] = cast(char)(0x80 | (c & 0x3F));
return buf[0 .. 4];
}
assert(0);
}
/*******************
* Encodes string $(D_PARAM s) into UTF-8 and returns the encoded string.
*/
string toUTF8(in char[] s) @safe
{
validate(s);
return s.idup;
}
/// ditto
string toUTF8(in wchar[] s) @trusted
{
char[] r;
size_t i;
size_t slen = s.length;
r.length = slen;
for (i = 0; i < slen; i++)
{
wchar c = s[i];
if (c <= 0x7F)
r[i] = cast(char)c; // fast path for ascii
else
{
r.length = i;
while (i < slen)
encode(r, decode(s, i));
break;
}
}
return r.assumeUnique();
}
/// ditto
string toUTF8(in dchar[] s) @trusted
{
char[] r;
size_t i;
size_t slen = s.length;
r.length = slen;
for (i = 0; i < slen; i++)
{
dchar c = s[i];
if (c <= 0x7F)
r[i] = cast(char)c; // fast path for ascii
else
{
r.length = i;
foreach (dchar d; s[i .. slen])
{
encode(r, d);
}
break;
}
}
return r.assumeUnique();
}
/* =================== Conversion to UTF16 ======================= */
wchar[] toUTF16(ref wchar[2] buf, dchar c) nothrow @safe
in
{
assert(isValidDchar(c));
}
body
{
if (c <= 0xFFFF)
{
buf[0] = cast(wchar)c;
return buf[0 .. 1];
}
else
{
buf[0] = cast(wchar)((((c - 0x10000) >> 10) & 0x3FF) + 0xD800);
buf[1] = cast(wchar)(((c - 0x10000) & 0x3FF) + 0xDC00);
return buf[0 .. 2];
}
}
/****************
* Encodes string $(D s) into UTF-16 and returns the encoded string.
*/
wstring toUTF16(in char[] s) @trusted
{
wchar[] r;
size_t slen = s.length;
r.length = slen;
r.length = 0;
for (size_t i = 0; i < slen; )
{
dchar c = s[i];
if (c <= 0x7F)
{
i++;
r ~= cast(wchar)c;
}
else
{
c = decode(s, i);
encode(r, c);
}
}
return r.assumeUnique(); // ok because r is unique
}
/// ditto
wstring toUTF16(in wchar[] s) @safe
{
validate(s);
return s.idup;
}
/// ditto
pure wstring toUTF16(in dchar[] s) @trusted
{
wchar[] r;
size_t slen = s.length;
r.length = slen;
r.length = 0;
for (size_t i = 0; i < slen; i++)
{
encode(r, s[i]);
}
return r.assumeUnique(); // ok because r is unique
}
/* =================== Conversion to UTF32 ======================= */
/*****
* Encodes string $(D_PARAM s) into UTF-32 and returns the encoded string.
*/
dstring toUTF32(in char[] s) @trusted
{
dchar[] r;
size_t slen = s.length;
size_t j = 0;
r.length = slen; // r[] will never be longer than s[]
for (size_t i = 0; i < slen; )
{
dchar c = s[i];
if (c >= 0x80)
c = decode(s, i);
else
i++; // c is ascii, no need for decode
r[j++] = c;
}
return r[0 .. j].assumeUnique(); // legit because it's unique
}
/// ditto
dstring toUTF32(in wchar[] s) @trusted
{
dchar[] r;
size_t slen = s.length;
size_t j = 0;
r.length = slen; // r[] will never be longer than s[]
for (size_t i = 0; i < slen; )
{
dchar c = s[i];
if (c >= 0x80)
c = decode(s, i);
else
i++; // c is ascii, no need for decode
r[j++] = c;
}
return r[0 .. j].assumeUnique(); // legit because it's unique
}
/// ditto
dstring toUTF32(in dchar[] s) @safe
{
validate(s);
return s.idup;
}
} // Convert functions are @safe
/* =================== toUTFz ======================= */
/++
Returns a C-style zero-terminated string equivalent to $(D str). $(D str)
must not contain embedded $(D '\0')'s as any C function will treat the first
$(D '\0') that it sees as the end of the string. If $(D str.empty) is
$(D true), then a string containing only $(D '\0') is returned.
$(D toUTFz) accepts any type of string and is templated on the type of
character pointer that you wish to convert to. It will avoid allocating a
new string if it can, but there's a decent chance that it will end up having
to allocate a new string - particularly when dealing with character types
other than $(D char).
$(RED Warning 1:) If the result of $(D toUTFz) equals $(D str.ptr), then if
anything alters the character one past the end of $(D str) (which is the
$(D '\0') character terminating the string), then the string won't be
zero-terminated anymore. The most likely scenarios for that are if you
append to $(D str) and no reallocation takes place or when $(D str) is a
slice of a larger array, and you alter the character in the larger array
which is one character past the end of $(D str). Another case where it could
occur would be if you had a mutable character array immediately after
$(D str) in memory (for example, if they're member variables in a
user-defined type with one declared right after the other) and that
character array happened to start with $(D '\0'). Such scenarios will never
occur if you immediately use the zero-terminated string after calling
$(D toUTFz) and the C function using it doesn't keep a reference to it.
Also, they are unlikely to occur even if you save the zero-terminated string
(the cases above would be among the few examples of where it could happen).
However, if you save the zero-terminate string and want to be absolutely
certain that the string stays zero-terminated, then simply append a
$(D '\0') to the string and use its $(D ptr) property rather than calling
$(D toUTFz).
$(RED Warning 2:) When passing a character pointer to a C function, and the
C function keeps it around for any reason, make sure that you keep a
reference to it in your D code. Otherwise, it may go away during a garbage
collection cycle and cause a nasty bug when the C code tries to use it.
Examples:
--------------------
auto p1 = toUTFz!(char*)("hello world");
auto p2 = toUTFz!(const(char)*)("hello world");
auto p3 = toUTFz!(immutable(char)*)("hello world");
auto p4 = toUTFz!(char*)("hello world"d);
auto p5 = toUTFz!(const(wchar)*)("hello world");
auto p6 = toUTFz!(immutable(dchar)*)("hello world"w);
--------------------
+/
template toUTFz(P)
{
P toUTFz(S)(S str) @system
{
return toUTFzImpl!(P, S)(str);
}
}
/++ Ditto +/
template toUTFz(P, S)
{
P toUTFz(S str) @system
{
return toUTFzImpl!(P, S)(str);
}
}
private P toUTFzImpl(P, S)(S str) @system
if(isSomeString!S && isPointer!P && isSomeChar!(typeof(*P.init)) &&
is(Unqual!(typeof(*P.init)) == Unqual!(ElementEncodingType!S)) &&
is(immutable(Unqual!(ElementEncodingType!S)) == ElementEncodingType!S))
//immutable(C)[] -> C*, const(C)*, or immutable(C)*
{
if(str.empty)
{
typeof(*P.init)[] retval = ['\0'];
return retval.ptr;
}
alias Unqual!(ElementEncodingType!S) C;
//If the P is mutable, then we have to make a copy.
static if(is(Unqual!(typeof(*P.init)) == typeof(*P.init)))
return toUTFzImpl!(P, const(C)[])(cast(const(C)[])str);
else
{
immutable p = str.ptr + str.length;
// Peek past end of str, if it's 0, no conversion necessary.
// Note that the compiler will put a 0 past the end of static
// strings, and the storage allocator will put a 0 past the end
// of newly allocated char[]'s.
// Is p dereferenceable? A simple test: if the p points to an
// address multiple of 4, then conservatively assume the pointer
// might be pointing to a new block of memory, which might be
// unreadable. Otherwise, it's definitely pointing to valid
// memory.
if((cast(size_t)p & 3) && *p == '\0')
return str.ptr;
return toUTFzImpl!(P, const(C)[])(cast(const(C)[])str);
}
}
private P toUTFzImpl(P, S)(S str) @system
if(isSomeString!S && isPointer!P && isSomeChar!(typeof(*P.init)) &&
is(Unqual!(typeof(*P.init)) == Unqual!(ElementEncodingType!S)) &&
!is(immutable(Unqual!(ElementEncodingType!S)) == ElementEncodingType!S))
//C[] or const(C)[] -> C*, const(C)*, or immutable(C)*
{
alias ElementEncodingType!S InChar;
alias typeof(*P.init) OutChar;
//const(C)[] -> const(C)* or
//C[] -> C* or const(C)*
static if((is(const(Unqual!InChar) == InChar) && is(const(Unqual!OutChar) == OutChar)) ||
(!is(const(Unqual!InChar) == InChar) && !is(immutable(Unqual!OutChar) == OutChar)))
{
auto p = str.ptr + str.length;
if((cast(size_t)p & 3) && *p == '\0')
return str.ptr;
str ~= '\0';
return str.ptr;
}
//const(C)[] -> C* or immutable(C)* or
//C[] -> immutable(C)*
else
{
auto copy = uninitializedArray!(Unqual!OutChar[])(str.length + 1);
copy[0 .. $ - 1] = str[];
copy[$ - 1] = '\0';
return cast(P)copy.ptr;
}
}
private P toUTFzImpl(P, S)(S str)
if(isSomeString!S && isPointer!P && isSomeChar!(typeof(*P.init)) &&
!is(Unqual!(typeof(*P.init)) == Unqual!(ElementEncodingType!S)))
//C1[], const(C1)[], or immutable(C1)[] -> C2*, const(C2)*, or immutable(C2)*
{
auto retval = appender!(typeof(*P.init)[])();
foreach(dchar c; str)
retval.put(c);
retval.put('\0');
return cast(P)retval.data.ptr;
}
//Verify Examples.
unittest
{
auto p1 = toUTFz!(char*)("hello world");
auto p2 = toUTFz!(const(char)*)("hello world");
auto p3 = toUTFz!(immutable(char)*)("hello world");
auto p4 = toUTFz!(char*)("hello world"d);
auto p5 = toUTFz!(const(wchar)*)("hello world");
auto p6 = toUTFz!(immutable(dchar)*)("hello world"w);
}
unittest
{
import core.exception;
import std.algorithm;
import std.metastrings;
import std.typetuple;
size_t zeroLen(C)(const(C)* ptr)
{
size_t len = 0;
while(*ptr != '\0')
{
++ptr;
++len;
}
return len;
}
foreach(S; TypeTuple!(string, wstring, dstring))
{
alias Unqual!(ElementEncodingType!S) C;
auto s1 = to!S("hello\U00010143\u0100\U00010143");
auto temp = new C[](s1.length + 1);
temp[0 .. $ - 1] = s1[0 .. $];
temp[$ - 1] = '\n';
--temp.length;
auto s2 = assumeUnique(temp);
assert(s1 == s2);
foreach(P; TypeTuple!(C*, const(C)*, immutable(C)*))
{
auto p1 = toUTFz!P(s1);
assert(p1[0 .. s1.length] == s1);
assert(p1[s1.length] == '\0');
auto p2 = toUTFz!P(s2);
assert(p2[0 .. s2.length] == s2);
assert(p2[s2.length] == '\0');
}
}
void test(P, S)(S s, size_t line = __LINE__)
{
auto p = toUTFz!P(s);
immutable len = zeroLen(p);
enforce(cmp(s, p[0 .. len]) == 0,
new AssertError(Format!("Unit test failed: %s %s", P.stringof, S.stringof),
__FILE__, line));
}
foreach(P; TypeTuple!(wchar*, const(wchar)*, immutable(wchar)*,
dchar*, const(dchar)*, immutable(dchar)*))
{
test!P("hello\U00010143\u0100\U00010143");
}
foreach(P; TypeTuple!(char*, const(char)*, immutable(char)*,
dchar*, const(dchar)*, immutable(dchar)*))
{
test!P("hello\U00010143\u0100\U00010143"w);
}
foreach(P; TypeTuple!(char*, const(char)*, immutable(char)*,
wchar*, const(wchar)*, immutable(wchar)*))
{
test!P("hello\U00010143\u0100\U00010143"d);
}
foreach(S; TypeTuple!(char[], wchar[], dchar[],
const(char)[], const(wchar)[], const(dchar)[]))
{
auto s = to!S("hello\U00010143\u0100\U00010143");
foreach(P; TypeTuple!(char*, wchar*, dchar*,
const(char)*, const(wchar)*, const(dchar)*,
immutable(char)*, immutable(wchar)*, immutable(dchar)*))
{
test!P(s);
}
}
}
/++
$(D toUTF16z) is a convenience function for $(D toUTFz!(const(wchar)*)).
Encodes string $(D s) into UTF-16 and returns the encoded string.
$(D toUTF16z) is suitable for calling the 'W' functions in the Win32 API
that take an $(D LPWSTR) or $(D LPCWSTR) argument.
+/
const(wchar)* toUTF16z(C)(const(C)[] str)
if(isSomeChar!C)
{
return toUTFz!(const(wchar)*)(str);
}
unittest
{
import std.typetuple;
//toUTFz is already thoroughly tested, so this will just verify that
//toUTF16z compiles properly for the various string types.
foreach(S; TypeTuple!(string, wstring, dstring))
static assert(__traits(compiles, toUTF16z(to!S("hello world"))));
}
/* ================================ tests ================================== */
unittest
{
debug(utf) printf("utf.toUTF.unittest\n");
string c;
wstring w;
dstring d;
c = "hello";
w = toUTF16(c);
assert(w == "hello");
d = toUTF32(c);
assert(d == "hello");
c = toUTF8(w);
assert(c == "hello");
d = toUTF32(w);
assert(d == "hello");
c = toUTF8(d);
assert(c == "hello");
w = toUTF16(d);
assert(w == "hello");
c = "hel\u1234o";
w = toUTF16(c);
assert(w == "hel\u1234o");
d = toUTF32(c);
assert(d == "hel\u1234o");
c = toUTF8(w);
assert(c == "hel\u1234o");
d = toUTF32(w);
assert(d == "hel\u1234o");
c = toUTF8(d);
assert(c == "hel\u1234o");
w = toUTF16(d);
assert(w == "hel\u1234o");
c = "he\U0010AAAAllo";
w = toUTF16(c);
//foreach (wchar c; w) printf("c = x%x\n", c);
//foreach (wchar c; cast(wstring)"he\U0010AAAAllo") printf("c = x%x\n", c);
assert(w == "he\U0010AAAAllo");
d = toUTF32(c);
assert(d == "he\U0010AAAAllo");
c = toUTF8(w);
assert(c == "he\U0010AAAAllo");
d = toUTF32(w);
assert(d == "he\U0010AAAAllo");
c = toUTF8(d);
assert(c == "he\U0010AAAAllo");
w = toUTF16(d);
assert(w == "he\U0010AAAAllo");
}
/++
Returns the total number of code points encoded in $(D str).
Supercedes: This function supercedes $(LREF toUCSindex).
Standards: Unicode 5.0, ASCII, ISO-8859-1, WINDOWS-1252
Throws:
$(D UTFException) if $(D str) is not well-formed.
+/
size_t count(C)(const(C)[] str) @trusted pure
if(isSomeChar!C)
{
return walkLength(str);
}
unittest
{
assert(count("") == 0);
assert(count("a") == 1);
assert(count("abc") == 3);
assert(count("\u20AC100") == 4);
}
|
D
|
/**
* Put initializers and objects created from CTFE into a `dt_t` data structure
* so the backend puts them into the data segment.
*
* 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/todt.d, _todt.d)
* Documentation: https://dlang.org/phobos/dmd_todt.html
* Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/todt.d
*/
module dmd.todt;
import core.stdc.stdio;
import core.stdc.string;
import dmd.root.array;
import dmd.root.rmem;
import dmd.aggregate;
import dmd.arraytypes;
import dmd.backend.type;
import dmd.complex;
import dmd.ctfeexpr;
import dmd.declaration;
import dmd.dclass;
import dmd.denum;
import dmd.dstruct;
import dmd.dsymbol;
import dmd.dtemplate;
import dmd.errors;
import dmd.expression;
import dmd.func;
import dmd.globals;
import dmd.init;
import dmd.mtype;
import dmd.target;
import dmd.tokens;
import dmd.tocsym;
import dmd.toobj;
import dmd.typesem;
import dmd.typinf;
import dmd.visitor;
import dmd.backend.cc;
import dmd.backend.dt;
alias toSymbol = dmd.tocsym.toSymbol;
alias toSymbol = dmd.glue.toSymbol;
/* A dt_t is a simple structure representing data to be added
* to the data segment of the output object file. As such,
* it is a list of initialized bytes, 0 data, and offsets from
* other symbols.
* Each D symbol and type can be converted into a dt_t so it can
* be written to the data segment.
*/
alias Dts = Array!(dt_t*);
/* ================================================================ */
extern (C++) void Initializer_toDt(Initializer init, ref DtBuilder dtb)
{
void visitError(ErrorInitializer)
{
assert(0);
}
void visitVoid(VoidInitializer vi)
{
/* Void initializers are set to 0, just because we need something
* to set them to in the static data segment.
*/
dtb.nzeros(cast(uint)vi.type.size());
}
void visitStruct(StructInitializer si)
{
//printf("StructInitializer.toDt('%s')\n", si.toChars());
assert(0);
}
void visitArray(ArrayInitializer ai)
{
//printf("ArrayInitializer.toDt('%s')\n", ai.toChars());
Type tb = ai.type.toBasetype();
if (tb.ty == Tvector)
tb = (cast(TypeVector)tb).basetype;
Type tn = tb.nextOf().toBasetype();
//printf("\tdim = %d\n", ai.dim);
Dts dts;
dts.setDim(ai.dim);
dts.zero();
uint size = cast(uint)tn.size();
uint length = 0;
foreach (i, idx; ai.index)
{
if (idx)
length = cast(uint)idx.toInteger();
//printf("\tindex[%d] = %p, length = %u, dim = %u\n", i, idx, length, ai.dim);
assert(length < ai.dim);
auto dtb = DtBuilder(0);
Initializer_toDt(ai.value[i], dtb);
if (dts[length])
error(ai.loc, "duplicate initializations for index `%d`", length);
dts[length] = dtb.finish();
length++;
}
Expression edefault = tb.nextOf().defaultInit(Loc.initial);
const n = tn.numberOfElems(ai.loc);
dt_t* dtdefault = null;
auto dtbarray = DtBuilder(0);
foreach (dt; dts)
{
if (dt)
dtbarray.cat(dt);
else
{
if (!dtdefault)
{
auto dtb = DtBuilder(0);
Expression_toDt(edefault, dtb);
dtdefault = dtb.finish();
}
dtbarray.repeat(dtdefault, n);
}
}
switch (tb.ty)
{
case Tsarray:
{
TypeSArray ta = cast(TypeSArray)tb;
size_t tadim = cast(size_t)ta.dim.toInteger();
if (ai.dim < tadim)
{
if (edefault.isBool(false))
{
// pad out end of array
dtbarray.nzeros(cast(uint)(size * (tadim - ai.dim)));
}
else
{
if (!dtdefault)
{
auto dtb = DtBuilder(0);
Expression_toDt(edefault, dtb);
dtdefault = dtb.finish();
}
const m = n * (tadim - ai.dim);
assert(m <= uint.max);
dtbarray.repeat(dtdefault, cast(uint)m);
}
}
else if (ai.dim > tadim)
{
error(ai.loc, "too many initializers, %d, for array[%d]", ai.dim, tadim);
}
dtb.cat(dtbarray);
break;
}
case Tpointer:
case Tarray:
{
if (tb.ty == Tarray)
dtb.size(ai.dim);
Symbol* s = dtb.dtoff(dtbarray.finish(), 0);
if (tn.isMutable())
foreach (i; 0 .. ai.dim)
write_pointers(tn, s, size * cast(int)i);
break;
}
default:
assert(0);
}
dt_free(dtdefault);
}
void visitExp(ExpInitializer ei)
{
//printf("ExpInitializer.toDt() %s\n", ei.exp.toChars());
ei.exp = ei.exp.optimize(WANTvalue);
Expression_toDt(ei.exp, dtb);
}
final switch (init.kind)
{
case InitKind.void_: return visitVoid (cast( VoidInitializer)init);
case InitKind.error: return visitError (cast( ErrorInitializer)init);
case InitKind.struct_: return visitStruct(cast(StructInitializer)init);
case InitKind.array: return visitArray (cast( ArrayInitializer)init);
case InitKind.exp: return visitExp (cast( ExpInitializer)init);
}
}
/* ================================================================ */
extern (C++) void Expression_toDt(Expression e, ref DtBuilder dtb)
{
void nonConstExpError(Expression e)
{
version (none)
{
printf("Expression.toDt() %d\n", e.op);
}
e.error("non-constant expression `%s`", e.toChars());
dtb.nzeros(1);
}
void visitCast(CastExp e)
{
version (none)
{
printf("CastExp.toDt() %d from %s to %s\n", e.op, e.e1.type.toChars(), e.type.toChars());
}
if (e.e1.type.ty == Tclass)
{
if (auto toc = e.type.isTypeClass())
{
if (auto toi = toc.sym.isInterfaceDeclaration()) // casting from class to interface
{
auto cre1 = e.e1.isClassReferenceExp();
ClassDeclaration from = cre1.originalClass();
int off = 0;
const isbase = toi.isBaseOf(from, &off);
assert(isbase);
ClassReferenceExp_toDt(cre1, dtb, off);
}
else //casting from class to class
{
Expression_toDt(e.e1, dtb);
}
return;
}
}
nonConstExpError(e);
}
void visitAddr(AddrExp e)
{
version (none)
{
printf("AddrExp.toDt() %d\n", e.op);
}
if (auto sl = e.e1.isStructLiteralExp())
{
Symbol* s = toSymbol(sl);
dtb.xoff(s, 0);
if (sl.type.isMutable())
write_pointers(sl.type, s, 0);
return;
}
nonConstExpError(e);
}
void visitInteger(IntegerExp e)
{
//printf("IntegerExp.toDt() %d\n", e.op);
const sz = cast(uint)e.type.size();
if (auto value = e.getInteger())
dtb.nbytes(sz, cast(char*)&value);
else
dtb.nzeros(sz);
}
void visitReal(RealExp e)
{
//printf("RealExp.toDt(%Lg)\n", e.value);
switch (e.type.toBasetype().ty)
{
case Tfloat32:
case Timaginary32:
{
auto fvalue = cast(float)e.value;
dtb.nbytes(4, cast(char*)&fvalue);
break;
}
case Tfloat64:
case Timaginary64:
{
auto dvalue = cast(double)e.value;
dtb.nbytes(8, cast(char*)&dvalue);
break;
}
case Tfloat80:
case Timaginary80:
{
auto evalue = e.value;
dtb.nbytes(target.realsize - target.realpad, cast(char*)&evalue);
dtb.nzeros(target.realpad);
break;
}
default:
printf("%s, e.type=%s\n", e.toChars(), e.type.toChars());
assert(0);
}
}
void visitComplex(ComplexExp e)
{
//printf("ComplexExp.toDt() '%s'\n", e.toChars());
switch (e.type.toBasetype().ty)
{
case Tcomplex32:
{
auto fvalue = cast(float)creall(e.value);
dtb.nbytes(4, cast(char*)&fvalue);
fvalue = cast(float)cimagl(e.value);
dtb.nbytes(4, cast(char*)&fvalue);
break;
}
case Tcomplex64:
{
auto dvalue = cast(double)creall(e.value);
dtb.nbytes(8, cast(char*)&dvalue);
dvalue = cast(double)cimagl(e.value);
dtb.nbytes(8, cast(char*)&dvalue);
break;
}
case Tcomplex80:
{
auto evalue = creall(e.value);
dtb.nbytes(target.realsize - target.realpad, cast(char*)&evalue);
dtb.nzeros(target.realpad);
evalue = cimagl(e.value);
dtb.nbytes(target.realsize - target.realpad, cast(char*)&evalue);
dtb.nzeros(target.realpad);
break;
}
default:
assert(0);
}
}
void visitNull(NullExp e)
{
assert(e.type);
dtb.nzeros(cast(uint)e.type.size());
}
void visitString(StringExp e)
{
//printf("StringExp.toDt() '%s', type = %s\n", e.toChars(), e.type.toChars());
Type t = e.type.toBasetype();
// BUG: should implement some form of static string pooling
const n = cast(int)e.numberOfCodeUnits();
const(char)* p;
char* q;
if (e.sz == 1)
p = e.peekString().ptr;
else
{
q = cast(char*)mem.xmalloc(n * e.sz);
e.writeTo(q, false);
p = q;
}
switch (t.ty)
{
case Tarray:
dtb.size(n);
goto case Tpointer;
case Tpointer:
if (e.sz == 1)
{
import dmd.e2ir : toStringSymbol;
import dmd.glue : totym;
Symbol* s = toStringSymbol(p, n, e.sz);
dtb.xoff(s, 0);
}
else
dtb.abytes(0, n * e.sz, p, cast(uint)e.sz);
break;
case Tsarray:
{
auto tsa = t.isTypeSArray();
dtb.nbytes(n * e.sz, p);
if (tsa.dim)
{
dinteger_t dim = tsa.dim.toInteger();
if (n < dim)
{
// Pad remainder with 0
dtb.nzeros(cast(uint)((dim - n) * tsa.next.size()));
}
}
break;
}
default:
printf("StringExp.toDt(type = %s)\n", e.type.toChars());
assert(0);
}
mem.xfree(q);
}
void visitArrayLiteral(ArrayLiteralExp e)
{
//printf("ArrayLiteralExp.toDt() '%s', type = %s\n", e.toChars(), e.type.toChars());
auto dtbarray = DtBuilder(0);
foreach (i; 0 .. e.elements.dim)
{
Expression_toDt(e[i], dtbarray);
}
Type t = e.type.toBasetype();
switch (t.ty)
{
case Tsarray:
dtb.cat(dtbarray);
break;
case Tarray:
dtb.size(e.elements.dim);
goto case Tpointer;
case Tpointer:
{
if (auto d = dtbarray.finish())
dtb.dtoff(d, 0);
else
dtb.size(0);
break;
}
default:
assert(0);
}
}
void visitStructLiteral(StructLiteralExp sle)
{
//printf("StructLiteralExp.toDt() %s, ctfe = %d\n", sle.toChars(), sle.ownedByCtfe);
assert(sle.sd.nonHiddenFields() <= sle.elements.dim);
membersToDt(sle.sd, dtb, sle.elements, 0, null);
}
void visitSymOff(SymOffExp e)
{
//printf("SymOffExp.toDt('%s')\n", e.var.toChars());
assert(e.var);
if (!(e.var.isDataseg() || e.var.isCodeseg()) ||
e.var.needThis() ||
e.var.isThreadlocal())
{
return nonConstExpError(e);
}
dtb.xoff(toSymbol(e.var), cast(uint)e.offset);
}
void visitVar(VarExp e)
{
//printf("VarExp.toDt() %d\n", e.op);
if (auto v = e.var.isVarDeclaration())
{
if ((v.isConst() || v.isImmutable()) &&
e.type.toBasetype().ty != Tsarray && v._init)
{
e.error("recursive reference `%s`", e.toChars());
return;
}
v.inuse++;
Initializer_toDt(v._init, dtb);
v.inuse--;
return;
}
if (auto sd = e.var.isSymbolDeclaration())
if (sd.dsym)
{
StructDeclaration_toDt(sd.dsym, dtb);
return;
}
return nonConstExpError(e);
}
void visitFunc(FuncExp e)
{
//printf("FuncExp.toDt() %d\n", e.op);
if (e.fd.tok == TOK.reserved && e.type.ty == Tpointer)
{
// change to non-nested
e.fd.tok = TOK.function_;
e.fd.vthis = null;
}
Symbol *s = toSymbol(e.fd);
toObjFile(e.fd, false);
if (e.fd.tok == TOK.delegate_)
dtb.size(0);
dtb.xoff(s, 0);
}
void visitVector(VectorExp e)
{
//printf("VectorExp.toDt() %s\n", e.toChars());
foreach (i; 0 .. e.dim)
{
Expression elem;
if (auto ale = e.e1.isArrayLiteralExp())
elem = ale[i];
else
elem = e.e1;
Expression_toDt(elem, dtb);
}
}
void visitClassReference(ClassReferenceExp e)
{
InterfaceDeclaration to = (cast(TypeClass)e.type).sym.isInterfaceDeclaration();
if (to) //Static typeof this literal is an interface. We must add offset to symbol
{
ClassDeclaration from = e.originalClass();
int off = 0;
const isbase = to.isBaseOf(from, &off);
assert(isbase);
ClassReferenceExp_toDt(e, dtb, off);
}
else
ClassReferenceExp_toDt(e, dtb, 0);
}
void visitTypeid(TypeidExp e)
{
if (Type t = isType(e.obj))
{
genTypeInfo(e.loc, t, null);
Symbol *s = toSymbol(t.vtinfo);
dtb.xoff(s, 0);
return;
}
assert(0);
}
switch (e.op)
{
default: return nonConstExpError(e);
case TOK.cast_: return visitCast (e.isCastExp());
case TOK.address: return visitAddr (e.isAddrExp());
case TOK.int64: return visitInteger (e.isIntegerExp());
case TOK.float64: return visitReal (e.isRealExp());
case TOK.complex80: return visitComplex (e.isComplexExp());
case TOK.null_: return visitNull (e.isNullExp());
case TOK.string_: return visitString (e.isStringExp());
case TOK.arrayLiteral: return visitArrayLiteral (e.isArrayLiteralExp());
case TOK.structLiteral: return visitStructLiteral (e.isStructLiteralExp());
case TOK.symbolOffset: return visitSymOff (e.isSymOffExp());
case TOK.variable: return visitVar (e.isVarExp());
case TOK.function_: return visitFunc (e.isFuncExp());
case TOK.vector: return visitVector (e.isVectorExp());
case TOK.classReference: return visitClassReference(e.isClassReferenceExp());
case TOK.typeid_: return visitTypeid (e.isTypeidExp());
}
}
/* ================================================================= */
// Generate the data for the static initializer.
extern (C++) void ClassDeclaration_toDt(ClassDeclaration cd, ref DtBuilder dtb)
{
//printf("ClassDeclaration.toDt(this = '%s')\n", cd.toChars());
membersToDt(cd, dtb, null, 0, cd);
//printf("-ClassDeclaration.toDt(this = '%s')\n", cd.toChars());
}
extern (C++) void StructDeclaration_toDt(StructDeclaration sd, ref DtBuilder dtb)
{
//printf("+StructDeclaration.toDt(), this='%s'\n", sd.toChars());
membersToDt(sd, dtb, null, 0, null);
//printf("-StructDeclaration.toDt(), this='%s'\n", sd.toChars());
}
/******************************
* Generate data for instance of __cpp_type_info_ptr that refers
* to the C++ RTTI symbol for cd.
* Params:
* cd = C++ class
* dtb = data table builder
*/
extern (C++) void cpp_type_info_ptr_toDt(ClassDeclaration cd, ref DtBuilder dtb)
{
//printf("cpp_type_info_ptr_toDt(this = '%s')\n", cd.toChars());
assert(cd.isCPPclass());
// Put in first two members, the vtbl[] and the monitor
dtb.xoff(toVtblSymbol(ClassDeclaration.cpp_type_info_ptr), 0);
if (ClassDeclaration.cpp_type_info_ptr.hasMonitor())
dtb.size(0); // monitor
// Create symbol for C++ type info
Symbol *s = toSymbolCppTypeInfo(cd);
// Put in address of cd's C++ type info
dtb.xoff(s, 0);
//printf("-cpp_type_info_ptr_toDt(this = '%s')\n", cd.toChars());
}
/****************************************************
* Put out initializers of ad.fields[].
* Although this is consistent with the elements[] version, we
* have to use this optimized version to reduce memory footprint.
* Params:
* ad = aggregate with members
* pdt = tail of initializer list to start appending initialized data to
* elements = values to use as initializers, null means use default initializers
* firstFieldIndex = starting place is elements[firstFieldIndex]
* concreteType = structs: null, classes: most derived class
* ppb = pointer that moves through BaseClass[] from most derived class
* Returns:
* updated tail of dt_t list
*/
private void membersToDt(AggregateDeclaration ad, ref DtBuilder dtb,
Expressions* elements, size_t firstFieldIndex,
ClassDeclaration concreteType,
BaseClass*** ppb = null)
{
//printf("membersToDt(ad = '%s', concrete = '%s', ppb = %p)\n", ad.toChars(), concreteType ? concreteType.toChars() : "null", ppb);
ClassDeclaration cd = ad.isClassDeclaration();
version (none)
{
printf(" interfaces.length = %d\n", cast(int)cd.interfaces.length);
foreach (i, b; cd.vtblInterfaces[])
{
printf(" vbtblInterfaces[%d] b = %p, b.sym = %s\n", cast(int)i, b, b.sym.toChars());
}
}
/* Order:
* { base class } or { __vptr, __monitor }
* interfaces
* fields
*/
uint offset;
if (cd)
{
if (ClassDeclaration cdb = cd.baseClass)
{
size_t index = 0;
for (ClassDeclaration c = cdb.baseClass; c; c = c.baseClass)
index += c.fields.dim;
membersToDt(cdb, dtb, elements, index, concreteType);
offset = cdb.structsize;
}
else if (InterfaceDeclaration id = cd.isInterfaceDeclaration())
{
offset = (**ppb).offset;
if (id.vtblInterfaces.dim == 0)
{
BaseClass* b = **ppb;
//printf(" Interface %s, b = %p\n", id.toChars(), b);
++(*ppb);
for (ClassDeclaration cd2 = concreteType; 1; cd2 = cd2.baseClass)
{
assert(cd2);
uint csymoffset = baseVtblOffset(cd2, b);
//printf(" cd2 %s csymoffset = x%x\n", cd2 ? cd2.toChars() : "null", csymoffset);
if (csymoffset != ~0)
{
dtb.xoff(toSymbol(cd2), csymoffset);
offset += target.ptrsize;
break;
}
}
}
}
else
{
dtb.xoff(toVtblSymbol(concreteType), 0); // __vptr
offset = target.ptrsize;
if (cd.hasMonitor())
{
dtb.size(0); // __monitor
offset += target.ptrsize;
}
}
// Interface vptr initializations
toSymbol(cd); // define csym
BaseClass** pb;
if (!ppb)
{
pb = (*cd.vtblInterfaces)[].ptr;
ppb = &pb;
}
foreach (si; cd.interfaces[])
{
BaseClass* b = **ppb;
if (offset < b.offset)
dtb.nzeros(b.offset - offset);
membersToDt(si.sym, dtb, elements, firstFieldIndex, concreteType, ppb);
//printf("b.offset = %d, b.sym.structsize = %d\n", (int)b.offset, (int)b.sym.structsize);
offset = b.offset + b.sym.structsize;
}
}
else
offset = 0;
assert(!elements ||
firstFieldIndex <= elements.dim &&
firstFieldIndex + ad.fields.dim <= elements.dim);
foreach (i, field; ad.fields)
{
if (elements && !(*elements)[firstFieldIndex + i])
continue;
if (!elements || !(*elements)[firstFieldIndex + i])
{
if (field._init && field._init.isVoidInitializer())
continue;
}
VarDeclaration vd;
size_t k;
foreach (j; i .. ad.fields.length)
{
VarDeclaration v2 = ad.fields[j];
if (v2.offset < offset)
continue;
if (elements && !(*elements)[firstFieldIndex + j])
continue;
if (!elements || !(*elements)[firstFieldIndex + j])
{
if (v2._init && v2._init.isVoidInitializer())
continue;
}
// find the nearest field
if (!vd || v2.offset < vd.offset)
{
vd = v2;
k = j;
assert(vd == v2 || !vd.isOverlappedWith(v2));
}
}
if (!vd)
continue;
assert(offset <= vd.offset);
if (offset < vd.offset)
dtb.nzeros(vd.offset - offset);
auto dtbx = DtBuilder(0);
if (elements)
{
Expression e = (*elements)[firstFieldIndex + k];
if (auto tsa = vd.type.toBasetype().isTypeSArray())
toDtElem(tsa, dtbx, e);
else
Expression_toDt(e, dtbx); // convert e to an initializer dt
}
else
{
if (Initializer init = vd._init)
{
//printf("\t\t%s has initializer %s\n", vd.toChars(), init.toChars());
if (init.isVoidInitializer())
continue;
assert(vd.semanticRun >= PASS.semantic2done);
auto ei = init.isExpInitializer();
auto tsa = vd.type.toBasetype().isTypeSArray();
if (ei && tsa)
toDtElem(tsa, dtbx, ei.exp);
else
Initializer_toDt(init, dtbx);
}
else if (offset <= vd.offset)
{
//printf("\t\tdefault initializer\n");
Type_toDt(vd.type, dtbx);
}
if (dtbx.isZeroLength())
continue;
}
dtb.cat(dtbx);
offset = cast(uint)(vd.offset + vd.type.size());
}
if (offset < ad.structsize)
dtb.nzeros(ad.structsize - offset);
}
/* ================================================================= */
extern (C++) void Type_toDt(Type t, ref DtBuilder dtb)
{
switch (t.ty)
{
case Tvector:
toDtElem(t.isTypeVector().basetype.isTypeSArray(), dtb, null);
break;
case Tsarray:
toDtElem(t.isTypeSArray(), dtb, null);
break;
case Tstruct:
StructDeclaration_toDt(t.isTypeStruct().sym, dtb);
break;
default:
Expression_toDt(t.defaultInit(Loc.initial), dtb);
break;
}
}
private void toDtElem(TypeSArray tsa, ref DtBuilder dtb, Expression e)
{
//printf("TypeSArray.toDtElem() tsa = %s\n", tsa.toChars());
if (tsa.size(Loc.initial) == 0)
{
dtb.nzeros(0);
}
else
{
size_t len = cast(size_t)tsa.dim.toInteger();
assert(len);
Type tnext = tsa.next;
Type tbn = tnext.toBasetype();
Type ten = e ? e.type : null;
if (ten && (ten.ty == Tsarray || ten.ty == Tarray))
ten = ten.nextOf();
while (tbn.ty == Tsarray && (!e || !tbn.equivalent(ten)))
{
len *= tbn.isTypeSArray().dim.toInteger();
tnext = tbn.nextOf();
tbn = tnext.toBasetype();
}
if (!e) // if not already supplied
e = tsa.defaultInit(Loc.initial); // use default initializer
if (!e.type.implicitConvTo(tnext)) // https://issues.dlang.org/show_bug.cgi?id=14996
{
// https://issues.dlang.org/show_bug.cgi?id=1914
// https://issues.dlang.org/show_bug.cgi?id=3198
if (auto se = e.isStringExp())
len /= se.numberOfCodeUnits();
else if (auto ae = e.isArrayLiteralExp())
len /= ae.elements.dim;
}
auto dtb2 = DtBuilder(0);
Expression_toDt(e, dtb2);
dt_t* dt2 = dtb2.finish();
assert(len <= uint.max);
dtb.repeat(dt2, cast(uint)len);
}
}
/*****************************************************/
/* CTFE stuff */
/*****************************************************/
private void ClassReferenceExp_toDt(ClassReferenceExp e, ref DtBuilder dtb, int off)
{
//printf("ClassReferenceExp.toDt() %d\n", e.op);
Symbol* s = toSymbol(e);
dtb.xoff(s, off);
if (e.type.isMutable())
write_instance_pointers(e.type, s, 0);
}
extern (C++) void ClassReferenceExp_toInstanceDt(ClassReferenceExp ce, ref DtBuilder dtb)
{
//printf("ClassReferenceExp.toInstanceDt() %d\n", ce.op);
ClassDeclaration cd = ce.originalClass();
// Put in the rest
size_t firstFieldIndex = 0;
for (ClassDeclaration c = cd.baseClass; c; c = c.baseClass)
firstFieldIndex += c.fields.dim;
membersToDt(cd, dtb, ce.value.elements, firstFieldIndex, cd);
}
/****************************************************
*/
private extern (C++) class TypeInfoDtVisitor : Visitor
{
DtBuilder* dtb;
/*
* Used in TypeInfo*.toDt to verify the runtime TypeInfo sizes
*/
static void verifyStructSize(ClassDeclaration typeclass, size_t expected)
{
if (typeclass.structsize != expected)
{
debug
{
printf("expected = x%x, %s.structsize = x%x\n", cast(uint)expected,
typeclass.toChars(), cast(uint)typeclass.structsize);
}
error(typeclass.loc, "`%s`: mismatch between compiler (%d bytes) and object.d or object.di (%d bytes) found. Check installation and import paths with -v compiler switch.",
typeclass.toChars(), cast(uint)expected, cast(uint)typeclass.structsize);
fatal();
}
}
this(ref DtBuilder dtb)
{
this.dtb = &dtb;
}
alias visit = Visitor.visit;
override void visit(TypeInfoDeclaration d)
{
//printf("TypeInfoDeclaration.toDt() %s\n", toChars());
verifyStructSize(Type.dtypeinfo, 2 * target.ptrsize);
dtb.xoff(toVtblSymbol(Type.dtypeinfo), 0); // vtbl for TypeInfo
if (Type.dtypeinfo.hasMonitor())
dtb.size(0); // monitor
}
override void visit(TypeInfoConstDeclaration d)
{
//printf("TypeInfoConstDeclaration.toDt() %s\n", toChars());
verifyStructSize(Type.typeinfoconst, 3 * target.ptrsize);
dtb.xoff(toVtblSymbol(Type.typeinfoconst), 0); // vtbl for TypeInfo_Const
if (Type.typeinfoconst.hasMonitor())
dtb.size(0); // monitor
Type tm = d.tinfo.mutableOf();
tm = tm.merge();
genTypeInfo(d.loc, tm, null);
dtb.xoff(toSymbol(tm.vtinfo), 0);
}
override void visit(TypeInfoInvariantDeclaration d)
{
//printf("TypeInfoInvariantDeclaration.toDt() %s\n", toChars());
verifyStructSize(Type.typeinfoinvariant, 3 * target.ptrsize);
dtb.xoff(toVtblSymbol(Type.typeinfoinvariant), 0); // vtbl for TypeInfo_Invariant
if (Type.typeinfoinvariant.hasMonitor())
dtb.size(0); // monitor
Type tm = d.tinfo.mutableOf();
tm = tm.merge();
genTypeInfo(d.loc, tm, null);
dtb.xoff(toSymbol(tm.vtinfo), 0);
}
override void visit(TypeInfoSharedDeclaration d)
{
//printf("TypeInfoSharedDeclaration.toDt() %s\n", toChars());
verifyStructSize(Type.typeinfoshared, 3 * target.ptrsize);
dtb.xoff(toVtblSymbol(Type.typeinfoshared), 0); // vtbl for TypeInfo_Shared
if (Type.typeinfoshared.hasMonitor())
dtb.size(0); // monitor
Type tm = d.tinfo.unSharedOf();
tm = tm.merge();
genTypeInfo(d.loc, tm, null);
dtb.xoff(toSymbol(tm.vtinfo), 0);
}
override void visit(TypeInfoWildDeclaration d)
{
//printf("TypeInfoWildDeclaration.toDt() %s\n", toChars());
verifyStructSize(Type.typeinfowild, 3 * target.ptrsize);
dtb.xoff(toVtblSymbol(Type.typeinfowild), 0); // vtbl for TypeInfo_Wild
if (Type.typeinfowild.hasMonitor())
dtb.size(0); // monitor
Type tm = d.tinfo.mutableOf();
tm = tm.merge();
genTypeInfo(d.loc, tm, null);
dtb.xoff(toSymbol(tm.vtinfo), 0);
}
override void visit(TypeInfoEnumDeclaration d)
{
//printf("TypeInfoEnumDeclaration.toDt()\n");
verifyStructSize(Type.typeinfoenum, 7 * target.ptrsize);
dtb.xoff(toVtblSymbol(Type.typeinfoenum), 0); // vtbl for TypeInfo_Enum
if (Type.typeinfoenum.hasMonitor())
dtb.size(0); // monitor
assert(d.tinfo.ty == Tenum);
TypeEnum tc = cast(TypeEnum)d.tinfo;
EnumDeclaration sd = tc.sym;
/* Put out:
* TypeInfo base;
* string name;
* void[] m_init;
*/
// TypeInfo for enum members
if (sd.memtype)
{
genTypeInfo(d.loc, sd.memtype, null);
dtb.xoff(toSymbol(sd.memtype.vtinfo), 0);
}
else
dtb.size(0);
// string name;
const(char)* name = sd.toPrettyChars();
size_t namelen = strlen(name);
dtb.size(namelen);
dtb.xoff(d.csym, Type.typeinfoenum.structsize);
// void[] init;
if (!sd.members || d.tinfo.isZeroInit(Loc.initial))
{
// 0 initializer, or the same as the base type
dtb.size(0); // init.length
dtb.size(0); // init.ptr
}
else
{
dtb.size(sd.type.size()); // init.length
dtb.xoff(toInitializer(sd), 0); // init.ptr
}
// Put out name[] immediately following TypeInfo_Enum
dtb.nbytes(cast(uint)(namelen + 1), name);
}
override void visit(TypeInfoPointerDeclaration d)
{
//printf("TypeInfoPointerDeclaration.toDt()\n");
verifyStructSize(Type.typeinfopointer, 3 * target.ptrsize);
dtb.xoff(toVtblSymbol(Type.typeinfopointer), 0); // vtbl for TypeInfo_Pointer
if (Type.typeinfopointer.hasMonitor())
dtb.size(0); // monitor
auto tc = d.tinfo.isTypePointer();
genTypeInfo(d.loc, tc.next, null);
dtb.xoff(toSymbol(tc.next.vtinfo), 0); // TypeInfo for type being pointed to
}
override void visit(TypeInfoArrayDeclaration d)
{
//printf("TypeInfoArrayDeclaration.toDt()\n");
verifyStructSize(Type.typeinfoarray, 3 * target.ptrsize);
dtb.xoff(toVtblSymbol(Type.typeinfoarray), 0); // vtbl for TypeInfo_Array
if (Type.typeinfoarray.hasMonitor())
dtb.size(0); // monitor
auto tc = d.tinfo.isTypeDArray();
genTypeInfo(d.loc, tc.next, null);
dtb.xoff(toSymbol(tc.next.vtinfo), 0); // TypeInfo for array of type
}
override void visit(TypeInfoStaticArrayDeclaration d)
{
//printf("TypeInfoStaticArrayDeclaration.toDt()\n");
verifyStructSize(Type.typeinfostaticarray, 4 * target.ptrsize);
dtb.xoff(toVtblSymbol(Type.typeinfostaticarray), 0); // vtbl for TypeInfo_StaticArray
if (Type.typeinfostaticarray.hasMonitor())
dtb.size(0); // monitor
auto tc = d.tinfo.isTypeSArray();
genTypeInfo(d.loc, tc.next, null);
dtb.xoff(toSymbol(tc.next.vtinfo), 0); // TypeInfo for array of type
dtb.size(tc.dim.toInteger()); // length
}
override void visit(TypeInfoVectorDeclaration d)
{
//printf("TypeInfoVectorDeclaration.toDt()\n");
verifyStructSize(Type.typeinfovector, 3 * target.ptrsize);
dtb.xoff(toVtblSymbol(Type.typeinfovector), 0); // vtbl for TypeInfo_Vector
if (Type.typeinfovector.hasMonitor())
dtb.size(0); // monitor
auto tc = d.tinfo.isTypeVector();
genTypeInfo(d.loc, tc.basetype, null);
dtb.xoff(toSymbol(tc.basetype.vtinfo), 0); // TypeInfo for equivalent static array
}
override void visit(TypeInfoAssociativeArrayDeclaration d)
{
//printf("TypeInfoAssociativeArrayDeclaration.toDt()\n");
verifyStructSize(Type.typeinfoassociativearray, 4 * target.ptrsize);
dtb.xoff(toVtblSymbol(Type.typeinfoassociativearray), 0); // vtbl for TypeInfo_AssociativeArray
if (Type.typeinfoassociativearray.hasMonitor())
dtb.size(0); // monitor
auto tc = d.tinfo.isTypeAArray();
genTypeInfo(d.loc, tc.next, null);
dtb.xoff(toSymbol(tc.next.vtinfo), 0); // TypeInfo for array of type
genTypeInfo(d.loc, tc.index, null);
dtb.xoff(toSymbol(tc.index.vtinfo), 0); // TypeInfo for array of type
}
override void visit(TypeInfoFunctionDeclaration d)
{
//printf("TypeInfoFunctionDeclaration.toDt()\n");
verifyStructSize(Type.typeinfofunction, 5 * target.ptrsize);
dtb.xoff(toVtblSymbol(Type.typeinfofunction), 0); // vtbl for TypeInfo_Function
if (Type.typeinfofunction.hasMonitor())
dtb.size(0); // monitor
auto tc = d.tinfo.isTypeFunction();
genTypeInfo(d.loc, tc.next, null);
dtb.xoff(toSymbol(tc.next.vtinfo), 0); // TypeInfo for function return value
const name = d.tinfo.deco;
assert(name);
const namelen = strlen(name);
dtb.size(namelen);
dtb.xoff(d.csym, Type.typeinfofunction.structsize);
// Put out name[] immediately following TypeInfo_Function
dtb.nbytes(cast(uint)(namelen + 1), name);
}
override void visit(TypeInfoDelegateDeclaration d)
{
//printf("TypeInfoDelegateDeclaration.toDt()\n");
verifyStructSize(Type.typeinfodelegate, 5 * target.ptrsize);
dtb.xoff(toVtblSymbol(Type.typeinfodelegate), 0); // vtbl for TypeInfo_Delegate
if (Type.typeinfodelegate.hasMonitor())
dtb.size(0); // monitor
auto tc = d.tinfo.isTypeDelegate();
genTypeInfo(d.loc, tc.next.nextOf(), null);
dtb.xoff(toSymbol(tc.next.nextOf().vtinfo), 0); // TypeInfo for delegate return value
const name = d.tinfo.deco;
assert(name);
const namelen = strlen(name);
dtb.size(namelen);
dtb.xoff(d.csym, Type.typeinfodelegate.structsize);
// Put out name[] immediately following TypeInfo_Delegate
dtb.nbytes(cast(uint)(namelen + 1), name);
}
override void visit(TypeInfoStructDeclaration d)
{
//printf("TypeInfoStructDeclaration.toDt() '%s'\n", d.toChars());
if (global.params.is64bit)
verifyStructSize(Type.typeinfostruct, 17 * target.ptrsize);
else
verifyStructSize(Type.typeinfostruct, 15 * target.ptrsize);
dtb.xoff(toVtblSymbol(Type.typeinfostruct), 0); // vtbl for TypeInfo_Struct
if (Type.typeinfostruct.hasMonitor())
dtb.size(0); // monitor
auto tc = d.tinfo.isTypeStruct();
StructDeclaration sd = tc.sym;
if (!sd.members)
return;
if (TemplateInstance ti = sd.isInstantiated())
{
if (!ti.needsCodegen())
{
assert(ti.minst || sd.requestTypeInfo);
/* ti.toObjFile() won't get called. So, store these
* member functions into object file in here.
*/
if (sd.xeq && sd.xeq != StructDeclaration.xerreq)
toObjFile(sd.xeq, global.params.multiobj);
if (sd.xcmp && sd.xcmp != StructDeclaration.xerrcmp)
toObjFile(sd.xcmp, global.params.multiobj);
if (FuncDeclaration ftostr = search_toString(sd))
toObjFile(ftostr, global.params.multiobj);
if (sd.xhash)
toObjFile(sd.xhash, global.params.multiobj);
if (sd.postblit)
toObjFile(sd.postblit, global.params.multiobj);
if (sd.dtor)
toObjFile(sd.dtor, global.params.multiobj);
}
}
/* Put out:
* char[] name;
* void[] init;
* hash_t function(in void*) xtoHash;
* bool function(in void*, in void*) xopEquals;
* int function(in void*, in void*) xopCmp;
* string function(const(void)*) xtoString;
* StructFlags m_flags;
* //xgetMembers;
* xdtor;
* xpostblit;
* uint m_align;
* version (X86_64)
* TypeInfo m_arg1;
* TypeInfo m_arg2;
* xgetRTInfo
*/
const name = sd.toPrettyChars();
const namelen = strlen(name);
dtb.size(namelen);
dtb.xoff(d.csym, Type.typeinfostruct.structsize);
// void[] init;
dtb.size(sd.structsize); // init.length
if (sd.zeroInit)
dtb.size(0); // null for 0 initialization
else
dtb.xoff(toInitializer(sd), 0); // init.ptr
if (FuncDeclaration fd = sd.xhash)
{
dtb.xoff(toSymbol(fd), 0);
TypeFunction tf = cast(TypeFunction)fd.type;
assert(tf.ty == Tfunction);
/* I'm a little unsure this is the right way to do it. Perhaps a better
* way would to automatically add these attributes to any struct member
* function with the name "toHash".
* So I'm leaving this here as an experiment for the moment.
*/
if (!tf.isnothrow || tf.trust == TRUST.system /*|| tf.purity == PURE.impure*/)
warning(fd.loc, "toHash() must be declared as extern (D) size_t toHash() const nothrow @safe, not %s", tf.toChars());
}
else
dtb.size(0);
if (sd.xeq)
dtb.xoff(toSymbol(sd.xeq), 0);
else
dtb.size(0);
if (sd.xcmp)
dtb.xoff(toSymbol(sd.xcmp), 0);
else
dtb.size(0);
if (FuncDeclaration fd = search_toString(sd))
{
dtb.xoff(toSymbol(fd), 0);
}
else
dtb.size(0);
// StructFlags m_flags;
StructFlags m_flags = StructFlags.none;
if (tc.hasPointers()) m_flags |= StructFlags.hasPointers;
dtb.size(m_flags);
version (none)
{
// xgetMembers
if (auto sgetmembers = sd.findGetMembers())
dtb.xoff(toSymbol(sgetmembers), 0);
else
dtb.size(0); // xgetMembers
}
// xdtor
if (auto sdtor = sd.tidtor)
dtb.xoff(toSymbol(sdtor), 0);
else
dtb.size(0); // xdtor
// xpostblit
FuncDeclaration spostblit = sd.postblit;
if (spostblit && !(spostblit.storage_class & STC.disable))
dtb.xoff(toSymbol(spostblit), 0);
else
dtb.size(0); // xpostblit
// uint m_align;
dtb.size(tc.alignsize());
if (global.params.is64bit)
{
Type t = sd.arg1type;
foreach (i; 0 .. 2)
{
// m_argi
if (t)
{
genTypeInfo(d.loc, t, null);
dtb.xoff(toSymbol(t.vtinfo), 0);
}
else
dtb.size(0);
t = sd.arg2type;
}
}
// xgetRTInfo
if (sd.getRTInfo)
{
Expression_toDt(sd.getRTInfo, *dtb);
}
else if (m_flags & StructFlags.hasPointers)
dtb.size(1);
else
dtb.size(0);
// Put out name[] immediately following TypeInfo_Struct
dtb.nbytes(cast(uint)(namelen + 1), name);
}
override void visit(TypeInfoClassDeclaration d)
{
//printf("TypeInfoClassDeclaration.toDt() %s\n", tinfo.toChars());
assert(0);
}
override void visit(TypeInfoInterfaceDeclaration d)
{
//printf("TypeInfoInterfaceDeclaration.toDt() %s\n", tinfo.toChars());
verifyStructSize(Type.typeinfointerface, 3 * target.ptrsize);
dtb.xoff(toVtblSymbol(Type.typeinfointerface), 0); // vtbl for TypeInfoInterface
if (Type.typeinfointerface.hasMonitor())
dtb.size(0); // monitor
auto tc = d.tinfo.isTypeClass();
if (!tc.sym.vclassinfo)
tc.sym.vclassinfo = TypeInfoClassDeclaration.create(tc);
auto s = toSymbol(tc.sym.vclassinfo);
dtb.xoff(s, 0); // ClassInfo for tinfo
}
override void visit(TypeInfoTupleDeclaration d)
{
//printf("TypeInfoTupleDeclaration.toDt() %s\n", tinfo.toChars());
verifyStructSize(Type.typeinfotypelist, 4 * target.ptrsize);
dtb.xoff(toVtblSymbol(Type.typeinfotypelist), 0); // vtbl for TypeInfoInterface
if (Type.typeinfotypelist.hasMonitor())
dtb.size(0); // monitor
auto tu = d.tinfo.isTypeTuple();
const dim = tu.arguments.dim;
dtb.size(dim); // elements.length
auto dtbargs = DtBuilder(0);
foreach (arg; *tu.arguments)
{
genTypeInfo(d.loc, arg.type, null);
Symbol* s = toSymbol(arg.type.vtinfo);
dtbargs.xoff(s, 0);
}
dtb.dtoff(dtbargs.finish(), 0); // elements.ptr
}
}
extern (C++) void TypeInfo_toDt(ref DtBuilder dtb, TypeInfoDeclaration d)
{
scope v = new TypeInfoDtVisitor(dtb);
d.accept(v);
}
|
D
|
import c;
|
D
|
module tests.match;
import optional;
@("Should work with qualified optionals")
@safe @nogc unittest {
import std.meta: AliasSeq;
foreach (T; AliasSeq!(Optional!int, const Optional!int, immutable Optional!int)) {
T a = some(3);
auto r = a.match!(
(int a) => "yes",
() => "no",
);
assert(r == "yes");
}
}
@("shoudl work with void return")
unittest {
int i = 0;
int j = 0;
auto yes = some(1);
auto no = no!int;
void fun(int x) { j = x; }
yes.match!(
(int a) => i = a,
() => fun(3),
);
assert(i == 1);
assert(j == 0);
no.match!(
(int a) => i = a + 1,
() => fun(3),
);
assert(i == 1);
assert(j == 3);
}
|
D
|
// This file is part of Visual D
//
// Visual D integrates the D programming language into Visual Studio
// Copyright (c) 2010-2011 by Rainer Schuetze, All Rights Reserved
//
// 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 vdc.parser.misc;
import vdc.util;
import vdc.lexer;
import vdc.parser.engine;
import vdc.parser.expr;
import vdc.parser.decl;
import vdc.parser.stmt;
import vdc.parser.mod;
import ast = vdc.ast.all;
import stdext.util;
//-- GRAMMAR_BEGIN --
//EnumDeclaration:
// enum EnumTag EnumBody
// enum EnumBody
// enum EnumTag : EnumBaseType EnumBody
// enum : EnumBaseType EnumBody
// enum EnumTag ;
// enum EnumInitializers ;
// enum Type EnumInitializers ;
//
//EnumTag:
// Identifier
//
//EnumBaseType:
// Type
//
//EnumInitializers:
// EnumInitializer
// EnumInitializers , EnumInitializer
//
//EnumInitializer:
// Identifier = AssignExpression
class EnumDeclaration
{
static Action enter(Parser p)
{
if(p.tok.id != TOK_enum)
return p.parseError("enum expected");
p.pushNode(new ast.EnumDeclaration(p.tok));
p.pushState(&shiftEnum);
return Accept;
}
static Action shiftEnum(Parser p)
{
switch(p.tok.id)
{
case TOK_lcurly:
p.pushState(&shiftEnumBody);
return EnumBody.enter(p);
case TOK_colon:
p.pushState(&shiftColon);
return Accept;
case TOK_Identifier:
p.pushToken(p.tok);
p.pushState(&shiftIdentifier);
return Accept;
default:
p.pushState(&shiftType);
return Type.enter(p);
}
}
static Action shiftColon(Parser p)
{
p.pushState(&shiftBaseType);
return Type.enter(p);
}
static Action shiftType(Parser p)
{
p.popAppendTopNode!(ast.EnumDeclaration)();
switch(p.tok.id)
{
case TOK_Identifier:
p.topNode!(ast.EnumDeclaration)().ident = p.tok.txt;
p.pushState(&shiftAssignAfterType);
return Accept;
default:
return p.parseError("identifier expected after enum type");
}
}
// assumes token on stack
static Action shiftIdentifier(Parser p)
{
switch(p.tok.id)
{
case TOK_colon:
p.topNode!(ast.EnumDeclaration)().ident = p.popToken().txt;
p.pushState(&shiftColon);
return Accept;
case TOK_semicolon:
p.topNode!(ast.EnumDeclaration)().ident = p.popToken().txt;
return Accept;
case TOK_assign:
p.topNode!(ast.EnumDeclaration)().ident = p.popToken().txt;
p.pushState(&shiftAssign);
return Accept;
case TOK_lcurly:
p.topNode!(ast.EnumDeclaration)().ident = p.popToken().txt;
p.pushState(&shiftEnumBody);
return EnumBody.enter(p);
default:
p.pushState(&shiftType);
return Type.enterIdentifier(p);
}
}
static Action shiftBaseType(Parser p)
{
p.popAppendTopNode!(ast.EnumDeclaration)();
p.pushState(&shiftEnumBody);
return EnumBody.enter(p);
}
static Action shiftEnumBody(Parser p)
{
p.popAppendTopNode!(ast.EnumDeclaration)();
return Forward;
}
static Action shiftAssignAfterType(Parser p)
{
switch(p.tok.id)
{
case TOK_assign:
p.pushState(&shiftAssign);
return Accept;
default:
return p.parseError("'=' expected to initialize enum");
}
}
static Action shiftAssign(Parser p)
{
p.pushState(&shiftExpression);
return AssignExpression.enter(p);
}
static Action shiftExpression(Parser p)
{
auto expr = p.popNode();
auto ed = p.topNode!(ast.EnumDeclaration)();
// rebuild as anonymous enum with single member
auto b = new ast.EnumBody(TOK_lcurly, ed.span);
auto m = new ast.EnumMembers(TOK_Identifier, ed.span);
auto e = new ast.EnumMember(TOK_Identifier, ed.span);
e.addMember(expr);
e.ident = ed.ident;
m.addMember(e);
b.addMember(m);
ed.ident = null;
ed.isDecl = true;
ed.addMember(b);
switch(p.tok.id)
{
case TOK_semicolon:
return Accept;
case TOK_comma:
p.pushState(&shiftNextIdentifier);
return Accept;
default:
return p.parseError("';' expected after single line enum");
}
}
static Action shiftNextIdentifier(Parser p)
{
switch(p.tok.id)
{
case TOK_Identifier:
auto e = new ast.EnumMember(p.tok);
e.ident = p.tok.txt;
p.pushNode(e);
p.pushState(&shiftAssignAfterNextIdentifier);
return Accept;
default:
return p.parseError("identifier expected after enum type");
}
}
static Action shiftAssignAfterNextIdentifier(Parser p)
{
switch(p.tok.id)
{
case TOK_assign:
p.pushState(&shiftNextAssign);
return Accept;
default:
return p.parseError("'=' expected to initialize enum");
}
}
static Action shiftNextAssign(Parser p)
{
p.pushState(&shiftNextExpression);
return AssignExpression.enter(p);
}
static Action shiftNextExpression(Parser p)
{
p.popAppendTopNode!(ast.EnumMember)();
auto m = p.popNode!(ast.EnumMember)();
auto ed = p.topNode!(ast.EnumDeclaration)();
auto eb = ed.getBody();
auto em = static_cast!(ast.EnumMembers)(eb.getMember(0));
em.addMember(m);
switch(p.tok.id)
{
case TOK_semicolon:
return Accept;
case TOK_comma:
p.pushState(&shiftNextIdentifier);
return Accept;
default:
return p.parseError("';' expected after single line enum");
}
}
}
//-- GRAMMAR_BEGIN --
// forward declaration not needed with proper handling
//EnumBody:
// ;
// { EnumMembers }
class EnumBody
{
mixin SequenceNode!(ast.EnumBody, TOK_lcurly, EnumMembersRecover, TOK_rcurly);
}
class EnumMembersRecover
{
static Action enter(Parser p)
{
p.pushNode(new ast.EnumMembers(p.tok));
// recover code inserted into EnumMembers.enter
p.pushRecoverState(&recover);
p.pushState(&Parser.keepRecover); // add a "guard" state to avoid popping recover
p.pushState(&verifyCurly);
p.pushState(&EnumMembers.shift);
return EnumMember.enter(p);
}
static Action verifyCurly(Parser p)
{
if(p.tok.id != TOK_rcurly)
return p.parseError("'}' expected after enum");
return Forward;
}
static Action recover(Parser p)
{
return Parser.recoverSemiCurly(p);
}
}
//-- GRAMMAR_BEGIN --
//EnumMembers:
// EnumMember
// EnumMember ,
// EnumMember , EnumMembers
class EnumMembers
{
mixin ListNode!(ast.EnumMembers, EnumMember, TOK_comma, true);
}
//-- GRAMMAR_BEGIN --
//EnumMember:
// Identifier
// Identifier = AssignExpression
// Type Identifier = AssignExpression
class EnumMember
{
static Action enter(Parser p)
{
p.pushNode(new ast.EnumMember(p.tok));
if(p.tok.id != TOK_Identifier)
{
p.pushState(&shiftType);
return Type.enter(p);
}
p.pushState(&shiftIdentifierOrType);
p.pushToken(p.tok);
return Accept;
}
static Action shiftIdentifierOrType(Parser p)
{
if(p.tok.id != TOK_assign && p.tok.id != TOK_comma && p.tok.id != TOK_rcurly)
{
p.pushState(&shiftType);
return Type.enterIdentifier(p);
}
Token tok = p.popToken();
ast.EnumMember em = p.topNode!(ast.EnumMember)();
em.ident = tok.txt;
return shiftIdentifier(p);
}
static Action shiftAssign(Parser p)
{
p.pushState(&shiftExpression);
return AssignExpression.enter(p);
}
static Action shiftExpression(Parser p)
{
p.popAppendTopNode!(ast.EnumMember, ast.Expression)();
return Forward;
}
static Action shiftType(Parser p)
{
if(p.tok.id != TOK_Identifier)
return p.parseError("identifier expected after type in enum");
p.popAppendTopNode!(ast.EnumMember, ast.Type)();
auto em = p.topNode!(ast.EnumMember)();
em.ident = p.tok.txt;
p.pushState(&shiftIdentifier);
return Accept;
}
static Action shiftIdentifier(Parser p)
{
if(p.tok.id != TOK_assign)
return Forward;
p.pushState(&shiftAssign);
return Accept;
}
}
////////////////////////////////////////////////////////////////
//-- GRAMMAR_BEGIN --
//FunctionBody:
// BlockStatement
// BodyStatement
// InStatement BodyStatement
// OutStatement BodyStatement
// InStatement OutStatement BodyStatement
// OutStatement InStatement BodyStatement
//
//InStatement:
// in BlockStatement
//
//OutStatement:
// out BlockStatement
// out ( Identifier ) BlockStatement
//
//BodyStatement:
// body BlockStatement
//
// body statement might be missing in interface contracts
//
class FunctionBody
{
static bool isInitTerminal(Token tok)
{
switch(tok.id)
{
case TOK_lcurly:
case TOK_body:
case TOK_in:
case TOK_out:
return true;
default:
return false;
}
}
static Action enter(Parser p)
{
ast.FunctionBody fb = new ast.FunctionBody(p.tok);
p.pushNode(fb);
if(p.tok.id == TOK_lcurly)
{
p.pushState(&shiftBodyStatement);
return BlockStatement.enter(p);
}
return shiftStatement(p);
}
static Action shiftBodyStatement(Parser p)
{
auto bodyStmt = p.topNode!(ast.BlockStatement)();
p.popAppendTopNode();
p.topNode!(ast.FunctionBody)().bodyStatement = bodyStmt;
return Forward;
}
static Action shiftInStatement(Parser p)
{
auto inStmt = p.topNode!(ast.BlockStatement)();
p.popAppendTopNode();
p.topNode!(ast.FunctionBody)().inStatement = inStmt;
return shiftStatement(p);
}
static Action shiftOutStatement(Parser p)
{
auto outStmt = p.topNode!(ast.BlockStatement)();
p.popAppendTopNode();
p.topNode!(ast.FunctionBody)().outStatement = outStmt;
return shiftStatement(p);
}
static Action shiftStatement(Parser p)
{
switch(p.tok.id)
{
case TOK_body:
p.pushState(&shiftBodyStatement);
p.pushState(&BlockStatement.enter);
return Accept;
case TOK_in:
if(p.topNode!(ast.FunctionBody)().inStatement)
return p.parseError("duplicate in block");
p.pushState(&shiftInStatement);
p.pushState(&BlockStatement.enter);
return Accept;
case TOK_out:
if(p.topNode!(ast.FunctionBody)().outStatement)
return p.parseError("duplicate out block");
p.pushState(&shiftOut);
return Accept;
default:
return Forward; // p.parseError("expected body or in or out block");
}
}
static Action shiftOut(Parser p)
{
if(p.tok.id == TOK_lparen)
{
p.pushState(&shiftLparen);
return Accept;
}
p.pushState(&shiftOutStatement);
return BlockStatement.enter(p);
}
static Action shiftLparen(Parser p)
{
if(p.tok.id != TOK_Identifier)
return p.parseError("identifier expected for return value in out contract");
auto outid = new ast.OutIdentifier(p.tok);
p.topNode!(ast.FunctionBody)().addMember(outid);
p.topNode!(ast.FunctionBody)().outIdentifier = outid;
p.pushState(&shiftOutIdentifier);
return Accept;
}
static Action shiftOutIdentifier(Parser p)
{
if(p.tok.id != TOK_rparen)
return p.parseError("closing parenthesis expected in out contract");
p.pushState(&shiftOutStatement);
p.pushState(&BlockStatement.enter);
return Accept;
}
}
////////////////////////////////////////////////////////////////
// disambiguate between VersionCondition and VersionSpecification
class VersionCondOrSpec
{
static Action enter(Parser p)
{
assert(p.tok.id == TOK_version);
p.pushState(&shiftVersion);
return Accept;
}
static Action shiftVersion(Parser p)
{
switch(p.tok.id)
{
case TOK_assign:
return VersionSpecification.enterAfterVersion(p);
case TOK_lparen:
return ConditionalDeclaration.enterAfterVersion(p);
default:
return p.parseError("'=' or '(' expected after version");
}
}
}
//-- GRAMMAR_BEGIN --
//ConditionalDeclaration:
// Condition DeclarationBlock
// Condition DeclarationBlock else DeclarationBlock
// Condition: DeclDefs_opt
class ConditionalDeclaration
{
// Condition DeclarationBlock else $ DeclarationBlock
mixin stateAppendClass!(DeclarationBlock, Parser.forward) stateElseDecl;
// Condition DeclarationBlock $ else DeclarationBlock
mixin stateShiftToken!(TOK_else, stateElseDecl.shift,
-1, Parser.forward) stateElse;
// Condition $ DeclarationBlock else DeclarationBlock
mixin stateAppendClass!(DeclarationBlock, stateElse.shift) stateThenDecl;
static Action shiftCondition(Parser p)
{
switch(p.tok.id)
{
case TOK_colon:
auto declblk = new ast.DeclarationBlock(p.tok);
p.topNode!(ast.ConditionalDeclaration).id = TOK_colon;
p.pushNode(declblk);
p.pushState(&enterDeclarationBlock);
return Accept;
default:
return stateThenDecl.shift(p);
}
}
static Action enterDeclarationBlock(Parser p)
{
switch(p.tok.id)
{
case TOK_rcurly:
case TOK_EOF:
return shiftDeclarationBlock(p);
default:
p.pushState(&shiftDeclarationBlock);
return DeclDefs.enter(p);
}
}
static Action shiftDeclarationBlock(Parser p)
{
p.popAppendTopNode!(ast.ConditionalDeclaration,ast.DeclarationBlock)();
return Forward;
}
// $ Condition DeclarationBlock else DeclarationBlock
mixin stateEnterClass!(Condition, ast.ConditionalDeclaration, shiftCondition);
static Action enterAfterVersion(Parser p)
{
p.pushNode(new ast.ConditionalDeclaration(p.tok));
p.pushState(&enterReduce);
return VersionCondition.enterAfterVersion(p);
}
static Action enterAfterDebug(Parser p)
{
p.pushNode(new ast.ConditionalDeclaration(p.tok));
p.pushState(&enterReduce);
return DebugCondition.enterAfterDebug(p);
}
static Action enterAfterStatic(Parser p)
{
p.pushNode(new ast.ConditionalDeclaration(p.tok));
p.pushState(&enterReduce);
return StaticIfCondition.enterAfterStatic(p);
}
}
//-- GRAMMAR_BEGIN --
//ConditionalStatement:
// Condition NoScopeNonEmptyStatement
// Condition NoScopeNonEmptyStatement else NoScopeNonEmptyStatement
class ConditionalStatement
{
// Condition $ NoScopeNonEmptyStatement else NoScopeNonEmptyStatement
mixin stateAppendClass!(NoScopeNonEmptyStatement, Parser.forward) stateElseStmt;
mixin stateShiftToken!(TOK_else, stateElseStmt.shift,
-1, Parser.forward) stateElse;
// Condition $ NoScopeNonEmptyStatement else NoScopeNonEmptyStatement
mixin stateAppendClass!(NoScopeNonEmptyStatement, stateElse.shift) stateThenStmt;
// $ Condition NoScopeNonEmptyStatement else NoScopeNonEmptyStatement
mixin stateEnterClass!(Condition, ast.ConditionalStatement, stateThenStmt.shift);
static Action enterAfterStatic(Parser p)
{
p.pushNode(new ast.ConditionalStatement(p.tok));
p.pushState(&enterReduce);
return StaticIfCondition.enterAfterStatic(p);
}
}
//-- GRAMMAR_BEGIN --
//Condition:
// VersionCondition
// DebugCondition
// StaticIfCondition
class Condition
{
static Action enter(Parser p)
{
switch(p.tok.id)
{
case TOK_version:
return VersionCondition.enter(p);
case TOK_debug:
return DebugCondition.enter(p);
case TOK_static:
return StaticIfCondition.enter(p);
default:
return p.parseError("version, debug or static if expected");
}
}
}
//-- GRAMMAR_BEGIN --
//VersionCondition:
// version ( Integer )
// version ( Identifier )
// version ( unittest )
// version ( assert )
class VersionCondition
{
// version ( Integer $ )
mixin stateShiftToken!(TOK_rparen, Parser.forward) stateRparen;
// version ( $ Integer )
mixin stateAppendClass!(IdentifierOrInteger, stateRparen.shift) stateArgument2;
static Action shiftUnittest(Parser p)
{
p.topNode!(ast.VersionCondition).id = TOK_unittest;
return stateRparen.shift(p);
}
static Action shiftAssert(Parser p)
{
p.topNode!(ast.VersionCondition).id = TOK_assert;
return stateRparen.shift(p);
}
mixin stateShiftToken!(TOK_unittest, shiftUnittest,
TOK_assert, shiftAssert,
-1, stateArgument2.shift) stateArgument;
// version $ ( Integer )
mixin stateShiftToken!(TOK_lparen, stateArgument.shift) stateLparen;
// $ version ( Integer )
mixin stateEnterToken!(TOK_version, ast.VersionCondition, stateLparen.shift);
static Action enterAfterVersion(Parser p)
{
p.pushNode(new ast.VersionCondition(p.tok));
return stateLparen.shift(p);
}
}
//-- GRAMMAR_BEGIN --
//VersionSpecification:
// version = Identifier ;
// version = Integer ;
class VersionSpecification
{
mixin stateShiftToken!(TOK_semicolon, Parser.forward) stateSemi;
mixin stateAppendClass!(IdentifierOrInteger, stateSemi.shift) stateArgument;
mixin stateShiftToken!(TOK_assign, stateArgument.shift) stateAssign;
mixin stateEnterToken!(TOK_version, ast.VersionSpecification, stateAssign.shift);
static Action enterAfterVersion(Parser p)
{
p.pushNode(new ast.VersionSpecification(p.tok));
return stateAssign.shift(p);
}
}
// disambiguate between DebugCondition and DebugSpecification
class DebugCondOrSpec
{
static Action enter(Parser p)
{
assert(p.tok.id == TOK_debug);
p.pushState(&shiftDebug);
return Accept;
}
static Action shiftDebug(Parser p)
{
switch(p.tok.id)
{
case TOK_assign:
return DebugSpecification.enterAfterDebug(p);
default:
return ConditionalDeclaration.enterAfterDebug(p);
}
}
}
//-- GRAMMAR_BEGIN --
//DebugCondition:
// debug
// debug ( Integer )
// debug ( Identifier )
class DebugCondition
{
// debug ( Integer $ )
mixin stateShiftToken!(TOK_rparen, Parser.forward) stateRparen;
// debug ( $ Integer )
mixin stateAppendClass!(IdentifierOrInteger, stateRparen.shift) stateArgument;
// debug $ ( Integer )
mixin stateShiftToken!(TOK_lparen, stateArgument.shift,
-1, Parser.forward) stateLparen;
// $ debug ( Integer )
mixin stateEnterToken!(TOK_debug, ast.DebugCondition, stateLparen.shift);
static Action enterAfterDebug(Parser p)
{
p.pushNode(new ast.DebugCondition(p.tok));
return stateLparen.shift(p);
}
}
//-- GRAMMAR_BEGIN --
//DebugSpecification:
// debug = Identifier ;
// debug = Integer ;
class DebugSpecification
{
// debug = Integer $ ;
mixin stateShiftToken!(TOK_semicolon, Parser.forward) stateSemi;
// debug = $ Integer ;
mixin stateAppendClass!(IdentifierOrInteger, stateSemi.shift) stateArgument;
// debug $ = Integer ;
mixin stateShiftToken!(TOK_assign, stateArgument.shift) stateAssign;
// $ debug = Integer ;
mixin stateEnterToken!(TOK_debug, ast.DebugSpecification, stateAssign.shift);
static Action enterAfterDebug(Parser p)
{
p.pushNode(new ast.DebugSpecification(p.tok));
return stateAssign.shift(p);
}
}
class IdentifierOrInteger
{
static Action enter(Parser p)
{
switch(p.tok.id)
{
case TOK_IntegerLiteral:
p.pushNode(new ast.IntegerLiteralExpression(p.tok));
return Accept;
case TOK_Identifier:
p.pushNode(new ast.Identifier(p.tok));
return Accept;
default:
return p.parseError("integer or identifier expected");
}
}
}
//-- GRAMMAR_BEGIN --
//StaticIfCondition:
// static if ( AssignExpression )
class StaticIfCondition
{
mixin SequenceNode!(ast.StaticIfCondition, TOK_static, TOK_if, TOK_lparen, AssignExpression, TOK_rparen);
static Action enterAfterStatic(Parser p)
{
p.pushNode(new ast.StaticIfCondition(p.tok));
return shift1.shift(p); // jump into sequence before TOK_if
}
}
//-- GRAMMAR_BEGIN --
//StaticAssert:
// static assert ( AssignExpression ) ;
// static assert ( AssignExpression , AssignExpression ) ;
class StaticAssert
{
mixin SequenceNode!(ast.StaticAssert, TOK_static, TOK_assert, TOK_lparen, ArgumentList, TOK_rparen, TOK_semicolon);
static Action enterAfterStatic(Parser p)
{
p.pushNode(new ast.StaticAssert(p.tok));
return shift1.shift(p); // jump into sequence before TOK_assert
}
}
|
D
|
instance Mod_7313_HoherUntoterMagier_AW (Npc_Default)
{
//-------- primary data --------
name = "Hoher Untoter Magier";
Npctype = Npctype_UNTOTERMAGIER;
guild = GIL_STRF;
level = 80;
voice = 2;
id = 7313;
//-------- abilities --------
B_SetAttributesToChapter (self, 4);
level = 80;
//-------- visuals --------
// animations
Mdl_SetVisual (self,"HUMANS.MDS");
Mdl_ApplyOverlayMds (self,"Humans_Relaxed.mds");
// body mesh ,bdytex,skin,head mesh ,headtex,teethtex,ruestung
Mdl_SetVisualBody (self,"hum_body_Naked0", 15, 0,"Hum_Head_FatBald", 200, 1, ITAR_UntoterMagier);
Mdl_SetModelFatness(self,0);
B_SetFightSkills (self, 65);
B_CreateAmbientInv (self);
fight_tactic = FAI_HUMAN_STRONG;
//-------- Talente --------
//-------- inventory --------
//-------------Daily Routine-------------
daily_routine = Rtn_start_7313;
//------------- //MISSIONs-------------
};
FUNC VOID Rtn_start_7313 ()
{
TA_Stand_WP (02,00,08,00,"ADW_PIRATECAMP_WAY_06");
TA_Stand_WP (08,00,02,00,"ADW_PIRATECAMP_WAY_06");
};
|
D
|
/home/komal/r1cs_gadgets/target/debug/lin_com2-8b08f265a1886bde: /home/komal/r1cs_gadgets/src/lib.rs /home/komal/r1cs_gadgets/src/non_zero.rs /home/komal/r1cs_gadgets/src/r1cs_utils.rs /home/komal/r1cs_gadgets/tests/lin_com2.rs
|
D
|
/*
Copyright (c) 2019 Timur Gafarov
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
module dagon.game.presentrenderer;
import dlib.core.memory;
import dlib.core.ownership;
import dagon.core.event;
import dagon.core.time;
import dagon.resource.scene;
import dagon.render.pass;
import dagon.render.deferred;
import dagon.render.framebuffer;
import dagon.postproc.presentpass;
import dagon.game.renderer;
class PresentRenderer: Renderer
{
Framebuffer _inputBuffer;
PresentPass passPresent;
this(EventManager eventManager, Framebuffer inputBuffer, Owner owner)
{
super(eventManager, owner);
this._inputBuffer = inputBuffer;
passPresent = New!PresentPass(pipeline);
passPresent.view = view;
passPresent.inputBuffer = inputBuffer;
}
void inputBuffer(Framebuffer b)
{
_inputBuffer = b;
passPresent.inputBuffer = b;
}
Framebuffer inputBuffer()
{
return _inputBuffer;
}
}
|
D
|
/Users/victornascimento/Documents/Projects/Rust/pong_with_rust/pong_with_rust/target/rls/debug/build/glutin_gles2_sys-956401a57b30f84f/build_script_build-956401a57b30f84f: /Users/victornascimento/.cargo/registry/src/github.com-1ecc6299db9ec823/glutin_gles2_sys-0.1.5/build.rs
/Users/victornascimento/Documents/Projects/Rust/pong_with_rust/pong_with_rust/target/rls/debug/build/glutin_gles2_sys-956401a57b30f84f/build_script_build-956401a57b30f84f.d: /Users/victornascimento/.cargo/registry/src/github.com-1ecc6299db9ec823/glutin_gles2_sys-0.1.5/build.rs
/Users/victornascimento/.cargo/registry/src/github.com-1ecc6299db9ec823/glutin_gles2_sys-0.1.5/build.rs:
|
D
|
/**
* Bcrypt Password Hashing
*
* Copyright:
* (C) 2011 Jack Lloyd
* (C) 2014-2015 Etienne Cimon
*
* License:
* Botan is released under the Simplified BSD License (see LICENSE.md)
*/
module botan.passhash.bcrypt;
import botan.constants;
static if (BOTAN_HAS_BCRYPT && BOTAN_HAS_BLOWFISH):
import botan.rng.rng;
import botan.utils.loadstor;
import botan.block.blowfish;
import botan.codec.base64;
import botan.utils.types;
import botan.utils.mem_ops;
import std.string : toStringz;
import std.conv : to;
/**
* Create a password hash using Bcrypt
* Params:
* password = the password
* rng = a random number generator
* work_factor = how much work to do to slow down guessing attacks
*
* @see http://www.usenix.org/events/usenix99/provos/provos_html/
*/
string generateBcrypt(in string password,
RandomNumberGenerator rng,
ushort work_factor = 10)
{
return makeBcrypt(password, unlock(rng.randomVec(16)), work_factor);
}
/**
* Check a previously created password hash
* Params:
* password = the password to check against
* hash = the stored hash to check against
*/
bool checkBcrypt(in string password, in string hash)
{
if (hash.length != 60 ||
hash[0] != '$' || hash[1] != '2' || hash[2] != 'a' ||
hash[3] != '$' || hash[6] != '$')
{
return false;
}
const ushort workfactor = cast(ushort) to!uint(hash[4 .. 6]);
Vector!ubyte salt = bcryptBase64Decode(hash[7 .. 29].dup);
const string compare = makeBcrypt(password, salt, workfactor);
// constant time memory comparisons on hashes, inefficient but necessary for timing attacks
bool valid = true;
if (compare.length != hash.length)
valid = false;
else {
foreach (i, immutable(char) c; hash) {
foreach (j, immutable(char) c2; compare) {
if (i != j) continue;
if (c != c2) {
valid = false;
}
break;
}
}
}
return valid;
}
private:
string bcryptBase64Encode(const(ubyte)* input, size_t length)
{
// Bcrypt uses a non-standard base64 alphabet
__gshared immutable ubyte[256] OPENBSD_BASE64_SUB = [
0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x38, 0x80, 0x80, 0x80, 0x39,
0x79, 0x7A, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x2E, 0x2F, 0x41, 0x42, 0x43, 0x44, 0x45,
0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51,
0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75,
0x76, 0x77, 0x78, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80
];
char[] b64 = base64Encode(input, length).dup;
while (b64.length && b64[b64.length-1] == '=') {
b64 = b64[0 .. $-1];
}
foreach (size_t i; 0 .. b64.length)
b64[i] = OPENBSD_BASE64_SUB[cast(ubyte) b64[i]];
return cast(string) b64;
}
Vector!ubyte bcryptBase64Decode(char[] input)
{
__gshared immutable ubyte[256] OPENBSD_BASE64_SUB = [
0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x41, 0x42,
0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2B, 0x2F, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55,
0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, 0x62, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D,
0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
0x7A, 0x30, 0x31, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80
];
foreach (size_t i; 0 .. input.length)
input[i] = OPENBSD_BASE64_SUB[cast(ubyte)(input[i])];
return unlock(base64Decode(cast(string)input));
}
string makeBcrypt()(in string pass,
auto const ref Vector!ubyte salt,
ushort work_factor)
{
__gshared immutable ubyte[24] magic = [
0x4F, 0x72, 0x70, 0x68, 0x65, 0x61, 0x6E, 0x42,
0x65, 0x68, 0x6F, 0x6C, 0x64, 0x65, 0x72, 0x53,
0x63, 0x72, 0x79, 0x44, 0x6F, 0x75, 0x62, 0x74
];
Vector!ubyte ctext = Vector!ubyte(magic.ptr[0 .. magic.length]);
Unique!Blowfish blowfish = new Blowfish;
// Include the trailing NULL ubyte
blowfish.eksKeySchedule(cast(const(ubyte)*) pass.toStringz, pass.length + 1, salt.ptr[0 .. 16], work_factor);
foreach (size_t i; 0 .. 64) {
blowfish.encryptN(ctext.ptr, ctext.ptr, 3);
}
string salt_b64 = bcryptBase64Encode(salt.ptr, salt.length);
string work_factor_str = to!string(work_factor);
if (work_factor_str.length == 1)
work_factor_str = "0" ~ work_factor_str;
return "$2a$" ~ work_factor_str ~ "$" ~ salt_b64[0 .. 22] ~ bcryptBase64Encode(ctext.ptr, ctext.length - 1);
}
static if (BOTAN_TEST):
import botan.test;
import botan.rng.auto_rng;
static if (BOTAN_HAS_TESTS && !SKIP_BCRYPT_TEST) unittest
{
import botan.libstate.libstate;
globalState();
logDebug("Testing bcrypt.d ...");
size_t fails = 0;
// Generated by jBCrypt 0.3
if (!checkBcrypt("abc", "$2a$05$DfPyLs.G6.To9fXEFgUL1O6HpYw3jIXgPcl/L3Qt3jESuWmhxtmpS"))
{
logTrace("Bcrypt test 1 failed");
fails++;
}
// http://www.openwall.com/lists/john-dev/2011/06/19/2
if (!checkBcrypt("\xA3", "$2a$05$/OK.fbVrR/bpIqNJ5ianF.Sa7shbm4.OzKpvFnX1pQLmQW96oUlCq"))
{
logTrace("Bcrypt test 2 failed");
fails++;
}
Unique!AutoSeededRNG rng = new AutoSeededRNG;
for(ushort level = 1; level != 5; ++level)
{
const string input = "some test passphrase 123";
const string gen_hash = generateBcrypt(input, *rng, level);
if (!checkBcrypt(input, gen_hash))
{
logTrace("Gen and check for bcrypt failed: " ~ gen_hash ~ " not valid");
++fails;
}
}
testReport("Bcrypt", 6, fails);
}
|
D
|
/**
* Invoke the linker as a separate process.
*
* 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/link.d, _link.d)
* Documentation: https://dlang.org/phobos/dmd_link.html
* Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/link.d
*/
module dmd.link;
import core.stdc.ctype;
import core.stdc.stdio;
import core.stdc.string;
import core.sys.posix.stdio;
import core.sys.posix.stdlib;
import core.sys.posix.unistd;
import core.sys.windows.winbase;
import core.sys.windows.windef;
import dmd.env;
import dmd.errors;
import dmd.globals;
import dmd.root.file;
import dmd.root.filename;
import dmd.root.outbuffer;
import dmd.root.rmem;
import dmd.root.string;
import dmd.utils;
import dmd.vsoptions;
version (Posix) extern (C) int pipe(int*);
version (Windows) extern (C) int spawnlp(int, const char*, const char*, const char*, const char*);
version (Windows) extern (C) int spawnl(int, const char*, const char*, const char*, const char*);
version (Windows) extern (C) int spawnv(int, const char*, const char**);
version (CRuntime_Microsoft)
{
// until the new windows bindings are available when building dmd.
static if(!is(STARTUPINFOA))
{
alias STARTUPINFOA = STARTUPINFO;
// dwCreationFlags for CreateProcess() and CreateProcessAsUser()
enum : DWORD {
DEBUG_PROCESS = 0x00000001,
DEBUG_ONLY_THIS_PROCESS = 0x00000002,
CREATE_SUSPENDED = 0x00000004,
DETACHED_PROCESS = 0x00000008,
CREATE_NEW_CONSOLE = 0x00000010,
NORMAL_PRIORITY_CLASS = 0x00000020,
IDLE_PRIORITY_CLASS = 0x00000040,
HIGH_PRIORITY_CLASS = 0x00000080,
REALTIME_PRIORITY_CLASS = 0x00000100,
CREATE_NEW_PROCESS_GROUP = 0x00000200,
CREATE_UNICODE_ENVIRONMENT = 0x00000400,
CREATE_SEPARATE_WOW_VDM = 0x00000800,
CREATE_SHARED_WOW_VDM = 0x00001000,
CREATE_FORCEDOS = 0x00002000,
BELOW_NORMAL_PRIORITY_CLASS = 0x00004000,
ABOVE_NORMAL_PRIORITY_CLASS = 0x00008000,
CREATE_BREAKAWAY_FROM_JOB = 0x01000000,
CREATE_WITH_USERPROFILE = 0x02000000,
CREATE_DEFAULT_ERROR_MODE = 0x04000000,
CREATE_NO_WINDOW = 0x08000000,
PROFILE_USER = 0x10000000,
PROFILE_KERNEL = 0x20000000,
PROFILE_SERVER = 0x40000000
}
}
}
/****************************************
* Write filename to cmdbuf, quoting if necessary.
*/
private void writeFilename(OutBuffer* buf, const(char)[] filename)
{
/* Loop and see if we need to quote
*/
foreach (const char c; filename)
{
if (isalnum(c) || c == '_')
continue;
/* Need to quote
*/
buf.writeByte('"');
buf.writestring(filename);
buf.writeByte('"');
return;
}
/* No quoting necessary
*/
buf.writestring(filename);
}
private void writeFilename(OutBuffer* buf, const(char)* filename)
{
writeFilename(buf, filename.toDString());
}
version (Posix)
{
/*****************************
* As it forwards the linker error message to stderr, checks for the presence
* of an error indicating lack of a main function (NME_ERR_MSG).
*
* Returns:
* 1 if there is a no main error
* -1 if there is an IO error
* 0 otherwise
*/
private int findNoMainError(int fd)
{
version (OSX)
{
static immutable(char*) nmeErrorMessage = "`__Dmain`, referenced from:";
}
else
{
static immutable(char*) nmeErrorMessage = "undefined reference to `_Dmain`";
}
FILE* stream = fdopen(fd, "r");
if (stream is null)
return -1;
const(size_t) len = 64 * 1024 - 1;
char[len + 1] buffer; // + '\0'
size_t beg = 0, end = len;
bool nmeFound = false;
for (;;)
{
// read linker output
const(size_t) n = fread(&buffer[beg], 1, len - beg, stream);
if (beg + n < len && ferror(stream))
return -1;
buffer[(end = beg + n)] = '\0';
// search error message, stop at last complete line
const(char)* lastSep = strrchr(buffer.ptr, '\n');
if (lastSep)
buffer[(end = lastSep - &buffer[0])] = '\0';
if (strstr(&buffer[0], nmeErrorMessage))
nmeFound = true;
if (lastSep)
buffer[end++] = '\n';
if (fwrite(&buffer[0], 1, end, stderr) < end)
return -1;
if (beg + n < len && feof(stream))
break;
// copy over truncated last line
memcpy(&buffer[0], &buffer[end], (beg = len - end));
}
return nmeFound ? 1 : 0;
}
}
version (Windows)
{
private void writeQuotedArgIfNeeded(ref OutBuffer buffer, const(char)* arg)
{
bool quote = false;
for (size_t i = 0; arg[i]; ++i)
{
if (arg[i] == '"')
{
quote = false;
break;
}
if (arg[i] == ' ')
quote = true;
}
if (quote)
buffer.writeByte('"');
buffer.writestring(arg);
if (quote)
buffer.writeByte('"');
}
unittest
{
OutBuffer buffer;
const(char)[] test(string arg)
{
buffer.reset();
buffer.writeQuotedArgIfNeeded(arg.ptr);
return buffer[];
}
assert(test("arg") == `arg`);
assert(test("arg with spaces") == `"arg with spaces"`);
assert(test(`"/LIBPATH:dir with spaces"`) == `"/LIBPATH:dir with spaces"`);
assert(test(`/LIBPATH:"dir with spaces"`) == `/LIBPATH:"dir with spaces"`);
}
}
/*****************************
* Run the linker. Return status of execution.
*/
public int runLINK()
{
const phobosLibname = global.finalDefaultlibname();
void setExeFile()
{
/* Generate exe file name from first obj name.
* No need to add it to cmdbuf because the linker will default to it.
*/
const char[] n = FileName.name(global.params.objfiles[0].toDString);
global.params.exefile = FileName.forceExt(n, "exe");
}
const(char)[] getMapFilename()
{
const(char)[] fn = FileName.forceExt(global.params.exefile, "map");
const(char)[] path = FileName.path(global.params.exefile);
return path.length ? fn : FileName.combine(global.params.objdir, fn);
}
version (Windows)
{
if (phobosLibname)
global.params.libfiles.push(phobosLibname.xarraydup.ptr);
if (global.params.mscoff)
{
OutBuffer cmdbuf;
cmdbuf.writestring("/NOLOGO");
for (size_t i = 0; i < global.params.objfiles.length; i++)
{
cmdbuf.writeByte(' ');
const(char)* p = global.params.objfiles[i];
writeFilename(&cmdbuf, p);
}
if (global.params.resfile)
{
cmdbuf.writeByte(' ');
writeFilename(&cmdbuf, global.params.resfile);
}
cmdbuf.writeByte(' ');
if (global.params.exefile)
{
cmdbuf.writestring("/OUT:");
writeFilename(&cmdbuf, global.params.exefile);
}
else
{
setExeFile();
}
// Make sure path to exe file exists
ensurePathToNameExists(Loc.initial, global.params.exefile);
cmdbuf.writeByte(' ');
if (global.params.mapfile)
{
cmdbuf.writestring("/MAP:");
writeFilename(&cmdbuf, global.params.mapfile);
}
else if (global.params.map)
{
cmdbuf.writestring("/MAP:");
writeFilename(&cmdbuf, getMapFilename());
}
for (size_t i = 0; i < global.params.libfiles.length; i++)
{
cmdbuf.writeByte(' ');
cmdbuf.writestring("/DEFAULTLIB:");
writeFilename(&cmdbuf, global.params.libfiles[i]);
}
if (global.params.deffile)
{
cmdbuf.writeByte(' ');
cmdbuf.writestring("/DEF:");
writeFilename(&cmdbuf, global.params.deffile);
}
if (global.params.symdebug)
{
cmdbuf.writeByte(' ');
cmdbuf.writestring("/DEBUG");
// in release mode we need to reactivate /OPT:REF after /DEBUG
if (global.params.release)
cmdbuf.writestring(" /OPT:REF");
}
if (global.params.dll)
{
cmdbuf.writeByte(' ');
cmdbuf.writestring("/DLL");
}
for (size_t i = 0; i < global.params.linkswitches.length; i++)
{
cmdbuf.writeByte(' ');
cmdbuf.writeQuotedArgIfNeeded(global.params.linkswitches[i]);
}
VSOptions vsopt;
// if a runtime library (msvcrtNNN.lib) from the mingw folder is selected explicitly, do not detect VS and use lld
if (global.params.mscrtlib.length <= 6 ||
global.params.mscrtlib[0..6] != "msvcrt" || !isdigit(global.params.mscrtlib[6]))
vsopt.initialize();
const(char)* lflags = vsopt.linkOptions(global.params.is64bit);
if (lflags)
{
cmdbuf.writeByte(' ');
cmdbuf.writestring(lflags);
}
const(char)* linkcmd = getenv(global.params.is64bit ? "LINKCMD64" : "LINKCMD");
if (!linkcmd)
linkcmd = getenv("LINKCMD"); // backward compatible
if (!linkcmd)
linkcmd = vsopt.linkerPath(global.params.is64bit);
// object files not SAFESEH compliant, but LLD is more picky than MS link
if (!global.params.is64bit)
if (FileName.equals(FileName.name(linkcmd), "lld-link.exe"))
cmdbuf.writestring(" /SAFESEH:NO");
cmdbuf.writeByte(0); // null terminate the buffer
char[] p = cmdbuf.extractSlice()[0 .. $-1];
const(char)[] lnkfilename;
if (p.length > 7000)
{
lnkfilename = FileName.forceExt(global.params.exefile, "lnk");
writeFile(Loc.initial, lnkfilename, p);
if (lnkfilename.length < p.length)
{
p[0] = '@';
p[1 .. lnkfilename.length +1] = lnkfilename;
p[lnkfilename.length +1] = 0;
}
}
const int status = executecmd(linkcmd, p.ptr);
if (lnkfilename)
{
lnkfilename.toCStringThen!(lf => remove(lf.ptr));
FileName.free(lnkfilename.ptr);
}
return status;
}
else
{
OutBuffer cmdbuf;
global.params.libfiles.push("user32");
global.params.libfiles.push("kernel32");
for (size_t i = 0; i < global.params.objfiles.length; i++)
{
if (i)
cmdbuf.writeByte('+');
const(char)* p = global.params.objfiles[i];
const(char)* basename = FileName.removeExt(FileName.name(p));
const(char)* ext = FileName.ext(p);
if (ext && !strchr(basename, '.'))
{
// Write name sans extension (but not if a double extension)
writeFilename(&cmdbuf, p[0 .. ext - p - 1]);
}
else
writeFilename(&cmdbuf, p);
FileName.free(basename);
}
cmdbuf.writeByte(',');
if (global.params.exefile)
writeFilename(&cmdbuf, global.params.exefile);
else
{
setExeFile();
}
// Make sure path to exe file exists
ensurePathToNameExists(Loc.initial, global.params.exefile);
cmdbuf.writeByte(',');
if (global.params.mapfile)
writeFilename(&cmdbuf, global.params.mapfile);
else if (global.params.map)
{
writeFilename(&cmdbuf, getMapFilename());
}
else
cmdbuf.writestring("nul");
cmdbuf.writeByte(',');
for (size_t i = 0; i < global.params.libfiles.length; i++)
{
if (i)
cmdbuf.writeByte('+');
writeFilename(&cmdbuf, global.params.libfiles[i]);
}
if (global.params.deffile)
{
cmdbuf.writeByte(',');
writeFilename(&cmdbuf, global.params.deffile);
}
/* Eliminate unnecessary trailing commas */
while (1)
{
const size_t i = cmdbuf.length;
if (!i || cmdbuf[i - 1] != ',')
break;
cmdbuf.setsize(cmdbuf.length - 1);
}
if (global.params.resfile)
{
cmdbuf.writestring("/RC:");
writeFilename(&cmdbuf, global.params.resfile);
}
if (global.params.map || global.params.mapfile)
cmdbuf.writestring("/m");
version (none)
{
if (debuginfo)
cmdbuf.writestring("/li");
if (codeview)
{
cmdbuf.writestring("/co");
if (codeview3)
cmdbuf.writestring(":3");
}
}
else
{
if (global.params.symdebug)
cmdbuf.writestring("/co");
}
cmdbuf.writestring("/noi");
for (size_t i = 0; i < global.params.linkswitches.length; i++)
{
cmdbuf.writestring(global.params.linkswitches[i]);
}
cmdbuf.writeByte(';');
cmdbuf.writeByte(0); //null terminate the buffer
char[] p = cmdbuf.extractSlice()[0 .. $-1];
const(char)[] lnkfilename;
if (p.length > 7000)
{
lnkfilename = FileName.forceExt(global.params.exefile, "lnk");
writeFile(Loc.initial, lnkfilename, p);
if (lnkfilename.length < p.length)
{
p[0] = '@';
p[1 .. lnkfilename.length +1] = lnkfilename;
p[lnkfilename.length +1] = 0;
}
}
const(char)* linkcmd = getenv("LINKCMD");
if (!linkcmd)
linkcmd = "optlink";
const int status = executecmd(linkcmd, p.ptr);
if (lnkfilename)
{
lnkfilename.toCStringThen!(lf => remove(lf.ptr));
FileName.free(lnkfilename.ptr);
}
return status;
}
}
else version (Posix)
{
pid_t childpid;
int status;
// Build argv[]
Strings argv;
const(char)* cc = getenv("CC");
if (!cc)
{
argv.push("cc");
}
else
{
// Split CC command to support link driver arguments such as -fpie or -flto.
char* arg = cast(char*)Mem.check(strdup(cc));
const(char)* tok = strtok(arg, " ");
while (tok)
{
argv.push(mem.xstrdup(tok));
tok = strtok(null, " ");
}
free(arg);
}
argv.append(&global.params.objfiles);
version (OSX)
{
// If we are on Mac OS X and linking a dynamic library,
// add the "-dynamiclib" flag
if (global.params.dll)
argv.push("-dynamiclib");
}
else version (Posix)
{
if (global.params.dll)
argv.push("-shared");
}
// None of that a.out stuff. Use explicit exe file name, or
// generate one from name of first source file.
argv.push("-o");
if (global.params.exefile)
{
argv.push(global.params.exefile.xarraydup.ptr);
}
else if (global.params.run)
{
version (all)
{
char[L_tmpnam + 14 + 1] name;
strcpy(name.ptr, P_tmpdir);
strcat(name.ptr, "/dmd_runXXXXXX");
int fd = mkstemp(name.ptr);
if (fd == -1)
{
error(Loc.initial, "error creating temporary file");
return 1;
}
else
close(fd);
global.params.exefile = name.arraydup;
argv.push(global.params.exefile.xarraydup.ptr);
}
else
{
/* The use of tmpnam raises the issue of "is this a security hole"?
* The hole is that after tmpnam and before the file is opened,
* the attacker modifies the file system to get control of the
* file with that name. I do not know if this is an issue in
* this context.
* We cannot just replace it with mkstemp, because this name is
* passed to the linker that actually opens the file and writes to it.
*/
char[L_tmpnam + 1] s;
char* n = tmpnam(s.ptr);
global.params.exefile = mem.xstrdup(n);
argv.push(global.params.exefile);
}
}
else
{
// Generate exe file name from first obj name
const(char)[] n = global.params.objfiles[0].toDString();
const(char)[] ex;
n = FileName.name(n);
if (const e = FileName.ext(n))
{
if (global.params.dll)
ex = FileName.forceExt(ex, global.dll_ext);
else
ex = FileName.removeExt(n);
}
else
ex = "a.out"; // no extension, so give up
argv.push(ex.ptr);
global.params.exefile = ex;
}
// Make sure path to exe file exists
ensurePathToNameExists(Loc.initial, global.params.exefile);
if (global.params.symdebug)
argv.push("-g");
if (global.params.is64bit)
argv.push("-m64");
else
argv.push("-m32");
version (OSX)
{
/* Without this switch, ld generates messages of the form:
* ld: warning: could not create compact unwind for __Dmain: offset of saved registers too far to encode
* meaning they are further than 255 bytes from the frame register.
* ld reverts to the old method instead.
* See: https://ghc.haskell.org/trac/ghc/ticket/5019
* which gives this tidbit:
* "When a C++ (or x86_64 Objective-C) exception is thrown, the runtime must unwind the
* stack looking for some function to catch the exception. Traditionally, the unwind
* information is stored in the __TEXT/__eh_frame section of each executable as Dwarf
* CFI (call frame information). Beginning in Mac OS X 10.6, the unwind information is
* also encoded in the __TEXT/__unwind_info section using a two-level lookup table of
* compact unwind encodings.
* The unwinddump tool displays the content of the __TEXT/__unwind_info section."
*
* A better fix would be to save the registers next to the frame pointer.
*/
argv.push("-Xlinker");
argv.push("-no_compact_unwind");
}
if (global.params.map || global.params.mapfile.length)
{
argv.push("-Xlinker");
version (OSX)
{
argv.push("-map");
}
else
{
argv.push("-Map");
}
if (!global.params.mapfile.length)
{
const(char)[] fn = FileName.forceExt(global.params.exefile, "map");
const(char)[] path = FileName.path(global.params.exefile);
global.params.mapfile = path.length ? fn : FileName.combine(global.params.objdir, fn);
}
argv.push("-Xlinker");
argv.push(global.params.mapfile.xarraydup.ptr);
}
if (0 && global.params.exefile)
{
/* This switch enables what is known as 'smart linking'
* in the Windows world, where unreferenced sections
* are removed from the executable. It eliminates unreferenced
* functions, essentially making a 'library' out of a module.
* Although it is documented to work with ld version 2.13,
* in practice it does not, but just seems to be ignored.
* Thomas Kuehne has verified that it works with ld 2.16.1.
* BUG: disabled because it causes exception handling to fail
* because EH sections are "unreferenced" and elided
*/
argv.push("-Xlinker");
argv.push("--gc-sections");
}
/**
Checks if C string `p` starts with `needle`.
Params:
p = the C string to check
needle = the string to look for
Returns
`true` if `p` starts with `needle`
*/
static bool startsWith(const(char)* p, string needle)
{
const f = p.toDString();
return f.length >= needle.length && f[0 .. needle.length] == needle;
}
// return true if flagp should be ordered in with the library flags
static bool flagIsLibraryRelated(const char* p)
{
const flag = p.toDString();
return startsWith(p, "-l") || startsWith(p, "-L")
|| flag == "-(" || flag == "-)"
|| flag == "--start-group" || flag == "--end-group"
|| FileName.equalsExt(p, "a")
;
}
/* Add libraries. The order of libraries passed is:
* 1. link switches without a -L prefix,
e.g. --whole-archive "lib.a" --no-whole-archive (global.params.linkswitches)
* 2. static libraries ending with *.a (global.params.libfiles)
* 3. link switches with a -L prefix (global.params.linkswitches)
* 4. libraries specified by pragma(lib), which were appended
* to global.params.libfiles. These are prefixed with "-l"
* 5. dynamic libraries passed to the command line (global.params.dllfiles)
* 6. standard libraries.
*/
// STEP 1
foreach (pi, p; global.params.linkswitches)
{
if (p && p[0] && !flagIsLibraryRelated(p))
{
if (!global.params.linkswitchIsForCC[pi])
argv.push("-Xlinker");
argv.push(p);
}
}
// STEP 2
foreach (p; global.params.libfiles)
{
if (FileName.equalsExt(p, "a"))
argv.push(p);
}
// STEP 3
foreach (pi, p; global.params.linkswitches)
{
if (p && p[0] && flagIsLibraryRelated(p))
{
if (!startsWith(p, "-l") && !startsWith(p, "-L") && !global.params.linkswitchIsForCC[pi])
{
// Don't need -Xlinker if switch starts with -l or -L.
// Eliding -Xlinker is significant for -L since it allows our paths
// to take precedence over gcc defaults.
// All other link switches were already added in step 1.
argv.push("-Xlinker");
}
argv.push(p);
}
}
// STEP 4
foreach (p; global.params.libfiles)
{
if (!FileName.equalsExt(p, "a"))
{
const plen = strlen(p);
char* s = cast(char*)mem.xmalloc(plen + 3);
s[0] = '-';
s[1] = 'l';
memcpy(s + 2, p, plen + 1);
argv.push(s);
}
}
// STEP 5
foreach (p; global.params.dllfiles)
{
argv.push(p);
}
// STEP 6
/* D runtime libraries must go after user specified libraries
* passed with -l.
*/
const libname = phobosLibname;
if (libname.length)
{
const bufsize = 2 + libname.length + 1;
auto buf = (cast(char*) malloc(bufsize))[0 .. bufsize];
if (!buf)
Mem.error();
buf[0 .. 2] = "-l";
char* getbuf(const(char)[] suffix)
{
buf[2 .. 2 + suffix.length] = suffix[];
buf[2 + suffix.length] = 0;
return buf.ptr;
}
if (libname.length > 3 + 2 && libname[0 .. 3] == "lib")
{
if (libname[$-2 .. $] == ".a")
{
argv.push("-Xlinker");
argv.push("-Bstatic");
argv.push(getbuf(libname[3 .. $-2]));
argv.push("-Xlinker");
argv.push("-Bdynamic");
}
else if (libname[$-3 .. $] == ".so")
argv.push(getbuf(libname[3 .. $-3]));
else
argv.push(getbuf(libname));
}
else
{
argv.push(getbuf(libname));
}
}
//argv.push("-ldruntime");
argv.push("-lpthread");
argv.push("-lm");
version (linux)
{
// Changes in ld for Ubuntu 11.10 require this to appear after phobos2
argv.push("-lrt");
// Link against libdl for phobos usage of dlopen
argv.push("-ldl");
}
if (global.params.verbose)
{
// Print it
OutBuffer buf;
for (size_t i = 0; i < argv.dim; i++)
{
buf.writestring(argv[i]);
buf.writeByte(' ');
}
message(buf.peekChars());
}
argv.push(null);
// set up pipes
int[2] fds;
if (pipe(fds.ptr) == -1)
{
perror("unable to create pipe to linker");
return -1;
}
childpid = fork();
if (childpid == 0)
{
// pipe linker stderr to fds[0]
dup2(fds[1], STDERR_FILENO);
close(fds[0]);
execvp(argv[0], argv.tdata());
perror(argv[0]); // failed to execute
return -1;
}
else if (childpid == -1)
{
perror("unable to fork");
return -1;
}
close(fds[1]);
const(int) nme = findNoMainError(fds[0]);
waitpid(childpid, &status, 0);
if (WIFEXITED(status))
{
status = WEXITSTATUS(status);
if (status)
{
if (nme == -1)
{
perror("error with the linker pipe");
return -1;
}
else
{
error(Loc.initial, "linker exited with status %d", status);
if (nme == 1)
error(Loc.initial, "no main function specified");
}
}
}
else if (WIFSIGNALED(status))
{
error(Loc.initial, "linker killed by signal %d", WTERMSIG(status));
status = 1;
}
return status;
}
else
{
error(Loc.initial, "linking is not yet supported for this version of DMD.");
return -1;
}
}
/******************************
* Execute a rule. Return the status.
* cmd program to run
* args arguments to cmd, as a string
*/
version (Windows)
{
private int executecmd(const(char)* cmd, const(char)* args)
{
int status;
size_t len;
if (global.params.verbose)
message("%s %s", cmd, args);
if (!global.params.mscoff)
{
if ((len = strlen(args)) > 255)
{
status = putenvRestorable("_CMDLINE", args[0 .. len]);
if (status == 0)
args = "@_CMDLINE";
else
error(Loc.initial, "command line length of %d is too long", len);
}
}
// Normalize executable path separators
// https://issues.dlang.org/show_bug.cgi?id=9330
cmd = toWinPath(cmd);
version (CRuntime_Microsoft)
{
// Open scope so dmd doesn't complain about alloca + exception handling
{
// Use process spawning through the WinAPI to avoid issues with executearg0 and spawnlp
OutBuffer cmdbuf;
cmdbuf.writestring("\"");
cmdbuf.writestring(cmd);
cmdbuf.writestring("\" ");
cmdbuf.writestring(args);
STARTUPINFOA startInf;
startInf.dwFlags = STARTF_USESTDHANDLES;
startInf.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
startInf.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
startInf.hStdError = GetStdHandle(STD_ERROR_HANDLE);
PROCESS_INFORMATION procInf;
BOOL b = CreateProcessA(null, cmdbuf.peekChars(), null, null, 1, NORMAL_PRIORITY_CLASS, null, null, &startInf, &procInf);
if (b)
{
WaitForSingleObject(procInf.hProcess, INFINITE);
DWORD returnCode;
GetExitCodeProcess(procInf.hProcess, &returnCode);
status = returnCode;
CloseHandle(procInf.hProcess);
}
else
{
status = -1;
}
}
}
else
{
status = executearg0(cmd, args);
if (status == -1)
{
status = spawnlp(0, cmd, cmd, args, null);
}
}
if (status)
{
if (status == -1)
error(Loc.initial, "can't run '%s', check PATH", cmd);
else
error(Loc.initial, "linker exited with status %d", status);
}
return status;
}
}
/**************************************
* Attempt to find command to execute by first looking in the directory
* where DMD was run from.
* Returns:
* -1 did not find command there
* !=-1 exit status from command
*/
version (Windows)
{
private int executearg0(const(char)* cmd, const(char)* args)
{
const argv0 = global.params.argv0;
//printf("argv0='%s', cmd='%s', args='%s'\n",argv0,cmd,args);
// If cmd is fully qualified, we don't do this
if (FileName.absolute(cmd))
return -1;
const file = FileName.replaceName(argv0, cmd.toDString);
//printf("spawning '%s'\n",file);
// spawnlp returns intptr_t in some systems, not int
return spawnl(0, file.ptr, file.ptr, args, null);
}
}
/***************************************
* Run the compiled program.
* Return exit status.
*/
public int runProgram()
{
//printf("runProgram()\n");
if (global.params.verbose)
{
OutBuffer buf;
buf.writestring(global.params.exefile);
for (size_t i = 0; i < global.params.runargs.dim; ++i)
{
buf.writeByte(' ');
buf.writestring(global.params.runargs[i]);
}
message(buf.peekChars());
}
// Build argv[]
Strings argv;
argv.push(global.params.exefile.xarraydup.ptr);
for (size_t i = 0; i < global.params.runargs.dim; ++i)
{
const(char)* a = global.params.runargs[i];
version (Windows)
{
// BUG: what about " appearing in the string?
if (strchr(a, ' '))
{
char* b = cast(char*)mem.xmalloc(3 + strlen(a));
sprintf(b, "\"%s\"", a);
a = b;
}
}
argv.push(a);
}
argv.push(null);
restoreEnvVars();
version (Windows)
{
const(char)[] ex = FileName.name(global.params.exefile);
if (ex == global.params.exefile)
ex = FileName.combine(".", ex);
else
ex = global.params.exefile;
// spawnlp returns intptr_t in some systems, not int
return spawnv(0, ex.xarraydup.ptr, argv.tdata());
}
else version (Posix)
{
pid_t childpid;
int status;
childpid = fork();
if (childpid == 0)
{
const(char)* fn = argv[0];
if (!FileName.absolute(fn))
{
// Make it "./fn"
fn = FileName.combine(".", fn);
}
execv(fn, argv.tdata());
perror(fn); // failed to execute
return -1;
}
waitpid(childpid, &status, 0);
if (WIFEXITED(status))
{
status = WEXITSTATUS(status);
//printf("--- errorlevel %d\n", status);
}
else if (WIFSIGNALED(status))
{
error(Loc.initial, "program killed by signal %d", WTERMSIG(status));
status = 1;
}
return status;
}
else
{
assert(0);
}
}
|
D
|
/Users/Avinash/Documents/Code/Poochie/Poochie/DerivedData/Poochie/Build/Intermediates/Pods.build/Debug-iphonesimulator/Koloda.build/Objects-normal/x86_64/KolodaView.o : /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Koloda/Pod/Classes/KolodaView/DraggableCardView/DraggableCardView.swift /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Koloda/Pod/Classes/KolodaView/KolodaCardStorage.swift /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Koloda/Pod/Classes/KolodaView/KolodaView.swift /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Koloda/Pod/Classes/KolodaView/KolodaViewAnimatior.swift /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Koloda/Pod/Classes/KolodaView/OverlayView/OverlayView.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Target\ Support\ Files/Koloda/Koloda-umbrella.h /Users/Avinash/Documents/Code/Poochie/Poochie/DerivedData/Poochie/Build/Intermediates/Pods.build/Debug-iphonesimulator/Koloda.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/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPLayerExtras.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPDecayAnimation.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPCustomAnimation.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPBasicAnimation.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPAnimator.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPPropertyAnimation.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPSpringAnimation.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPAnimationExtras.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPGeometry.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPAnimationEvent.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPAnimationTracer.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPAnimation.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPAnimatableProperty.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPDefines.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POP.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Target\ Support\ Files/pop/pop-umbrella.h /Users/Avinash/Documents/Code/Poochie/Poochie/DerivedData/Poochie/Build/Intermediates/Pods.build/Debug-iphonesimulator/pop.build/module.modulemap
/Users/Avinash/Documents/Code/Poochie/Poochie/DerivedData/Poochie/Build/Intermediates/Pods.build/Debug-iphonesimulator/Koloda.build/Objects-normal/x86_64/KolodaView~partial.swiftmodule : /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Koloda/Pod/Classes/KolodaView/DraggableCardView/DraggableCardView.swift /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Koloda/Pod/Classes/KolodaView/KolodaCardStorage.swift /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Koloda/Pod/Classes/KolodaView/KolodaView.swift /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Koloda/Pod/Classes/KolodaView/KolodaViewAnimatior.swift /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Koloda/Pod/Classes/KolodaView/OverlayView/OverlayView.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Target\ Support\ Files/Koloda/Koloda-umbrella.h /Users/Avinash/Documents/Code/Poochie/Poochie/DerivedData/Poochie/Build/Intermediates/Pods.build/Debug-iphonesimulator/Koloda.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/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPLayerExtras.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPDecayAnimation.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPCustomAnimation.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPBasicAnimation.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPAnimator.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPPropertyAnimation.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPSpringAnimation.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPAnimationExtras.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPGeometry.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPAnimationEvent.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPAnimationTracer.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPAnimation.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPAnimatableProperty.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPDefines.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POP.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Target\ Support\ Files/pop/pop-umbrella.h /Users/Avinash/Documents/Code/Poochie/Poochie/DerivedData/Poochie/Build/Intermediates/Pods.build/Debug-iphonesimulator/pop.build/module.modulemap
/Users/Avinash/Documents/Code/Poochie/Poochie/DerivedData/Poochie/Build/Intermediates/Pods.build/Debug-iphonesimulator/Koloda.build/Objects-normal/x86_64/KolodaView~partial.swiftdoc : /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Koloda/Pod/Classes/KolodaView/DraggableCardView/DraggableCardView.swift /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Koloda/Pod/Classes/KolodaView/KolodaCardStorage.swift /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Koloda/Pod/Classes/KolodaView/KolodaView.swift /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Koloda/Pod/Classes/KolodaView/KolodaViewAnimatior.swift /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Koloda/Pod/Classes/KolodaView/OverlayView/OverlayView.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Target\ Support\ Files/Koloda/Koloda-umbrella.h /Users/Avinash/Documents/Code/Poochie/Poochie/DerivedData/Poochie/Build/Intermediates/Pods.build/Debug-iphonesimulator/Koloda.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/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPLayerExtras.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPDecayAnimation.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPCustomAnimation.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPBasicAnimation.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPAnimator.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPPropertyAnimation.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPSpringAnimation.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPAnimationExtras.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPGeometry.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPAnimationEvent.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPAnimationTracer.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPAnimation.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPAnimatableProperty.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POPDefines.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/pop/pop/POP.h /Users/Avinash/Documents/Code/Poochie/Poochie/Pods/Target\ Support\ Files/pop/pop-umbrella.h /Users/Avinash/Documents/Code/Poochie/Poochie/DerivedData/Poochie/Build/Intermediates/Pods.build/Debug-iphonesimulator/pop.build/module.modulemap
|
D
|
#
# Settings for hdapsd
#
# DEVICE specifies the device to monitor, defaults to 'sda'
#
# SENSITIVITY is self explanatory, defaults to '15'
#
# Set ADAPTIVE to 'yes' to enable adaptive threshold
# (automatic increase when the built-in keyboard/mouse are used).
#
# Set SYSLOG to 'yes' to have the daemon report errors to syslog
# (instead of stderr/stdout).
#
# Set FORCE to 'yes' to force the kernel to use the unload heads feature
# on some old hard drives for which support cannot be autodetected.
# (don't use this unless you're absolutely sure your hard drive
# really do support unloading heads)
#
#DEVICE='sda'
# If an ultrabay hard drive is inserted, the following can be used:
#DEVICE=('sda' 'sdb')
#SENSITIVITY='15'
#ADAPTIVE='yes'
SYSLOG='yes'
#FORCE='yes'
|
D
|
# FIXED
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/source/F2837xS_CpuTimers.c
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_device.h
F2837xS_CpuTimers.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/include/assert.h
F2837xS_CpuTimers.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/include/_ti_config.h
F2837xS_CpuTimers.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/include/linkage.h
F2837xS_CpuTimers.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/include/stdarg.h
F2837xS_CpuTimers.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/include/stdbool.h
F2837xS_CpuTimers.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/include/stddef.h
F2837xS_CpuTimers.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/include/stdint.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_adc.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_analogsubsys.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_cla.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_cmpss.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_cputimer.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_dac.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_dcsm.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_dma.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_ecap.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_emif.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_epwm.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_epwm_xbar.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_eqep.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_flash.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_gpio.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_i2c.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_input_xbar.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_mcbsp.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_memconfig.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_nmiintrupt.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_output_xbar.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_piectrl.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_pievect.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_sci.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_sdfm.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_spi.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_sysctrl.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_upp.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_xbar.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_xint.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_can.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Examples.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_GlobalPrototypes.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_cputimervars.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Cla_defines.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_EPwm_defines.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Adc_defines.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Emif_defines.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Gpio_defines.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_I2c_defines.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Pie_defines.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Dma_defines.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_SysCtrl_defines.h
F2837xS_CpuTimers.obj: C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/common/include/F2837xS_Upp_defines.h
F2837xS_CpuTimers.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_CpuTimers.c:
C:/ti/c2000/C2000Ware_1_00_04_00/device_support/f2837xs/headers/include/F2837xS_device.h:
C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/include/assert.h:
C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/include/_ti_config.h:
C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/include/linkage.h:
C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/include/stdarg.h:
C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/include/stdbool.h:
C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/include/stddef.h:
C:/ti/ccsv8/tools/compiler/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
|
module UnrealScript.TribesGame.TrProj_HeavyTwinfusor;
import ScriptClasses;
import UnrealScript.Helpers;
import UnrealScript.TribesGame.TrProjectile;
extern(C++) interface TrProj_HeavyTwinfusor : TrProjectile
{
public extern(D):
private static __gshared ScriptClass mStaticClass;
@property final static ScriptClass StaticClass() { mixin(MGSCC("Class TribesGame.TrProj_HeavyTwinfusor")); }
private static __gshared TrProj_HeavyTwinfusor mDefaultProperties;
@property final static TrProj_HeavyTwinfusor DefaultProperties() { mixin(MGDPC("TrProj_HeavyTwinfusor", "TrProj_HeavyTwinfusor TribesGame.Default__TrProj_HeavyTwinfusor")); }
static struct Functions
{
private static __gshared ScriptFunction mSpawnFlightEffects;
public @property static final ScriptFunction SpawnFlightEffects() { mixin(MGF("mSpawnFlightEffects", "Function TribesGame.TrProj_HeavyTwinfusor.SpawnFlightEffects")); }
}
final void SpawnFlightEffects()
{
(cast(ScriptObject)this).ProcessEvent(Functions.SpawnFlightEffects, cast(void*)0, cast(void*)0);
}
}
|
D
|
module behaviour.player;
import std.stdio;
import std.random;
import game.actor;
import game.game;
import behaviour.util;
enum PlayerState : ubyte {
STANDING,
WALKING,
FIRING
}
struct PlayerData {
short delay;
ubyte idleDelay;
ubyte frameIndex;
// Current state.
PlayerState state;
// Movement.
byte moveX;
byte moveY;
// Firing attributes.
bool isFiring;
ubyte fireDelay;
ubyte autoFireDelay;
}
public void playerUpdate(Actor actor, Game game) {
if (actor.getFlag(ActorFlags.FROZEN) == true) {
return;
}
PlayerData* data = cast(PlayerData*)actor.getDataPtr();
bool animate;
PlayerState state;
data.delay -= 1;
if (data.delay <= 0) {
data.delay = 2;
animate = true;
}
AngleType destAngle = movementToAngle(data.moveX, data.moveY);
AngleType angle = actor.getAngle();
// See if there is an angle that we have to turn towards.
if (destAngle != AngleType.NONE && angle != destAngle && animate == true) {
if ((angle == AngleType.NORTH && destAngle == AngleType.WEST) || (angle == AngleType.WEST && destAngle == AngleType.NORTH)) {
actor.setAngle(AngleType.NORTHWEST);
} else if ((angle == AngleType.WEST && destAngle == AngleType.SOUTH) || (angle == AngleType.SOUTH && destAngle == AngleType.WEST)) {
actor.setAngle(AngleType.SOUTHWEST);
} else if ((angle == AngleType.SOUTH && destAngle == AngleType.EAST) || (angle == AngleType.EAST && destAngle == AngleType.SOUTH)) {
actor.setAngle(AngleType.SOUTHEAST);
} else if ((angle == AngleType.EAST && destAngle == AngleType.NORTH) || (angle == AngleType.NORTH && destAngle == AngleType.EAST)) {
actor.setAngle(AngleType.NORTHEAST);
} else {
actor.setAngle(destAngle);
}
}
// Firing.
if (data.isFiring == true) {
state = PlayerState.FIRING;
if (data.state != state) {
data.frameIndex = 0;
data.fireDelay = 1;
}
// Animate between 2 frames. autoFireDelay indicates how many frames to wait between shots.
data.fireDelay -= 1;
if (data.fireDelay <= 0) {
if (data.frameIndex == 0) {
data.frameIndex = 1;
data.fireDelay = 1;
actor.attack();
} else {
data.frameIndex = 0;
data.fireDelay = cast(ubyte)(data.autoFireDelay + 1);
}
}
// Each sprite frame has a different location in the texture.
if (data.frameIndex == 0) {
actor.setFrameIndex(actor.getAngle() - 1);
} else if (data.frameIndex == 1) {
actor.setFrameIndex(actor.getAngle() - 1 + 5 * 8);
}
// Walking.
} else if (destAngle != 0) {
state = PlayerState.WALKING;
if (state != data.state) {
animate = true;
data.frameIndex = 0;
}
actor.moveForward(destAngle);
if (animate == true) {
data.frameIndex = (data.frameIndex + animate) & 3;
actor.setFrameIndex(8 + (actor.getAngle() - 1) * 4 + data.frameIndex);
}
// Standing idle.
} else {
state = PlayerState.STANDING;
if (state != data.state) {
data.idleDelay = 150;
}
data.frameIndex = 0;
data.idleDelay -= 1;
if (data.idleDelay <= 0) {
data.idleDelay = 150;
actor.setAngle(cast(AngleType)uniform(1, 8));
}
actor.setFrameIndex(actor.getAngle() - 1);
}
data.state = state;
}
private AngleType movementToAngle(const int moveX, const int moveY) {
if (moveX == 0 && moveY == -1) {
return AngleType.NORTH;
} else if (moveX == 1 && moveY == -1) {
return AngleType.NORTHEAST;
} else if (moveX == 1 && moveY == 0) {
return AngleType.EAST;
} else if (moveX == 1 && moveY == 1) {
return AngleType.SOUTHEAST;
} else if (moveX == 0 && moveY == 1) {
return AngleType.SOUTH;
} else if (moveX == -1 && moveY == 1) {
return AngleType.SOUTHWEST;
} else if (moveX == -1 && moveY == 0) {
return AngleType.WEST;
} else if (moveX == -1 && moveY == -1) {
return AngleType.NORTHWEST;
}
return AngleType.NONE;
}
|
D
|
/*
* Copyright (C) 2019, HuntLabs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
module hunt.database.driver.postgresql.impl.codec.PgProtocolConstants;
/**
* @author <a href="mailto:emad.albloushi@gmail.com">Emad Alblueshi</a>
*/
class PgProtocolConstants {
enum int AUTHENTICATION_TYPE_OK = 0;
enum int AUTHENTICATION_TYPE_KERBEROS_V5 = 2;
enum int AUTHENTICATION_TYPE_CLEARTEXT_PASSWORD = 3;
enum int AUTHENTICATION_TYPE_MD5_PASSWORD = 5;
enum int AUTHENTICATION_TYPE_SCM_CREDENTIAL = 6;
enum int AUTHENTICATION_TYPE_GSS = 7;
enum int AUTHENTICATION_TYPE_GSS_CONTINUE = 8;
enum int AUTHENTICATION_TYPE_SSPI = 9;
enum byte ERROR_OR_NOTICE_SEVERITY = 'S';
enum byte ERROR_OR_NOTICE_CODE = 'C';
enum byte ERROR_OR_NOTICE_MESSAGE = 'M';
enum byte ERROR_OR_NOTICE_DETAIL = 'D';
enum byte ERROR_OR_NOTICE_HINT = 'H';
enum byte ERROR_OR_NOTICE_POSITION = 'P';
enum byte ERROR_OR_NOTICE_INTERNAL_POSITION = 'p';
enum byte ERROR_OR_NOTICE_INTERNAL_QUERY = 'q';
enum byte ERROR_OR_NOTICE_WHERE = 'W';
enum byte ERROR_OR_NOTICE_FILE = 'F';
enum byte ERROR_OR_NOTICE_LINE = 'L';
enum byte ERROR_OR_NOTICE_ROUTINE = 'R';
enum byte ERROR_OR_NOTICE_SCHEMA = 's';
enum byte ERROR_OR_NOTICE_TABLE = 't';
enum byte ERROR_OR_NOTICE_COLUMN = 'c';
enum byte ERROR_OR_NOTICE_DATA_TYPE = 'd';
enum byte ERROR_OR_NOTICE_CONSTRAINT = 'n';
enum byte MESSAGE_TYPE_BACKEND_KEY_DATA = 'K';
enum byte MESSAGE_TYPE_AUTHENTICATION = 'R';
enum byte MESSAGE_TYPE_ERROR_RESPONSE = 'E';
enum byte MESSAGE_TYPE_NOTICE_RESPONSE = 'N';
enum byte MESSAGE_TYPE_NOTIFICATION_RESPONSE = 'A';
enum byte MESSAGE_TYPE_COMMAND_COMPLETE = 'C';
enum byte MESSAGE_TYPE_PARAMETER_STATUS = 'S';
enum byte MESSAGE_TYPE_READY_FOR_QUERY = 'Z';
enum byte MESSAGE_TYPE_PARAMETER_DESCRIPTION = 't';
enum byte MESSAGE_TYPE_ROW_DESCRIPTION = 'T';
enum byte MESSAGE_TYPE_DATA_ROW = 'D';
enum byte MESSAGE_TYPE_PORTAL_SUSPENDED = 's';
enum byte MESSAGE_TYPE_NO_DATA = 'n';
enum byte MESSAGE_TYPE_EMPTY_QUERY_RESPONSE = 'I';
enum byte MESSAGE_TYPE_PARSE_COMPLETE = '1';
enum byte MESSAGE_TYPE_BIND_COMPLETE = '2';
enum byte MESSAGE_TYPE_CLOSE_COMPLETE = '3';
enum byte MESSAGE_TYPE_FUNCTION_RESULT = 'V';
enum byte MESSAGE_TYPE_SSL_YES = 'S';
enum byte MESSAGE_TYPE_SSL_NO = 'N';
}
|
D
|
module misanthropyd.orthographiccameracontroller;
import std.math;
import gfm.math.funcs;
import gfm.math.vector;
import misanthropyd.core.input;
import misanthropyd.core.keymousecodes;
import misanthropyd.core.timestep;
import misanthropyd.events;
import misanthropyd.renderer.cameras;
/// implements orthographic camera controller
class OrthographicCameraController
{
/// constructor
this(float ar, bool rot=false) nothrow pure @safe
{
aspectRatio_ = ar;
camera_ = new OrthographicCamera(-aspectRatio_ * zoomLevel_, aspectRatio_ * zoomLevel_,
-zoomLevel_, zoomLevel_);
rotation_ = rot;
}
/// on update
void onUpdate(const Timestep ts)
{
if(Input.isKeyPressed(MD_KEY_a))
{
cameraPosition_.x -= cos(radians(cameraRotation_)) * cameraTranslationSpeed_ * ts.getSeconds;
cameraPosition_.y -= sin(radians(cameraRotation_)) * cameraTranslationSpeed_ * ts.getSeconds;
}
else if(Input.isKeyPressed(MD_KEY_d))
{
cameraPosition_.x += cos(radians(cameraRotation_)) * cameraTranslationSpeed_ * ts.getSeconds;
cameraPosition_.y += sin(radians(cameraRotation_)) * cameraTranslationSpeed_ * ts.getSeconds;
}
if(Input.isKeyPressed(MD_KEY_w))
{
cameraPosition_.x += -sin(radians(cameraRotation_)) * cameraTranslationSpeed_ * ts.getSeconds;
cameraPosition_.y += cos(radians(cameraRotation_)) * cameraTranslationSpeed_ * ts.getSeconds;
}
else if(Input.isKeyPressed(MD_KEY_s))
{
cameraPosition_.x -= -sin(radians(cameraRotation_)) * cameraTranslationSpeed_ * ts.getSeconds;
cameraPosition_.y -= cos(radians(cameraRotation_)) * cameraTranslationSpeed_ * ts.getSeconds;
}
if(rotation_)
{
if(Input.isKeyPressed(MD_KEY_q))
cameraRotation_ += cameraRotationSpeed_ * ts.getSeconds;
if(Input.isKeyPressed(MD_KEY_e))
cameraRotation_ -= cameraRotationSpeed_ * ts.getSeconds;
if(cameraRotation_ > 180.0f)
cameraRotation_ -= 360.0f;
else if(cameraRotation_ <= -180.0f)
cameraRotation_ += 360.0f;
camera_.rotation = cameraRotation_;
}
camera_.position = cameraPosition_;
cameraTranslationSpeed_ = zoomLevel_;
}
/// event handler
void onEvent(Event e)
{
EventDispatcher dispatcher = EventDispatcher(e);
dispatcher.dispatch!MouseScrolledEvent(&onMouseScrolled);
dispatcher.dispatch!WindowResizeEvent(&onWindowResized);
}
/// camera get property
OrthographicCamera camera() nothrow pure @nogc @safe
{
return camera_;
}
/// zoom level get property
float zoomLevel() const nothrow pure @nogc @safe
{
return zoomLevel_;
}
/// zoom level set property
float zoomLevel(float zl) nothrow pure @nogc @safe
{
return zoomLevel_ = zl;
}
private
{
bool onMouseScrolled(MouseScrolledEvent e) nothrow pure @nogc @safe
{
import std.algorithm: max;
zoomLevel_ -= e.yOffset * 0.25f;
zoomLevel_ = max(zoomLevel_, 0.25f);
camera_.setProjection(-aspectRatio_ * zoomLevel_, aspectRatio_ * zoomLevel_, -zoomLevel_, zoomLevel_);
return false;
}
bool onWindowResized(WindowResizeEvent e) nothrow pure @nogc @safe
{
aspectRatio_ = cast(float)e.width / cast(float)e.height;
camera_.setProjection(-aspectRatio_ * zoomLevel_, aspectRatio_ * zoomLevel_, -zoomLevel_, zoomLevel_);
return false;
}
}
private
{
float aspectRatio_;
float zoomLevel_ = 1.0f;
OrthographicCamera camera_;
bool rotation_;
vec3f cameraPosition_ = vec3f(0.0f, 0.0f, 0.0f);
float cameraRotation_ = 0.0f; // in degrees
float cameraTranslationSpeed_ = 5.0f, cameraRotationSpeed_ = 180.0f;
}
}
|
D
|
//-----------------------------------------------------------------------------
// wxD - DirDialog.d
// (C) 2005 bero <berobero@users.sourceforge.net>
// based on
// wx.NET - DirDialog.cs
//
/// The wxDirDialog wrapper class.
//
// Written by Bryan Bulten (bryan@bulten.ca)
// (C) 2003 Bryan Bulten
// Licensed under the wxWidgets license, see LICENSE.txt for details.
//
// $Id: DirDialog.d,v 1.10 2007/01/28 23:06:36 afb Exp $
//-----------------------------------------------------------------------------
module wx.DirDialog;
public import wx.common;
public import wx.Dialog;
//! \cond EXTERN
static extern (C) IntPtr wxDirDialog_ctor(IntPtr parent, string message, string defaultPath, uint style, inout Point pos, inout Size size, string name);
static extern (C) void wxDirDialog_SetPath(IntPtr self, string path);
static extern (C) IntPtr wxDirDialog_GetPath(IntPtr self);
static extern (C) int wxDirDialog_GetStyle(IntPtr self);
static extern (C) void wxDirDialog_SetStyle(IntPtr self, int style);
static extern (C) void wxDirDialog_SetMessage(IntPtr self, string message);
static extern (C) IntPtr wxDirDialog_GetMessage(IntPtr self);
static extern (C) int wxDirDialog_ShowModal(IntPtr self);
//! \endcond
//-----------------------------------------------------------------------------
alias DirDialog wxDirDialog;
public class DirDialog : Dialog
{
enum { wxDD_NEW_DIR_BUTTON = 0x0080 }
enum { wxDD_DEFAULT_STYLE = (wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxDD_NEW_DIR_BUTTON) }
public const string wxDirSelectorPromptStr = "Выберите папку";
public const string wxDirDialogNameStr = "DirDialog";
public this(IntPtr wxobj)
{
super(wxobj);
}
public this(Window parent, string title = wxDirSelectorPromptStr, string defaultPath = "", int style = wxDD_DEFAULT_STYLE, Point pos = wxDefaultPosition, Size size = wxDefaultSize, string name = wxDirDialogNameStr)
{
this(wxDirDialog_ctor(wxObject.SafePtr(parent), title, defaultPath, style, pos, size, name));
}
//-----------------------------------------------------------------------------
public void Path(string value)
{
wxDirDialog_SetPath(wxobj, value);
}
public string Path()
{
return cast(string) new wxString(wxDirDialog_GetPath(wxobj), true);
}
//-----------------------------------------------------------------------------
public void Message(string value)
{
wxDirDialog_SetMessage(wxobj, value);
}
public string Message()
{
return cast(string) new wxString(wxDirDialog_GetMessage(wxobj), true);
}
//-----------------------------------------------------------------------------
public override int ShowModal()
{
return wxDirDialog_ShowModal(wxobj);
}
//-----------------------------------------------------------------------------
public void Style(int value)
{
wxDirDialog_SetStyle(wxobj, value);
}
public int Style()
{
return wxDirDialog_GetStyle(wxobj);
}
//-----------------------------------------------------------------------------
}
//! \cond EXTERN
extern (C) string wxDirSelector_func(string message,
string defaultPath,
int style,
inout Point pos,
IntPtr parent);
//! \endcond
string DirSelector(string message = null,
string defaultPath = null,
int style = DirDialog.wxDD_DEFAULT_STYLE,
Point pos = Dialog.wxDefaultPosition,
Window parent = null)
{
return wxDirSelector_func(message,defaultPath,style,pos,wxObject.SafePtr(parent));
}
|
D
|
/*
* Collie - An asynchronous event-driven network framework using Dlang development
*
* Copyright (C) 2015-2017 Shanghai Putao Technology Co., Ltd
*
* Developer: putao's Dlang team
*
* Licensed under the Apache-2.0 License.
*
*/
module collie.net.server.connection;
import kiss.net.TcpStream;
import kiss.timingwheel;
import kiss.net.Timer;
import kiss.event;
import kiss.event.task;
import std.experimental.logger;
@trusted abstract class ServerConnection : WheelTimer
{
this(TcpStream socket)
{
restSocket(socket);
}
final void restSocket(TcpStream socket)
{
if(_socket !is null){
_socket.setCloseHandle(null);
_socket.setReadHandle(null);
_socket = null;
}
if(socket !is null){
_socket = socket;
_loop = socket.eventLoop;
_socket.setCloseHandle(&doClose);
_socket.setReadHandle(&onRead);
}
}
final bool isAlive() @trusted {
return _socket && _socket.watched;
}
final bool active() @trusted
{
if(_socket is null)
return false;
bool active = _socket.watch;
if(active)
onActive();
return active;
}
final void write(ubyte[] data,TCPWriteCallBack cback = null) @trusted
{
write(new WarpStreamBuffer(data,cback));
}
final void write(StreamWriteBuffer buffer) @trusted
{
if (_loop.isInLoopThread()) {
_postWriteBuffer(buffer);
} else {
_loop.postTask(newTask(&_postWriteBuffer, buffer));
}
}
final void restTimeout() @trusted
{
if(_loop.isInLoopThread()){
rest();
} else {
_loop.postTask(newTask(&rest,0));
}
}
pragma(inline)
final void close() @trusted
{
_loop.postTask(newTask(&_postClose));
}
final @property tcpStream()@safe {return _socket;}
protected:
void onActive() nothrow;
void onClose() nothrow;
void onRead(in ubyte[] data) nothrow;
private:
final void _postClose(){
if(_socket)
_socket.close();
}
final void _postWriteBuffer(StreamWriteBuffer buffer)
{
trace("post send dara! ", _socket is null);
if (_socket) {
rest();
_socket.write(buffer);
} else
buffer.doFinish();
}
final void doClose() nothrow
{
stop();
onClose();
}
private:
TcpStream _socket;
EventLoop _loop;
}
|
D
|
import std.getopt;
import std.file;
import std.stdio;
import core.stdc.stdlib;
enum ShapeType{circle, rectangle};
struct Options
{
bool forever;
ShapeType type = ShapeType.rectangle;
size_t maxEpoch = 10_000;
size_t shapeCount = 100;
float mutation = 0.001;
string input;
}
Options getOptions(string[] args)
{
Options options;
try
{
auto helpInformation = getopt(
args,
"epoch|e", "Counting epoch, number (ulong).", &options.maxEpoch,
"shape|s", "Which shape should be used for approximation (circle, rectangle)", &options.type,
"mutation|m", "Mutation, how large mutation is, value MUST be between 0.0 and 1",
&options.mutation,
"forever|f", "Run program forever", &options.forever,
"shapeCount|c", "Number of shapes used for approximation (s > 0)", &options.shapeCount,
config.required,
"input|i", "This is the image you MUST input", &options.input
);
if (!options.input.exists && options.input != "")
{
helpInformation.helpWanted = true;
stderr.writeln("ERROR: File you tried to input " ~ options.input ~ " does not exists!");
}
if(!(options.mutation >= 0.0f && options.mutation <= 1.0f))
{
helpInformation.helpWanted = true;
stderr.writeln("ERROR: Mutation value is not correct");
}
if (options.shapeCount == 0)
{
helpInformation.helpWanted = true;
stderr.writeln("ERROR: number of shapes has to be at least 1");
}
if (helpInformation.helpWanted)
{
defaultGetoptPrinter(
"\nHELP INFO: Generic algorithm coloring pictures with geometric objects.\n",
helpInformation.options
);
}
if (helpInformation.helpWanted)
{
exit(-1);
}
}
catch(GetOptException e)
{
stderr.writeln(e.msg);
exit(-1);
}
return options;
}
|
D
|
/**********************************************************************************************
*
* raylib - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
*
* FEATURES:
* - NO external dependencies, all required libraries included with raylib
* - Multiplatform: Windows, Linux, FreeBSD, OpenBSD, NetBSD, DragonFly, MacOS, UWP, Android, Raspberry Pi, HTML5.
* - Written in plain C code (C99) in PascalCase/camelCase notation
* - Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES2 - choose at compile)
* - Unique OpenGL abstraction layer (usable as standalone module): [rlgl]
* - Powerful fonts module (XNA SpriteFonts, BMFonts, TTF)
* - Outstanding texture formats support, including compressed formats (DXT, ETC, ASTC)
* - Full 3d support for 3d Shapes, Models, Billboards, Heightmaps and more!
* - Flexible Materials system, supporting classic maps and PBR maps
* - Skeletal Animation support (CPU bones-based animation)
* - Shaders support, including Model shaders and Postprocessing shaders
* - Powerful math module for Vector, Matrix and Quaternion operations: [raymath]
* - Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, XM, MOD)
* - VR stereo rendering with configurable HMD device parameters
* - Bindings to multiple programming languages available!
*
* NOTES:
* One custom font is loaded by default when InitWindow() [core]
* If using OpenGL 3.3 or ES2, one default shader is loaded automatically (internally defined) [rlgl]
* If using OpenGL 3.3 or ES2, several vertex buffers (VAO/VBO) are created to manage lines-triangles-quads
*
* DEPENDENCIES (included):
* [core] rglfw (github.com/glfw/glfw) for window/context management and input (only PLATFORM_DESKTOP)
* [rlgl] glad (github.com/Dav1dde/glad) for OpenGL 3.3 extensions loading (only PLATFORM_DESKTOP)
* [raudio] miniaudio (github.com/dr-soft/miniaudio) for audio device/context management
*
* OPTIONAL DEPENDENCIES (included):
* [core] rgif (Charlie Tangora, Ramon Santamaria) for GIF recording
* [textures] stb_image (Sean Barret) for images loading (BMP, TGA, PNG, JPEG, HDR...)
* [textures] stb_image_write (Sean Barret) for image writting (BMP, TGA, PNG, JPG)
* [textures] stb_image_resize (Sean Barret) for image resizing algorythms
* [textures] stb_perlin (Sean Barret) for Perlin noise image generation
* [text] stb_truetype (Sean Barret) for ttf fonts loading
* [text] stb_rect_pack (Sean Barret) for rectangles packing
* [models] par_shapes (Philip Rideout) for parametric 3d shapes generation
* [models] tinyobj_loader_c (Syoyo Fujita) for models loading (OBJ, MTL)
* [models] cgltf (Johannes Kuhlmann) for models loading (glTF)
* [raudio] stb_vorbis (Sean Barret) for OGG audio loading
* [raudio] dr_flac (David Reid) for FLAC audio file loading
* [raudio] dr_mp3 (David Reid) for MP3 audio file loading
* [raudio] jar_xm (Joshua Reisenauer) for XM audio module loading
* [raudio] jar_mod (Joshua Reisenauer) for MOD audio module loading
*
*
* LICENSE: zlib/libpng
*
* raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2013-2019 Ramon Santamaria (@raysan5)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*
**********************************************************************************************/
module raylib;
pragma(lib, "raylib");
extern (C):
import core.stdc.config;
import core.stdc.stdarg;
import core.stdc.stdlib;
import std.math;
//----------------------------------------------------------------------------------
// Some basic Defines
//----------------------------------------------------------------------------------
enum PI = 3.14159265358979323846f;
enum DEG2RAD = PI / 180.0f;
enum RAD2DEG = 180.0f / PI;
enum MAX_TOUCH_POINTS = 10; // Maximum number of touch points supported
// Shader and material limits
enum MAX_SHADER_LOCATIONS = 32; // Maximum number of predefined locations stored in shader struct
enum MAX_MATERIAL_MAPS = 12; // Maximum number of texture maps stored in shader struct
// Allow custom memory allocators
alias RL_MALLOC = malloc;
alias RL_CALLOC = calloc;
alias RL_FREE = free;
// NOTE: MSC C++ compiler does not support compound literals (C99 feature)
// Plain structures in C++ (without constructors) can be initialized from { } initializers.
alias CLITERAL = Color;
// Some Basic Colors
// NOTE: Custom raylib color palette for amazing visuals on WHITE background // Light Gray // Gray // Dark Gray // Yellow // Gold // Orange // Pink // Red // Maroon // Green // Lime // Dark Green // Sky Blue // Blue // Dark Blue // Purple // Violet // Dark Purple // Beige // Brown // Dark Brown // White // Black // Blank (Transparent) // Magenta // My own White (raylib logo)
enum Color LIGHTGRAY = Color(200, 200, 200, 255); // Light Gray
enum Color GRAY = Color(130, 130, 130, 255); // Gray
enum Color DARKGRAY = Color(80, 80, 80, 255); // Dark Gray
enum Color YELLOW = Color(253, 249, 0, 255); // Yellow
enum Color GOLD = Color(255, 203, 0, 255); // Gold
enum Color ORANGE = Color(255, 161, 0, 255); // Orange
enum Color PINK = Color(255, 109, 194, 255); // Pink
enum Color RED = Color(230, 41, 55, 255); // Red
enum Color MAROON = Color(190, 33, 55, 255); // Maroon
enum Color GREEN = Color(0, 228, 48, 255); // Green
enum Color LIME = Color(0, 158, 47, 255); // Lime
enum Color DARKGREEN = Color(0, 117, 44, 255); // Dark Green
enum Color SKYBLUE = Color(102, 191, 255, 255); // Sky Blue
enum Color BLUE = Color(0, 121, 241, 255); // Blue
enum Color DARKBLUE = Color(0, 82, 172, 255); // Dark Blue
enum Color PURPLE = Color(200, 122, 255, 255); // Purple
enum Color VIOLET = Color(135, 60, 190, 255); // Violet
enum Color DARKPURPLE = Color(112, 31, 126, 255); // Dark Purple
enum Color BEIGE = Color(211, 176, 131, 255); // Beige
enum Color BROWN = Color(127, 106, 79, 255); // Brown
enum Color DARKBROWN = Color(76, 63, 47, 255); // Dark Brown
enum Color WHITE = Color(255, 255, 255, 255); // White
enum Color BLACK = Color(0, 0, 0, 255); // Black
enum Color BLANK = Color(0, 0, 0, 0); // Blank (Transparent)
enum Color MAGENTA = Color(255, 0, 255, 255); // Magenta
enum Color RAYWHITE = Color(245, 245, 245, 255); // My own White (raylib logo)
// Temporal hack to avoid breaking old codebases using
// deprecated raylib implementation of these functions
alias FormatText = TextFormat;
alias SubText = TextSubtext;
alias ShowWindow = UnhideWindow;
//----------------------------------------------------------------------------------
// Structures Definition
//----------------------------------------------------------------------------------
// Boolean type
// Vector2 type
struct Vector2
{
float x;
float y;
void opOpAssign(string op)(Vector2 b)
{
switch(op) {
case "+":
x += b.x;
y += b.y;
break;
case "-":
x -= b.x;
y -= b.y;
break;
case "*":
x *= b.x;
y *= b.y;
break;
case "/":
x += b.x;
y += y.x;
break;
default:
break;
}
}
void opOpAssign(string op)(int b)
{
switch(op) {
case "+":
x += cast(float)b;
y += cast(float)b;
break;
case "-":
x -= cast(float)b;
y -= cast(float)b;
break;
case "*":
x *= cast(float)b;
y *= cast(float)b;
break;
case "/":
x += cast(float)b;
y += cast(float)b;
break;
default:
break;
}
}
void opOpAssign(string op)(float b)
{
switch(op){
case "+":
x += b;
y += b;
break;
case "-":
x -= b;
y -= b;
break;
case "*":
x *= b;
y *= b;
break;
case "/":
x += b;
y += b;
break;
default:
break;
}
}
bool opEquals(Vector2 b) { return x == b.x && y == b.x; }
bool opEquals(int b) { return x == cast(float)b && y == cast(float)b; }
bool opEquals(float b) { return x == b && y == b; }
void negate()
{
x *= -1.0f;
y *= -1.0f;
}
float dot(Vector2 b) { return (x*b.x + y*b.y); }
float length() { return sqrt((x*x) + (y*y)); }
Vector2 normalized()
{
Vector2 v = Vector2(x, y);
return Vector2(x/v.length, y/v.length);
}
Vector2 lerp(Vector2 b, float amt)
{
Vector2 result = Vector2(0.0f, 0.0f);
result.x = x + amt*(b.x-x);
result.y = y + amt*(b.y-y);
return result;
}
float distance(Vector2 b) { return sqrt((x - b.x)*(x - b.x) + (y - b.y)*(y - b.y)); }
}
// Vector3 type
// TODO: Add operator overloads and raymath methods
struct Vector3
{
float x;
float y;
float z;
}
// Vector4 type
// TODO: Add operator overloads and raymath methods
struct Vector4
{
float x;
float y;
float z;
float w;
}
// Quaternion type, same as Vector4
alias Quaternion = Vector4;
// Matrix type (OpenGL style 4x4 - right handed, column major)
struct Matrix
{
float m0;
float m4;
float m8;
float m12;
float m1;
float m5;
float m9;
float m13;
float m2;
float m6;
float m10;
float m14;
float m3;
float m7;
float m11;
float m15;
}
// Color type, RGBA (32bit)
struct Color
{
ubyte r;
ubyte g;
ubyte b;
ubyte a = 255;
}
// Rectangle type
struct Rectangle
{
float x;
float y;
float width;
float height;
}
// Image type, bpp always RGBA (32bit)
// NOTE: Data stored in CPU memory (RAM)
struct Image
{
void* data; // Image raw data
int width; // Image base width
int height; // Image base height
int mipmaps; // Mipmap levels, 1 by default
int format; // Data format (PixelFormat type)
}
// Texture2D type
// NOTE: Data stored in GPU memory
struct Texture2D
{
uint id; // OpenGL texture id
int width; // Texture base width
int height; // Texture base height
int mipmaps; // Mipmap levels, 1 by default
int format; // Data format (PixelFormat type)
}
// Texture type, same as Texture2D
alias Texture = Texture2D;
// TextureCubemap type, actually, same as Texture2D
alias TextureCubemap = Texture2D;
// RenderTexture2D type, for texture rendering
struct RenderTexture2D
{
uint id; // OpenGL Framebuffer Object (FBO) id
Texture2D texture; // Color buffer attachment texture
Texture2D depth; // Depth buffer attachment texture
bool depthTexture; // Track if depth attachment is a texture or renderbuffer
}
// RenderTexture type, same as RenderTexture2D
alias RenderTexture = RenderTexture2D;
// N-Patch layout info
struct NPatchInfo
{
Rectangle sourceRec; // Region in the texture
int left; // left border offset
int top; // top border offset
int right; // right border offset
int bottom; // bottom border offset
int type; // layout of the n-patch: 3x3, 1x3 or 3x1
}
// Font character info
struct CharInfo
{
int value; // Character value (Unicode)
Rectangle rec; // Character rectangle in sprite font
int offsetX; // Character offset X when drawing
int offsetY; // Character offset Y when drawing
int advanceX; // Character advance position X
ubyte* data; // Character pixel data (grayscale)
}
// Font type, includes texture and charSet array data
struct Font
{
Texture2D texture; // Font texture
int baseSize; // Base size (default chars height)
int charsCount; // Number of characters
CharInfo* chars; // Characters info data
}
alias SpriteFont = Font; // SpriteFont type fallback, defaults to Font
// Camera type, defines a camera position/orientation in 3d space
struct Camera3D
{
Vector3 position; // Camera position
Vector3 target; // Camera target it looks-at
Vector3 up; // Camera up vector (rotation over its axis)
float fovy; // Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
int type; // Camera type, defines projection type: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
}
alias Camera = Camera3D; // Camera type fallback, defaults to Camera3D
// Camera2D type, defines a 2d camera
struct Camera2D
{
Vector2 offset; // Camera offset (displacement from target)
Vector2 target; // Camera target (rotation and zoom origin)
float rotation; // Camera rotation in degrees
float zoom; // Camera zoom (scaling), should be 1.0f by default
}
// Vertex data definning a mesh
// NOTE: Data stored in CPU memory (and GPU)
struct Mesh
{
int vertexCount; // Number of vertices stored in arrays
int triangleCount; // Number of triangles stored (indexed or not)
// Default vertex data
float* vertices; // Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
float* texcoords; // Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
float* texcoords2; // Vertex second texture coordinates (useful for lightmaps) (shader-location = 5)
float* normals; // Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)
float* tangents; // Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4)
ubyte* colors; // Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
ushort* indices; // Vertex indices (in case vertex data comes indexed)
// Animation vertex data
float* animVertices; // Animated vertex positions (after bones transformations)
float* animNormals; // Animated normals (after bones transformations)
int* boneIds; // Vertex bone ids, up to 4 bones influence by vertex (skinning)
float* boneWeights; // Vertex bone weight, up to 4 bones influence by vertex (skinning)
// OpenGL identifiers
uint vaoId; // OpenGL Vertex Array Object id
uint[7] vboId; // OpenGL Vertex Buffer Objects id (default vertex data)
}
// Shader type (generic)
struct Shader
{
uint id; // Shader program id
int[MAX_SHADER_LOCATIONS] locs; // Shader locations array
}
// Material texture map
struct MaterialMap
{
Texture2D texture; // Material map texture
Color color; // Material map color
float value; // Material map value
}
// Material type (generic)
struct Material
{
Shader shader; // Material shader
MaterialMap[MAX_MATERIAL_MAPS] maps; // Material maps
float* params; // Material generic parameters (if required)
}
// Transformation properties
struct Transform
{
Vector3 translation; // Translation
Quaternion rotation; // Rotation
Vector3 scale; // Scale
}
// Bone information
struct BoneInfo
{
char[32] name; // Bone name
int parent; // Bone parent
}
// Model type
struct Model
{
Matrix transform; // Local transform matrix
int meshCount; // Number of meshes
Mesh* meshes; // Meshes array
int materialCount; // Number of materials
Material* materials; // Materials array
int* meshMaterial; // Mesh material number
// Animation data
int boneCount; // Number of bones
BoneInfo* bones; // Bones information (skeleton)
Transform* bindPose; // Bones base transformation (pose)
}
// Model animation
struct ModelAnimation
{
int boneCount; // Number of bones
BoneInfo* bones; // Bones information (skeleton)
int frameCount; // Number of animation frames
Transform** framePoses; // Poses array by frame
}
// Ray type (useful for raycast)
struct Ray
{
Vector3 position; // Ray position (origin)
Vector3 direction; // Ray direction
}
// Raycast hit information
struct RayHitInfo
{
bool hit; // Did the ray hit something?
float distance; // Distance to nearest hit
Vector3 position; // Position of nearest hit
Vector3 normal; // Surface normal of hit
}
// Bounding box type
struct BoundingBox
{
Vector3 min; // Minimum vertex box-corner
Vector3 max; // Maximum vertex box-corner
}
// Wave type, defines audio wave data
struct Wave
{
uint sampleCount; // Number of samples
uint sampleRate; // Frequency (samples per second)
uint sampleSize; // Bit depth (bits per sample): 8, 16, 32 (24 not supported)
uint channels; // Number of channels (1-mono, 2-stereo)
void* data; // Buffer data pointer
}
// Sound source type
struct Sound
{
void* audioBuffer; // Pointer to internal data used by the audio system
uint source; // Audio source id
uint buffer; // Audio buffer id
int format; // Audio format specifier
}
// Music type (file streaming from memory)
// NOTE: Anything longer than ~10 seconds should be streamed
struct MusicData;
alias Music = MusicData*;
// Audio stream type
// NOTE: Useful to create custom audio streams not bound to a specific file
struct AudioStream
{
uint sampleRate; // Frequency (samples per second)
uint sampleSize; // Bit depth (bits per sample): 8, 16, 32 (24 not supported)
uint channels; // Number of channels (1-mono, 2-stereo)
void* audioBuffer; // Pointer to internal data used by the audio system.
int format; // Audio format specifier
uint source; // Audio source id
uint[2] buffers; // Audio buffers (double buffering)
}
// Head-Mounted-Display device parameters
struct VrDeviceInfo
{
int hResolution; // HMD horizontal resolution in pixels
int vResolution; // HMD vertical resolution in pixels
float hScreenSize; // HMD horizontal size in meters
float vScreenSize; // HMD vertical size in meters
float vScreenCenter; // HMD screen center in meters
float eyeToScreenDistance; // HMD distance between eye and display in meters
float lensSeparationDistance; // HMD lens separation distance in meters
float interpupillaryDistance; // HMD IPD (distance between pupils) in meters
float[4] lensDistortionValues; // HMD lens distortion constant parameters
float[4] chromaAbCorrection; // HMD chromatic aberration correction parameters
}
//----------------------------------------------------------------------------------
// Enumerators Definition
//----------------------------------------------------------------------------------
// System config flags
// NOTE: Used for bit masks
enum ConfigFlag
{
FLAG_SHOW_LOGO = 1, // Set to show raylib logo at startup
FLAG_FULLSCREEN_MODE = 2, // Set to run program in fullscreen
FLAG_WINDOW_RESIZABLE = 4, // Set to allow resizable window
FLAG_WINDOW_UNDECORATED = 8, // Set to disable window decoration (frame and buttons)
FLAG_WINDOW_TRANSPARENT = 16, // Set to allow transparent window
FLAG_WINDOW_HIDDEN = 128, // Set to create the window initially hidden
FLAG_MSAA_4X_HINT = 32, // Set to try enabling MSAA 4X
FLAG_VSYNC_HINT = 64 // Set to try enabling V-Sync on GPU
}
// Trace log type
enum TraceLogType
{
LOG_ALL = 0, // Display all logs
LOG_TRACE = 1,
LOG_DEBUG = 2,
LOG_INFO = 3,
LOG_WARNING = 4,
LOG_ERROR = 5,
LOG_FATAL = 6,
LOG_NONE = 7 // Disable logging
}
// Keyboard keys
// TODO: fix enums so that they're easier to call from
// Alphanumeric keys
enum KEY_APOSTROPHE = 39;
enum KEY_COMMA = 44;
enum KEY_MINUS = 45;
enum KEY_PERIOD = 46;
enum KEY_SLASH = 47;
enum KEY_ZERO = 48;
enum KEY_ONE = 49;
enum KEY_TWO = 50;
enum KEY_THREE = 51;
enum KEY_FOUR = 52;
enum KEY_FIVE = 53;
enum KEY_SIX = 54;
enum KEY_SEVEN = 55;
enum KEY_EIGHT = 56;
enum KEY_NINE = 57;
enum KEY_SEMICOLON = 59;
enum KEY_EQUAL = 61;
enum KEY_A = 65;
enum KEY_B = 66;
enum KEY_C = 67;
enum KEY_D = 68;
enum KEY_E = 69;
enum KEY_F = 70;
enum KEY_G = 71;
enum KEY_H = 72;
enum KEY_I = 73;
enum KEY_J = 74;
enum KEY_K = 75;
enum KEY_L = 76;
enum KEY_M = 77;
enum KEY_N = 78;
enum KEY_O = 79;
enum KEY_P = 80;
enum KEY_Q = 81;
enum KEY_R = 82;
enum KEY_S = 83;
enum KEY_T = 84;
enum KEY_U = 85;
enum KEY_V = 86;
enum KEY_W = 87;
enum KEY_X = 88;
enum KEY_Y = 89;
enum KEY_Z = 90;
// Function keys
enum KEY_SPACE = 32;
enum KEY_ESCAPE = 256;
enum KEY_ENTER = 257;
enum KEY_TAB = 258;
enum KEY_BACKSPACE = 259;
enum KEY_INSERT = 260;
enum KEY_DELETE = 261;
enum KEY_RIGHT = 262;
enum KEY_LEFT = 263;
enum KEY_DOWN = 264;
enum KEY_UP = 265;
enum KEY_PAGE_UP = 266;
enum KEY_PAGE_DOWN = 267;
enum KEY_HOME = 268;
enum KEY_END = 269;
enum KEY_CAPS_LOCK = 280;
enum KEY_SCROLL_LOCK = 281;
enum KEY_NUM_LOCK = 282;
enum KEY_PRINT_SCREEN = 283;
enum KEY_PAUSE = 284;
enum KEY_F1 = 290;
enum KEY_F2 = 291;
enum KEY_F3 = 292;
enum KEY_F4 = 293;
enum KEY_F5 = 294;
enum KEY_F6 = 295;
enum KEY_F7 = 296;
enum KEY_F8 = 297;
enum KEY_F9 = 298;
enum KEY_F10 = 299;
enum KEY_F11 = 300;
enum KEY_F12 = 301;
enum KEY_LEFT_SHIFT = 340;
enum KEY_LEFT_CONTROL = 341;
enum KEY_LEFT_ALT = 342;
enum KEY_LEFT_SUPER = 343;
enum KEY_RIGHT_SHIFT = 344;
enum KEY_RIGHT_CONTROL = 345;
enum KEY_RIGHT_ALT = 346;
enum KEY_RIGHT_SUPER = 347;
enum KEY_KB_MENU = 348;
enum KEY_LEFT_BRACKET = 91;
enum KEY_BACKSLASH = 92;
enum KEY_RIGHT_BRACKET = 93;
enum KEY_GRAVE = 96;
// Keypad keys
enum KEY_KP_0 = 320;
enum KEY_KP_1 = 321;
enum KEY_KP_2 = 322;
enum KEY_KP_3 = 323;
enum KEY_KP_4 = 324;
enum KEY_KP_5 = 325;
enum KEY_KP_6 = 326;
enum KEY_KP_7 = 327;
enum KEY_KP_8 = 328;
enum KEY_KP_9 = 329;
enum KEY_KP_DECIMAL = 330;
enum KEY_KP_DIVIDE = 331;
enum KEY_KP_MULTIPLY = 332;
enum KEY_KP_SUBTRACT = 333;
enum KEY_KP_ADD = 334;
enum KEY_KP_ENTER = 335;
enum KEY_KP_EQUAL = 336;
// Android buttons
enum KEY_BACK = 4;
enum KEY_MENU = 82;
enum KEY_VOLUME_UP = 24;
enum KEY_VOLUME_DOWN = 25;
// Mouse buttons
enum MOUSE_LEFT_BUTTON = 0;
enum MOUSE_RIGHT_BUTTON = 1;
enum MOUSE_MIDDLE_BUTTON = 2;
// Gamepad number
enum GAMEPAD_PLAYER1 = 0;
enum GAMEPAD_PLAYER2 = 1;
enum GAMEPAD_PLAYER3 = 2;
enum GAMEPAD_PLAYER4 = 3;
// Gamepad Buttons
enum GamepadButton
{
// This is here just for error checking
GAMEPAD_BUTTON_UNKNOWN = 0,
// This is normally [A,B,X,Y]/[Circle,Triangle,Square,Cross]
// No support for 6 button controllers though..
GAMEPAD_BUTTON_LEFT_FACE_UP = 1,
GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2,
GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3,
GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4,
// This is normally a DPAD
GAMEPAD_BUTTON_RIGHT_FACE_UP = 5,
GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6,
GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7,
GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8,
// Triggers
GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9,
GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10,
GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11,
GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12,
// These are buttons in the center of the gamepad
GAMEPAD_BUTTON_MIDDLE_LEFT = 13, //PS3 Select
GAMEPAD_BUTTON_MIDDLE = 14, //PS Button/XBOX Button
GAMEPAD_BUTTON_MIDDLE_RIGHT = 15, //PS3 Start
// These are the joystick press in buttons
GAMEPAD_BUTTON_LEFT_THUMB = 16,
GAMEPAD_BUTTON_RIGHT_THUMB = 17
}
enum GamepadAxis
{
// This is here just for error checking
GAMEPAD_AXIS_UNKNOWN = 0,
// Left stick
GAMEPAD_AXIS_LEFT_X = 1,
GAMEPAD_AXIS_LEFT_Y = 2,
// Right stick
GAMEPAD_AXIS_RIGHT_X = 3,
GAMEPAD_AXIS_RIGHT_Y = 4,
// Pressure levels for the back triggers
GAMEPAD_AXIS_LEFT_TRIGGER = 5, // [1..-1] (pressure-level)
GAMEPAD_AXIS_RIGHT_TRIGGER = 6 // [1..-1] (pressure-level)
}
// Shader location point type
enum ShaderLocationIndex
{
LOC_VERTEX_POSITION = 0,
LOC_VERTEX_TEXCOORD01 = 1,
LOC_VERTEX_TEXCOORD02 = 2,
LOC_VERTEX_NORMAL = 3,
LOC_VERTEX_TANGENT = 4,
LOC_VERTEX_COLOR = 5,
LOC_MATRIX_MVP = 6,
LOC_MATRIX_MODEL = 7,
LOC_MATRIX_VIEW = 8,
LOC_MATRIX_PROJECTION = 9,
LOC_VECTOR_VIEW = 10,
LOC_COLOR_DIFFUSE = 11,
LOC_COLOR_SPECULAR = 12,
LOC_COLOR_AMBIENT = 13,
LOC_MAP_ALBEDO = 14, // LOC_MAP_DIFFUSE
LOC_MAP_METALNESS = 15, // LOC_MAP_SPECULAR
LOC_MAP_NORMAL = 16,
LOC_MAP_ROUGHNESS = 17,
LOC_MAP_OCCLUSION = 18,
LOC_MAP_EMISSION = 19,
LOC_MAP_HEIGHT = 20,
LOC_MAP_CUBEMAP = 21,
LOC_MAP_IRRADIANCE = 22,
LOC_MAP_PREFILTER = 23,
LOC_MAP_BRDF = 24
}
enum LOC_MAP_DIFFUSE = ShaderLocationIndex.LOC_MAP_ALBEDO;
enum LOC_MAP_SPECULAR = ShaderLocationIndex.LOC_MAP_METALNESS;
// Shader uniform data types
enum UNIFORM_FLOAT = 0;
enum UNIFORM_VEC2 = 1;
enum UNIFORM_VEC3 = 2;
enum UNIFORM_VEC4 = 3;
enum UNIFORM_INT = 4;
enum UNIFORM_IVEC2 = 5;
enum UNIFORM_IVEC3 = 6;
enum UNIFORM_IVEC4 = 7;
enum UNIFORM_SAMPLER2D = 8;
// Material map type
enum MAP_ALBEDO = 0; // MAP_DIFFUSE
enum MAP_METALNESS = 1; // MAP_SPECULAR
enum MAP_NORMAL = 2;
enum MAP_ROUGHNESS = 3;
enum MAP_OCCLUSION = 4;
enum MAP_EMISSION = 5;
enum MAP_HEIGHT = 6;
enum MAP_CUBEMAP = 7; // NOTE: Uses GL_TEXTURE_CUBE_MAP
enum MAP_IRRADIANCE = 8; // NOTE: Uses GL_TEXTURE_CUBE_MAP
enum MAP_PREFILTER = 9; // NOTE: Uses GL_TEXTURE_CUBE_MAP
enum MAP_BRDF = 10;
enum MAP_DIFFUSE = 0; // Included for compatibility
enum MAP_SPECULAR = 1; // Also included for compatibility
// Pixel formats
// NOTE: Support depends on OpenGL version and platform
enum UNCOMPRESSED_GRAYSCALE = 1; // 8 bit per pixel (no alpha)
enum UNCOMPRESSED_GRAY_ALPHA = 2; // 8*2 bpp (2 channels)
enum UNCOMPRESSED_R5G6B5 = 3; // 16 bpp
enum UNCOMPRESSED_R8G8B8 = 4; // 24 bpp
enum UNCOMPRESSED_R5G5B5A1 = 5; // 16 bpp (1 bit alpha)
enum UNCOMPRESSED_R4G4B4A4 = 6; // 16 bpp (4 bit alpha)
enum UNCOMPRESSED_R8G8B8A8 = 7; // 32 bpp
enum UNCOMPRESSED_R32 = 8; // 32 bpp (1 channel - float)
enum UNCOMPRESSED_R32G32B32 = 9; // 32*3 bpp (3 channels - float)
enum UNCOMPRESSED_R32G32B32A32 = 10; // 32*4 bpp (4 channels - float)
enum COMPRESSED_DXT1_RGB = 11; // 4 bpp (no alpha)
enum COMPRESSED_DXT1_RGBA = 12; // 4 bpp (1 bit alpha)
enum COMPRESSED_DXT3_RGBA = 13; // 8 bpp
enum COMPRESSED_DXT5_RGBA = 14; // 8 bpp
enum COMPRESSED_ETC1_RGB = 15; // 4 bpp
enum COMPRESSED_ETC2_RGB = 16; // 4 bpp
enum COMPRESSED_ETC2_EAC_RGBA = 17; // 8 bpp
enum COMPRESSED_PVRT_RGB = 18; // 4 bpp
enum COMPRESSED_PVRT_RGBA = 19; // 4 bpp
enum COMPRESSED_ASTC_4x4_RGBA = 20; // 8 bpp
enum COMPRESSED_ASTC_8x8_RGBA = 21; // 2 bpp
// Texture parameters: filter mode
// NOTE 1: Filtering considers mipmaps if available in the texture
// NOTE 2: Filter is accordingly set for minification and magnification
enum TextureFilterMode
{
FILTER_POINT = 0, // No filter, just pixel aproximation
FILTER_BILINEAR = 1, // Linear filtering
FILTER_TRILINEAR = 2, // Trilinear filtering (linear with mipmaps)
FILTER_ANISOTROPIC_4X = 3, // Anisotropic filtering 4x
FILTER_ANISOTROPIC_8X = 4, // Anisotropic filtering 8x
FILTER_ANISOTROPIC_16X = 5 // Anisotropic filtering 16x
}
// Cubemap layout type
enum CubemapLayoutType
{
CUBEMAP_AUTO_DETECT = 0, // Automatically detect layout type
CUBEMAP_LINE_VERTICAL = 1, // Layout is defined by a vertical line with faces
CUBEMAP_LINE_HORIZONTAL = 2, // Layout is defined by an horizontal line with faces
CUBEMAP_CROSS_THREE_BY_FOUR = 3, // Layout is defined by a 3x4 cross with cubemap faces
CUBEMAP_CROSS_FOUR_BY_THREE = 4, // Layout is defined by a 4x3 cross with cubemap faces
CUBEMAP_PANORAMA = 5 // Layout is defined by a panorama image (equirectangular map)
}
// Texture parameters: wrap mode
enum TextureWrapMode
{
WRAP_REPEAT = 0, // Repeats texture in tiled mode
WRAP_CLAMP = 1, // Clamps texture to edge pixel in tiled mode
WRAP_MIRROR_REPEAT = 2, // Mirrors and repeats the texture in tiled mode
WRAP_MIRROR_CLAMP = 3 // Mirrors and clamps to border the texture in tiled mode
}
// Font type, defines generation method
enum FontType
{
FONT_DEFAULT = 0, // Default font generation, anti-aliased
FONT_BITMAP = 1, // Bitmap font generation, no anti-aliasing
FONT_SDF = 2 // SDF font generation, requires external shader
}
// Color blending modes (pre-defined)
enum BlendMode
{
BLEND_ALPHA = 0, // Blend textures considering alpha (default)
BLEND_ADDITIVE = 1, // Blend textures adding colors
BLEND_MULTIPLIED = 2 // Blend textures multiplying colors
}
// Gestures type
// NOTE: It could be used as flags to enable only some gestures
enum GestureType
{
GESTURE_NONE = 0,
GESTURE_TAP = 1,
GESTURE_DOUBLETAP = 2,
GESTURE_HOLD = 4,
GESTURE_DRAG = 8,
GESTURE_SWIPE_RIGHT = 16,
GESTURE_SWIPE_LEFT = 32,
GESTURE_SWIPE_UP = 64,
GESTURE_SWIPE_DOWN = 128,
GESTURE_PINCH_IN = 256,
GESTURE_PINCH_OUT = 512
}
// Camera system modes
enum CameraMode
{
CAMERA_CUSTOM = 0,
CAMERA_FREE = 1,
CAMERA_ORBITAL = 2,
CAMERA_FIRST_PERSON = 3,
CAMERA_THIRD_PERSON = 4
}
// Camera projection modes
enum CameraType
{
CAMERA_PERSPECTIVE = 0,
CAMERA_ORTHOGRAPHIC = 1
}
// Type of n-patch
enum NPatchType
{
NPT_9PATCH = 0, // Npatch defined by 3x3 tiles
NPT_3PATCH_VERTICAL = 1, // Npatch defined by 1x3 tiles
NPT_3PATCH_HORIZONTAL = 2 // Npatch defined by 3x1 tiles
}
// Callbacks to be implemented by users
alias TraceLogCallback = void function (int logType, const(char)* text, va_list args);
// Prevents name mangling of functions
//------------------------------------------------------------------------------------
// Global Variables Definition
//------------------------------------------------------------------------------------
// It's lonely here...
//------------------------------------------------------------------------------------
// Window and Graphics Device Functions (Module: core)
//------------------------------------------------------------------------------------
// Window-related functions
void InitWindow (int width, int height, const(char)* title); // Initialize window and OpenGL context
bool WindowShouldClose (); // Check if ESCAPE pressed or Close icon pressed
void CloseWindow (); // Close window and unload OpenGL context
bool IsWindowReady (); // Check if window has been initialized successfully
bool IsWindowMinimized (); // Check if window has been minimized (or lost focus)
bool IsWindowResized (); // Check if window has been resized
bool IsWindowHidden (); // Check if window is currently hidden
void ToggleFullscreen (); // Toggle fullscreen mode (only PLATFORM_DESKTOP)
void UnhideWindow (); // Show the window
void HideWindow (); // Hide the window
void SetWindowIcon (Image image); // Set icon for window (only PLATFORM_DESKTOP)
void SetWindowTitle (const(char)* title); // Set title for window (only PLATFORM_DESKTOP)
void SetWindowPosition (int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
void SetWindowMonitor (int monitor); // Set monitor for the current window (fullscreen mode)
void SetWindowMinSize (int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
void SetWindowSize (int width, int height); // Set window dimensions
void* GetWindowHandle (); // Get native window handle
int GetScreenWidth (); // Get current screen width
int GetScreenHeight (); // Get current screen height
int GetMonitorCount (); // Get number of connected monitors
int GetMonitorWidth (int monitor); // Get primary monitor width
int GetMonitorHeight (int monitor); // Get primary monitor height
int GetMonitorPhysicalWidth (int monitor); // Get primary monitor physical width in millimetres
int GetMonitorPhysicalHeight (int monitor); // Get primary monitor physical height in millimetres
const(char)* GetMonitorName (int monitor); // Get the human-readable, UTF-8 encoded name of the primary monitor
const(char)* GetClipboardText (); // Get clipboard text content
void SetClipboardText (const(char)* text); // Set clipboard text content
// Cursor-related functions
void ShowCursor (); // Shows cursor
void HideCursor (); // Hides cursor
bool IsCursorHidden (); // Check if cursor is not visible
void EnableCursor (); // Enables cursor (unlock cursor)
void DisableCursor (); // Disables cursor (lock cursor)
// Drawing-related functions
void ClearBackground (Color color); // Set background color (framebuffer clear color)
void BeginDrawing (); // Setup canvas (framebuffer) to start drawing
void EndDrawing (); // End canvas drawing and swap buffers (double buffering)
void BeginMode2D (Camera2D camera); // Initialize 2D mode with custom camera (2D)
void EndMode2D (); // Ends 2D mode with custom camera
void BeginMode3D (Camera3D camera); // Initializes 3D mode with custom camera (3D)
void EndMode3D (); // Ends 3D mode and returns to default 2D orthographic mode
void BeginTextureMode (RenderTexture2D target); // Initializes render texture for drawing
void EndTextureMode (); // Ends drawing to render texture
// Screen-space-related functions
Ray GetMouseRay (Vector2 mousePosition, Camera camera); // Returns a ray trace from mouse position
Vector2 GetWorldToScreen (Vector3 position, Camera camera); // Returns the screen space position for a 3d world space position
Matrix GetCameraMatrix (Camera camera); // Returns camera transform matrix (view matrix)
// Timing-related functions
void SetTargetFPS (int fps); // Set target FPS (maximum)
int GetFPS (); // Returns current FPS
float GetFrameTime (); // Returns time in seconds for last frame drawn
double GetTime (); // Returns elapsed time in seconds since InitWindow()
// Color-related functions
int ColorToInt (Color color); // Returns hexadecimal value for a Color
Vector4 ColorNormalize (Color color); // Returns color normalized as float [0..1]
Vector3 ColorToHSV (Color color); // Returns HSV values for a Color
Color ColorFromHSV (Vector3 hsv); // Returns a Color from HSV values
Color GetColor (int hexValue); // Returns a Color struct from hexadecimal value
Color Fade (Color color, float alpha); // Color fade-in or fade-out, alpha goes from 0.0f to 1.0f
// Misc. functions
void SetConfigFlags (ubyte flags); // Setup window configuration flags (view FLAGS)
void SetTraceLogLevel (int logType); // Set the current threshold (minimum) log level
void SetTraceLogExit (int logType); // Set the exit threshold (minimum) log level
void SetTraceLogCallback (TraceLogCallback callback); // Set a trace log callback to enable custom logging
void TraceLog (int logType, const(char)* text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR)
void TakeScreenshot (const(char)* fileName); // Takes a screenshot of current screen (saved a .png)
int GetRandomValue (int min, int max); // Returns a random value between min and max (both included)
// Files management functions
bool FileExists (const(char)* fileName); // Check if file exists
bool IsFileExtension (const(char)* fileName, const(char)* ext); // Check file extension
const(char)* GetExtension (const(char)* fileName); // Get pointer to extension for a filename string
const(char)* GetFileName (const(char)* filePath); // Get pointer to filename for a path string
const(char)* GetFileNameWithoutExt (const(char)* filePath); // Get filename string without extension (memory should be freed)
const(char)* GetDirectoryPath (const(char)* fileName); // Get full path for a given fileName (uses static string)
const(char)* GetWorkingDirectory (); // Get current working directory (uses static string)
char** GetDirectoryFiles (const(char)* dirPath, int* count); // Get filenames in a directory path (memory should be freed)
void ClearDirectoryFiles (); // Clear directory files paths buffers (free memory)
bool ChangeDirectory (const(char)* dir); // Change working directory, returns true if success
bool IsFileDropped (); // Check if a file has been dropped into window
char** GetDroppedFiles (int* count); // Get dropped files names (memory should be freed)
void ClearDroppedFiles (); // Clear dropped files paths buffer (free memory)
c_long GetFileModTime (const(char)* fileName); // Get file modification time (last write time)
// Persistent storage management
void StorageSaveValue (int position, int value); // Save integer value to storage file (to defined position)
int StorageLoadValue (int position); // Load integer value from storage file (from defined position)
void OpenURL (const(char)* url); // Open URL with default system browser (if available)
//------------------------------------------------------------------------------------
// Input Handling Functions (Module: core)
//------------------------------------------------------------------------------------
// Input-related functions: keyboard
bool IsKeyPressed (int key); // Detect if a key has been pressed once
bool IsKeyDown (int key); // Detect if a key is being pressed
bool IsKeyReleased (int key); // Detect if a key has been released once
bool IsKeyUp (int key); // Detect if a key is NOT being pressed
int GetKeyPressed (); // Get latest key pressed
void SetExitKey (int key); // Set a custom key to exit program (default is ESC)
// Input-related functions: gamepads
bool IsGamepadAvailable (int gamepad); // Detect if a gamepad is available
bool IsGamepadName (int gamepad, const(char)* name); // Check gamepad name (if available)
const(char)* GetGamepadName (int gamepad); // Return gamepad internal name id
bool IsGamepadButtonPressed (int gamepad, int button); // Detect if a gamepad button has been pressed once
bool IsGamepadButtonDown (int gamepad, int button); // Detect if a gamepad button is being pressed
bool IsGamepadButtonReleased (int gamepad, int button); // Detect if a gamepad button has been released once
bool IsGamepadButtonUp (int gamepad, int button); // Detect if a gamepad button is NOT being pressed
int GetGamepadButtonPressed (); // Get the last gamepad button pressed
int GetGamepadAxisCount (int gamepad); // Return gamepad axis count for a gamepad
float GetGamepadAxisMovement (int gamepad, int axis); // Return axis movement value for a gamepad axis
// Input-related functions: mouse
bool IsMouseButtonPressed (int button); // Detect if a mouse button has been pressed once
bool IsMouseButtonDown (int button); // Detect if a mouse button is being pressed
bool IsMouseButtonReleased (int button); // Detect if a mouse button has been released once
bool IsMouseButtonUp (int button); // Detect if a mouse button is NOT being pressed
int GetMouseX (); // Returns mouse position X
int GetMouseY (); // Returns mouse position Y
Vector2 GetMousePosition (); // Returns mouse position XY
void SetMousePosition (int x, int y); // Set mouse position XY
void SetMouseOffset (int offsetX, int offsetY); // Set mouse offset
void SetMouseScale (float scaleX, float scaleY); // Set mouse scaling
int GetMouseWheelMove (); // Returns mouse wheel movement Y
// Input-related functions: touch
int GetTouchX (); // Returns touch position X for touch point 0 (relative to screen size)
int GetTouchY (); // Returns touch position Y for touch point 0 (relative to screen size)
Vector2 GetTouchPosition (int index); // Returns touch position XY for a touch point index (relative to screen size)
//------------------------------------------------------------------------------------
// Gestures and Touch Handling Functions (Module: gestures)
//------------------------------------------------------------------------------------
void SetGesturesEnabled (uint gestureFlags); // Enable a set of gestures using flags
bool IsGestureDetected (int gesture); // Check if a gesture have been detected
int GetGestureDetected (); // Get latest detected gesture
int GetTouchPointsCount (); // Get touch points count
float GetGestureHoldDuration (); // Get gesture hold time in milliseconds
Vector2 GetGestureDragVector (); // Get gesture drag vector
float GetGestureDragAngle (); // Get gesture drag angle
Vector2 GetGesturePinchVector (); // Get gesture pinch delta
float GetGesturePinchAngle (); // Get gesture pinch angle
//------------------------------------------------------------------------------------
// Camera System Functions (Module: camera)
//------------------------------------------------------------------------------------
void SetCameraMode (Camera camera, int mode); // Set camera mode (multiple camera modes available)
void UpdateCamera (Camera* camera); // Update camera position for selected mode
void SetCameraPanControl (int panKey); // Set camera pan key to combine with mouse movement (free camera)
void SetCameraAltControl (int altKey); // Set camera alt key to combine with mouse movement (free camera)
void SetCameraSmoothZoomControl (int szKey); // Set camera smooth zoom key to combine with mouse (free camera)
void SetCameraMoveControls (int frontKey, int backKey, int rightKey, int leftKey, int upKey, int downKey); // Set camera move controls (1st person and 3rd person cameras)
//------------------------------------------------------------------------------------
// Basic Shapes Drawing Functions (Module: shapes)
//------------------------------------------------------------------------------------
// Basic shapes drawing functions
void DrawPixel (int posX, int posY, Color color); // Draw a pixel
void DrawPixelV (Vector2 position, Color color); // Draw a pixel (Vector version)
void DrawLine (int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line
void DrawLineV (Vector2 startPos, Vector2 endPos, Color color); // Draw a line (Vector version)
void DrawLineEx (Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line defining thickness
void DrawLineBezier (Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line using cubic-bezier curves in-out
void DrawLineStrip (Vector2* points, int numPoints, Color color); // Draw lines sequence
void DrawCircle (int centerX, int centerY, float radius, Color color); // Draw a color-filled circle
void DrawCircleSector (Vector2 center, float radius, int startAngle, int endAngle, int segments, Color color); // Draw a piece of a circle
void DrawCircleSectorLines (Vector2 center, float radius, int startAngle, int endAngle, int segments, Color color); // Draw circle sector outline
void DrawCircleGradient (int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle
void DrawCircleV (Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
void DrawCircleLines (int centerX, int centerY, float radius, Color color); // Draw circle outline
void DrawRing (Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color); // Draw ring
void DrawRingLines (Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color); // Draw ring outline
void DrawRectangle (int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle
void DrawRectangleV (Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version)
void DrawRectangleRec (Rectangle rec, Color color); // Draw a color-filled rectangle
void DrawRectanglePro (Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters
void DrawRectangleGradientV (int posX, int posY, int width, int height, Color color1, Color color2); // Draw a vertical-gradient-filled rectangle
void DrawRectangleGradientH (int posX, int posY, int width, int height, Color color1, Color color2); // Draw a horizontal-gradient-filled rectangle
void DrawRectangleGradientEx (Rectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rectangle with custom vertex colors
void DrawRectangleLines (int posX, int posY, int width, int height, Color color); // Draw rectangle outline
void DrawRectangleLinesEx (Rectangle rec, int lineThick, Color color); // Draw rectangle outline with extended parameters
void DrawRectangleRounded (Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges
void DrawRectangleRoundedLines (Rectangle rec, float roundness, int segments, int lineThick, Color color); // Draw rectangle with rounded edges outline
void DrawTriangle (Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle
void DrawTriangleLines (Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline
void DrawTriangleFan (Vector2* points, int numPoints, Color color); // Draw a triangle fan defined by points
void DrawPoly (Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
void SetShapesTexture (Texture2D texture, Rectangle source); // Define default texture used to draw shapes
// Basic shapes collision detection functions
bool CheckCollisionRecs (Rectangle rec1, Rectangle rec2); // Check collision between two rectangles
bool CheckCollisionCircles (Vector2 center1, float radius1, Vector2 center2, float radius2); // Check collision between two circles
bool CheckCollisionCircleRec (Vector2 center, float radius, Rectangle rec); // Check collision between circle and rectangle
Rectangle GetCollisionRec (Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision
bool CheckCollisionPointRec (Vector2 point, Rectangle rec); // Check if point is inside rectangle
bool CheckCollisionPointCircle (Vector2 point, Vector2 center, float radius); // Check if point is inside circle
bool CheckCollisionPointTriangle (Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); // Check if point is inside a triangle
//------------------------------------------------------------------------------------
// Texture Loading and Drawing Functions (Module: textures)
//------------------------------------------------------------------------------------
// Image/Texture2D data loading/unloading/saving functions
Image LoadImage (const(char)* fileName); // Load image from file into CPU memory (RAM)
Image LoadImageEx (Color* pixels, int width, int height); // Load image from Color array data (RGBA - 32bit)
Image LoadImagePro (void* data, int width, int height, int format); // Load image from raw data with parameters
Image LoadImageRaw (const(char)* fileName, int width, int height, int format, int headerSize); // Load image from RAW file data
void ExportImage (Image image, const(char)* fileName); // Export image data to file
void ExportImageAsCode (Image image, const(char)* fileName); // Export image as code file defining an array of bytes
Texture2D LoadTexture (const(char)* fileName); // Load texture from file into GPU memory (VRAM)
Texture2D LoadTextureFromImage (Image image); // Load texture from image data
TextureCubemap LoadTextureCubemap (Image image, int layoutType); // Load cubemap from image, multiple image cubemap layouts supported
RenderTexture2D LoadRenderTexture (int width, int height); // Load texture for rendering (framebuffer)
void UnloadImage (Image image); // Unload image from CPU memory (RAM)
void UnloadTexture (Texture2D texture); // Unload texture from GPU memory (VRAM)
void UnloadRenderTexture (RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
Color* GetImageData (Image image); // Get pixel data from image as a Color struct array
Vector4* GetImageDataNormalized (Image image); // Get pixel data from image as Vector4 array (float normalized)
int GetPixelDataSize (int width, int height, int format); // Get pixel data size in bytes (image or texture)
Image GetTextureData (Texture2D texture); // Get pixel data from GPU texture and return an Image
Image GetScreenData (); // Get pixel data from screen buffer and return an Image (screenshot)
void UpdateTexture (Texture2D texture, const(void)* pixels); // Update GPU texture with new data
// Image manipulation functions
Image ImageCopy (Image image); // Create an image duplicate (useful for transformations)
void ImageToPOT (Image* image, Color fillColor); // Convert image to POT (power-of-two)
void ImageFormat (Image* image, int newFormat); // Convert image data to desired format
void ImageAlphaMask (Image* image, Image alphaMask); // Apply alpha mask to image
void ImageAlphaClear (Image* image, Color color, float threshold); // Clear alpha channel to desired color
void ImageAlphaCrop (Image* image, float threshold); // Crop image depending on alpha value
void ImageAlphaPremultiply (Image* image); // Premultiply alpha channel
void ImageCrop (Image* image, Rectangle crop); // Crop an image to a defined rectangle
void ImageResize (Image* image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm)
void ImageResizeNN (Image* image, int newWidth, int newHeight); // Resize image (Nearest-Neighbor scaling algorithm)
void ImageResizeCanvas (Image* image, int newWidth, int newHeight, int offsetX, int offsetY, Color color); // Resize canvas and fill with color
void ImageMipmaps (Image* image); // Generate all mipmap levels for a provided image
void ImageDither (Image* image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
Color* ImageExtractPalette (Image image, int maxPaletteSize, int* extractCount); // Extract color palette from image to maximum size (memory should be freed)
Image ImageText (const(char)* text, int fontSize, Color color); // Create an image from text (default font)
Image ImageTextEx (Font font, const(char)* text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font)
void ImageDraw (Image* dst, Image src, Rectangle srcRec, Rectangle dstRec); // Draw a source image within a destination image
void ImageDrawRectangle (Image* dst, Rectangle rec, Color color); // Draw rectangle within an image
void ImageDrawRectangleLines (Image* dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image
void ImageDrawText (Image* dst, Vector2 position, const(char)* text, int fontSize, Color color); // Draw text (default font) within an image (destination)
void ImageDrawTextEx (Image* dst, Vector2 position, Font font, const(char)* text, float fontSize, float spacing, Color color); // Draw text (custom sprite font) within an image (destination)
void ImageFlipVertical (Image* image); // Flip image vertically
void ImageFlipHorizontal (Image* image); // Flip image horizontally
void ImageRotateCW (Image* image); // Rotate image clockwise 90deg
void ImageRotateCCW (Image* image); // Rotate image counter-clockwise 90deg
void ImageColorTint (Image* image, Color color); // Modify image color: tint
void ImageColorInvert (Image* image); // Modify image color: invert
void ImageColorGrayscale (Image* image); // Modify image color: grayscale
void ImageColorContrast (Image* image, float contrast); // Modify image color: contrast (-100 to 100)
void ImageColorBrightness (Image* image, int brightness); // Modify image color: brightness (-255 to 255)
void ImageColorReplace (Image* image, Color color, Color replace); // Modify image color: replace color
// Image generation functions
Image GenImageColor (int width, int height, Color color); // Generate image: plain color
Image GenImageGradientV (int width, int height, Color top, Color bottom); // Generate image: vertical gradient
Image GenImageGradientH (int width, int height, Color left, Color right); // Generate image: horizontal gradient
Image GenImageGradientRadial (int width, int height, float density, Color inner, Color outer); // Generate image: radial gradient
Image GenImageChecked (int width, int height, int checksX, int checksY, Color col1, Color col2); // Generate image: checked
Image GenImageWhiteNoise (int width, int height, float factor); // Generate image: white noise
Image GenImagePerlinNoise (int width, int height, int offsetX, int offsetY, float scale); // Generate image: perlin noise
Image GenImageCellular (int width, int height, int tileSize); // Generate image: cellular algorithm. Bigger tileSize means bigger cells
// Texture2D configuration functions
void GenTextureMipmaps (Texture2D* texture); // Generate GPU mipmaps for a texture
void SetTextureFilter (Texture2D texture, int filterMode); // Set texture scaling filter mode
void SetTextureWrap (Texture2D texture, int wrapMode); // Set texture wrapping mode
// Texture2D drawing functions
void DrawTexture (Texture2D texture, int posX, int posY, Color tint); // Draw a Texture2D
void DrawTextureV (Texture2D texture, Vector2 position, Color tint); // Draw a Texture2D with position defined as Vector2
void DrawTextureEx (Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with extended parameters
void DrawTextureRec (Texture2D texture, Rectangle sourceRec, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle
void DrawTextureQuad (Texture2D texture, Vector2 tiling, Vector2 offset, Rectangle quad, Color tint); // Draw texture quad with tiling and offset parameters
void DrawTexturePro (Texture2D texture, Rectangle sourceRec, Rectangle destRec, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rectangle with 'pro' parameters
void DrawTextureNPatch (Texture2D texture, NPatchInfo nPatchInfo, Rectangle destRec, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely
//------------------------------------------------------------------------------------
// Font Loading and Text Drawing Functions (Module: text)
//------------------------------------------------------------------------------------
// Font loading/unloading functions
Font GetFontDefault (); // Get the default Font
Font LoadFont (const(char)* fileName); // Load font from file into GPU memory (VRAM)
Font LoadFontEx (const(char)* fileName, int fontSize, int* fontChars, int charsCount); // Load font from file with extended parameters
Font LoadFontFromImage (Image image, Color key, int firstChar); // Load font from Image (XNA style)
CharInfo* LoadFontData (const(char)* fileName, int fontSize, int* fontChars, int charsCount, int type); // Load font data for further use
Image GenImageFontAtlas (CharInfo* chars, int charsCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
void UnloadFont (Font font); // Unload Font from GPU memory (VRAM)
// Text drawing functions
void DrawFPS (int posX, int posY); // Shows current FPS
void DrawText (const(char)* text, int posX, int posY, int fontSize, Color color); // Draw text (using default font)
void DrawTextEx (Font font, const(char)* text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text using font and additional parameters
void DrawTextRec (Font font, const(char)* text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint); // Draw text using font inside rectangle limits
void DrawTextRecEx (
Font font,
const(char)* text,
Rectangle rec,
float fontSize,
float spacing,
bool wordWrap,
Color tint,
int selectStart,
int selectLength,
Color selectText,
Color selectBack); // Draw text using font inside rectangle limits with support for text selection
// Text misc. functions
int MeasureText (const(char)* text, int fontSize); // Measure string width for default font
Vector2 MeasureTextEx (Font font, const(char)* text, float fontSize, float spacing); // Measure string size for Font
int GetGlyphIndex (Font font, int character); // Get index position for a unicode character on font
int GetNextCodepoint (const(char)* text, int* count); // Returns next codepoint in a UTF8 encoded string
// NOTE: 0x3f(`?`) is returned on failure, `count` will hold the total number of bytes processed
// Text strings management functions
// NOTE: Some strings allocate memory internally for returned strings, just be careful!
bool TextIsEqual (const(char)* text1, const(char)* text2); // Check if two text string are equal
uint TextLength (const(char)* text); // Get text length, checks for '\0' ending
uint TextCountCodepoints (const(char)* text); // Get total number of characters (codepoints) in a UTF8 encoded string
const(char)* TextFormat (const(char)* text, ...); // Text formatting with variables (sprintf style)
const(char)* TextSubtext (const(char)* text, int position, int length); // Get a piece of a text string
const(char)* TextReplace (char* text, const(char)* replace, const(char)* by); // Replace text string (memory should be freed!)
const(char)* TextInsert (const(char)* text, const(char)* insert, int position); // Insert text in a position (memory should be freed!)
const(char)* TextJoin (const(char*)* textList, int count, const(char)* delimiter); // Join text strings with delimiter
const(char*)* TextSplit (const(char)* text, char delimiter, int* count); // Split text into multiple strings
void TextAppend (char* text, const(char)* append, int* position); // Append text at specific position and move cursor!
int TextFindIndex (const(char)* text, const(char)* find); // Find first text occurrence within a string
const(char)* TextToUpper (const(char)* text); // Get upper case version of provided string
const(char)* TextToLower (const(char)* text); // Get lower case version of provided string
const(char)* TextToPascal (const(char)* text); // Get Pascal case notation version of provided string
int TextToInteger (const(char)* text); // Get integer value from text (negative values not supported)
//------------------------------------------------------------------------------------
// Basic 3d Shapes Drawing Functions (Module: models)
//------------------------------------------------------------------------------------
// Basic geometric 3D shapes drawing functions
void DrawLine3D (Vector3 startPos, Vector3 endPos, Color color); // Draw a line in 3D world space
void DrawCircle3D (Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space
void DrawCube (Vector3 position, float width, float height, float length, Color color); // Draw cube
void DrawCubeV (Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
void DrawCubeWires (Vector3 position, float width, float height, float length, Color color); // Draw cube wires
void DrawCubeWiresV (Vector3 position, Vector3 size, Color color); // Draw cube wires (Vector version)
void DrawCubeTexture (Texture2D texture, Vector3 position, float width, float height, float length, Color color); // Draw cube textured
void DrawSphere (Vector3 centerPos, float radius, Color color); // Draw sphere
void DrawSphereEx (Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere with extended parameters
void DrawSphereWires (Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere wires
void DrawCylinder (Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color); // Draw a cylinder/cone
void DrawCylinderWires (Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color); // Draw a cylinder/cone wires
void DrawPlane (Vector3 centerPos, Vector2 size, Color color); // Draw a plane XZ
void DrawRay (Ray ray, Color color); // Draw a ray line
void DrawGrid (int slices, float spacing); // Draw a grid (centered at (0, 0, 0))
void DrawGizmo (Vector3 position); // Draw simple gizmo
//DrawTorus(), DrawTeapot() could be useful?
//------------------------------------------------------------------------------------
// Model 3d Loading and Drawing Functions (Module: models)
//------------------------------------------------------------------------------------
// Model loading/unloading functions
Model LoadModel (const(char)* fileName); // Load model from files (meshes and materials)
Model LoadModelFromMesh (Mesh mesh); // Load model from generated mesh (default material)
void UnloadModel (Model model); // Unload model from memory (RAM and/or VRAM)
// Mesh loading/unloading functions
Mesh* LoadMeshes (const(char)* fileName, int* meshCount); // Load meshes from model file
void ExportMesh (Mesh mesh, const(char)* fileName); // Export mesh data to file
void UnloadMesh (Mesh* mesh); // Unload mesh from memory (RAM and/or VRAM)
// Material loading/unloading functions
Material* LoadMaterials (const(char)* fileName, int* materialCount); // Load materials from model file
Material LoadMaterialDefault (); // Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
void UnloadMaterial (Material material); // Unload material from GPU memory (VRAM)
void SetMaterialTexture (Material* material, int mapType, Texture2D texture); // Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
void SetModelMeshMaterial (Model* model, int meshId, int materialId); // Set material for a mesh
// Model animations loading/unloading functions
ModelAnimation* LoadModelAnimations (const(char)* fileName, int* animsCount); // Load model animations from file
void UpdateModelAnimation (Model model, ModelAnimation anim, int frame); // Update model animation pose
void UnloadModelAnimation (ModelAnimation anim); // Unload animation data
bool IsModelAnimationValid (Model model, ModelAnimation anim); // Check model animation skeleton match
// Mesh generation functions
Mesh GenMeshPoly (int sides, float radius); // Generate polygonal mesh
Mesh GenMeshPlane (float width, float length, int resX, int resZ); // Generate plane mesh (with subdivisions)
Mesh GenMeshCube (float width, float height, float length); // Generate cuboid mesh
Mesh GenMeshSphere (float radius, int rings, int slices); // Generate sphere mesh (standard sphere)
Mesh GenMeshHemiSphere (float radius, int rings, int slices); // Generate half-sphere mesh (no bottom cap)
Mesh GenMeshCylinder (float radius, float height, int slices); // Generate cylinder mesh
Mesh GenMeshTorus (float radius, float size, int radSeg, int sides); // Generate torus mesh
Mesh GenMeshKnot (float radius, float size, int radSeg, int sides); // Generate trefoil knot mesh
Mesh GenMeshHeightmap (Image heightmap, Vector3 size); // Generate heightmap mesh from image data
Mesh GenMeshCubicmap (Image cubicmap, Vector3 cubeSize); // Generate cubes-based map mesh from image data
// Mesh manipulation functions
BoundingBox MeshBoundingBox (Mesh mesh); // Compute mesh bounding box limits
void MeshTangents (Mesh* mesh); // Compute mesh tangents
void MeshBinormals (Mesh* mesh); // Compute mesh binormals
// Model drawing functions
void DrawModel (Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set)
void DrawModelEx (Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters
void DrawModelWires (Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set)
void DrawModelWiresEx (Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters
void DrawBoundingBox (BoundingBox box, Color color); // Draw bounding box (wires)
void DrawBillboard (Camera camera, Texture2D texture, Vector3 center, float size, Color tint); // Draw a billboard texture
void DrawBillboardRec (Camera camera, Texture2D texture, Rectangle sourceRec, Vector3 center, float size, Color tint); // Draw a billboard texture defined by sourceRec
// Collision detection functions
bool CheckCollisionSpheres (Vector3 centerA, float radiusA, Vector3 centerB, float radiusB); // Detect collision between two spheres
bool CheckCollisionBoxes (BoundingBox box1, BoundingBox box2); // Detect collision between two bounding boxes
bool CheckCollisionBoxSphere (BoundingBox box, Vector3 centerSphere, float radiusSphere); // Detect collision between box and sphere
bool CheckCollisionRaySphere (Ray ray, Vector3 spherePosition, float sphereRadius); // Detect collision between ray and sphere
bool CheckCollisionRaySphereEx (Ray ray, Vector3 spherePosition, float sphereRadius, Vector3* collisionPoint); // Detect collision between ray and sphere, returns collision point
bool CheckCollisionRayBox (Ray ray, BoundingBox box); // Detect collision between ray and box
RayHitInfo GetCollisionRayModel (Ray ray, Model* model); // Get collision info between ray and model
RayHitInfo GetCollisionRayTriangle (Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); // Get collision info between ray and triangle
RayHitInfo GetCollisionRayGround (Ray ray, float groundHeight); // Get collision info between ray and ground plane (Y-normal plane)
//------------------------------------------------------------------------------------
// Shaders System Functions (Module: rlgl)
// NOTE: This functions are useless when using OpenGL 1.1
//------------------------------------------------------------------------------------
// Shader loading/unloading functions
char* LoadText (const(char)* fileName); // Load chars array from text file
Shader LoadShader (const(char)* vsFileName, const(char)* fsFileName); // Load shader from files and bind default locations
Shader LoadShaderCode (char* vsCode, char* fsCode); // Load shader from code strings and bind default locations
void UnloadShader (Shader shader); // Unload shader from GPU memory (VRAM)
Shader GetShaderDefault (); // Get default shader
Texture2D GetTextureDefault (); // Get default texture
// Shader configuration functions
int GetShaderLocation (Shader shader, const(char)* uniformName); // Get shader uniform location
void SetShaderValue (Shader shader, int uniformLoc, const(void)* value, int uniformType); // Set shader uniform value
void SetShaderValueV (Shader shader, int uniformLoc, const(void)* value, int uniformType, int count); // Set shader uniform value vector
void SetShaderValueMatrix (Shader shader, int uniformLoc, Matrix mat); // Set shader uniform value (matrix 4x4)
void SetShaderValueTexture (Shader shader, int uniformLoc, Texture2D texture); // Set shader uniform value for texture
void SetMatrixProjection (Matrix proj); // Set a custom projection matrix (replaces internal projection matrix)
void SetMatrixModelview (Matrix view); // Set a custom modelview matrix (replaces internal modelview matrix)
Matrix GetMatrixModelview (); // Get internal modelview matrix
// Texture maps generation (PBR)
// NOTE: Required shaders should be provided
Texture2D GenTextureCubemap (Shader shader, Texture2D skyHDR, int size); // Generate cubemap texture from HDR texture
Texture2D GenTextureIrradiance (Shader shader, Texture2D cubemap, int size); // Generate irradiance texture using cubemap data
Texture2D GenTexturePrefilter (Shader shader, Texture2D cubemap, int size); // Generate prefilter texture using cubemap data
Texture2D GenTextureBRDF (Shader shader, int size); // Generate BRDF texture
// Shading begin/end functions
void BeginShaderMode (Shader shader); // Begin custom shader drawing
void EndShaderMode (); // End custom shader drawing (use default shader)
void BeginBlendMode (int mode); // Begin blending mode (alpha, additive, multiplied)
void EndBlendMode (); // End blending mode (reset to default: alpha blending)
void BeginScissorMode (int x, int y, int width, int height); // Begin scissor mode (define screen area for following drawing)
void EndScissorMode (); // End scissor mode
// VR control functions
void InitVrSimulator (); // Init VR simulator for selected device parameters
void CloseVrSimulator (); // Close VR simulator for current device
void UpdateVrTracking (Camera* camera); // Update VR tracking (position and orientation) and camera
void SetVrConfiguration (VrDeviceInfo info, Shader distortion); // Set stereo rendering configuration parameters
bool IsVrSimulatorReady (); // Detect if VR simulator is ready
void ToggleVrMode (); // Enable/Disable VR experience
void BeginVrDrawing (); // Begin VR simulator stereo rendering
void EndVrDrawing (); // End VR simulator stereo rendering
//------------------------------------------------------------------------------------
// Audio Loading and Playing Functions (Module: audio)
//------------------------------------------------------------------------------------
// Audio device management functions
void InitAudioDevice (); // Initialize audio device and context
void CloseAudioDevice (); // Close the audio device and context
bool IsAudioDeviceReady (); // Check if audio device has been initialized successfully
void SetMasterVolume (float volume); // Set master volume (listener)
// Wave/Sound loading/unloading functions
Wave LoadWave (const(char)* fileName); // Load wave data from file
Wave LoadWaveEx (void* data, int sampleCount, int sampleRate, int sampleSize, int channels); // Load wave data from raw array data
Sound LoadSound (const(char)* fileName); // Load sound from file
Sound LoadSoundFromWave (Wave wave); // Load sound from wave data
void UpdateSound (Sound sound, const(void)* data, int samplesCount); // Update sound buffer with new data
void UnloadWave (Wave wave); // Unload wave data
void UnloadSound (Sound sound); // Unload sound
void ExportWave (Wave wave, const(char)* fileName); // Export wave data to file
void ExportWaveAsCode (Wave wave, const(char)* fileName); // Export wave sample data to code (.h)
// Wave/Sound management functions
void PlaySound (Sound sound); // Play a sound
void PauseSound (Sound sound); // Pause a sound
void ResumeSound (Sound sound); // Resume a paused sound
void StopSound (Sound sound); // Stop playing a sound
bool IsSoundPlaying (Sound sound); // Check if a sound is currently playing
void SetSoundVolume (Sound sound, float volume); // Set volume for a sound (1.0 is max level)
void SetSoundPitch (Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
void WaveFormat (Wave* wave, int sampleRate, int sampleSize, int channels); // Convert wave data to desired format
Wave WaveCopy (Wave wave); // Copy a wave to a new wave
void WaveCrop (Wave* wave, int initSample, int finalSample); // Crop a wave to defined samples range
float* GetWaveData (Wave wave); // Get samples data from wave as a floats array
// Music management functions
Music LoadMusicStream (const(char)* fileName); // Load music stream from file
void UnloadMusicStream (Music music); // Unload music stream
void PlayMusicStream (Music music); // Start music playing
void UpdateMusicStream (Music music); // Updates buffers for music streaming
void StopMusicStream (Music music); // Stop music playing
void PauseMusicStream (Music music); // Pause music playing
void ResumeMusicStream (Music music); // Resume playing paused music
bool IsMusicPlaying (Music music); // Check if music is playing
void SetMusicVolume (Music music, float volume); // Set volume for music (1.0 is max level)
void SetMusicPitch (Music music, float pitch); // Set pitch for a music (1.0 is base level)
void SetMusicLoopCount (Music music, int count); // Set music loop count (loop repeats)
float GetMusicTimeLength (Music music); // Get music time length (in seconds)
float GetMusicTimePlayed (Music music); // Get current music time played (in seconds)
// AudioStream management functions
AudioStream InitAudioStream (uint sampleRate, uint sampleSize, uint channels); // Init audio stream (to stream raw audio pcm data)
void UpdateAudioStream (AudioStream stream, const(void)* data, int samplesCount); // Update audio stream buffers with data
void CloseAudioStream (AudioStream stream); // Close audio stream and free memory
bool IsAudioBufferProcessed (AudioStream stream); // Check if any audio stream buffers requires refill
void PlayAudioStream (AudioStream stream); // Play audio stream
void PauseAudioStream (AudioStream stream); // Pause audio stream
void ResumeAudioStream (AudioStream stream); // Resume audio stream
bool IsAudioStreamPlaying (AudioStream stream); // Check if audio stream is playing
void StopAudioStream (AudioStream stream); // Stop audio stream
void SetAudioStreamVolume (AudioStream stream, float volume); // Set volume for audio stream (1.0 is max level)
void SetAudioStreamPitch (AudioStream stream, float pitch); // Set pitch for audio stream (1.0 is base level)
//------------------------------------------------------------------------------------
// Network (Module: network)
//------------------------------------------------------------------------------------
// IN PROGRESS: Check rnet.h for reference
// RAYLIB_H
|
D
|
/**
A simple module that handles user input on the command line.
Authors:
Paul Crane
*/
module raijin.cmdline;
import std.stdio;
import std.string;
import std.typecons;
import std.range;
import std.conv;
import std.regex;
import core.thread;
import raijin.types.callbacks;
alias ShowPrompt = Flag!"showPrompt";
private
{
alias OnCommandDelegate = void delegate(const string command, const string[] args);
alias VoidDelegate = void delegate();
alias OnInvalidCommandDelegate = void delegate(const string command);
}
/**
Manages a loop which processes commands via command line input.
Examples:
--------------------
class MyCommandLoop : CommandLoop
{
// All on<name> commands can be overriden.
override void onCommand(const string command, const string[] args)
{
// Will only print "test" since it is the only command registered.
writeln("Command: ", command, " Args: ", args);
}
}
auto cmd = new MyCommandLoop;
cmd.addCommand("test", "this is a test");
cmd.processCommands();
--------------------
*/
class CommandLoop
{
public:
this()
{
addCommand("clear", "Clear screen of output and display command prompt.");
addCommand("list", "Lists all available commands.");
addCommand("exit", "Exits the program.");
addCommand("quit", "Exits the program.");
defaultCommandsCount_ = validCommands_.length;
setCallback("onCommand", &onCommand);
setCallback("onInvalidCommand", &onInvalidCommand);
setCallback("onEnterProcessCommands", &onEnterProcessCommands);
setCallback("onExitProcessCommands", &onExitProcessCommands);
}
/**
Receives commands sent from processCommands
Params:
command = The command that was sent
args = Additional arguments sent with command.
*/
void onCommand(const string command, const string[] args) {}
/**
Called by processCommands before commands are handled.
*/
void onExitProcessCommands() {}
/**
Called by processCommands after commands are handled.
*/
void onEnterProcessCommands() {}
/**
Called by processCommands when the "list" command is sent.
*/
void onListCommands()
{
import std.algorithm : sort, each;
auto keys = sort(validCommands_.keys);
writeln("Commands:");
keys.each!((key) => writeln("\t", key, " - ", validCommands_[key]));
}
/**
Called by processCommands when an invalid command is sent.
*/
void onInvalidCommand(const string command)
{
writeln("Invalid command '", command, "'. Use 'list' for a list of valid commands.\n");
}
/**
Sets a callback to a function instead of having to inherit from class.
Params:
name = Name of the callback to use(valid values are: onTimer, onTimerStart or onTimerStop).
callback = The function to be called. Function must take no arguments and have void return type.
*/
void setCallback(const string name, VoidDelegate callback)
{
final switch(name)
{
case "onExitProcessCommands":
onExitProcessCommands_ = callback;
break;
case "onEnterProcessCommands":
onEnterProcessCommands_ = callback;
break;
}
}
/**
Sets a callback to a function instead of having to inherit from class.
Params:
name = Name of the callback to use(valid values are: onTimer, onTimerStart or onTimerStop).
callback = The function to be called. Function must take no arguments and have void return type.
*/
void setCallback(const string name, OnCommandDelegate callback)
{
final switch(name)
{
case "onCommand":
onCommand_ = callback;
break;
}
}
/**
Sets a callback to a function instead of having to inherit from class.
Params:
name = Name of the callback to use(valid values are: onTimer, onTimerStart or onTimerStop).
callback = The function to be called. Function must take no arguments and have void return type.
*/
void setCallback(const string name, OnInvalidCommandDelegate callback)
{
final switch(name)
{
case "onInvalidCommand":
onInvalidCommand_ = callback;
break;
}
}
/**
Processes commands sent via the command line.
Params:
showPrompt = Set to yes to show a prompt(A message saying Enter Command> by default). Set to no to ignore prompt.
promptMsg = The message to print if showPrompt is enabled.
*/
final void processCommands(ShowPrompt showPrompt = ShowPrompt.yes, string promptMsg = "Enter Command>")
{
showPrompt_ = showPrompt;
promptMsg_ = promptMsg;
//validateCallbacks();
thread_ = new Thread(&run);
thread_.start();
}
private void run()
{
onEnterProcessCommands_();
while(keepProcessing_)
{
if(showPrompt_)
{
write(promptMsg_);
}
immutable string[] commands = readln.strip.split(' ');
immutable string command = commands[0];
immutable string[] args = commands[1..$];
if(isValidCommand(command))
{
switch(command)
{
case "exit", "quit":
quit();
break;
case "list":
onListCommands();
break;
case "clear":
clear();
break;
default:
if(validCommands_.length > defaultCommandsCount_) // If length is greater the user added a command so process it.
{
onCommand_(command, args);
}
break;
}
}
else
{
onInvalidCommand_(command);
}
thread_.sleep(dur!("msecs")(10)); // Throttle so we don't take up too much CPU
}
onExitProcessCommands_();
}
/**
Determines if a command is valid(added via addCommand).
Params:
command = The command to check for.
*/
final bool isValidCommand(const string command) pure @safe
{
foreach(validCommand, description; validCommands_)
{
if(validCommand == command)
{
return true;
}
}
return false;
}
/**
Adds a command that should be processed.
Params:
command = The command to add.
description = A description of what the command does.
*/
void addCommand(const string command, const string description)// pure @safe
{
validCommands_[command] = description;
}
void removeCommand(const string command)
{
validCommands_.remove(command);
}
/**
Called by processCommands when the "exit" command is sent.
*/
final void quit() pure @safe
{
keepProcessing_ = false;
}
/**
Helper property for accessing whether the prompt is set to be shown.
Returns:
true if the prompt will show false otherwise.
*/
bool showPrompt() @property const
{
return showPrompt_;
}
private:
bool keepProcessing_ = true;
string promptMsg_;
ShowPrompt showPrompt_;
string[string] validCommands_;
size_t defaultCommandsCount_;
Thread thread_;
Callback!OnCommandDelegate onCommand_;
Callback!OnInvalidCommandDelegate onInvalidCommand_;
Callback!VoidDelegate onEnterProcessCommands_;
Callback!VoidDelegate onExitProcessCommands_;
}
alias CommandProcessor = CommandLoop;
/**
Pauses the program until the enter key is pressed
Params:
msg = The message to display.
*/
void pause(const string msg = "Press enter/return to continue...")
{
write(msg);
getchar();
}
/**
Clears the terminal of all output.
*/
void clear()
{
version(linux)
{
write("\x1B[2J\x1B[H");
}
version(windows)
{
// call cls
}
}
/**
Display a prompt that contains a yes(Y/y) or no instruction.
*/
bool confirmationPrompt(string msg = "Do you wish to continue(y/n): ")
{
write(msg);
immutable auto answer = readln();
if(answer.front == 'Y' || answer.front == 'y')
{
return true;
}
return false;
}
|
D
|
/**
* 微信摇一摇周边-摇一摇红包-红包查询接口
* GET请求
*
*
*/
module hunt.wechat.bean.shakearound.lottery.querylottery;
public import hunt.wechat.bean.shakearound.lottery.querylottery.LotteryQueryLotteryResult;
public import hunt.wechat.bean.shakearound.lottery.querylottery.LotteryQueryLotteryResultResult;
|
D
|
/*
TEST_OUTPUT:
---
fail_compilation/fail12236.d(16): Error: forward reference to inferred return type of function 'f1'
fail_compilation/fail12236.d(16): while evaluating `pragma(msg, f1.mangleof)`
fail_compilation/fail12236.d(21): Error: forward reference to inferred return type of function 'f2'
fail_compilation/fail12236.d(21): while evaluating `pragma(msg, f2(T)(T).mangleof)`
fail_compilation/fail12236.d(27): Error: template instance fail12236.f2!int error instantiating
fail_compilation/fail12236.d(31): Error: forward reference to inferred return type of function '__lambda1'
fail_compilation/fail12236.d(31): while evaluating `pragma(msg, __lambda1.mangleof)`
---
*/
auto f1(int)
{
pragma(msg, f1.mangleof); // forward reference error
}
auto f2(T)(T)
{
pragma(msg, f2.mangleof); // error <- weird output: "v"
}
void main()
{
f1(1);
f2(1);
(a) {
int x;
pragma(msg, __traits(parent, x).mangleof);
} (1);
}
|
D
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.